:root {
  --pink: #ff6fa5;
  --purple: #7c5cff;
  --gold: #ffc857;
  --mint: #4fd8b8;
  --ink: #3a2e52;
  --card-bg: #fffaf5;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Quicksand', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #ffd6e8 0%, #ffe6c7 35%, #d9c9ff 70%, #c6f2e7 100%);
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- floating decorations ---------- */

.floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floater {
  position: absolute;
  bottom: -10%;
  font-size: 2.4rem;
  opacity: 0.85;
  animation-name: floatUp;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08));
}

@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.9; }
  100% { transform: translateY(-115vh) translateX(var(--drift, 30px)) rotate(20deg); opacity: 0; }
}

/* ---------- layout helpers ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

/* ---------- headline ---------- */

.title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2rem, 7vw, 3.4rem);
  color: var(--purple);
  margin: 0 0 4px;
  text-shadow: 0 3px 0 rgba(255,255,255,0.6);
}

.subtitle {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 700;
  color: var(--pink);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold), #ff9f43);
  color: #fff;
  font-size: 2.4rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(255, 159, 67, 0.4);
  margin-bottom: 18px;
}

/* ---------- card ---------- */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 45px rgba(90, 50, 120, 0.18);
  padding: 36px 28px;
  max-width: 460px;
  width: 100%;
}

.gift-button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  padding: 16px 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 12px 24px rgba(124, 92, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gift-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 30px rgba(124, 92, 255, 0.45);
}

.gift-button:active {
  transform: translateY(0) scale(0.98);
}

.message-box {
  display: none;
  text-align: left;
  margin-top: 22px;
  animation: popIn 0.5s ease;
}

.message-box.visible {
  display: block;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.message-text {
  white-space: pre-wrap;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 14px;
}

.message-from {
  text-align: right;
  font-family: 'Pacifico', cursive;
  color: var(--purple);
  font-size: 1.3rem;
  margin: 0;
}

.hint {
  font-size: 0.85rem;
  color: #9c8fb5;
  margin-top: 22px;
}

/* ---------- confetti canvas ---------- */

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

@media (max-width: 420px) {
  .card {
    padding: 26px 20px;
  }
}
