/* ================================================================
   style.css — Birthday Surprise Website
   Dreamy · Warm · Soft-glow · Cinematic
   ================================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --cream:     #fdf6f0;
  --pink:      #f9c5d1;
  --pink-deep: #e8829a;
  --lav:       #d8c5f0;
  --lav-deep:  #9b6dce;
  --blue-soft: #c5dff0;
  --gold:      #f6d365;
  --white:     #ffffff;
  --text-dark: #3a2e3a;
  --text-mid:  #6e5e6e;
  --text-soft: #9e8e9e;
  --glass-bg:  rgba(255,255,255,0.35);
  --glass-bdr: rgba(255,255,255,0.55);
  --shadow:    0 8px 32px rgba(180,120,160,0.18);
  --shadow-lg: 0 20px 60px rgba(180,120,160,0.22);
  --radius:    20px;
  --radius-lg: 32px;
  --ff-display:'Playfair Display', Georgia, serif;
  --ff-script: 'Dancing Script', cursive;
  --ff-body:   'Lato', sans-serif;
  --ease-out:  cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ff-body);
  color: var(--text-dark);
  background: var(--cream);
  overflow-x: hidden;
  cursor: none; /* replaced by custom cursor */
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(249,197,209,0.38) 0%, transparent 60%),
    radial-gradient(ellipse 70% 80% at 85% 90%, rgba(216,197,240,0.32) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(197,223,240,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

section {
  position: relative;
  z-index: 1;
}

em { font-style: italic; }

/* ── Custom Cursor ──────────────────────────────────────────── */
.cursor-sparkle {
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,197,209,0.9) 0%, rgba(216,197,240,0.4) 60%, transparent 100%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, opacity 0.2s;
  mix-blend-mode: multiply;
}

/* Sparkle trail dots (appended by JS) */
.sparkle-dot {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  animation: sparkFade 0.6s var(--ease-out) forwards;
}

@keyframes sparkFade {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(0.1); }
}

/* ── Particle Canvas ────────────────────────────────────────── */
.particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Loading Screen ─────────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #fff0f5 0%, #f5f0ff 50%, #f0f5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-inner {
  text-align: center;
  max-width: 340px;
}

.loading-petals {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.loading-petals .petal {
  font-size: 2rem;
  animation: petalBounce 1.4s ease-in-out infinite;
}

.loading-petals .petal:nth-child(1) { animation-delay: 0s; }
.loading-petals .petal:nth-child(2) { animation-delay: 0.18s; }
.loading-petals .petal:nth-child(3) { animation-delay: 0.36s; }
.loading-petals .petal:nth-child(4) { animation-delay: 0.54s; }
.loading-petals .petal:nth-child(5) { animation-delay: 0.72s; }

@keyframes petalBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-12px) scale(1.15); }
}

.loading-text {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 24px;
  font-style: italic;
}

.loading-text strong { color: var(--pink-deep); }

.loading-bar-wrap {
  height: 4px;
  background: rgba(249,197,209,0.3);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.loading-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink), var(--lav), var(--blue-soft));
  transition: width 0.1s linear;
}

.loading-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
  letter-spacing: 0.05em;
}

/* ── Music Button ───────────────────────────────────────────── */
.music-btn {
  position: fixed;
  top: 20px; right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-bdr);
  border-radius: 99px;
  padding: 8px 16px 8px 12px;
  cursor: pointer;
  z-index: 1000;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  color: var(--text-mid);
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.music-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.music-icon { font-size: 1rem; }

/* ── Shared Section Styles ──────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink-deep);
  background: rgba(249,197,209,0.2);
  border: 1px solid rgba(249,197,209,0.4);
  border-radius: 99px;
  padding: 5px 14px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 48px;
}

.section-title em {
  color: var(--pink-deep);
  font-style: italic;
}

/* ── Reveal animation (triggered by IntersectionObserver) ───── */
.reveal-item {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   SECTION 1 — HERO
================================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  animation: heroFadeIn 1.4s var(--ease-out) both;
  animation-delay: 0.5s;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-date {
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: 16px;
  font-weight: 300;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--text-dark);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-title em {
  display: block;
  color: var(--pink-deep);
  font-style: italic;
}

.hero-subtitle {
  font-family: var(--ff-display);
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: var(--text-mid);
  font-style: italic;
  min-height: 2em;
  margin-bottom: 48px;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--pink-deep);
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.scroll-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s, transform 0.2s;
  animation: ctaBob 2.5s ease-in-out infinite;
}

.scroll-cta:hover { color: var(--pink-deep); transform: translateY(-4px); }
.scroll-cta svg { width: 20px; height: 20px; }

@keyframes ctaBob {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Decorative blurred circles */
.hero-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.decor-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}

.c1 { width: 400px; height: 400px; background: var(--pink);      top: -100px;  left: -120px; }
.c2 { width: 350px; height: 350px; background: var(--lav);       bottom: -80px; right: -100px; }
.c3 { width: 280px; height: 280px; background: var(--blue-soft); top: 40%;     left: 55%; }

/* ================================================================
   SECTION 2 — COUNTDOWN
================================================================ */
.countdown-section {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(249,197,209,0.08) 40%, transparent);
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.countdown-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 24px 32px;
  min-width: 100px;
  box-shadow: var(--shadow);
}

.count-num {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  color: var(--pink-deep);
  line-height: 1;
  margin-bottom: 8px;
  transition: transform 0.2s var(--ease-out);
}

.count-num.bump { transform: scale(1.15); }

.count-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.countdown-sep {
  font-family: var(--ff-display);
  font-size: 3rem;
  color: var(--pink);
  line-height: 1;
  margin-top: -12px;
}

.countdown-msg {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--text-mid);
  font-size: 1.1rem;
}

.birthday-today-msg {
  text-align: center;
  padding: 40px;
}

.birthday-today-msg .big-emoji { font-size: 4rem; margin-bottom: 16px; }
.birthday-today-msg h3 { font-family: var(--ff-display); font-size: 2rem; color: var(--pink-deep); margin-bottom: 12px; }
.birthday-today-msg p  { font-size: 1.2rem; color: var(--text-mid); }

/* ================================================================
   SECTION 3 — GALLERY (Polaroid)
================================================================ */
.gallery-section {
  padding: 100px 24px;
  text-align: center;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.polaroid {
  background: #fff;
  padding: 14px 14px 40px;
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  cursor: default;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.05) translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  z-index: 10;
}

.polaroid-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-real-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-emoji { font-size: 3rem; }

.polaroid-caption {
  font-family: var(--ff-script);
  font-size: 0.95rem;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.3;
}

/* ================================================================
   SECTION 4 — REASONS
================================================================ */
.reasons-section {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(216,197,240,0.08) 40%, transparent);
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.reason-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  overflow: hidden;
}

.reason-card::before {
  content: attr(data-num);
  position: absolute;
  top: -10px; right: 16px;
  font-family: var(--ff-display);
  font-size: 5rem;
  font-weight: 600;
  color: rgba(249,197,209,0.25);
  line-height: 1;
  pointer-events: none;
}

.reason-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.reason-icon { font-size: 2rem; margin-bottom: 14px; display: block; }

.reason-card h3 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.reason-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-mid);
  font-weight: 300;
}

/* ================================================================
   SECTION 5 — TIMELINE
================================================================ */
.timeline-section {
  padding: 100px 24px;
  text-align: center;
}

.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, var(--pink), var(--lav), var(--blue-soft));
  transform: translateX(-50%);
  border-radius: 1px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
  position: relative;
}

.timeline-item.left  { flex-direction: row-reverse; }
.timeline-item.right { flex-direction: row; }

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  background: var(--white);
  border: 2px solid var(--pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  z-index: 2;
  flex-shrink: 0;
}

.timeline-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 22px 24px;
  width: calc(50% - 44px);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease-out);
}

.timeline-card:hover { transform: translateY(-4px); }

.tl-date {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink-deep);
  font-weight: 400;
  display: block;
  margin-bottom: 8px;
}

.timeline-card h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.timeline-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-mid);
  font-weight: 300;
}

/* ================================================================
   SECTION 6 — PLAYLIST
================================================================ */
.playlist-section {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(197,223,240,0.1) 40%, transparent);
}

.playlist-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.playlist-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-bdr);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease-out), background 0.2s;
  cursor: default;
  position: relative;
}

.playlist-item:hover {
  transform: translateX(6px);
  background: rgba(255,255,255,0.5);
}

.pl-num {
  font-family: var(--ff-display);
  font-size: 0.8rem;
  color: var(--pink-deep);
  font-style: italic;
}

.pl-info { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.pl-info strong { font-size: 0.95rem; color: var(--text-dark); font-weight: 400; }
.pl-info small  { font-size: 0.76rem; color: var(--text-soft); }

.pl-duration { font-size: 0.78rem; color: var(--text-soft); white-space: nowrap; }

.pl-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(249,197,209,0.2);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.pl-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--lav));
  border-radius: 1px;
}

/* ================================================================
   SECTION 7 — CAKE + MINI GAME
================================================================ */
.cake-section {
  padding: 100px 24px;
  text-align: center;
}

.cake-container {
  max-width: 360px;
  margin: 0 auto 40px;
}

/* ── Cake ─────────────────────────────────────────────────── */
.cake-interactive {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Candles */
.candle-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 0;
  position: relative;
  z-index: 3;
}

.candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.candle:hover { transform: scale(1.05); }

.flame {
  width: 14px; height: 22px;
  background: radial-gradient(ellipse at 50% 80%, #ffe066 0%, #ffa500 50%, #ff4400 100%);
  border-radius: 50% 50% 40% 40%;
  box-shadow: 0 0 12px 4px rgba(255,180,0,0.5);
  animation: flameFlicker 0.3s ease-in-out infinite alternate;
  transform-origin: bottom center;
  transition: opacity 0.4s, height 0.4s;
}

.flame.out {
  opacity: 0;
  height: 0;
  animation: none;
}

@keyframes flameFlicker {
  0%   { transform: scaleX(1)    scaleY(1)    rotate(-2deg); }
  100% { transform: scaleX(0.85) scaleY(1.1)  rotate(2deg); }
}

.candle-body {
  width: 14px; height: 50px;
  border-radius: 4px;
  margin-top: 2px;
}

.c-pink { background: linear-gradient(180deg, #f9c5d1, #e8829a); }
.c-lav  { background: linear-gradient(180deg, #d8c5f0, #9b6dce); }
.c-blue { background: linear-gradient(180deg, #c5dff0, #6aabcf); }

/* Cake tiers */
.cake-tier {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  position: relative;
}

.tier-top {
  width: 60%;
  height: 60px;
  background: linear-gradient(135deg, #fde2e8, #f9c5d1);
  border-radius: 12px 12px 0 0;
  z-index: 2;
  border: 2px solid #f9c5d1;
}

.tier-mid {
  width: 80%;
  height: 80px;
  background: linear-gradient(135deg, #f0d6f5, #d8c5f0);
  z-index: 2;
  border: 2px solid #d8c5f0;
  margin-top: -4px;
}

.tier-bot {
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #ddeeff, #c5dff0);
  border-radius: 0 0 12px 12px;
  z-index: 2;
  border: 2px solid #c5dff0;
  margin-top: -4px;
}

.cake-deco { font-size: 1.3rem; }

.cake-text {
  font-family: var(--ff-script);
  font-size: 1.2rem;
  color: var(--lav-deep);
}

.cake-plate {
  width: 110%;
  height: 16px;
  background: linear-gradient(135deg, #e8d5c0, #d4b896);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  margin-top: -2px;
}

.cake-hint {
  margin-top: 24px;
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--text-mid);
  font-size: 1rem;
}

.cake-wish {
  margin-top: 16px;
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--pink-deep);
  animation: wishPulse 1.5s ease-in-out infinite;
}

@keyframes wishPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.04); }
}

.hidden { display: none !important; }

/* ── Mini Game ────────────────────────────────────────────── */
.minigame-wrap { max-width: 500px; margin: 0 auto; }

.minigame-title {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.minigame-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.minigame-board {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-bdr);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.mg-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-display);
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.mg-start-btn {
  display: block;
  margin: 60px auto 0;
  background: linear-gradient(135deg, var(--pink), var(--lav));
  color: white;
  border: none;
  border-radius: 99px;
  padding: 14px 32px;
  font-family: var(--ff-display);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(232,130,154,0.35);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.mg-start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(232,130,154,0.45);
}

/* Falling heart (spawned by JS) */
.mg-heart {
  position: absolute;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  animation: heartFall linear forwards;
  transition: transform 0.1s;
  z-index: 5;
}

.mg-heart:hover { transform: scale(1.2); }

@keyframes heartFall {
  from { top: -40px; opacity: 1; }
  to   { top: 110%;  opacity: 0.3; }
}

.mg-end-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  font-family: var(--ff-display);
  z-index: 10;
}

.mg-end-msg h4 { font-size: 1.8rem; color: var(--pink-deep); margin-bottom: 8px; }
.mg-end-msg p  { color: var(--text-mid); margin-bottom: 20px; }

/* ================================================================
   SECTION 8 — SURPRISE
================================================================ */
.surprise-section {
  padding: 100px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(249,197,209,0.1) 50%, transparent);
}

.surprise-hint {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--text-mid);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.surprise-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav-deep));
  color: white;
  border: none;
  border-radius: 99px;
  padding: 18px 48px;
  font-family: var(--ff-display);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(232,130,154,0.4);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  overflow: hidden;
}

.surprise-btn:hover {
  transform: scale(1.06) translateY(-3px);
  box-shadow: 0 20px 50px rgba(232,130,154,0.5);
}

.btn-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  animation: glowSpin 3s linear infinite;
}

@keyframes glowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hidden Birthday Message */
.hidden-message {
  display: none;
  max-width: 600px;
  margin: 48px auto 0;
  animation: messageReveal 0.8s var(--ease-out) both;
}

.hidden-message.show { display: block; }

@keyframes messageReveal {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-inner {
  background: linear-gradient(135deg, rgba(255,248,252,0.9), rgba(248,248,255,0.9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: 0 24px 80px rgba(200,130,160,0.2);
  text-align: left;
}

.msg-top { font-size: 2.5rem; text-align: center; margin-bottom: 20px; display: block; }

.msg-inner h3 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 28px;
}

.msg-inner p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 16px;
  font-weight: 300;
}

.msg-sign {
  text-align: right;
  font-family: var(--ff-script);
  font-size: 1.15rem;
  color: var(--pink-deep);
  margin-top: 28px !important;
  border-top: 1px solid rgba(249,197,209,0.4);
  padding-top: 20px;
}

/* ================================================================
   SECTION 9 — ENDING
================================================================ */
.ending-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1025 0%, #2a1535 40%, #1a0e28 100%);
}

.ending-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ending-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
}

.ending-title {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 600;
  line-height: 1.1;
  color: rgba(255,255,255,0.92);
  margin-bottom: 28px;
}

.ending-title em {
  display: block;
  color: #f9c5d1;
  font-style: italic;
}

.ending-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  max-width: 480px;
  margin: 0 auto 40px;
  font-weight: 300;
}

.ending-hearts {
  font-size: 2.5rem;
  animation: heartBeat 1.4s ease-in-out infinite;
  display: block;
  margin-bottom: 32px;
}

@keyframes heartBeat {
  0%,100% { transform: scale(1); }
  15%      { transform: scale(1.2); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.15); }
}

.ending-credit {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* ================================================================
   FLOATING HEARTS (click effect)
================================================================ */
.click-heart {
  position: fixed;
  pointer-events: none;
  font-size: 1.5rem;
  z-index: 8000;
  animation: floatUp 1.2s var(--ease-out) forwards;
  user-select: none;
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-120px) scale(0.4) rotate(20deg); }
}

/* ================================================================
   CONFETTI
================================================================ */
.confetti-piece {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9000;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ================================================================
   RESPONSIVE — MOBILE
================================================================ */
@media (max-width: 640px) {
  .countdown-cell { padding: 16px 20px; min-width: 68px; }
  .count-num { font-size: 2rem; }
  .countdown-sep { font-size: 2rem; margin-top: -6px; }

  .polaroid-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Linearize timeline on mobile */
  .timeline::before { left: 20px; }
  .timeline-item.left,
  .timeline-item.right { flex-direction: row; }
  .timeline-dot { left: 20px; }
  .timeline-card { width: calc(100% - 60px); margin-left: 56px; }

  .reasons-grid { grid-template-columns: 1fr; }

  .msg-inner { padding: 32px 22px; }

  .music-btn { top: 12px; right: 12px; padding: 6px 12px 6px 10px; }

  .hero-title { font-size: clamp(3rem, 16vw, 5rem); }
}

@media (max-width: 380px) {
  .countdown-grid { gap: 6px; }
  .countdown-cell { padding: 14px 14px; min-width: 58px; }
  .count-num { font-size: 1.6rem; }
}

/* ================================================================
   SCROLLBAR (Webkit)
================================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(249,197,209,0.5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink); }