/* ==========================================================================
   CUTE PASTEL BIRTHDAY — MASTER STYLESHEET
   Vanvi Moments Luxury Digital Gifting Engine
   ========================================================================== */

:root {
  /* Default Theme: Rose Pastel */
  --theme-bg-gradient: radial-gradient(circle at 50% 0%, #ffe8f2 0%, #fff0f7 45%, #fffafc 100%);
  --theme-primary: #ff6da8;
  --theme-primary-hover: #ff4785;
  --theme-primary-glow: rgba(255, 109, 168, 0.45);
  --theme-secondary: #fed7aa;
  --theme-lavender: #e9d5ff;
  --theme-blue: #bae6fd;
  --theme-cream: #fffdfa;
  --theme-white: #ffffff;
  --theme-card-bg: rgba(255, 255, 255, 0.92);
  --theme-border: rgba(255, 120, 175, 0.28);
  --theme-gold: #f59e0b;
  --theme-gold-glow: rgba(245, 158, 11, 0.35);
  --theme-text-main: #3b182e;
  --theme-text-muted: #8b5a79;
  --theme-text-light: #b084a1;
  --shadow-clay: 0 14px 34px rgba(255, 109, 168, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03), inset 0 2px 3px #ffffff, inset 0 -2px 3px rgba(255, 120, 175, 0.15);
  --shadow-clay-btn: 0 8px 22px -2px rgba(255, 109, 168, 0.45), inset 0 2.5px 3px rgba(255, 255, 255, 0.95), inset 0 -2.5px 3.5px rgba(200, 20, 90, 0.45);
  --font-display: 'Caveat', cursive, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Palette 2: Lavender Dream */
[data-theme="lavender"] {
  --theme-bg-gradient: radial-gradient(circle at 50% 0%, #f3e8ff 0%, #f5f0ff 45%, #faf8ff 100%);
  --theme-primary: #c084fc;
  --theme-primary-hover: #a855f7;
  --theme-primary-glow: rgba(192, 132, 252, 0.45);
  --theme-secondary: #fbcfe8;
  --theme-border: rgba(192, 132, 252, 0.32);
  --theme-text-main: #2e1065;
  --theme-text-muted: #6b21a8;
  --shadow-clay-btn: 0 8px 22px -2px rgba(192, 132, 252, 0.45), inset 0 2.5px 3px rgba(255, 255, 255, 0.95), inset 0 -2.5px 3.5px rgba(126, 34, 206, 0.45);
}

/* Palette 3: Peach Bloom */
[data-theme="peach"] {
  --theme-bg-gradient: radial-gradient(circle at 50% 0%, #ffedd5 0%, #fff7ed 45%, #fffdfa 100%);
  --theme-primary: #fb923c;
  --theme-primary-hover: #ea580c;
  --theme-primary-glow: rgba(251, 146, 60, 0.45);
  --theme-secondary: #fed7aa;
  --theme-border: rgba(251, 146, 60, 0.32);
  --theme-text-main: #431407;
  --theme-text-muted: #9a3412;
  --shadow-clay-btn: 0 8px 22px -2px rgba(251, 146, 60, 0.45), inset 0 2.5px 3px rgba(255, 255, 255, 0.95), inset 0 -2.5px 3.5px rgba(194, 65, 12, 0.45);
}

/* Palette 4: Baby Blue */
[data-theme="blue"] {
  --theme-bg-gradient: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #f0f9ff 45%, #f8fcff 100%);
  --theme-primary: #60a5fa;
  --theme-primary-hover: #3b82f6;
  --theme-primary-glow: rgba(96, 165, 250, 0.45);
  --theme-secondary: #bae6fd;
  --theme-border: rgba(96, 165, 250, 0.32);
  --theme-text-main: #172554;
  --theme-text-muted: #1e40af;
  --shadow-clay-btn: 0 8px 22px -2px rgba(96, 165, 250, 0.45), inset 0 2.5px 3px rgba(255, 255, 255, 0.95), inset 0 -2.5px 3.5px rgba(29, 78, 216, 0.45);
}

/* Palette 5: Cotton Candy Duo */
[data-theme="cotton-candy"] {
  --theme-bg-gradient: radial-gradient(circle at 50% 0%, #fce7f3 0%, #e0f2fe 50%, #fdf4ff 100%);
  --theme-primary: #f472b6;
  --theme-primary-hover: #ec4899;
  --theme-primary-glow: rgba(244, 114, 182, 0.45);
  --theme-secondary: #7dd3fc;
  --theme-border: rgba(244, 114, 182, 0.32);
  --theme-text-main: #3b0764;
  --theme-text-muted: #86198f;
  --shadow-clay-btn: 0 8px 22px -2px rgba(244, 114, 182, 0.45), inset 0 2.5px 3px rgba(255, 255, 255, 0.95), inset 0 -2.5px 3.5px rgba(190, 24, 93, 0.45);
}

/* Palette 6: Cream & Blush Champagne */
[data-theme="cream"] {
  --theme-bg-gradient: radial-gradient(circle at 50% 0%, #fef3c7 0%, #fffbeb 45%, #fffdf5 100%);
  --theme-primary: #f59e0b;
  --theme-primary-hover: #d97706;
  --theme-primary-glow: rgba(245, 158, 11, 0.45);
  --theme-secondary: #fde68a;
  --theme-border: rgba(245, 158, 11, 0.32);
  --theme-text-main: #451a03;
  --theme-text-muted: #92400e;
  --shadow-clay-btn: 0 8px 22px -2px rgba(245, 158, 11, 0.45), inset 0 2.5px 3px rgba(255, 255, 255, 0.95), inset 0 -2.5px 3.5px rgba(180, 83, 9, 0.45);
}

/* -------------------------------------------------------------
   RESET & GLOBAL SETUP
   ------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--theme-bg-gradient);
  background-attachment: fixed;
  color: var(--theme-text-main);
  font-family: var(--font-sans);
  overflow-x: hidden !important;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Canvases */
#ambientCanvas,
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#confettiCanvas {
  z-index: 1000;
}

/* App Wrap */
.gift-app-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  padding: 0 16px 120px;
}

@media (min-width: 1024px) {
  .gift-app-container {
    max-width: 860px;
  }
}

/* -------------------------------------------------------------
   INTRO / LOADING SCREEN (1-2s Soft Fade)
   ------------------------------------------------------------- */
.intro-loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--theme-bg-gradient);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.intro-loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-sparkle-logo {
  font-size: 38px;
  margin-bottom: 12px;
  animation: introPulse 1.8s infinite ease-in-out;
}

@keyframes introPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px var(--theme-primary-glow)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 22px var(--theme-primary-glow)); }
}

.intro-brand-title {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--theme-primary);
  font-weight: 800;
  margin-bottom: 8px;
}

.intro-tagline {
  font-size: 14.5px;
  color: var(--theme-text-muted);
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

.intro-progress-bar {
  width: 180px;
  height: 6px;
  background: rgba(255, 120, 175, 0.2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.intro-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary));
  border-radius: 99px;
  animation: loadProgress 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes loadProgress {
  0% { width: 5%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* -------------------------------------------------------------
   REUSABLE 3D CLAY CARDS & BUTTONS
   ------------------------------------------------------------- */
.clay-card {
  background: var(--theme-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--theme-border);
  border-radius: 28px;
  box-shadow: var(--shadow-clay);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.clay-card:hover {
  transform: translateY(-2px);
}

.section-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.2px solid var(--theme-border);
  color: var(--theme-primary);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 800;
  color: var(--theme-text-main);
  line-height: 1.2;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 13.5px;
  color: var(--theme-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Flowing Tactile Button (Option #4) */
@keyframes clueButtonFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-tactile-primary {
  padding: 13px 26px;
  border-radius: 999px;
  background: linear-gradient(125deg, #ff6da8 0%, #ff85b8 20%, #c084fc 45%, #60a5fa 70%, #fb923c 85%, #ff6da8 100%) !important;
  background-size: 280% 280% !important;
  animation: clueButtonFlow 6s ease-in-out infinite !important;
  color: #ffffff !important;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: var(--shadow-clay-btn);
  text-shadow: 0 1px 2px rgba(180, 18, 60, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  white-space: nowrap;
}

.btn-tactile-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px -2px rgba(255, 109, 168, 0.55), inset 0 3px 4px #ffffff;
}

.btn-tactile-primary:active {
  transform: translateY(2px) scale(0.98);
}

.btn-tactile-secondary {
  padding: 11px 22px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid var(--theme-border);
  color: var(--theme-primary);
  font-weight: 850;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 2px #fff;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.btn-tactile-secondary:hover {
  background: #fff5f8;
  border-color: var(--theme-primary);
  transform: translateY(-1.5px);
}

/* -------------------------------------------------------------
   SECTION 1 — HERO
   ------------------------------------------------------------- */
.hero-section {
  padding: 30px 16px 20px;
  text-align: center;
  position: relative;
}

.hero-balloons-cluster {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.balloon-item {
  position: absolute;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  animation: floatBalloon 6s ease-in-out infinite alternate;
}

.b-pink { width: 52px; height: 64px; background: radial-gradient(circle at 35% 35%, #ffd1e4, #ff85b8); top: 12px; left: 10px; animation-duration: 5s; }
.b-lavender { width: 44px; height: 56px; background: radial-gradient(circle at 35% 35%, #f3e8ff, #c084fc); top: 25px; right: 18px; animation-duration: 6.5s; animation-delay: -1s; }
.b-peach { width: 48px; height: 60px; background: radial-gradient(circle at 35% 35%, #fed7aa, #fb923c); top: 90px; left: -10px; animation-duration: 7s; animation-delay: -2s; }
.b-blue { width: 40px; height: 52px; background: radial-gradient(circle at 35% 35%, #e0f2fe, #60a5fa); top: 100px; right: -6px; animation-duration: 5.5s; animation-delay: -3s; }

@keyframes floatBalloon {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-16px) rotate(4deg); }
}

.hero-card {
  padding: 32px 20px 28px;
  margin-top: 14px;
}

.hero-mascot-img {
  width: clamp(140px, 32vw, 190px);
  height: clamp(140px, 32vw, 190px);
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 30px var(--theme-primary-glow), inset 0 2px 4px rgba(255,255,255,0.8);
  animation: mascotHover 4s ease-in-out infinite alternate;
}

@keyframes mascotHover {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.02); }
}

.hero-bday-tag {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 36px);
  color: var(--theme-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-recipient-name {
  font-family: var(--font-serif);
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 900;
  color: var(--theme-text-main);
  line-height: 1.1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--theme-text-main) 0%, var(--theme-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-emotional-subtitle {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--theme-text-muted);
  max-width: 440px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.hero-scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--theme-text-light);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
  animation: bounceCue 2s infinite ease-in-out;
}

@keyframes bounceCue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* -------------------------------------------------------------
   SECTION 2 — 3D GIFT REVEAL (Realistic 3D Opening & Unwrapping)
   ------------------------------------------------------------- */
.gift-section {
  padding: 24px 0;
  text-align: center;
}

.gift-card {
  padding: 34px 20px 28px;
}

.gift-box-wrapper {
  position: relative;
  width: clamp(190px, 42vw, 240px);
  height: clamp(190px, 42vw, 240px);
  margin: 0 auto 20px;
  cursor: pointer;
  perspective: 1000px;
  user-select: none;
}

.gift-box-3d-scene {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-box-wrapper:hover .gift-box-3d-scene {
  transform: rotateX(8deg) rotateY(-8deg) scale(1.05);
}

.gift-box-wrapper:active .gift-box-3d-scene {
  transform: scale(0.97);
}

.gift-box-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px var(--theme-primary-glow));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

/* 3D Lid & Ribbon Assembly */
.gift-lid-assembly {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 10;
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.gift-ribbon-bow {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 38px;
  filter: drop-shadow(0 6px 14px rgba(255, 109, 168, 0.6));
  animation: bowGlowPulse 2.5s infinite alternate ease-in-out;
}

@keyframes bowGlowPulse {
  0% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 4px 10px rgba(255, 109, 168, 0.5)); }
  100% { transform: translateX(-50%) scale(1.08); filter: drop-shadow(0 8px 18px rgba(255, 109, 168, 0.8)); }
}

.gift-tag-pendant {
  position: absolute;
  top: 36%;
  right: 12%;
  background: #ffffff;
  border: 1.5px solid var(--theme-primary);
  color: var(--theme-text-main);
  font-size: 11px;
  font-weight: 850;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 109, 168, 0.25);
  transform: rotate(10deg);
  white-space: nowrap;
  animation: tagFloat 3s infinite alternate ease-in-out;
}

@keyframes tagFloat {
  0% { transform: rotate(8deg) translateY(0); }
  100% { transform: rotate(14deg) translateY(-3px); }
}

/* Golden Light Rays burst */
.gift-light-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, rgba(254, 240, 138, 0.9) 0%, rgba(245, 158, 11, 0.6) 45%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating Sparks */
.gift-floating-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.g-spark {
  position: absolute;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.g-s1 { top: 40%; left: 10%; font-size: 20px; }
.g-s2 { top: 20%; right: 15%; font-size: 22px; }
.g-s3 { top: 15%; left: 45%; font-size: 24px; }
.g-s4 { bottom: 25%; left: 8%; font-size: 22px; }
.g-s5 { bottom: 30%; right: 10%; font-size: 20px; }

/* Surprise Keepsake Token */
.gift-surprise-token {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(0.5);
  background: linear-gradient(135deg, #ffffff, #fff0f7);
  border: 2px solid var(--theme-gold);
  border-radius: 999px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 850;
  color: var(--theme-text-main);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
  opacity: 0;
  z-index: 12;
  pointer-events: none;
  transition: all 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* OPENED 3D STATE */
.gift-box-wrapper.opened .gift-lid-assembly {
  transform: translateY(-90px) rotateX(45deg) rotateZ(-15deg) scale(1.1);
  opacity: 0.85;
}

.gift-box-wrapper.opened .gift-box-img {
  transform: scale(1.08);
  filter: drop-shadow(0 18px 36px var(--theme-gold-glow));
}

.gift-box-wrapper.opened .gift-light-burst {
  transform: translate(-50%, -50%) scale(1.3);
  opacity: 0.85;
  animation: burstRaysPulse 3s infinite alternate ease-in-out;
}

@keyframes burstRaysPulse {
  0% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.95; }
}

.gift-box-wrapper.opened .g-spark {
  opacity: 1;
}
.gift-box-wrapper.opened .g-s1 { transform: translateY(-35px) scale(1.1); }
.gift-box-wrapper.opened .g-s2 { transform: translateY(-45px) scale(1.2); }
.gift-box-wrapper.opened .g-s3 { transform: translateY(-55px) scale(1.3); }
.gift-box-wrapper.opened .g-s4 { transform: translateY(-30px) scale(1.1); }
.gift-box-wrapper.opened .g-s5 { transform: translateY(-40px) scale(1.15); }

.gift-box-wrapper.opened .gift-surprise-token {
  transform: translateX(-50%) translateY(-35px) scale(1);
  opacity: 1;
}

.gift-revealed-content {
  display: none;
  animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.98), rgba(254, 243, 199, 0.95));
  border: 2px solid var(--theme-gold);
  border-radius: 24px;
  padding: 22px;
  margin-top: 20px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.18);
}

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

/* -------------------------------------------------------------
   SECTION 3 — BIRTHDAY COUNTDOWN
   ------------------------------------------------------------- */
.countdown-section {
  padding: 20px 0;
  text-align: center;
}

.countdown-card {
  padding: 26px 16px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.5vw, 14px);
  margin-top: 14px;
}

.countdown-pill {
  background: #ffffff;
  border: 1.5px solid var(--theme-border);
  border-radius: 18px;
  padding: 12px 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.03), inset 0 1px 2px #fff;
  transition: transform 0.2s ease;
}

.countdown-pill:hover {
  transform: translateY(-2px);
  border-color: var(--theme-primary);
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  color: var(--theme-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.countdown-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--theme-text-muted);
  letter-spacing: 0.6px;
}

/* -------------------------------------------------------------
   SECTION 4 — 3D CAKE CELEBRATION (Interactive Real 3D Cake & Wish)
   ------------------------------------------------------------- */
.cake-section {
  padding: 24px 0;
  text-align: center;
}

.cake-card {
  padding: 32px 20px 28px;
}

.cake-stage {
  position: relative;
  width: clamp(230px, 48vw, 300px);
  margin: 0 auto 24px;
  perspective: 1000px;
  user-select: none;
}

.cake-3d-wrapper {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  animation: cakeFloat3D 5s infinite ease-in-out alternate;
}

@keyframes cakeFloat3D {
  0% { transform: translateY(0) rotateX(4deg); }
  100% { transform: translateY(-8px) rotateX(7deg) rotateY(2deg); }
}

.cake-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  filter: drop-shadow(0 18px 36px rgba(255, 109, 168, 0.3));
  transition: filter 0.5s ease;
}

.cake-pedestal-glow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 109, 168, 0.5) 0%, transparent 70%);
  filter: blur(8px);
  z-index: 1;
}

/* 3D Animated Candles Array */
.cake-candles-array {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: clamp(24px, 6vw, 38px);
  z-index: 10;
  pointer-events: none;
}

.cake-candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.candle-1 { transform: translateY(6px); }
.candle-2 { transform: translateY(0); }
.candle-3 { transform: translateY(6px); }

.candle-body {
  width: 10px;
  height: 38px;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, #fef08a, #fef08a 6px, #f472b6 6px, #f472b6 12px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 1px 2px #fff;
}

.candle-wick {
  width: 2px;
  height: 7px;
  background: #3b182e;
  margin-bottom: -1px;
}

.candle-flame-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle-flame {
  width: 14px;
  height: 22px;
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 80%, #ffffff 15%, #fde047 40%, #ea580c 85%);
  box-shadow: 0 0 16px #f59e0b, 0 0 32px rgba(245, 158, 11, 0.7);
  animation: realisticFlameFlicker 1.4s infinite alternate ease-in-out;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.candle-1 .candle-flame { animation-delay: -0.3s; }
.candle-2 .candle-flame { animation-delay: -0.7s; }
.candle-3 .candle-flame { animation-delay: -1.1s; }

@keyframes realisticFlameFlicker {
  0% { transform: scale(0.95) rotate(-2deg); }
  25% { transform: scale(1.05) rotate(2deg); }
  50% { transform: scale(0.98) rotate(-1deg); }
  75% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.candle-glow-aura {
  position: absolute;
  top: -14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(254, 240, 138, 0.7) 0%, transparent 75%);
  filter: blur(5px);
  pointer-events: none;
  animation: auraPulse 1.6s infinite alternate ease-in-out;
}

@keyframes auraPulse {
  0% { opacity: 0.6; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.15); }
}

/* Smoke wisps on candle blow */
.candle-smoke {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(3px);
  opacity: 0;
  pointer-events: none;
}

/* Floating sugar sparkles around cake */
.cake-floating-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}

.c-spark {
  position: absolute;
  animation: sparkOrbit 4s infinite ease-in-out alternate;
}
.cs-1 { top: 20%; left: 8%; font-size: 18px; animation-duration: 3.5s; }
.cs-2 { top: 45%; right: 6%; font-size: 20px; animation-duration: 4.5s; animation-delay: -1.5s; }
.cs-3 { bottom: 25%; left: 12%; font-size: 18px; animation-duration: 4s; animation-delay: -2s; }

@keyframes sparkOrbit {
  0% { transform: translateY(0) scale(0.9); opacity: 0.6; }
  100% { transform: translateY(-12px) scale(1.15); opacity: 1; }
}

/* Wish Sealed Badge */
.cake-wish-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  border: 2px solid var(--theme-gold);
  color: #451a03;
  font-size: 13px;
  font-weight: 850;
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.4);
  white-space: nowrap;
  z-index: 20;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* BLOWN STATE */
.cake-stage.blown .candle-flame {
  opacity: 0;
  transform: scale(0.1) translateY(-10px);
}

.cake-stage.blown .candle-glow-aura {
  opacity: 0;
}

.cake-stage.blown .candle-smoke {
  animation: smokePuff 2.2s forwards ease-out;
}

@keyframes smokePuff {
  0% { opacity: 0.9; transform: translateY(0) scale(1); }
  50% { opacity: 0.6; transform: translateY(-30px) scale(2.5) translateX(-8px); }
  100% { opacity: 0; transform: translateY(-60px) scale(4) translateX(12px); }
}

.cake-stage.blown .cake-wish-badge {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.cake-stage.blown .cake-img {
  filter: drop-shadow(0 14px 28px rgba(245, 158, 11, 0.35));
}

.wish-screen-dim {
  position: fixed;
  inset: 0;
  background: rgba(44, 18, 36, 0.82);
  backdrop-filter: blur(10px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.wish-screen-dim.active {
  opacity: 1;
}

/* -------------------------------------------------------------
   SECTION 5 & 6 — PHOTO MEMORY INTRO & CINEMATIC GALLERY
   ------------------------------------------------------------- */
.gallery-section {
  padding: 24px 0;
}

.gallery-card {
  padding: 28px 18px;
}

.gallery-hero-wrapper {
  margin-bottom: 20px;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border: 3px solid #ffffff;
  cursor: pointer;
}

.gallery-hero-img {
  width: 100%;
  height: clamp(260px, 48vw, 380px);
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-hero-wrapper:hover .gallery-hero-img {
  transform: scale(1.03);
}

.gallery-caption-bar {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: linear-gradient(0deg, rgba(44, 18, 36, 0.75) 0%, transparent 100%);
  color: #ffffff;
  padding: 24px 16px 12px;
  font-size: 13.5px;
  font-weight: 700;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.polaroid-card {
  background: #ffffff;
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  padding: 8px 8px 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}

.polaroid-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 0 12px 24px rgba(255, 109, 168, 0.15);
}

.polaroid-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.polaroid-caption {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--theme-text-main);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fullscreen Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 24, 0.92);
  backdrop-filter: blur(14px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 3px solid #ffffff;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

/* -------------------------------------------------------------
   SECTION 7 — MEMORY TIMELINE
   ------------------------------------------------------------- */
.timeline-section {
  padding: 24px 0;
}

.timeline-card {
  padding: 30px 20px;
}

.timeline-track {
  position: relative;
  padding-left: 24px;
  margin-top: 20px;
}

.timeline-track::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2.5px;
  background: linear-gradient(180deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
  border-radius: 99px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--theme-primary);
  box-shadow: 0 0 10px var(--theme-primary-glow);
}

.timeline-box {
  background: #ffffff;
  border: 1.5px solid var(--theme-border);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.timeline-date-tag {
  font-size: 11px;
  font-weight: 850;
  color: var(--theme-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.timeline-item-title {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--theme-text-main);
  margin-bottom: 4px;
}

.timeline-item-desc {
  font-size: 13px;
  color: var(--theme-text-muted);
  line-height: 1.45;
}

/* -------------------------------------------------------------
   SECTION 8 — BIRTHDAY LETTER
   ------------------------------------------------------------- */
.letter-section {
  padding: 24px 0;
}

.letter-card {
  padding: 32px 20px;
  text-align: center;
}

.envelope-wrapper {
  position: relative;
  width: clamp(240px, 60vw, 340px);
  margin: 0 auto 20px;
  perspective: 1000px;
}

.envelope-box {
  background: linear-gradient(145deg, #fff0f6, #ffe4ee);
  border: 2px solid var(--theme-border);
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: 0 12px 30px rgba(255, 109, 168, 0.15);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.envelope-box:hover {
  transform: translateY(-3px);
}

.envelope-seal {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #f43f5e 0%, #be123c 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.letter-paper-content {
  display: none;
  background: #fffdfa;
  border: 1.5px solid rgba(217, 119, 6, 0.25);
  border-radius: 20px;
  padding: 28px 22px;
  margin-top: 18px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.08);
  animation: slidePaperUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slidePaperUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.letter-paper-header {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--theme-primary);
  margin-bottom: 12px;
  text-align: center;
}

.letter-paper-body {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.8;
  color: var(--theme-text-main);
  margin-bottom: 18px;
  white-space: pre-line;
}

.letter-paper-signature {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--theme-primary);
  text-align: right;
}

/* -------------------------------------------------------------
   SECTION 9 — SPECIAL MEMORIES CARDS
   ------------------------------------------------------------- */
.memories-section {
  padding: 20px 0;
}

.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.memory-clay-card {
  background: #ffffff;
  border: 1.5px solid var(--theme-border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-clay);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.memory-clay-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 32px var(--theme-primary-glow);
}

.memory-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}

.memory-card-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  color: var(--theme-text-main);
  margin-bottom: 4px;
}

.memory-card-desc {
  font-size: 12.5px;
  color: var(--theme-text-muted);
  line-height: 1.4;
}

/* -------------------------------------------------------------
   SECTION 10 — SURPRISE REVEAL
   ------------------------------------------------------------- */
.surprise-section {
  padding: 24px 0;
  text-align: center;
}

.surprise-card-frosted {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 199, 0.85));
  border: 1.5px dashed var(--theme-gold);
  border-radius: 26px;
  padding: 30px 20px;
  box-shadow: 0 10px 30px var(--theme-gold-glow);
}

.surprise-hidden-message {
  display: none;
  animation: popIn 0.5s ease forwards;
  margin-top: 18px;
  padding: 18px;
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid var(--theme-gold);
}

/* -------------------------------------------------------------
   SECTION 11 — FLOATING CUTE VINYL MUSIC PLAYER
   ------------------------------------------------------------- */
.floating-music-widget {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--theme-border);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  box-shadow: 0 8px 26px rgba(255, 109, 168, 0.25);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s;
}

.floating-music-widget:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(255, 109, 168, 0.35);
}

.mini-vinyl-disc {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, #2c1224 35%, #180913 70%, #ff6da8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.mini-vinyl-disc.playing {
  animation: spinVinyl 3.5s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-widget-info {
  display: flex;
  flex-direction: column;
}

.music-widget-title {
  font-size: 11.5px;
  font-weight: 850;
  color: var(--theme-text-main);
  white-space: nowrap;
}

.music-widget-status {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--theme-primary);
  text-transform: uppercase;
}

/* -------------------------------------------------------------
   SECTION 13 & 14 — FINAL MESSAGE & CELEBRATION
   ------------------------------------------------------------- */
.final-message-section {
  padding: 30px 16px;
  text-align: center;
}

.final-card {
  padding: 36px 20px;
}

.final-chapter-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5.5vw, 40px);
  font-weight: 800;
  color: var(--theme-text-main);
  line-height: 1.2;
  margin-bottom: 8px;
}

.final-recipient-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 54px);
  color: var(--theme-primary);
  margin-bottom: 14px;
}

.final-message-text {
  font-size: 15px;
  color: var(--theme-text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 24px;
}

/* -------------------------------------------------------------
   SECTION 15 — SHARE & QR
   ------------------------------------------------------------- */
.share-section {
  padding: 24px 0 40px;
  text-align: center;
}

.share-card {
  padding: 30px 20px;
}

.share-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.share-pill-btn {
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 850;
  border: 1.5px solid var(--theme-border);
  background: #ffffff;
  color: var(--theme-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-pill-btn:hover {
  background: #fff5f8;
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  transform: translateY(-2px);
}

.share-pill-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.share-pill-whatsapp:hover {
  background: linear-gradient(135deg, #22c55e, #0f766e);
  color: #fff;
}

.qr-box-wrap {
  background: #ffffff;
  border: 1.5px dashed var(--theme-border);
  border-radius: 20px;
  padding: 18px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

#shareQrCanvas {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Toast */
.vanvi-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(59, 24, 46, 0.95);
  backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--theme-border);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  white-space: nowrap;
}

.vanvi-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* -------------------------------------------------------------
   MOBILE TWEAKS (320px–480px)
   ------------------------------------------------------------- */
@media (max-width: 480px) {
  .hero-card {
    padding: 24px 14px 20px;
  }
  .clay-card {
    border-radius: 22px;
  }
  .polaroid-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .countdown-grid {
    gap: 6px;
  }
  .countdown-pill {
    padding: 10px 4px;
  }
  .floating-music-widget {
    bottom: 18px;
    right: 14px;
  }
}
