/* ============================================
   BIRTHDAY SURPRISE - ROMANTIC THEME
   Enhanced with GSAP animations + Lucide SVG icons
   + Cake, Typewriter, Fireworks click, Timeline,
     Sparkle trail, Wish capsules, Blooming Rose,
     Balloon Release, Fireflies, Flip Cards
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (THEME VARIABLES)
   ============================================ */

.theme-day {
  --bg-gradient: linear-gradient(135deg, #ffeef8 0%, #ffe4f0 25%, #ffd6e8 50%, #f0e0ff 75%, #e8d5ff 100%);
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --text-primary: #5a1a4a;
  --text-soft: #8b4a7a;
  --accent: #e91e8c;
  --accent-soft: #f472b6;
  --accent-glow: rgba(233, 30, 140, 0.3);
  --border: rgba(233, 30, 140, 0.2);
  --input-bg: rgba(255, 255, 255, 0.6);
  --shadow: 0 8px 32px rgba(233, 30, 140, 0.15);
  --shadow-accent: 0 4px 20px rgba(233, 30, 140, 0.3);
  --particle-color: rgba(233, 30, 140, 0.1);
  --star-display: none;
  --letter-bg: linear-gradient(180deg, #fff8f0 0%, #fff0e8 100%);
  --letter-border: #e8d5c4;
  --letter-text: #5a3a4a;
  --letter-text-soft: #6a4a5a;
  --letter-stripe: linear-gradient(90deg, #e8a0b0, #d4708a, #e8a0b0);
  --timeline-line: #e8a0b0;
  --timeline-dot: #e91e8c;
  --capsule-bg: rgba(255, 255, 255, 0.5);
  --capsule-border: rgba(233, 30, 140, 0.3);
  --capsule-text: #5a1a4a;
  --cake-glow: rgba(255, 200, 0, 0.08);
  --flip-card-front: linear-gradient(135deg, #fce4ec, #f8bbd0);
  --flip-card-back: rgba(255, 255, 255, 0.9);
  --flip-card-border: rgba(233, 30, 140, 0.25);
  --rose-shadow: rgba(233, 30, 140, 0.15);
}

.theme-night {
  --bg-gradient: linear-gradient(135deg, #1a0a2e 0%, #16082a 25%, #2d1b4e 50%, #1a1040 75%, #0f0a20 100%);
  --surface: rgba(45, 27, 78, 0.6);
  --surface-strong: rgba(45, 27, 78, 0.8);
  --text-primary: #f0d0ff;
  --text-soft: #c8a0e0;
  --accent: #ff6bc1;
  --accent-soft: #e879a8;
  --accent-glow: rgba(255, 107, 193, 0.4);
  --border: rgba(255, 107, 193, 0.25);
  --input-bg: rgba(45, 27, 78, 0.5);
  --shadow: 0 8px 32px rgba(255, 107, 193, 0.2);
  --shadow-accent: 0 4px 20px rgba(255, 107, 193, 0.4);
  --particle-color: rgba(255, 107, 193, 0.15);
  --star-display: block;
  --letter-bg: linear-gradient(180deg, #2a1845 0%, #1f1240 100%);
  --letter-border: #4a2a6a;
  --letter-text: #e8c8f0;
  --letter-text-soft: #c8a0d8;
  --letter-stripe: linear-gradient(90deg, #ff6bc1, #e879a8, #ff6bc1);
  --timeline-line: #6a3a8a;
  --timeline-dot: #ff6bc1;
  --capsule-bg: rgba(45, 27, 78, 0.5);
  --capsule-border: rgba(255, 107, 193, 0.3);
  --capsule-text: #f0d0ff;
  --cake-glow: rgba(255, 200, 0, 0.2);
  --flip-card-front: linear-gradient(135deg, #3d1a5e, #4a2080);
  --flip-card-back: rgba(45, 27, 78, 0.9);
  --flip-card-border: rgba(255, 107, 193, 0.3);
  --rose-shadow: rgba(255, 107, 193, 0.25);
}

/* ============================================
   BASE RESET & STYLES
   ============================================ */

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-gradient);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cursive { font-family: 'Dancing Script', cursive; }

/* ============================================
   SVG ICON SYSTEM
   ============================================ */

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: inherit;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 40px; height: 40px; }

.heart-inline {
  display: inline-block;
  vertical-align: middle;
  color: var(--accent);
}

.heart-inline svg {
  width: 14px; height: 14px;
  fill: var(--accent);
  stroke: var(--accent);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow); }
}

@keyframes float-heart {
  0% { transform: translateY(100vh) scale(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; transform: translateY(85vh) scale(1) rotate(10deg); }
  50% { margin-left: 25px; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(0.5) rotate(-15deg); opacity: 0; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes text-glow {
  0%, 100% { text-shadow: 0 0 20px var(--accent-glow); }
  50% { text-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-glow); }
}

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

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

@keyframes flame-flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 0.9; }
  25% { transform: scaleY(1.12) scaleX(0.88); opacity: 1; }
  50% { transform: scaleY(0.93) scaleX(1.07); opacity: 0.85; }
  75% { transform: scaleY(1.07) scaleX(0.93); opacity: 0.95; }
}

@keyframes flame-glow-pulse {
  0%, 100% { opacity: 0.06; transform: scale(1); }
  50% { opacity: 0.12; transform: scale(1.3); }
}

@keyframes typewriter-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes sparkle-fade {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.3); }
}

@keyframes capsule-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(2deg); }
  66% { transform: translateY(4px) rotate(-1deg); }
}

@keyframes cake-all-out {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
  100% { filter: brightness(1.1); }
}

@keyframes smoke-rise {
  0% { opacity: 0.5; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(1.8); }
}

@keyframes cake-wobble {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-1.5deg); }
  40% { transform: rotate(1.5deg); }
  60% { transform: rotate(-1deg); }
  80% { transform: rotate(1deg); }
}

@keyframes rose-petal-fall {
  0% { opacity: 0.8; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--fall-x, 30px), 200px) rotate(var(--fall-rot, 180deg)); }
}

@keyframes firefly-drift {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  15% { opacity: 0.8; }
  50% { transform: translate(var(--ff-dx, 30px), var(--ff-dy, -40px)) scale(1.2); opacity: 0.6; }
  85% { opacity: 0.7; }
  100% { transform: translate(var(--ff-dx2, -20px), var(--ff-dy2, 50px)) scale(0.8); opacity: 0; }
}

@keyframes firefly-pulse {
  0%, 100% { box-shadow: 0 0 4px var(--ff-color, #ffd700), 0 0 8px var(--ff-color, #ffd700); }
  50% { box-shadow: 0 0 8px var(--ff-color, #ffd700), 0 0 20px var(--ff-color, #ffd700), 0 0 30px var(--ff-color, rgba(255,215,0,0.3)); }
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(8px); opacity: 1; }
}

@keyframes bloom-toast-in {
  0% { transform: translateX(-50%) translateY(20px) scale(0.9); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

@keyframes bloom-toast-out {
  0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(20px) scale(0.9); opacity: 0; }
}

@keyframes bloom-sparkle-burst {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes balloon-float-up {
  0% { transform: translateY(0) translateX(0); opacity: 1; }
  30% { transform: translateY(-30vh) translateX(10px); }
  60% { transform: translateY(-60vh) translateX(-15px); opacity: 0.9; }
  100% { transform: translateY(-120vh) translateX(20px); opacity: 0; }
}

@keyframes flip-card-flip {
  0% { transform: perspective(600px) rotateY(0deg); }
  100% { transform: perspective(600px) rotateY(180deg); }
}

/* ============================================
   UTILITY
   ============================================ */

.hidden { display: none !important; }
.text-center { text-align: center; }

/* ============================================
   GPU ACCELERATION HINTS
   ============================================ */

.screen,
.lock-icon-inner,
.timer-block,
.love-letter,
.btn-unlock,
.btn-replay,
.btn-reset,
.control-btn,
.btn-hint,
.btn-love-letter,
.cake-container,
.timeline-item,
.wish-capsule,
.flip-card,
.balloon-stage,
.rose-container {
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.screen {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.screen--reveal {
  justify-content: flex-start;
  padding-top: 3rem;
  overflow-y: auto;
}

/* ============================================
   BACKGROUND
   ============================================ */

.bg-particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}

.bg-particle {
  position: absolute; border-radius: 50%; opacity: 0.2;
  background: radial-gradient(circle, var(--particle-color) 0%, transparent 70%);
  animation: float 4s ease-in-out infinite;
  will-change: transform;
}

.bg-stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  display: var(--star-display);
}

.bg-star {
  position: absolute; width: 2px; height: 2px;
  background: white; border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

.canvas-overlay {
  position: fixed; inset: 0; pointer-events: none; width: 100vw; height: 100vh;
}

#confetti-canvas { z-index: 50; }
#fireworks-canvas { z-index: 45; }

/* ============================================
   FIXED CONTROLS
   ============================================ */

.controls {
  position: fixed; top: 1rem; right: 1rem; z-index: 60; display: flex; gap: 0.5rem; flex-wrap: wrap;
  max-width: 200px; justify-content: flex-end;
}

.control-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); color: var(--accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  outline: none;
}

.control-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.control-btn .icon {
  width: 18px; height: 18px;
}

/* ============================================
   FLOATING HEARTS
   ============================================ */

.floating-hearts-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden;
}

.floating-heart {
  position: absolute; bottom: -5%; font-size: 1.5rem;
  animation: float-heart 6s ease-in-out forwards; pointer-events: none;
}

/* ============================================
   SPARKLE CURSOR TRAIL
   ============================================ */

.sparkle-trail {
  position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden;
}

.sparkle-particle {
  position: absolute;
  pointer-events: none;
  animation: sparkle-fade 0.6s ease-out forwards;
}

.sparkle-particle::before {
  content: '';
  display: block;
  width: var(--sparkle-size, 6px); height: var(--sparkle-size, 6px);
  border-radius: 50%;
  background: var(--sparkle-color, var(--accent));
  box-shadow: 0 0 8px var(--sparkle-color, var(--accent-glow));
}

/* ============================================
   WISH CAPSULES
   ============================================ */

.wish-capsules-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 35; overflow: hidden;
}

.wish-capsule {
  position: absolute;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: var(--capsule-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--capsule-border);
  color: var(--capsule-text);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  pointer-events: auto;
  animation: capsule-float 4s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
}

.wish-capsule:hover {
  box-shadow: 0 6px 25px var(--accent-glow);
}

.wish-capsule.popped {
  background: var(--accent-glow);
  border-color: var(--accent);
  pointer-events: auto;
  cursor: default;
  animation: capsule-float 4s ease-in-out infinite;
  max-width: 250px;
  white-space: normal;
  text-overflow: clip;
  font-family: 'Dancing Script', cursive;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.wish-capsule.popped::after {
  content: ' \2713';
  color: var(--accent);
  font-weight: 700;
  margin-left: 4px;
}

/* ============================================
   BLOOMING ROSE
   ============================================ */

.rose-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1rem;
  z-index: 40;
  width: 70px;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px var(--rose-shadow));
  transition: filter 0.5s ease;
}

.rose-container svg {
  width: 100%;
  height: auto;
}

.rose-container.fully-bloomed {
  filter: drop-shadow(0 8px 25px var(--accent-glow));
}

.rose-progress {
  text-align: center;
  font-size: 0.6rem;
  color: var(--text-soft);
  opacity: 0.5;
  margin-top: -4px;
  font-weight: 500;
}

.falling-petal {
  position: absolute;
  width: 8px;
  height: 10px;
  background: var(--accent);
  border-radius: 50% 50% 50% 0;
  opacity: 0.7;
  animation: rose-petal-fall 3s ease-in forwards;
  pointer-events: none;
}

/* ============================================
   FIREFLIES (Night Mode)
   ============================================ */

.fireflies-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 38; overflow: hidden;
  display: var(--star-display);
}

.firefly {
  position: absolute;
  width: var(--ff-size, 4px);
  height: var(--ff-size, 4px);
  border-radius: 50%;
  background: var(--ff-color, #ffd700);
  animation: firefly-drift var(--ff-duration, 8s) ease-in-out forwards,
             firefly-pulse var(--ff-pulse, 2s) ease-in-out infinite;
  pointer-events: none;
}

/* ============================================
   SCROLL HINT
   ============================================ */

.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 42;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.scroll-hint.visible {
  opacity: 0.7;
  animation: scroll-hint-bounce 2s ease-in-out infinite;
}

.scroll-hint-text {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scroll-hint-arrow {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ============================================
   BLOOM TOAST
   ============================================ */

.bloom-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow), var(--shadow);
  color: var(--accent);
  font-family: 'Dancing Script', cursive;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

.bloom-toast.show {
  animation: bloom-toast-in 0.5s ease-out forwards;
}

.bloom-toast.hide {
  animation: bloom-toast-out 0.4s ease-in forwards;
}

.bloom-toast-icon {
  font-size: 1.3rem;
  animation: gentle-bounce 1.5s ease-in-out infinite;
}

.bloom-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  animation: bloom-sparkle-burst 0.8s ease-out forwards;
}

/* ============================================
   SCREEN 0: CODE ENTRY
   ============================================ */

.lock-icon { margin-bottom: 2rem; }

.lock-icon-inner {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--surface);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  animation: pulse-glow 2s ease-in-out infinite, lock-pulse 3s ease-in-out infinite;
}

.lock-icon-inner .icon {
  width: 36px; height: 36px;
  stroke-width: 1.8;
}

.screen-title {
  font-family: 'Dancing Script', cursive; font-size: 2.5rem;
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.5rem; text-align: center;
}

.screen-subtitle {
  font-size: 1.1rem; color: var(--text-soft);
  margin-bottom: 2rem; text-align: center;
}

/* Secret code input */
.secret-input-wrapper {
  width: 100%; max-width: 320px; margin-bottom: 1.5rem;
}

.secret-input {
  width: 100%; background: var(--input-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--border); border-radius: 1rem;
  color: var(--text-primary); font-size: 2rem;
  font-family: 'Poppins', sans-serif; letter-spacing: 0.5em;
  text-align: center; text-transform: uppercase;
  padding: 1rem 2rem; outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.secret-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}

.secret-input::placeholder {
  color: var(--text-soft); opacity: 0.5;
  letter-spacing: 0.3em; font-size: 1.2rem;
}

/* Unlock button */
.btn-unlock {
  padding: 0.85rem 2.5rem; border-radius: 50px; border: none;
  font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600;
  color: white; background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: var(--shadow-accent); cursor: pointer;
  display: flex; align-items: center; gap: 0.5rem;
  outline: none;
}

.btn-unlock .icon { width: 18px; height: 18px; }

/* Teasing message */
.teasing-msg {
  margin-top: 1.5rem; color: var(--accent);
  font-weight: 500; font-size: 1rem; text-align: center;
}

/* Hint section */
.hint-section { margin-top: 1rem; text-align: center; }

.btn-hint {
  padding: 0.6rem 1.5rem; border-radius: 50px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--accent); font-family: 'Poppins', sans-serif;
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  animation: gentle-bounce 2s ease-in-out infinite;
  outline: none;
}

.btn-hint .icon { width: 16px; height: 16px; }

.hint-text {
  margin-top: 0.75rem; padding: 1rem 1.5rem; border-radius: 0.75rem;
  background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); color: var(--text-soft);
  font-style: italic; font-size: 0.9rem;
}

/* Footer */
.footer-text {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-size: 0.75rem; color: var(--text-soft); opacity: 0.4;
  display: flex; align-items: center; gap: 0.2rem;
}

/* ============================================
   SCREEN 1: COUNTDOWN TIMER
   ============================================ */

.timer-unlock-icon { margin-bottom: 1.5rem; }

.timer-unlock-icon .lock-icon-inner {
  animation: none;
  opacity: 0.9;
}

.countdown-title {
  font-family: 'Dancing Script', cursive; font-size: 2.2rem;
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.5rem; text-align: center;
}

.countdown-subtitle {
  font-size: 1rem; color: var(--text-soft);
  margin-bottom: 2.5rem; text-align: center;
}

.timer-row {
  display: flex; gap: 1rem; margin-bottom: 2rem;
}

.timer-block {
  background: var(--surface-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 1rem;
  padding: 1rem 1.25rem; min-width: 75px; text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.timer-block:first-child { animation: pulse-glow 2.5s ease-in-out infinite; }

.timer-value {
  font-size: 2.5rem; font-weight: 700; color: var(--text-primary);
  line-height: 1; font-variant-numeric: tabular-nums;
}

.timer-label {
  font-size: 0.7rem; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.3rem;
}

.motivational-msg {
  font-style: italic; font-size: 1.05rem; color: var(--text-soft);
  text-align: center; max-width: 400px; margin-bottom: 2rem;
}

.countdown-target {
  font-size: 0.75rem; color: var(--text-soft);
  opacity: 0.6; margin-bottom: 1.5rem;
}

.btn-reset-small {
  margin-top: 1rem; padding: 0.4rem 1rem; border: none;
  border-radius: 50px; background: transparent;
  color: var(--text-soft); font-family: 'Poppins', sans-serif;
  font-size: 0.7rem; cursor: pointer; opacity: 0.5;
  display: flex; align-items: center; gap: 0.3rem;
  outline: none;
}

.btn-reset-small .icon { width: 12px; height: 12px; }

/* ============================================
   SCREEN 2: BIRTHDAY REVEAL
   ============================================ */

.reveal-heading {
  margin-top: 1.5rem; margin-bottom: 1.5rem; text-align: center;
}

.reveal-heading h1 {
  font-family: 'Dancing Script', cursive; font-size: 3.5rem;
  font-weight: 700; color: var(--accent);
  animation: text-glow 2s ease-in-out infinite; line-height: 1.2;
}

.reveal-heading h2 {
  font-family: 'Dancing Script', cursive; font-size: 2.2rem;
  font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}

.reveal-heading h2 .icon {
  width: 28px; height: 28px;
  color: var(--accent);
}

/* ============================================
   BIRTHDAY CAKE
   ============================================ */

.cake-section {
  width: 100%; max-width: 340px;
  margin-bottom: 2rem; text-align: center;
}

.cake-instruction {
  font-size: 0.85rem; color: var(--text-soft);
  margin-bottom: 0.75rem; font-style: italic;
  opacity: 0.7;
}

.cake-container {
  cursor: pointer;
  transition: filter 0.5s ease;
  position: relative;
}

.cake-container svg {
  width: 100%; max-width: 280px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1));
  transition: filter 0.5s ease;
}

/* Night mode warm glow for cake */
.theme-night .cake-container svg {
  filter: drop-shadow(0 0 30px var(--cake-glow)) drop-shadow(0 8px 20px rgba(0,0,0,0.2));
}

.candle {
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.candle .flame {
  animation: flame-flicker 0.3s ease-in-out infinite;
  transform-origin: center bottom;
}

.candle .flame-glow {
  animation: flame-glow-pulse 1s ease-in-out infinite;
}

.candle.blown .flame,
.candle.blown .flame-glow {
  display: none;
}

.candle.blown {
  opacity: 0.7;
}

.cake-container.all-blown {
  animation: cake-wobble 0.6s ease;
}

.cake-container.all-blown svg {
  filter: drop-shadow(0 0 25px var(--cake-glow));
}

.theme-night .cake-container.all-blown svg {
  filter: drop-shadow(0 0 40px var(--cake-glow)) drop-shadow(0 8px 20px rgba(0,0,0,0.2));
}

.smoke-wisp {
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.smoke-wisp.visible {
  animation: smoke-rise 1.5s ease-out forwards;
}

.cake-message {
  margin-top: 1rem;
  font-family: 'Dancing Script', cursive;
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   BIRTHDAY LETTER + TYPEWRITER
   ============================================ */

.love-letter-section {
  width: 100%; max-width: 500px; margin-bottom: 2rem;
}

.btn-love-letter {
  width: 100%; padding: 1rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: var(--surface);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--accent); font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  outline: none;
}

.btn-love-letter .icon { width: 18px; height: 18px; }

.love-letter {
  margin-top: 1rem; background: var(--letter-bg);
  border: 1px solid var(--letter-border); border-radius: 0.5rem;
  padding: 2rem; position: relative;
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
  overflow: hidden; transform-origin: top center;
}

.love-letter::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--letter-stripe);
  border-radius: 0.5rem 0.5rem 0 0;
}

.love-letter .letter-greeting {
  font-family: 'Dancing Script', cursive; font-size: 1.2rem;
  color: var(--letter-text); margin-bottom: 0.75rem;
}

.love-letter .letter-body {
  font-size: 0.95rem; line-height: 1.7;
  color: var(--letter-text-soft); margin-bottom: 0.75rem;
  min-height: 1.7em;
}

.love-letter .letter-sign {
  font-family: 'Dancing Script', cursive; font-size: 1.1rem;
  font-weight: 600; color: var(--letter-text);
  display: flex; align-items: center; gap: 0.3rem;
  min-height: 1.5em;
}

/* Typewriter cursor */
.typewriter-cursor::after {
  content: '|';
  color: var(--accent);
  animation: typewriter-cursor 0.6s step-end infinite;
  margin-left: 1px;
}

/* ============================================
   FLIP CARDS
   ============================================ */

.flip-cards-section {
  width: 100%; max-width: 500px; margin-bottom: 2rem;
}

.flip-cards-title {
  font-family: 'Dancing Script', cursive; font-size: 1.3rem;
  font-weight: 600; color: var(--text-primary);
  text-align: center; margin-bottom: 0.3rem;
}

.flip-cards-subtitle {
  font-size: 0.75rem; color: var(--text-soft);
  text-align: center; margin-bottom: 1rem; opacity: 0.6;
}

.flip-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.flip-card {
  perspective: 600px;
  cursor: pointer;
  aspect-ratio: 3/4;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border: 1px solid var(--flip-card-border);
}

.flip-card-front {
  background: var(--flip-card-front);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

.flip-card-front .card-number {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.8;
}

.flip-card-front .card-icon {
  font-size: 1.2rem;
  margin-top: 0.3rem;
  opacity: 0.5;
}

.flip-card-back {
  background: var(--flip-card-back);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: rotateY(180deg);
  text-align: center;
}

.flip-card-back .card-reason {
  font-family: 'Dancing Script', cursive;
  font-size: 0.9rem;
  color: var(--accent);
  line-height: 1.4;
}

/* ============================================
   MEMORY TIMELINE
   ============================================ */

.timeline-section {
  width: 100%; max-width: 420px; margin-bottom: 2rem;
}

.timeline-title {
  font-family: 'Dancing Script', cursive; font-size: 1.3rem;
  font-weight: 600; color: var(--text-primary);
  text-align: center; margin-bottom: 1.5rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-line);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--timeline-dot);
  border: 3px solid var(--surface-strong);
  box-shadow: 0 0 8px var(--accent-glow);
  z-index: 1;
}

.timeline-date {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* ============================================
   BALLOON RELEASE
   ============================================ */

.balloon-section {
  width: 100%; max-width: 400px; margin-bottom: 2rem; text-align: center;
}

.balloon-title {
  font-family: 'Dancing Script', cursive; font-size: 1.3rem;
  font-weight: 600; color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.balloon-subtitle {
  font-size: 0.8rem; color: var(--text-soft); opacity: 0.7;
  margin-bottom: 1rem;
}

.balloon-wish-input-wrap {
  width: 100%; max-width: 300px; margin: 0 auto 1rem;
}

.balloon-wish-input {
  width: 100%;
  background: var(--input-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--border); border-radius: 0.75rem;
  color: var(--text-primary); font-family: 'Dancing Script', cursive;
  font-size: 1.1rem; padding: 0.75rem 1rem;
  text-align: center; outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.balloon-wish-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.balloon-wish-input::placeholder {
  color: var(--text-soft); opacity: 0.5;
  font-size: 0.9rem;
}

.balloon-stage {
  width: 140px;
  margin: 0 auto 1rem;
  transition: transform 0.3s ease;
}

.balloon-stage.releasing {
  animation: balloon-float-up 4s ease-in forwards;
}

.balloon-stage.inflating {
  animation: gentle-bounce 0.4s ease-in-out infinite;
}

.btn-release-balloon {
  padding: 0.7rem 1.8rem; border-radius: 50px; border: none;
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 600;
  color: white; background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: var(--shadow-accent); cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  outline: none; transition: opacity 0.3s ease;
}

.btn-release-balloon:disabled {
  opacity: 0.4; cursor: not-allowed;
}

.btn-release-balloon .icon { width: 16px; height: 16px; }

.balloon-released-msg {
  margin-top: 1rem;
  font-family: 'Dancing Script', cursive;
  font-size: 1.1rem;
  color: var(--accent);
  font-style: italic;
  opacity: 0.8;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.reveal-actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.75rem; margin-bottom: 2rem;
}

.btn-replay {
  padding: 0.7rem 1.5rem; border-radius: 50px; border: none;
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 600;
  color: white; background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: var(--shadow-accent); cursor: pointer;
  display: flex; align-items: center; gap: 0.4rem;
  outline: none;
}

.btn-replay .icon { width: 16px; height: 16px; }

.btn-reset {
  padding: 0.7rem 1.5rem; border-radius: 50px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); font-family: 'Poppins', sans-serif;
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 0.4rem;
  outline: none;
}

.btn-reset .icon { width: 16px; height: 16px; }

.reveal-footer {
  font-size: 0.75rem; color: var(--text-soft);
  opacity: 0.5; padding-bottom: 2rem;
  display: flex; align-items: center; gap: 0.2rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 640px) {
  .screen-title { font-size: 2rem; }
  .screen-subtitle { font-size: 0.95rem; }
  .secret-input { font-size: 1.5rem; letter-spacing: 0.3em; padding: 0.75rem 1.5rem; }
  .timer-block { min-width: 60px; padding: 0.75rem 0.75rem; }
  .timer-value { font-size: 2rem; }
  .timer-label { font-size: 0.6rem; }
  .timer-row { gap: 0.6rem; }
  .reveal-heading h1 { font-size: 2.5rem; }
  .reveal-heading h2 { font-size: 1.6rem; }
  .countdown-title { font-size: 1.8rem; }
  .love-letter { padding: 1.5rem; }
  .controls { top: 0.5rem; right: 0.5rem; gap: 0.35rem; }
  .control-btn { width: 36px; height: 36px; }
  .control-btn .icon { width: 16px; height: 16px; }
  .lock-icon-inner { width: 68px; height: 68px; }
  .lock-icon-inner .icon { width: 30px; height: 30px; }
  .cake-container svg { max-width: 230px; }
  .timeline-section { max-width: 340px; }
  .wish-capsule { font-size: 0.65rem; padding: 0.4rem 0.75rem; }
  .rose-container { width: 50px; bottom: 1rem; left: 0.5rem; }
  .flip-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .flip-card-back .card-reason { font-size: 0.75rem; }
  .balloon-stage { width: 110px; }
  .bloom-toast { font-size: 0.95rem; padding: 0.6rem 1.2rem; }
  .scroll-hint-text { font-size: 0.6rem; }
}

@media (max-width: 380px) {
  .timer-block { min-width: 52px; padding: 0.5rem 0.5rem; }
  .timer-value { font-size: 1.6rem; }
  .reveal-heading h1 { font-size: 2rem; }
  .reveal-heading h2 { font-size: 1.3rem; }
  .reveal-heading h2 .icon { width: 22px; height: 22px; }
  .flip-cards-grid { gap: 0.4rem; }
}

/* ============================================
   SCROLLBAR & SELECTION
   ============================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

::selection { background: var(--accent); color: white; }
