/* ==========================================================================
   ROMANTIC BIRTHDAY SURPRISE - STYLESHEET
   Aesthetic Light Autumn Theme: Warm Cashmere Cream, Amber, Terracotta, Peach, Honey Gold
   ========================================================================== */

:root {
  /* Light Autumn Palette */
  --bg-primary: #fbf5ee;
  --bg-secondary: #f4e9dc;
  --bg-gradient: radial-gradient(ellipse at 50% 12%, #fffaf4 0%, #f9eee3 45%, #f3e2ce 80%, #ebd6bf 100%);
  --autumn-terracotta: #c45b38;
  --autumn-cinnamon: #8d4024;
  --autumn-amber: #d48b48;
  --autumn-honey: #e8a858;
  --autumn-apricot: #f28e6b;
  --autumn-espresso: #2e1a12;
  --autumn-cocoa: #4b3024;
  --autumn-warm-gray: #6b5246;
  --autumn-cream: #fffaf5;
  --rose-gold: #f7a072;
  --blush-pink: #c45b38;
  --soft-pink: #8d4024;
  --cream: #2e1a12;
  --gold: #d48b48;
  --gold-glow: rgba(212, 139, 72, 0.35);

  /* Light Frosted Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(220, 185, 155, 0.55);
  --glass-shadow: 0 16px 40px rgba(165, 115, 80, 0.12), 0 4px 12px rgba(165, 115, 80, 0.06);

  --font-heading: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-script: 'Dancing Script', cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background: var(--bg-gradient);
  color: var(--autumn-cocoa);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Background Particle & Firework Canvas */
#universe-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Aesthetic Shiuli Flower Shower Canvas */
#shiuli-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000; /* Directly above intro-curtain (999) to cascade over gift box & entire page */
  pointer-events: none;
}

/* Top Floating Navigation Bar */
.top-nav-controls {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1005;
  pointer-events: none;
}

.top-nav-controls > * {
  pointer-events: auto;
}

.nav-right-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Shiuli Flower Shower Floating Pill */
.shiuli-control {
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 139, 72, 0.45);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #8d4024;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-sans);
  box-shadow: 0 4px 18px rgba(180, 120, 80, 0.14);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shiuli-control:hover {
  background: #ffffff;
  border-color: #c45b38;
  color: #6e2e17;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(196, 91, 56, 0.25);
}

.shiuli-btn-icon {
  font-size: 1.15rem;
  display: inline-block;
  animation: gentleSway 3s infinite ease-in-out;
}

@keyframes gentleSway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(8deg); }
}

/* Audio Player Floating Pill */
.music-control {
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(220, 185, 155, 0.55);
  border-radius: 30px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #8d4024;
  box-shadow: 0 4px 18px rgba(180, 120, 80, 0.14);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-control:hover {
  transform: translateY(-2px) scale(1.03);
  background: #ffffff;
  border-color: #c45b38;
  color: #6e2e17;
  box-shadow: 0 6px 22px rgba(196, 91, 56, 0.25);
}

.music-icon {
  font-size: 1.2rem;
  display: inline-block;
  animation: musicBeat 1.8s infinite ease-in-out;
}

.music-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #8d4024;
}

@keyframes musicBeat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(8deg); }
}

/* Personalize / Settings Floating Button */
.settings-control {
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(220, 185, 155, 0.55);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #8d4024;
  font-size: 0.85rem;
  box-shadow: 0 4px 18px rgba(180, 120, 80, 0.14);
  transition: all 0.3s ease;
}

.settings-control:hover {
  background: #ffffff;
  border-color: #d48b48;
  color: #6e2e17;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(196, 91, 56, 0.25);
}

/* ==========================================================================
   SCENE 1: THE MYSTERY ENVELOPE / GIFT BOX INTRO
   ========================================================================== */
#intro-curtain {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(ellipse at center, #fffbf6 0%, #f8ede1 45%, #f0ddc8 85%, #e7cfb5 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  transition: opacity 1.2s cubic-bezier(0.77, 0, 0.175, 1), transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

#intro-curtain.opened {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.intro-content {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(212, 139, 72, 0.14);
  border: 1px solid rgba(196, 91, 56, 0.38);
  border-radius: 20px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #9c4424;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(196, 91, 56, 0.12);
  animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 10px rgba(196, 91, 56, 0.15); }
  50% { box-shadow: 0 0 25px rgba(196, 91, 56, 0.35); }
}

.intro-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 35px;
  background: linear-gradient(135deg, #3a1b12 0%, #8c3b24 55%, #c46835 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 3D Wax-sealed Envelope / Gift Box */
.gift-box-wrapper {
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 30px;
}

.gift-box {
  width: 170px;
  height: 170px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-box:hover {
  transform: scale(1.08) rotateY(10deg);
}

.gift-box.opened {
  animation: openGiftBurst 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes openGiftBurst {
  0% { transform: scale(1); }
  25% { transform: scale(1.15) rotate(-5deg); }
  50% { transform: scale(0.95) rotate(5deg); }
  100% { transform: scale(1.3) translateY(-15px); opacity: 0; }
}

.gift-box-base {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d85738 0%, #c24d2c 50%, #e07a5f 100%);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(196, 91, 56, 0.38), 0 0 35px rgba(224, 122, 95, 0.28);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 245, 235, 0.65);
  overflow: hidden;
}

/* Gold Ribbons across box */
.ribbon-vertical {
  position: absolute;
  width: 28px;
  height: 100%;
  background: linear-gradient(90deg, #d48b48, #f4c46d, #d48b48);
  box-shadow: 0 0 15px rgba(212, 139, 72, 0.6);
}

.ribbon-horizontal {
  position: absolute;
  height: 28px;
  width: 100%;
  background: linear-gradient(180deg, #d48b48, #f4c46d, #d48b48);
  box-shadow: 0 0 15px rgba(212, 139, 72, 0.6);
}

.gift-bow {
  position: absolute;
  top: -20px;
  font-size: 3.5rem;
  filter: drop-shadow(0 5px 15px rgba(212, 139, 72, 0.6));
  animation: floatBow 2s infinite ease-in-out;
}

@keyframes floatBow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gift-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #ffffff;
  color: #8d4024;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(140, 70, 40, 0.2);
  transform: rotate(-8deg);
}

.intro-instruction {
  font-size: 1rem;
  color: #8d4024;
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulseText 1.8s infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.85; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.sparkle-icon {
  color: var(--gold);
}

/* ==========================================================================
   MAIN EXPERIENCE CONTAINER
   ========================================================================== */
#main-stage {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease 0.4s, transform 1s ease 0.4s;
}

#main-stage.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   HERO BANNER & CELEBRATION SECTION
   ========================================================================== */
.hero-section {
  text-align: center;
  position: relative;
  padding-top: 20px;
}

.birthday-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(212, 139, 72, 0.14);
  border: 1px solid rgba(196, 91, 56, 0.35);
  border-radius: 30px;
  color: #9c4424;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(196, 91, 56, 0.12);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: #8c3b24;
  text-shadow: 0 4px 25px rgba(196, 91, 56, 0.25), 0 0 50px rgba(224, 138, 72, 0.2);
  margin-bottom: 15px;
  animation: glowTitle 3s ease-in-out infinite alternate;
}

@keyframes glowTitle {
  from {
    text-shadow: 0 4px 20px rgba(196, 91, 56, 0.2), 0 0 40px rgba(224, 138, 72, 0.15);
  }
  to {
    text-shadow: 0 6px 30px rgba(196, 91, 56, 0.35), 0 0 65px rgba(212, 139, 72, 0.3);
  }
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.3rem);
  font-weight: 400;
  color: #a85230;
  margin-bottom: 25px;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero-description {
  max-width: 680px;
  margin: 0 auto 35px;
  font-size: 1.1rem;
  color: #4a352c;
  line-height: 1.8;
  font-weight: 400;
}

/* Floating Interactive Balloons Array */
.balloons-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 20px 0 40px;
  flex-wrap: wrap;
}

.balloon {
  width: 58px;
  height: 72px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: floatBalloon 4s ease-in-out infinite alternate;
  box-shadow: inset -5px -5px 12px rgba(0, 0, 0, 0.25), inset 7px 7px 12px rgba(255, 255, 255, 0.4), 0 10px 25px rgba(0, 0, 0, 0.3);
}

.balloon:nth-child(1) { background: #ff4d6d; animation-delay: 0s; }
.balloon:nth-child(2) { background: #7209b7; animation-delay: 0.8s; }
.balloon:nth-child(3) { background: #ffd166; animation-delay: 1.6s; }
.balloon:nth-child(4) { background: #4cc9f0; animation-delay: 0.4s; }
.balloon:nth-child(5) { background: #f72585; animation-delay: 1.2s; }

.balloon:hover {
  transform: scale(1.15) translateY(-5px);
}

.balloon::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: rgba(255, 255, 255, 0.4);
}

.balloon-hint {
  font-size: 0.85rem;
  color: var(--soft-pink);
  margin-top: -15px;
  margin-bottom: 25px;
  opacity: 0.85;
}

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

/* ==========================================================================
   INTERACTIVE BIRTHDAY CAKE & WISH CANDLE
   ========================================================================== */
.cake-section {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.cake-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.section-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--autumn-terracotta);
  font-weight: 600;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--autumn-espresso);
}

.cake-instructions {
  color: var(--autumn-warm-gray);
  font-size: 1rem;
  margin-bottom: 30px;
}

.cake-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  margin-bottom: 25px;
}

/* 3D Styled Cake Structure */
.cake {
  position: relative;
  width: 180px;
  cursor: pointer;
}

.cake-plate {
  width: 220px;
  height: 16px;
  background: linear-gradient(90deg, #d4af37, #fff275, #d4af37);
  border-radius: 10px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.cake-tier-bottom {
  width: 170px;
  height: 65px;
  background: linear-gradient(180deg, #fceade 0%, #f4acb7 100%);
  margin: 0 auto;
  border-radius: 12px 12px 4px 4px;
  position: relative;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
}

.frosting-drips {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 18px;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.cake-tier-top {
  width: 120px;
  height: 55px;
  background: linear-gradient(180deg, #fff 0%, #ffcad4 100%);
  margin: 0 auto;
  border-radius: 12px 12px 0 0;
  position: relative;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.12);
}

.frosting-top-drips {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 14px;
  background: #fff0f3;
  border-radius: 0 0 8px 8px;
}

/* Candle & Flickering Flame */
.candle {
  width: 12px;
  height: 38px;
  background: repeating-linear-gradient(45deg, #ffd166, #ffd166 4px, #f72585 4px, #f72585 8px);
  border-radius: 4px;
  margin: -38px auto 0;
  position: relative;
  cursor: pointer;
  z-index: 5;
}

.candle-wick {
  position: absolute;
  top: -8px;
  left: 5px;
  width: 2px;
  height: 8px;
  background: #333;
}

.flame {
  position: absolute;
  top: -26px;
  left: -2px;
  width: 16px;
  height: 26px;
  background: radial-gradient(circle at 50% 80%, #fff 10%, #ffd166 40%, #ff5400 80%);
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  filter: drop-shadow(0 0 12px #ffb703) drop-shadow(0 0 25px #ff5400);
  animation: flicker 1.2s infinite alternate ease-in-out;
  cursor: pointer;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.candle.blown .flame {
  opacity: 0;
  transform: translateY(-10px) scale(0.1);
  pointer-events: none;
}

/* Smoke puff when blown */
.smoke {
  position: absolute;
  top: -25px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: rgba(220, 220, 220, 0.7);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.candle.blown .smoke {
  animation: smokePuff 1.6s ease-out forwards;
}

@keyframes smokePuff {
  0% { opacity: 0.9; transform: scale(1) translateY(0); }
  50% { opacity: 0.5; transform: scale(3.5) translateY(-25px) translateX(6px); }
  100% { opacity: 0; transform: scale(6) translateY(-50px) translateX(-10px); }
}

.wish-result-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 24px;
  background: rgba(255, 248, 235, 0.95);
  border: 1px solid rgba(212, 139, 72, 0.45);
  border-radius: 20px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #8c3b24;
  font-style: italic;
  display: none;
  box-shadow: 0 6px 20px rgba(180, 120, 80, 0.12);
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.wish-result-card.active {
  display: block;
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   POLAROID MEMORY LANE GALLERY
   ========================================================================== */
.gallery-section {
  position: relative;
}

.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.action-btn {
  background: rgba(212, 139, 72, 0.14);
  border: 1px solid rgba(196, 91, 56, 0.38);
  color: #8c3b24;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: var(--autumn-terracotta);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 91, 56, 0.3);
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  padding: 10px;
}

.polaroid-card {
  background: #ffffff;
  padding: 16px 16px 25px;
  border-radius: 6px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  cursor: pointer;
  transform-origin: center center;
}

.polaroid-card:nth-child(1) { transform: rotate(-2.5deg); }
.polaroid-card:nth-child(2) { transform: rotate(1.8deg); }
.polaroid-card:nth-child(3) { transform: rotate(-1.5deg); }

.polaroid-card:hover {
  transform: scale(1.06) rotate(0deg) translateY(-8px);
  box-shadow: 0 25px 50px rgba(255, 117, 143, 0.35), 0 10px 20px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* Tape decoration at top of polaroid */
.polaroid-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 22px;
  background: rgba(255, 235, 160, 0.65);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-left: 2px dashed rgba(255, 255, 255, 0.5);
  border-right: 2px dashed rgba(255, 255, 255, 0.5);
}

.polaroid-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #f0f0f0;
  margin-bottom: 16px;
}

.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.polaroid-card:hover .polaroid-img {
  transform: scale(1.08);
}

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.45rem;
  color: #2b2b2b;
  text-align: center;
  font-weight: 600;
  line-height: 1.3;
}

.polaroid-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: #777;
  text-align: center;
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Hidden file inputs for photo replacement */
.photo-file-input {
  display: none;
}

/* ==========================================================================
   REASONS WHY I LOVE YOU - INTERACTIVE JAR OF HEARTS
   ========================================================================== */
.reasons-section {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 45px 24px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.jar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin-top: 20px;
}

.magic-jar {
  width: 140px;
  height: 180px;
  background: rgba(255, 255, 255, 0.75);
  border: 3px solid rgba(212, 139, 72, 0.45);
  border-radius: 25px 25px 40px 40px;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 0 25px rgba(224, 122, 95, 0.2), 0 10px 30px rgba(160, 110, 80, 0.12);
  transition: transform 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.magic-jar:hover {
  transform: scale(1.08) rotate(-2deg);
}

.jar-lid {
  position: absolute;
  top: -14px;
  width: 100px;
  height: 16px;
  background: linear-gradient(90deg, #d48b48, #f4c46d, #d48b48);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(160, 110, 80, 0.25);
}

.jar-label {
  background: rgba(255, 252, 248, 0.95);
  color: #8c3b24;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(160, 110, 80, 0.15);
}

.floating-jar-hearts {
  position: absolute;
  font-size: 1.2rem;
  animation: floatJarHeart 2s infinite ease-in-out;
}

@keyframes floatJarHeart {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
  50% { transform: translateY(-8px) scale(1.2); opacity: 1; }
}

.reason-card-display {
  min-height: 130px;
  max-width: 550px;
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 246, 238, 0.9) 100%);
  border: 1px solid rgba(218, 160, 120, 0.45);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(160, 110, 80, 0.12);
  transition: all 0.4s ease;
}

.reason-number {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--autumn-amber);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.reason-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--autumn-espresso);
  line-height: 1.55;
}

.draw-btn {
  background: linear-gradient(135deg, #d85738, #ba4b27);
  border: none;
  color: white;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(196, 91, 56, 0.35);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.draw-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 35px rgba(196, 91, 56, 0.5);
}

/* ==========================================================================
   VINTAGE WAX-SEALED LOVE LETTER
   ========================================================================== */
.letter-section {
  position: relative;
  display: flex;
  justify-content: center;
}

.parchment-letter {
  background: #fdfbf7;
  color: #2b1d0c;
  max-width: 720px;
  width: 100%;
  padding: 55px 45px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 0 80px rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Vintage border styling */
.parchment-letter::before {
  content: '';
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(160, 120, 60, 0.25);
  pointer-events: none;
  border-radius: 8px;
}

.letter-header {
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 1px dashed rgba(160, 120, 60, 0.3);
  padding-bottom: 20px;
}

.letter-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  color: #8b0032;
  margin-bottom: 5px;
}

.letter-salutation {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: #5c3d2e;
  margin-bottom: 20px;
  text-align: left;
}

.letter-body {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.9;
  color: #3d2b1f;
  margin-bottom: 25px;
  text-align: justify;
}

.letter-body p {
  margin-bottom: 18px;
}

.letter-signoff {
  font-family: var(--font-script);
  font-size: 2rem;
  color: #8b0032;
  text-align: right;
  margin-top: 30px;
}

.letter-stamp {
  position: absolute;
  bottom: 30px;
  left: 45px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #b71c1c 40%, #7f0000 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: rotate(-12deg);
}

/* ==========================================================================
   FINALE: CELESTIAL WISH & COUNTDOWN / LOVE COUNTER
   ========================================================================== */
.finale-section {
  text-align: center;
  padding: 40px 20px;
}

.sparkle-tap-banner {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.94) 0%, rgba(252, 240, 226, 0.88) 100%);
  border: 1px dashed rgba(212, 139, 72, 0.45);
  border-radius: 24px;
  padding: 35px 20px;
  max-width: 650px;
  margin: 0 auto 30px;
  box-shadow: 0 10px 30px rgba(160, 110, 80, 0.08);
}

.sparkle-tap-banner h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #8c3b24;
  margin-bottom: 10px;
}

.sparkle-tap-banner p {
  color: #6b4636;
  font-size: 0.95rem;
}

.fireworks-btn {
  margin-top: 20px;
  background: linear-gradient(135deg, #d48b48, #c45b38);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 34px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(196, 91, 56, 0.35);
  transition: all 0.3s ease;
}

.fireworks-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 35px rgba(196, 91, 56, 0.5);
}

.footer-love {
  margin-top: 50px;
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: #8c3b24;
  letter-spacing: 1px;
}

/* ==========================================================================
   MODAL / PERSONALIZATION POPUP
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 25, 15, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #fffcf8;
  border: 1px solid rgba(212, 139, 72, 0.4);
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(140, 90, 60, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #8c3b24;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: #6b4636;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #4a2c1e;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input, .form-group textarea {
  width: 100%;
  background: #fdf7ef;
  border: 1px solid rgba(212, 139, 72, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  color: #2e1a12;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: #c45b38;
  background: #ffffff;
}

/* Custom Music Choice UI */
.music-choice-group {
  background: rgba(212, 139, 72, 0.08);
  border: 1px dashed rgba(212, 139, 72, 0.45);
  padding: 16px;
  border-radius: 16px;
  margin-top: 18px;
  margin-bottom: 20px;
}

.music-choice-group label {
  font-weight: 600;
  color: #8c3b24;
}

.music-file-picker-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.custom-file-upload-btn {
  background: linear-gradient(135deg, #d48b48, #c45b38);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(196, 91, 56, 0.25);
  transition: all 0.2s ease;
  margin-bottom: 0 !important;
}

.custom-file-upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(196, 91, 56, 0.35);
}

#input-music-file {
  display: none;
}

.reset-music-btn {
  background: rgba(212, 139, 72, 0.14);
  border: 1px solid rgba(196, 91, 56, 0.35);
  color: #8c3b24;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-music-btn:hover {
  background: rgba(196, 91, 56, 0.15);
  border-color: #c45b38;
}

.current-track-badge {
  font-size: 0.82rem;
  color: #5c3525;
  font-weight: 500;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(212, 139, 72, 0.35);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(160, 110, 80, 0.08);
}

.music-tip {
  font-size: 0.78rem;
  color: #7a4834;
  margin-top: 8px;
  line-height: 1.4;
}

.music-tip code {
  background: rgba(212, 139, 72, 0.18);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.82rem;
  color: #8c3b24;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}

.modal-btn-cancel {
  background: transparent;
  border: 1px solid rgba(196, 91, 56, 0.4);
  color: #8c3b24;
  padding: 8px 18px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-cancel:hover {
  background: rgba(212, 139, 72, 0.12);
}

.modal-btn-save {
  background: linear-gradient(135deg, #d48b48, #c45b38);
  border: none;
  color: #fff;
  padding: 8px 22px;
  border-radius: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(196, 91, 56, 0.3);
  transition: all 0.2s ease;
}

.modal-btn-save:hover {
  box-shadow: 0 6px 20px rgba(196, 91, 56, 0.45);
}

/* Lightbox for Photos */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 600px;
  width: 100%;
  background: #fff;
  padding: 16px 16px 25px;
  border-radius: 8px;
  text-align: center;
  position: relative;
}

.lightbox-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 12px;
}

.lightbox-caption {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: #2b2b2b;
}

.lightbox-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 36px;
  height: 36px;
  background: #f72585;
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #main-stage {
    padding: 40px 16px 80px;
    gap: 50px;
  }
  
  .parchment-letter {
    padding: 35px 20px;
  }
  
  .letter-stamp {
    left: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .top-nav-controls {
    top: 12px;
    padding: 0 12px;
  }

  .nav-right-cluster {
    gap: 8px;
  }

  .shiuli-control {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .music-control {
    padding: 6px 12px;
  }

  .music-label {
    font-size: 0.8rem;
  }

  .settings-control {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .shiuli-btn-text {
    display: none;
  }
  .shiuli-control {
    padding: 7px 10px;
  }
  .music-label {
    display: none;
  }
  .music-control {
    padding: 7px 10px;
  }
}
