/* ==========================================================================
   CINEMATIC BIRTHDAY SURPRISE — STYLING SYSTEM
   Theme: Dark Romantic, Warm Gold & Deep Navy
   Restricted: No heart shapes or outlines.
   ========================================================================== */

:root {
  --bg-dark: #03050B;
  --bg-navy: #08111F;
  --bg-gradient: radial-gradient(circle at 50% 30%, #0d1a30 0%, #08111f 50%, #03050b 100%);
  
  --gold-primary: #FFD28A;
  --gold-secondary: #FFAE42;
  --gold-bright: #FFF2D1;
  --gold-glow: rgba(255, 210, 138, 0.45);
  --gold-glow-intense: rgba(255, 210, 138, 0.85);
  --gold-subtle: rgba(255, 174, 66, 0.2);
  
  --text-warm-white: #FFF4E5;
  --text-muted: rgba(255, 244, 229, 0.72);
  --text-dim: rgba(255, 244, 229, 0.45);
  
  --accent-red: #6B1024;
  --accent-red-glow: rgba(107, 16, 36, 0.5);

  --font-cursive: 'Alex Brush', cursive;
  --font-serif: 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;

  --transition-slow: 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-med: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.3s ease;
}

/* ==================== BASE & RESET ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  color: var(--text-warm-white);
  font-family: var(--font-body);
  user-select: none;
}

body {
  position: relative;
  min-height: 100vh;
  background: var(--bg-gradient);
}

/* ==================== CANVAS & CINEMATIC OVERLAYS ==================== */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.vignette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at center, transparent 40%, rgba(3, 5, 11, 0.65) 80%, rgba(3, 5, 11, 0.95) 100%);
}

.cinematic-light-sweep {
  position: fixed;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 138, 0.08), transparent);
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.cinematic-light-sweep.animate {
  animation: sweepLight 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sweepLight {
  0% { left: -100%; opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 0.8; }
  100% { left: 200%; opacity: 0; }
}

/* ==================== AUDIO CONTROL BAR ==================== */
.audio-control-bar {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-btn {
  background: rgba(8, 17, 31, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 210, 138, 0.35);
  border-radius: 40px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 210, 138, 0.15);
}

.audio-btn:hover {
  border-color: var(--gold-secondary);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 210, 138, 0.35);
  transform: translateY(-2px);
}

.music-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-icon svg {
  width: 100%;
  height: 100%;
}

.sound-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.sound-wave span {
  width: 2px;
  height: 4px;
  background-color: var(--gold-secondary);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.audio-btn.playing .sound-wave span {
  animation: waveMotion 1.2s ease-in-out infinite alternate;
}

.audio-btn.playing .sound-wave span:nth-child(1) { animation-delay: 0.1s; }
.audio-btn.playing .sound-wave span:nth-child(2) { animation-delay: 0.3s; }
.audio-btn.playing .sound-wave span:nth-child(3) { animation-delay: 0.2s; }
.audio-btn.playing .sound-wave span:nth-child(4) { animation-delay: 0.4s; }

@keyframes waveMotion {
  0% { height: 4px; }
  100% { height: 14px; }
}

/* ==================== BUTTONS & CALL TO ACTIONS ==================== */
.gold-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 38px;
  background: rgba(8, 17, 31, 0.85);
  border: 1px solid var(--gold-primary);
  border-radius: 50px;
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-subtle);
  backdrop-filter: blur(8px);
}

.gold-btn .btn-text {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.gold-btn .btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 242, 209, 0.35), transparent);
  transition: all 0.6s ease;
  z-index: 1;
}

.gold-btn:hover {
  border-color: var(--gold-bright);
  background: rgba(13, 26, 48, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 35px var(--gold-glow);
  transform: translateY(-3px) scale(1.02);
}

.gold-btn:hover .btn-shimmer {
  left: 100%;
}

.pulse-glow {
  animation: buttonPulse 2.8s infinite ease-in-out;
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-subtle);
  }
  50% {
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.7), 0 0 40px var(--gold-glow-intense);
    border-color: var(--gold-bright);
  }
}

/* ==================== SCREEN CONTAINER ==================== */
.cinematic-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
  transform: scale(0.96) translateY(20px);
}

.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  position: relative;
}

/* ==================== SCREEN 1: OPENING ANIMATION ==================== */
#screen-intro {
  text-align: center;
}

.intro-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Elegant cursive birthday title */
.cursive-title {
  font-family: var(--font-cursive);
  font-size: clamp(3.8rem, 9vw, 8rem);
  font-weight: 400;
  color: var(--gold-primary);
  line-height: 1.1;
  margin-bottom: 4px;
  text-shadow: 
    0 0 15px rgba(255, 210, 138, 0.6),
    0 0 35px rgba(255, 174, 66, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(20px);
  animation: revealTitle 2s 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  letter-spacing: 0.02em;
}

@keyframes revealTitle {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* Exactly "Mr" underneath */
.person-name {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  line-height: 1.2;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
  opacity: 0;
  transform: translateY(25px);
  animation: revealName 1.8s 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  text-shadow: 
    0 0 25px rgba(255, 210, 138, 0.8),
    0 0 50px rgba(255, 174, 66, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.9);
}

.person-name::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 20%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  box-shadow: 0 0 8px var(--gold-primary);
}

@keyframes revealName {
  0% {
    opacity: 0;
    transform: translateY(35px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

/* Subtitle */
.subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(20px);
  animation: revealSubtitle 1.8s 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

@keyframes revealSubtitle {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-content .action-wrap {
  margin-top: 15px;
  opacity: 0;
  transform: translateY(20px);
  animation: revealAction 1.6s 4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes revealAction {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==================== SCREEN 2: PHOTO REVEAL ==================== */
#screen-photo {
  text-align: center;
  position: relative;
}

/* Golden Vertical Light Beam */
.reveal-beam {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 140%;
  background: radial-gradient(ellipse at center top, rgba(255, 210, 138, 0.22) 0%, rgba(255, 174, 66, 0.08) 45%, transparent 75%);
  pointer-events: none;
  filter: blur(25px);
  opacity: 0;
  transition: opacity 2s ease;
  z-index: 1;
}

.screen.active .reveal-beam {
  opacity: 1;
}

.photo-reveal-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 600px;
  width: 100%;
}

.photo-stage {
  perspective: 1200px;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* 3D Glowing Golden Photo Frame */
.photo-card {
  position: relative;
  width: min(85vw, 420px);
  height: min(115vw, 560px);
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(255, 210, 138, 0.18), rgba(8, 17, 31, 0.95), rgba(255, 174, 66, 0.22));
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 35px rgba(255, 210, 138, 0.35),
    inset 0 0 15px rgba(255, 210, 138, 0.25);
  transform-style: preserve-3d;
  transform: rotateY(-8deg) scale(0.88);
  transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 1.5s ease;
}

.screen.active .photo-card {
  transform: rotateY(0deg) scale(1);
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.85),
    0 0 55px rgba(255, 210, 138, 0.45),
    inset 0 0 20px rgba(255, 210, 138, 0.35);
}

.card-border-ring {
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-secondary), rgba(255, 210, 138, 0.1), var(--gold-primary));
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

.photo-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
  background-color: #050a14;
}

/* Blur to sharp reveal */
.reveal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  filter: blur(25px) brightness(0.2);
  transform: scale(1.15);
  transition: filter 2.5s cubic-bezier(0.25, 1, 0.5, 1), transform 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.screen.active .reveal-img {
  filter: blur(0px) brightness(1.05);
  transform: scale(1);
}

.photo-caption-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s 1.2s ease, transform 1.5s 1.2s ease;
}

.screen.active .photo-caption-wrap {
  opacity: 1;
  transform: translateY(0);
}

.photo-quote {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  color: var(--text-warm-white);
  letter-spacing: 0.04em;
  text-shadow: 0 0 15px rgba(255, 210, 138, 0.4);
}

/* ==================== SCREEN 3: MEMORIES GALLERY ==================== */
#screen-gallery {
  text-align: center;
}

.gallery-header {
  margin-bottom: 24px;
}

.gallery-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--gold-secondary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.gallery-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold-bright);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px rgba(255, 210, 138, 0.4);
}

.gallery-stage {
  position: relative;
  width: min(92vw, 750px);
  height: min(105vw, 500px);
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide-container {
  position: relative;
  width: min(80vw, 420px);
  height: 100%;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateX(40px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.gallery-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateX(0);
  pointer-events: auto;
}

.slide-frame {
  position: relative;
  width: 100%;
  height: min(85vw, 420px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(255, 210, 138, 0.25);
  border: 1px solid rgba(255, 210, 138, 0.4);
  background-color: #060b17;
  transition: transform 0.4s ease;
}

.slide-frame:hover {
  transform: scale(1.02);
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.slide-meta {
  margin-top: 14px;
}

.slide-caption {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-warm-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Nav arrows */
.gallery-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(8, 17, 31, 0.8);
  border: 1px solid var(--gold-primary);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.gallery-nav svg {
  width: 24px;
  height: 24px;
}

.gallery-nav.prev {
  left: 0;
}

.gallery-nav.next {
  right: 0;
}

.gallery-nav:hover {
  background: rgba(13, 26, 48, 0.95);
  box-shadow: 0 0 25px var(--gold-glow);
  transform: translateY(-50%) scale(1.1);
}

/* Indicators */
.gallery-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.gallery-indicators .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--gold-secondary);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-indicators .dot.active {
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
  transform: scale(1.2);
}

/* ==================== SCREEN 4: PERSONAL BIRTHDAY MESSAGE ==================== */
#screen-message {
  text-align: center;
}

.message-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.message-card {
  position: relative;
  padding: clamp(30px, 6vw, 60px) clamp(24px, 5vw, 50px);
  background: rgba(8, 17, 31, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 210, 138, 0.28);
  border-radius: 24px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 45px rgba(255, 210, 138, 0.15);
}

.message-glow-ring {
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(255, 210, 138, 0.4), transparent 60%, rgba(255, 174, 66, 0.3));
  pointer-events: none;
}

.message-lines {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.msg-line {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-warm-white);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.msg-line.revealed {
  opacity: 1;
  transform: translateY(0);
}

.msg-line.highlight-name {
  font-family: var(--font-cursive);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  color: var(--gold-bright);
  margin-top: 10px;
  text-shadow: 
    0 0 20px rgba(255, 210, 138, 0.8),
    0 0 40px rgba(255, 174, 66, 0.5);
}

.message-action {
  margin-top: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.message-action.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== SCREEN 5: FINAL CELEBRATION & CAKE ==================== */
#screen-cake {
  text-align: center;
}

.celebration-container {
  max-width: 650px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Realistic Cake Construction */
.cake-area {
  position: relative;
  width: 320px;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

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

.cake-glow-halo {
  position: absolute;
  top: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 138, 0.25) 0%, rgba(255, 174, 66, 0.1) 40%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: haloBreath 3s infinite alternate ease-in-out;
}

@keyframes haloBreath {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.08); opacity: 1; }
}

/* Stand */
.cake-stand {
  width: 260px;
  height: 14px;
  background: linear-gradient(90deg, #5c4322, #dfb776, #ffd28a, #8f6c37);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9), 0 0 15px rgba(255, 210, 138, 0.3);
  z-index: 1;
}

/* Tiers */
.cake-tier {
  position: relative;
  border-radius: 8px 8px 4px 4px;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.tier-bottom {
  width: 220px;
  height: 75px;
  background: linear-gradient(180deg, #2b1723 0%, #170912 100%);
  border: 1px solid rgba(255, 210, 138, 0.4);
  border-bottom: none;
}

.tier-bottom .tier-frosting {
  position: absolute;
  top: -6px;
  left: 0;
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, #ffd28a, #fff2d1, #ffd28a);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(255, 210, 138, 0.5);
}

.tier-bottom .tier-ribbon {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #6b1024, #ffd28a, #6b1024);
  opacity: 0.85;
}

.tier-top {
  width: 150px;
  height: 60px;
  background: linear-gradient(180deg, #381f2f 0%, #200d1a 100%);
  border: 1px solid rgba(255, 210, 138, 0.4);
  border-bottom: none;
}

.tier-top .tier-frosting {
  position: absolute;
  top: -6px;
  left: 0;
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, #ffd28a, #fff2d1, #ffd28a);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(255, 210, 138, 0.5);
}

/* Golden Candle & Flickering Flame */
.candle {
  position: absolute;
  top: -55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
}

.candle-stick {
  width: 12px;
  height: 48px;
  background: repeating-linear-gradient(
    45deg,
    #ffd28a,
    #ffd28a 6px,
    #fff2d1 6px,
    #fff2d1 12px
  );
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 210, 138, 0.5);
}

.candle-wick {
  width: 2px;
  height: 8px;
  background-color: #333;
  margin-top: -6px;
}

.candle-flame {
  position: relative;
  width: 18px;
  height: 28px;
  margin-top: -22px;
  cursor: pointer;
  filter: drop-shadow(0 0 12px rgba(255, 174, 66, 0.9));
  transform-origin: center bottom;
  animation: flicker 1.8s infinite alternate ease-in-out;
}

.flame-outer {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, #ffd28a 0%, #ff8c00 65%, transparent 100%);
  border-radius: 50% 50% 35% 35% / 70% 70% 30% 30%;
}

.flame-inner {
  position: absolute;
  bottom: 2px;
  left: 4px;
  width: 10px;
  height: 16px;
  background: #ffffff;
  border-radius: 50% 50% 35% 35% / 70% 70% 30% 30%;
  filter: blur(1px);
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-1deg); }
  25% { transform: scale(1.06, 0.96) rotate(1.5deg); }
  50% { transform: scale(0.96, 1.05) rotate(-2deg); }
  75% { transform: scale(1.04, 0.98) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Extinguished Flame State */
.candle.blown-out .candle-flame {
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.smoke-wisp {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 25px;
  background: rgba(220, 220, 220, 0.6);
  filter: blur(4px);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
}

.candle.blown-out .smoke-wisp {
  animation: smokeRise 1.8s ease-out forwards;
}

@keyframes smokeRise {
  0% { opacity: 0.8; transform: translateY(0) scaleX(1); }
  50% { opacity: 0.5; transform: translateY(-25px) scaleX(2.5) skewX(10deg); }
  100% { opacity: 0; transform: translateY(-50px) scaleX(4) skewX(-15deg); }
}

/* Wish controls */
.wish-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.wish-instruction {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-warm-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Finale message after blowing candle */
.finale-message {
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: opacity 1.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.finale-message.revealed {
  opacity: 1;
  transform: translateY(0);
}

.finale-title {
  font-family: var(--font-cursive);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  font-weight: 400;
  color: var(--gold-bright);
  line-height: 1.25;
  margin-bottom: 8px;
  text-shadow: 
    0 0 25px rgba(255, 210, 138, 0.9),
    0 0 50px rgba(255, 174, 66, 0.6);
}

.finale-subtext {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-warm-white);
  letter-spacing: 0.08em;
  max-width: 580px;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.finale-actions {
  margin-top: 15px;
}

.secondary-btn {
  background: rgba(107, 16, 36, 0.4);
  border-color: var(--gold-secondary);
}

.secondary-btn:hover {
  background: rgba(107, 16, 36, 0.8);
}

/* Utility */
.hidden {
  display: none !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .audio-control-bar {
    top: 16px;
    right: 16px;
  }
  .audio-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
  .audio-label {
    display: none;
  }
  .gold-btn {
    padding: 12px 30px;
    font-size: 0.88rem;
  }
  .message-card {
    padding: 28px 20px;
  }
  .msg-line {
    font-size: 1.25rem;
  }
  .gallery-nav {
    width: 40px;
    height: 40px;
  }
  .gallery-nav.prev { left: 4px; }
  .gallery-nav.next { right: 4px; }
}

/* ==================== REDUCED MOTION PREFERENCES ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cinematic-light-sweep {
    display: none;
  }
}
