/* ==========================================================================
   BIRTHDAY SURPRISE FOR BUBU 💜 - STYLESHEET
   A luxury romantic, pastel-lilac, glassmorphic theme with interactive animations
   ========================================================================== */

:root {
  --primary-purple: #8865C6;
  --primary-dark: #6D48B3;
  --primary-deep: #52348A;
  --accent-pink: #F472B6;
  --accent-lavender: #D8B4FE;
  --accent-soft: #EDE4FF;
  --text-main: #4A356A;
  --text-muted: #7E689C;
  --text-light: #A491C2;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(255, 255, 255, 0.85);
  --shadow-color: rgba(109, 72, 179, 0.18);
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Caveat', cursive, sans-serif;
}

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

html, body {
  min-height: 100vh;
  width: 100%;
  font-family: var(--font-main);
  background-color: #F8F5FF;
  background-image: 
    radial-gradient(at 10% 10%, #EFE5FF 0px, transparent 50%),
    radial-gradient(at 90% 15%, #FDE7F3 0px, transparent 50%),
    radial-gradient(at 50% 50%, #E8DBFC 0px, transparent 60%),
    radial-gradient(at 80% 90%, #DDD0F8 0px, transparent 50%),
    radial-gradient(at 15% 85%, #FCE7F3 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   AMBIENT GLOWS & BACKGROUND PARTICLES
   ========================================================================== */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #C084FC 0%, transparent 70%);
  top: -80px;
  left: -100px;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #F472B6 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-duration: 22s;
  animation-delay: -5s;
}

.glow-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #A78BFA 0%, transparent 70%);
  top: 40%;
  left: 65%;
  animation-duration: 26s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.15); }
  100% { transform: translate(-30px, 30px) scale(0.95); }
}

#sparkleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   TOP BAR & MUSIC CONTROLLER
   ========================================================================== */
.top-bar {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}

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

.brand-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 20px var(--shadow-color);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.heart-pulse {
  display: inline-block;
  animation: heartPulse 1.4s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.music-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-dark));
  color: #FFFFFF;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(109, 72, 179, 0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.music-pill:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(109, 72, 179, 0.45);
}

.music-pill:active {
  transform: translateY(1px) scale(0.98);
}

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

.sound-bars .bar {
  width: 3px;
  height: 100%;
  background-color: #FFFFFF;
  border-radius: 2px;
  transform-origin: bottom;
  animation: soundWave 1.2s ease-in-out infinite alternate;
}

.sound-bars .bar:nth-child(1) { animation-delay: 0.1s; height: 40%; }
.sound-bars .bar:nth-child(2) { animation-delay: 0.4s; height: 90%; }
.sound-bars .bar:nth-child(3) { animation-delay: 0.2s; height: 60%; }
.sound-bars .bar:nth-child(4) { animation-delay: 0.5s; height: 100%; }

.music-pill.paused .sound-bars .bar {
  animation-play-state: paused;
  height: 3px !important;
}

.music-pill.paused {
  background: #A393BD;
  box-shadow: 0 4px 12px rgba(163, 147, 189, 0.3);
}

@keyframes soundWave {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* Music Tap Hint Banner */
.music-start-hint {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(82, 52, 138, 0.9);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 60;
  cursor: pointer;
  animation: fadeInOut 2s infinite alternate;
  pointer-events: auto;
  white-space: nowrap;
}

@keyframes fadeInOut {
  0% { opacity: 0.75; transform: translate(-50%, 0); }
  100% { opacity: 1; transform: translate(-50%, -4px); }
}

/* ==========================================================================
   STEP PROGRESS INDICATOR
   ========================================================================== */
.step-indicator {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 75px;
  margin-bottom: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 15px rgba(109, 72, 179, 0.08);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(237, 228, 255, 0.8);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-muted);
}

.step-dot.active {
  background: #FFFFFF;
  border-color: var(--primary-purple);
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(136, 101, 198, 0.4);
}

.step-dot.completed {
  background: var(--accent-lavender);
  color: var(--primary-deep);
}

.step-line {
  width: 14px;
  height: 2px;
  background: rgba(189, 163, 237, 0.4);
  border-radius: 2px;
}

/* ==========================================================================
   CARD CONTAINER & LAYOUT
   ========================================================================== */
.card-container {
  width: 100%;
  max-width: 520px;
  padding: 10px 16px 30px;
  position: relative;
  z-index: 10;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 34px;
  padding: 34px 26px 26px;
  box-shadow: 
    0 25px 60px -15px var(--shadow-color),
    0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

/* Subtle corner light reflection */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #A855F7, #EC4899, #8B5CF6);
  opacity: 0.8;
}

/* ==========================================================================
   SCREENS & SWITCH ANIMATIONS
   ========================================================================== */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Badges & Tags */
.badge-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--accent-soft);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid rgba(136, 101, 198, 0.18);
}

.celebration-badge {
  background: linear-gradient(135deg, #FDE047, #F472B6);
  color: #701A75;
  border: none;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(244, 114, 182, 0.3);
}

/* Typography */
.title-display {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.subtitle {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-purple);
  margin-bottom: 16px;
}

.lead-text {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 12px 0 16px;
}

.question-prompt {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 14px 0 20px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #9C72E8 0%, #7E4FC9 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(126, 79, 201, 0.38);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 28px rgba(126, 79, 201, 0.5);
  background: linear-gradient(135deg, #A881EF 0%, #8A5CD4 100%);
}

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

.btn-secondary {
  background: #E8E0F5;
  color: var(--primary-deep);
  box-shadow: 0 4px 12px rgba(109, 72, 179, 0.12);
}

.btn-secondary:hover {
  background: #DDD2F0;
  transform: translateY(-2px);
}

/* Glossy light streak animation */
.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: skewX(-20deg);
  animation: shineStreak 4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes shineStreak {
  0%, 65% { left: -100%; }
  100% { left: 200%; }
}

/* ==========================================================================
   SCREEN 1: ANIMATED ENVELOPE
   ========================================================================== */
.envelope-wrapper {
  position: relative;
  width: 140px;
  height: 110px;
  margin: 10px auto 26px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.envelope-wrapper:hover {
  transform: scale(1.06) rotate(-2deg);
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  background: #D4BBFC;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(109, 72, 179, 0.22);
  overflow: visible;
}

.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 70px 65px 70px;
  border-color: transparent transparent #C3A3F9 transparent;
  border-radius: 0 0 12px 12px;
  z-index: 3;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 65px 70px 0 70px;
  border-color: #B590F7 transparent transparent transparent;
  transform-origin: top;
  z-index: 4;
  transition: transform 0.5s ease;
}

.envelope-wrapper:hover .envelope-flap {
  transform: rotateX(160deg);
}

.envelope-letter {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 70px;
  background: #FFFFFF;
  border-radius: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.5s ease;
}

.envelope-wrapper:hover .envelope-letter {
  transform: translateY(-26px);
}

.letter-stamp {
  font-family: var(--font-script);
  font-size: 17px;
  color: var(--primary-dark);
  font-weight: 700;
}

.wax-seal {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, #A855F7, #7E22CE);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(126, 34, 206, 0.4);
  z-index: 5;
  border: 2px solid #E9D5FF;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(168, 85, 247, 0.4);
  border-radius: 50%;
  animation: rotateSlow 14s linear infinite;
  pointer-events: none;
}

@keyframes rotateSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   SCREEN 2: ESCAPING NO BUTTON
   ========================================================================== */
.floating-emoji-wrap {
  margin: 10px 0 16px;
}

.emoji-bounce {
  font-size: 64px;
  display: inline-block;
  animation: bounceEmoji 2s ease-in-out infinite;
}

@keyframes bounceEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px) scale(1.06); }
}

.choice-container {
  position: relative;
  min-height: 90px;
  margin: 20px 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.btn-yes {
  padding: 15px 36px;
  font-size: 17px;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-yes:hover {
  transform: scale(1.08);
}

.btn-no {
  position: relative;
  z-index: 2;
  transition: all 0.25s ease-out;
  user-select: none;
}

.no-feedback {
  min-height: 38px;
  margin-top: 10px;
}

#noMessage {
  font-size: 15px;
  font-weight: 700;
  color: #C026D3;
  animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ==========================================================================
   SCREEN 3: I KNEW IT QUOTE CARD
   ========================================================================== */
.quote-card {
  background: linear-gradient(135deg, rgba(243, 232, 255, 0.8), rgba(253, 242, 248, 0.8));
  border-left: 4px solid var(--primary-purple);
  padding: 18px 20px;
  border-radius: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(109, 72, 179, 0.06);
}

.quote-card p {
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: var(--primary-deep);
  margin: 0;
}

/* ==========================================================================
   SCREEN 4: POLAROID GALLERY
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 24px;
}

.polaroid-card {
  position: relative;
  background: #FFFFFF;
  padding: 10px 10px 16px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(109, 72, 179, 0.15);
  transform: rotate(var(--rot, 0deg));
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  border: 1px solid rgba(220, 210, 240, 0.6);
}

.polaroid-card:hover {
  transform: rotate(0deg) scale(1.05) translateY(-5px);
  box-shadow: 0 16px 32px rgba(109, 72, 179, 0.28);
  z-index: 5;
}

.polaroid-span-full {
  grid-column: 1 / -1;
  width: calc((100% - 16px) / 2);
  margin: 0 auto;
  justify-self: center;
}

/* Washi tape stickers on polaroid */
.washi-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 16px;
  opacity: 0.85;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  z-index: 2;
  border-radius: 2px;
}

.tape-purple {
  background: rgba(192, 132, 252, 0.75);
}

.tape-pink {
  background: rgba(244, 114, 182, 0.75);
}

.tape-gold {
  background: rgba(251, 191, 36, 0.75);
}

.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.15;
  border-radius: 8px;
  overflow: hidden;
  background: #F3E8FF;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.4s ease;
  display: block;
}

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

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(82, 52, 138, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.polaroid-card:hover .photo-overlay {
  opacity: 1;
}

.view-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.polaroid-caption {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.polaroid-caption span:first-child {
  font-family: var(--font-script);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-deep);
}

.caption-date {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Custom Upload Dropzone */
.upload-box {
  background: rgba(243, 232, 255, 0.6);
  border: 2px dashed #C084FC;
  border-radius: 18px;
  padding: 14px 18px;
  margin: 16px 0;
  transition: all 0.3s ease;
}

.upload-box:hover {
  background: rgba(243, 232, 255, 0.9);
  border-color: var(--primary-purple);
  transform: translateY(-2px);
}

.upload-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
}

.upload-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(109, 72, 179, 0.12);
  flex-shrink: 0;
}

.upload-info b {
  font-size: 14px;
  color: var(--primary-deep);
  display: block;
}

.upload-info .small {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.upload-box input[type="file"] {
  display: none;
}

.footer-quote {
  font-style: italic;
  font-size: 14.5px;
  color: var(--primary-purple);
  margin: 16px 0 10px;
}

/* ==========================================================================
   SCREEN 5: HEARTFELT LETTER SCROLL
   ========================================================================== */
.letter-scroll-wrapper {
  max-height: 440px;
  overflow-y: auto;
  padding: 6px 4px;
  margin: 14px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-lavender) transparent;
}

.letter-scroll-wrapper::-webkit-scrollbar {
  width: 5px;
}

.letter-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-lavender);
  border-radius: 10px;
}

.letter-paper {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF7FF 100%);
  border-radius: 20px;
  padding: 26px 22px;
  border: 1px solid rgba(220, 205, 245, 0.8);
  box-shadow: 
    0 10px 30px rgba(109, 72, 179, 0.08),
    inset 0 0 20px rgba(237, 228, 255, 0.4);
  text-align: left;
}

.paper-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 140px;
  opacity: 0.04;
  pointer-events: none;
}

.letter-header {
  border-bottom: 2px dashed rgba(192, 132, 252, 0.35);
  padding-bottom: 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.postmark {
  align-self: flex-end;
  border: 1.5px solid #C084FC;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--primary-dark);
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(3deg);
  background: rgba(243, 232, 255, 0.5);
}

.letter-salutation {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--primary-deep);
  line-height: 1.35;
}

.letter-body p {
  font-size: 15px;
  line-height: 1.85;
  color: #554170;
  margin-bottom: 14px;
}

.letter-highlight {
  background: rgba(243, 232, 255, 0.7);
  border-left: 3px solid #A855F7;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 14px 0;
}

.letter-highlight p {
  font-weight: 500;
  color: var(--primary-deep);
  margin-bottom: 0;
}

.emphasis-line {
  font-weight: 600;
  color: var(--primary-dark) !important;
}

.letter-signature {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dashed rgba(192, 132, 252, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.script-sign {
  font-family: var(--font-script);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-purple);
}

.wax-stamp {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  padding: 4px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

/* ==========================================================================
   SCREEN 6: BIRTHDAY GRAND FINALE & CAKE
   ========================================================================== */
.celebration-hero {
  margin: 10px 0 16px;
}

.birthday-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.shimmer-text {
  background: linear-gradient(
    135deg,
    #9333EA 0%,
    #EC4899 25%,
    #8B5CF6 50%,
    #E11D48 75%,
    #9333EA 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.bubu-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 4px;
}

/* Interactive Birthday Cake */
.cake-stage {
  position: relative;
  width: 220px;
  height: 190px;
  margin: 14px auto 20px;
  cursor: pointer;
  user-select: none;
}

.cake-instruction {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #B45309;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.12);
  white-space: nowrap;
  animation: pulseHint 2s infinite ease-in-out;
  z-index: 10;
}

@keyframes pulseHint {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

.cake-box {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* Candle & Flame */
.candle {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 6;
}

.flame {
  width: 14px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #FFF7ED 0%, #F59E0B 40%, #EF4444 85%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 
    0 0 14px #F59E0B,
    0 0 28px rgba(239, 68, 68, 0.6);
  animation: flicker 0.6s infinite alternate ease-in-out;
  transform-origin: bottom center;
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-2deg); }
  100% { transform: scale(1.1) rotate(2deg); }
}

.candle.blown-out .flame {
  display: none;
}

.smoke {
  display: none;
  width: 8px;
  height: 8px;
  background: rgba(180, 180, 180, 0.6);
  border-radius: 50%;
  position: absolute;
  top: 0;
}

.candle.blown-out .smoke {
  display: block;
  animation: puffSmoke 1.5s forwards ease-out;
}

@keyframes puffSmoke {
  0% { opacity: 0.8; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(2.8); filter: blur(3px); }
}

.candle-stick {
  width: 8px;
  height: 28px;
  background: repeating-linear-gradient(
    45deg,
    #F472B6,
    #F472B6 4px,
    #FFFFFF 4px,
    #FFFFFF 8px
  );
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Cake Layers */
.cake-layer {
  position: relative;
  border-radius: 12px 12px 6px 6px;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.08);
}

.layer-top {
  width: 110px;
  height: 38px;
  background: #F3E8FF;
  border: 1px solid #E9D5FF;
  z-index: 3;
}

.frosting-drips {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
}

.frosting-drips span {
  width: 14px;
  height: 12px;
  background: #C084FC;
  border-radius: 0 0 10px 10px;
}

.berries {
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  font-size: 13px;
  letter-spacing: 6px;
  text-align: center;
}

.layer-middle {
  width: 140px;
  height: 42px;
  background: #E9D5FF;
  border: 1px solid #D8B4FE;
  z-index: 2;
  margin-top: -4px;
}

.cream-fill {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 6px;
  background: #FFFFFF;
}

.layer-bottom {
  width: 170px;
  height: 44px;
  background: #D8B4FE;
  border: 1px solid #C084FC;
  z-index: 1;
  margin-top: -4px;
}

.cake-plate {
  width: 194px;
  height: 10px;
  background: #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  margin-top: -2px;
}

/* Wishes Card */
.wishes-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 18px 20px;
  margin: 16px 0;
  border: 1px solid rgba(220, 205, 245, 0.6);
}

.wish-line {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 12px;
}

.sparkle-emojis {
  font-size: 32px;
  letter-spacing: 6px;
  margin: 14px 0;
  animation: heartPulse 1.8s infinite alternate;
}

.awesome-heading {
  font-size: 21px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 14px;
}

.signoff-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
}

.signoff-sub {
  font-size: 13px;
  color: var(--text-light);
}

.signoff-name {
  font-family: var(--font-script);
  font-size: 26px;
  font-weight: 700;
  color: #C026D3;
}

.multi-actions {
  gap: 12px;
}

/* ==========================================================================
   FLOATING BALLOONS & HEARTS (CSS + JS)
   ========================================================================== */
.balloon {
  position: fixed;
  bottom: -90px;
  font-size: 32px;
  animation: floatBalloon 7.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  z-index: 80;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.1));
}

@keyframes floatBalloon {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-15vh) rotate(6deg) scale(1);
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateY(-125vh) rotate(-12deg) scale(1.1);
    opacity: 0;
  }
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(43, 26, 74, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.lightbox-content {
  position: relative;
  background: #FFFFFF;
  padding: 14px 14px 22px;
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  text-align: center;
  animation: zoomLightbox 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomLightbox {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 12px;
  background: #FAF7FF;
}

.lightbox-caption {
  font-family: var(--font-script);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-top: 12px;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--primary-deep);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.card-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & SMALL SCREENS)
   ========================================================================== */
@media (max-width: 480px) {
  .card-container {
    padding: 6px 12px 24px;
  }

  .card {
    padding: 26px 18px 20px;
    border-radius: 28px;
  }

  .title-display {
    font-size: 27px;
  }

  .subtitle {
    font-size: 18px;
  }

  .lead-text {
    font-size: 14.5px;
    line-height: 1.65;
  }

  .step-indicator {
    margin-top: 68px;
    padding: 6px 12px;
    gap: 4px;
  }

  .step-dot {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .step-line {
    width: 8px;
  }

  .gallery-grid {
    gap: 12px;
  }

  .polaroid-span-full {
    width: calc((100% - 12px) / 2);
  }

  .letter-salutation {
    font-size: 19px;
  }

  .letter-body p {
    font-size: 14px;
  }

  .cake-stage {
    width: 190px;
    height: 175px;
  }

  .birthday-title {
    font-size: 28px;
  }

  .bubu-name {
    font-size: 24px;
  }
}

