/* ==========================================================================
   BIRTHDAY CELEBRATION WEB APP - MODERN DESIGN SYSTEM & STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Great+Vibes&family=Outfit:wght@300;400;600;800&family=Poppins:wght@400;600;700&display=swap');

:root {
  /* Default Theme: Romantic Red & Pink Palette (from Video Prompt) */
  --bg-gradient: linear-gradient(135deg, #1c0512 0%, #3d0924 40%, #5e0d34 70%, #15020c 100%);
  --primary-color: #ff2a6d;
  --primary-glow: rgba(255, 42, 109, 0.6);
  --secondary-color: #ff4757;
  --accent-gold: #ffd166;
  --accent-glow: rgba(255, 209, 102, 0.6);
  --text-main: #fff0f5;
  --text-muted: #f4acb7;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);

  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-cursive: 'Great Vibes', cursive;
  --font-display: 'Cinzel', serif;
  --font-body: 'Poppins', sans-serif;

  /* Transition speeds */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Master Romantic Girlfriend Day Background & Card Styling */
body[data-page="girlfriend"] {
  background: radial-gradient(circle at 50% 10%, #610935 0%, #34041e 40%, #0e0108 100%) !important;
  background-attachment: fixed !important;
}

body[data-page="girlfriend"] .celebration-section,
body[data-page="girlfriend"] .passcode-card,
body[data-page="girlfriend"] .countdown-card,
body[data-page="girlfriend"] .love-reason-card {
  background: rgba(45, 8, 28, 0.85) !important;
  border: 1.5px solid rgba(255, 105, 180, 0.5) !important;
  box-shadow: 0 20px 45px rgba(255, 42, 109, 0.3), inset 0 0 30px rgba(255, 105, 180, 0.2) !important;
  backdrop-filter: blur(24px) !important;
}

body[data-page="girlfriend"] h1,
body[data-page="girlfriend"] h2 {
  background: linear-gradient(135deg, #ffffff 0%, #ff80c0 40%, #ffc0e0 70%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
}

/* POV Video Intro Screen (Shot 1: VS Code Dark Theme with Yellow Overlay Text) */
.code-intro-overlay {
  position: fixed;
  inset: 0;
  background: #0d1117;
  z-index: 3500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s ease, visibility 0.8s ease;
}

.code-intro-overlay.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.15);
}

.pov-yellow-banner {
  background: #ffbe0b;
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 10px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(255, 190, 11, 0.4);
  margin-bottom: 25px;
  text-align: center;
  animation: pulse-banner 2s infinite ease-in-out;
}

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

.vscode-editor-mock {
  width: 100%;
  max-width: 580px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  overflow: hidden;
}

.editor-header {
  background: #21262d;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #30363d;
}

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.file-name {
  color: #8b949e;
  font-size: 0.85rem;
  font-family: monospace;
  margin-left: 10px;
}

.editor-code {
  padding: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #c9d1d9;
}

.tag { color: #7ee787; }
.attr { color: #79c0ff; }
.string { color: #a5d6ff; }
.comment { color: #8b949e; font-style: italic; }

.click-to-launch-hint {
  text-align: center;
  padding: 12px;
  background: #21262d;
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-family: var(--font-heading);
}

.password-lock-overlay {
  position: fixed;
  inset: 0;
  background: #0d0208 !important; /* 100% Solid Opaque Dark Background */
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.password-lock-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.08);
}

/* Hide inner page container & bottom nav bar until passcode is unlocked */
body:not(.is-unlocked) .app-container,
body:not(.is-unlocked) .mobile-bottom-nav,
body:not(.is-unlocked) .audio-control-btn {
  display: none !important;
}

/* Passcode Lock Container - Split Layout (Polaroid Photo + Keypad) */
.passcode-split-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 800px;
  width: 92%;
  margin: 0 auto;
}

.passcode-polaroid-side {
  flex: 1;
  max-width: 340px;
  width: 100%;
}

.passcode-card {
  flex: 1;
  max-width: 360px;
  width: 100%;
  background: rgba(18, 10, 30, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.4);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 36px;
  padding: 28px 20px;
  box-shadow: 0 30px 80px rgba(255, 42, 109, 0.35), inset 0 0 20px rgba(255, 215, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Keypad Button Micro-Animations */
.keypad-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.keypad-btn:active,
.keypad-btn.pressed {
  transform: scale(0.88);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
  border-color: #fff;
  box-shadow: 0 0 25px var(--primary-glow);
}

/* Romantic Loading Screen Overlay */
.loading-screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 3, 10, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 2400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.heart-loader-icon {
  font-size: 4rem;
  animation: pulse-heart-beat 0.9s infinite alternate cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 25px var(--primary-glow));
}

@keyframes pulse-heart-beat {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.25); }
}

.loading-progress-bar {
  width: 260px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-top: 25px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
  border-radius: 10px;
  transition: width 0.1s linear;
  box-shadow: 0 0 15px var(--primary-glow);
}

.loading-text-msg {
  margin-top: 15px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Animated Red Envelope (Video Style) */
.red-envelope-card {
  background: linear-gradient(135deg, #e63946, #b7094c) !important;
  box-shadow: 0 25px 60px rgba(183, 9, 76, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.make-a-wish-banner {
  font-family: var(--font-cursive);
  font-size: 3.5rem;
  color: var(--accent-gold);
  text-shadow: 0 0 20px var(--accent-glow), 0 5px 15px rgba(0,0,0,0.5);
  animation: glow-pulse 2s infinite alternate ease-in-out;
  margin-bottom: 10px;
}

@keyframes glow-pulse {
  0% { opacity: 0.85; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.03); }
}

/* Theme Variations */
[data-theme="rose"] {
  --bg-gradient: linear-gradient(135deg, #2b0b1a 0%, #4a1230 40%, #6b1d47 70%, #1e0512 100%);
  --primary-color: #ff6584;
  --primary-glow: rgba(255, 101, 132, 0.5);
  --secondary-color: #c72c41;
  --accent-gold: #ffd166;
  --accent-glow: rgba(255, 209, 102, 0.6);
}

[data-theme="gold"] {
  --bg-gradient: linear-gradient(135deg, #191409 0%, #382c11 40%, #544317 70%, #120e06 100%);
  --primary-color: #ffd700;
  --primary-glow: rgba(255, 215, 0, 0.5);
  --secondary-color: #b8860b;
  --accent-gold: #fff8dc;
  --accent-glow: rgba(255, 248, 220, 0.6);
}

[data-theme="neon"] {
  --bg-gradient: linear-gradient(135deg, #050515 0%, #0a1128 40%, #001f54 70%, #03045e 100%);
  --primary-color: #00f5d4;
  --primary-glow: rgba(0, 245, 212, 0.5);
  --secondary-color: #7b2cbf;
  --accent-gold: #f72585;
  --accent-glow: rgba(247, 37, 133, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  position: relative;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  image-rendering: -webkit-optimize-contrast;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  -webkit-touch-callout: none !important;
}

img {
  -webkit-user-drag: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  pointer-events: none !important;
}

/* Background Canvas Overlay */
#fx-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
}

/* Music Control Floating Button */
.audio-control-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-normal);
  color: #fff;
  font-size: 1.4rem;
}

.audio-control-btn:hover {
  transform: scale(1.1) rotate(15deg);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 20px var(--primary-glow);
}

.audio-control-btn.playing {
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--primary-glow); }
  70% { box-shadow: 0 0 0 15px rgba(255, 59, 139, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 139, 0); }
}

/* Floating Customize Gear Button */
.customize-floating-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  padding: 10px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-normal);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.customize-floating-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Main Layout Container */
.app-container {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 80px 20px 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 5;
}

/* Section Common Styling */
/* Romantic Floating Hearts Background Canvas (Hardware Accelerated) */
.floating-heart-particle {
  position: fixed;
  pointer-events: none;
  z-index: 8;
  font-size: 1.1rem;
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: float-up-fade 6s linear forwards;
}

@keyframes float-up-fade {
  0% { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  20% { opacity: 0.85; }
  100% { transform: translate3d(0, -100vh, 0) scale(1.3); opacity: 0; }
}

/* Mouse / Touch Sparkle Cursor Trail Particle */
.cursor-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: sparkle-shrink 0.4s linear forwards;
}

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

/* Floating Mobile Bottom Navigation Bar (App-Like Cool Experience) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 10, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 35px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 42, 109, 0.3);
}

.nav-item-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
}

.nav-item-btn:hover, .nav-item-btn.active {
  background: linear-gradient(135deg, var(--primary-color), #b7094c);
  color: #ffffff;
  box-shadow: 0 0 15px var(--primary-glow);
  transform: scale(1.08);
}

/* Multi-Page Tabbed Page System */
.tab-page {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  opacity: 1;
  transform: translateY(0);
}

/* Page Navigation Arrow Buttons */
.page-nav-bar {
  display: flex;
  gap: 15px;
  width: 100%;
  justify-content: center;
  margin-top: 15px;
}

.page-nav-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--card-border);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 25px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-nav-btn:hover {
  background: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
}

@keyframes glow-pulse-badge {
  0% { box-shadow: 0 0 10px rgba(255, 42, 109, 0.2); }
  100% { box-shadow: 0 0 25px rgba(255, 42, 109, 0.6); }
}

/* Glassmorphism Neon Section Cards */
.celebration-section {
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  padding: 36px 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Interactive Cake Stage & Eating Girl Avatar */
.cake-stage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  position: relative;
  flex-wrap: wrap;
}

/* Floating Cake Slice Piece */
.cake-slice-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.cake-slice-piece.floating-to-girl {
  opacity: 1;
  transform: translate(110px, -20px) scale(1.1) rotate(15deg);
}

/* Animated Girl Avatar Character */
.girl-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-top: 10px;
}

/* Photorealistic Real-Life Birthday Cake Reel Experience */
.real-life-cake-reel-container {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--accent-gold);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
}

.real-life-photo-frame-box {
  width: 100%;
  height: 460px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.real-life-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.real-life-photo-img.pulse-eat {
  transform: scale(1.05);
}

.reel-status-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  color: var(--accent-gold);
  padding: 6px 18px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
}
  position: absolute;
  top: 40%;
  left: 50%;
  width: 90px;
  height: 90px;
  font-size: 3.5rem;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* Stage 1: Hand reaches out & picks up slice */
.eating-hand-wrapper.stage-pickup {
  opacity: 1;
  animation: hand-reach-pickup 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes hand-reach-pickup {
  0% {
    transform: translate(-140px, 30px) scale(0.5) rotate(-25deg);
  }
  100% {
    transform: translate(-50px, 0px) scale(1) rotate(0deg);
  }
}

/* Stage 2: Hand lifts cake slice directly up to mouth */
.eating-hand-wrapper.stage-to-mouth {
  opacity: 1;
  animation: hand-lift-to-mouth 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes hand-lift-to-mouth {
  0% {
    transform: translate(-50px, 0px) scale(1) rotate(0deg);
  }
  100% {
    transform: translate(60px, -50px) scale(1.15) rotate(15deg);
  }
}

/* Stage 3: Bite & disappearance at mouth */
.eating-hand-wrapper.stage-bitten {
  animation: slice-bite-disappear 0.6s ease forwards;
}

@keyframes slice-bite-disappear {
  0% { transform: translate(60px, -50px) scale(1.15); opacity: 1; }
  50% { transform: translate(65px, -55px) scale(1.3); opacity: 0.8; }
  100% { transform: translate(70px, -60px) scale(0); opacity: 0; }
}
  width: 170px;
  height: 190px;
  background: #ffffff;
  padding: 10px 10px 20px 10px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transform: rotate(3deg);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.real-girl-photo-frame:hover {
  transform: scale(1.08) rotate(0deg);
  box-shadow: 0 20px 45px var(--primary-glow);
}

.real-girl-photo-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  background: #222;
}

.real-girl-photo-caption {
  font-family: var(--font-cursive);
  font-size: 1.3rem;
  color: #222;
  margin-top: 6px;
  text-align: center;
}

.real-girl-photo-frame.glow-eat {
  animation: photo-glow-pulse 0.8s infinite alternate cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes photo-glow-pulse {
  0% { box-shadow: 0 0 15px var(--primary-glow); transform: scale(1) rotate(0deg); }
  100% { box-shadow: 0 0 35px var(--accent-glow); transform: scale(1.08) rotate(2deg); }
}

/* Speech Bubble for Girl Avatar */
.speech-bubble {
  background: rgba(255, 255, 255, 0.95);
  color: #b7094c;
  padding: 8px 16px;
  border-radius: 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  position: relative;
  margin-bottom: 8px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent;
}

.speech-bubble.show {
  opacity: 1;
  transform: scale(1);
}
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--accent-gold);
  border-radius: 24px;
  padding: 30px 24px;
  margin-top: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.love-reason-card:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 20px 45px var(--primary-glow);
}

.reason-card-num {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.reason-card-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1.6;
}

/* Timeline Section */
.timeline-container {
  position: relative;
  width: 100%;
  margin-top: 30px;
  padding-left: 20px;
  border-left: 2px dashed var(--primary-color);
  text-align: left;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 20px;
}

.timeline-item::before {
  content: '💖';
  position: absolute;
  left: -32px;
  top: 0;
  font-size: 1.2rem;
  background: #1c0512;
  border-radius: 50%;
}

.timeline-date {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.9rem;
}

.timeline-title {
  font-size: 1.15rem;
  color: #fff;
  font-family: var(--font-heading);
  margin: 4px 0;
}

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

/* Endless Love Note Generator Box */
.endless-note-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed var(--accent-gold);
  border-radius: 20px;
  padding: 24px;
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  font-family: var(--font-cursive);
  font-size: 1.8rem;
  color: #fff;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 10px var(--primary-glow);
  transition: all 0.4s ease;
}

/* Header / Greeting Section */
.hero-header {
  margin-bottom: 20px;
}

.badge-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.main-title {
  font-family: var(--font-cursive);
  font-size: 4rem;
  line-height: 1.1;
  background: linear-gradient(45deg, #fff, var(--accent-gold), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin-bottom: 10px;
}

.bday-person-name {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #ffffff;
  text-transform: capitalize;
  text-shadow: 0 0 25px var(--primary-glow);
  margin-bottom: 8px;
}

.subtitle-msg {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 20px auto;
  line-height: 1.6;
}

/* Interactive Lock / Envelope Welcome Modal overlay */
.envelope-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Secret Password Lock Screen Overlay */
.password-lock-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e1035 0%, #090514 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.password-lock-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.1);
}

.passcode-card {
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 32px;
  padding: 35px 25px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.passcode-card.shake {
  animation: shake-error 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake-error {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
  40%, 60% { transform: translate3d(8px, 0, 0); }
}

.lock-icon-glow {
  font-size: 3.2rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 15px var(--primary-glow));
  animation: bounce-lock 2s infinite ease-in-out;
}

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

.passcode-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.passcode-hint {
  font-size: 0.88rem;
  color: var(--accent-gold);
  background: rgba(255, 190, 11, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 190, 11, 0.25);
}

.pin-display-box {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  transition: all 0.25s ease;
}

.pin-dot.filled {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: scale(1.15);
}

.pin-dot.error {
  background: #ff4757;
  border-color: #ff4757;
  box-shadow: 0 0 12px #ff4757;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
}

.keypad-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.keypad-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.keypad-btn:active {
  transform: scale(0.92);
  background: var(--primary-color);
}

.keypad-btn.action-key {
  font-size: 1rem;
  color: var(--text-muted);
  border-radius: 18px;
}

.envelope-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-card {
  width: 320px;
  height: 220px;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  border-radius: 16px;
  position: relative;
  box-shadow: 0 20px 50px rgba(255, 65, 108, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: var(--transition-normal);
  transform-style: preserve-3d;
}

.envelope-card:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 30px 60px rgba(255, 65, 108, 0.6);
}

.envelope-heart {
  font-size: 3.5rem;
  animation: pulse-heart 1.2s infinite ease-in-out;
}

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

.envelope-prompt {
  margin-top: 15px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

/* Countdown Timer */
.countdown-box {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.count-unit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  padding: 12px 18px;
  border-radius: 14px;
  min-width: 70px;
  text-align: center;
}

.count-num {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.count-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   CAKE & CANDLE CEREMONY SECTION
   ========================================================================== */

.cake-stage {
  position: relative;
  padding: 40px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cake-wrapper {
  position: relative;
  width: 280px;
  height: 260px;
  margin: 30px auto;
  cursor: pointer;
}

/* SVG Cake container styling */
.svg-cake-container {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

/* Candles on top */
.candles-group {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  z-index: 15;
}

.single-candle {
  width: 14px;
  height: 55px;
  background: linear-gradient(to bottom, #fff, #ffd166);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  cursor: pointer;
}

.candle-wick {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: #333;
}

.candle-flame {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #fff 0%, #ffbe0b 50%, #ff0000 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 15px #ffbe0b, 0 0 25px #ff0000;
  animation: flame-flicker 0.15s infinite alternate ease-in-out;
  transform-origin: center bottom;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Epic Wind Gust Sweep Animation on Candle Blow */
.wind-gust-overlay {
  position: absolute;
  top: 30%;
  left: -100px;
  width: 100px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  z-index: 40;
}

.wind-gust-overlay.active {
  animation: wind-gust-sweep 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes wind-gust-sweep {
  0% { left: -100px; opacity: 0.9; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.4); }
  100% { left: calc(100% + 100px); opacity: 0; transform: scale(0.8); }
}

/* Realistic 3D Rising Curly Smoke Trails */
.candle-smoke {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 25px;
  background: radial-gradient(circle, rgba(240, 240, 240, 0.8) 0%, rgba(200, 200, 200, 0) 70%);
  border-radius: 50%;
  filter: blur(3px);
  opacity: 0;
  pointer-events: none;
}

.single-candle.blown .candle-smoke {
  animation: smoke-rise-curly 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes smoke-rise-curly {
  0% { opacity: 0.9; transform: translate(-50%, 0) scale(0.8); }
  30% { transform: translate(-40%, -20px) scale(1.4) rotate(15deg); opacity: 0.7; }
  60% { transform: translate(-60%, -45px) scale(2) rotate(-15deg); opacity: 0.4; }
  100% { transform: translate(-50%, -75px) scale(2.8) rotate(25deg); opacity: 0; }
}

/* Magical Sparkler Blast from Wick */
.sparkler-burst {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  opacity: 0;
  pointer-events: none;
}

.single-candle.blown .sparkler-burst {
  animation: sparkler-erupt 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes sparkler-erupt {
  0% { transform: translate(-50%, 0) scale(0); opacity: 1; }
  50% { transform: translate(-50%, -25px) scale(1.6); opacity: 1; }
  100% { transform: translate(-50%, -50px) scale(0.2); opacity: 0; }
}

.single-candle.blown .candle-flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.1);
  pointer-events: none;
}

.candle-smoke {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 20px;
  background: rgba(200, 200, 200, 0.6);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
}

.single-candle.blown .candle-smoke {
  animation: smoke-rise 1.5s ease-out forwards;
}

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

@keyframes smoke-rise {
  0% { opacity: 0.8; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(3); }
}

.cake-instructions {
  margin-top: 15px;
  font-size: 1rem;
  color: var(--accent-gold);
  background: rgba(255, 190, 11, 0.1);
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 190, 11, 0.3);
}

.mic-status-indicator {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4757;
}

.mic-dot.active {
  background: #2ed573;
  box-shadow: 0 0 8px #2ed573;
}

/* Action Button Common */
.action-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border: none;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 25px var(--primary-glow);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.action-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px var(--primary-glow);
}

.action-btn:active {
  transform: translateY(1px);
}

/* ==========================================================================
   BALLOON POPPING GAME SECTION
   ========================================================================== */

.balloon-stage {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
  margin: 20px 0;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.balloon-item {
  position: absolute;
  bottom: -100px;
  width: 60px;
  height: 75px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  cursor: pointer;
  transition: transform 0.1s ease;
  animation: balloon-float 8s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: inset -6px -6px 12px rgba(0, 0, 0, 0.3), inset 6px 6px 12px rgba(255, 255, 255, 0.4);
}

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

.balloon-item:hover {
  transform: scale(1.15);
}

@keyframes balloon-float {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-450px) rotate(15deg); opacity: 0.9; }
}

.balloon-score-board {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

/* ==========================================================================
   3D GIFT UNBOXING SECTION
   ========================================================================== */

.gift-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.gift-box-3d {
  width: 140px;
  height: 140px;
  position: relative;
  margin: 40px auto 20px auto;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.gift-body {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #7b2cbf, #5a189a);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-ribbon-v {
  position: absolute;
  width: 24px;
  height: 100%;
  background: var(--accent-gold);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.gift-ribbon-h {
  position: absolute;
  height: 24px;
  width: 100%;
  background: var(--accent-gold);
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.gift-lid {
  position: absolute;
  top: -15px;
  left: -5%;
  width: 110%;
  height: 35px;
  background: linear-gradient(135deg, #9d4edd, #7b2cbf);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gift-box-3d.opened .gift-lid {
  transform: translateY(-80px) rotate(-25deg);
}

.gift-reveal-card {
  max-width: 450px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  padding: 25px;
  margin-top: 20px;
  display: none;
  animation: pop-in 0.6s ease forwards;
}

.gift-reveal-card.show {
  display: block;
}

@keyframes pop-in {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   POLAROID MEMORY GALLERY SECTION
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  width: 100%;
  margin-top: 30px;
}

.polaroid-card {
  background: #ffffff;
  padding: 12px 12px 20px 12px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, z-index 0.1s;
  cursor: pointer;
  position: relative;
}

.polaroid-card::before {
  content: '📌';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.polaroid-card:hover {
  transform: scale(1.08) rotate(0deg) translateY(-6px);
  box-shadow: 0 22px 45px rgba(255, 42, 109, 0.4);
  z-index: 20;
}

.polaroid-img-wrapper {
  overflow: hidden;
  border-radius: 6px;
  height: 230px;
  width: 100%;
  background: #1a0510;
}

.polaroid-img,
img.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
  transition: transform 0.5s ease;
}

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

.polaroid-caption {
  font-family: var(--font-cursive), 'Poppins', cursive;
  color: #2e081c;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-top: 10px;
  line-height: 1.3;
}

/* ==========================================================================
   LAPTOP & DESKTOP RESPONSIVE LAYOUT (MIN-WIDTH: 768PX)
   ========================================================================== */
@media (min-width: 768px) {
  .app-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 35px 25px 90px 25px;
  }

  .passcode-split-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 850px;
    width: 90%;
  }

  .passcode-polaroid-side {
    flex: 1;
    max-width: 380px;
  }

  .passcode-card {
    flex: 1;
    max-width: 380px;
    padding: 35px 30px;
  }

  .cake-stage-container {
    flex-direction: row;
    justify-content: space-around;
    gap: 40px;
  }

  .reasons-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 25px;
  }

  .mobile-bottom-nav {
    padding: 10px 24px;
    gap: 20px;
    border-radius: 40px;
    bottom: 25px;
  }

  .nav-item-btn {
    font-size: 0.95rem;
    padding: 10px 20px;
  }
}

/* Ambient Cinematic Motion for Lock Screen Photo */
.lock-photo-ambient {
  animation: photo-ambient-float 4s infinite alternate ease-in-out;
}

@keyframes photo-ambient-float {
  0% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1) contrast(1);
  }
  50% {
    transform: scale(1.06) rotate(1deg);
    filter: brightness(1.08) contrast(1.05);
  }
  100% {
    transform: scale(1.1) rotate(-1deg);
    filter: brightness(1.12) contrast(1.08);
  }
}

.polaroid-caption {
  font-family: var(--font-cursive);
  font-size: 1.6rem;
  color: #222;
  margin-top: 12px;
  text-align: center;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-content {
  max-width: 800px;
  width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
}

.lightbox-caption {
  font-family: var(--font-cursive);
  font-size: 2.2rem;
  color: #333;
  margin-top: 15px;
}

.close-lightbox {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
}

/* ==========================================================================
   LIVE CUSTOMIZER MODAL
   ========================================================================== */

.customizer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.customizer-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.customizer-box {
  width: 90%;
  max-width: 550px;
  background: #181528;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.customizer-box h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent-gold);
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary-color);
}

.theme-options {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.theme-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease;
}

.theme-swatch:hover {
  transform: scale(1.15);
}

.theme-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* Floating Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent-gold);
  padding: 12px 28px;
  border-radius: 30px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 4000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Footer */
footer {
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* ==========================================================================
   RESPONSIVE & MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Touch manipulation & anti-zoom fix for mobile touch */
button, input, select, textarea, .keypad-btn, .single-candle, .balloon-item, .polaroid-card, .envelope-card, .gift-box-3d {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .app-container {
    padding: 60px 14px 40px 14px;
    gap: 35px;
  }

  .celebration-section {
    padding: 24px 16px;
    border-radius: 22px;
  }

  .main-title { font-size: 2.8rem; }
  .bday-person-name { font-size: 2.2rem; }
  .make-a-wish-banner { font-size: 2.6rem; }
  .subtitle-msg { font-size: 0.98rem; }

  /* Passcode Split Container on Tablets / Mobile */
  .passcode-split-container {
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 360px;
  }

  .passcode-polaroid-side {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .passcode-polaroid-side .polaroid-card {
    padding: 10px 10px 16px 10px;
    transform: rotate(-1.5deg) !important;
  }

  .passcode-polaroid-side .polaroid-img {
    height: 140px;
  }

  .passcode-polaroid-side .polaroid-caption {
    font-size: 1.2rem;
    margin-top: 6px;
  }

  .passcode-card {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .lock-icon-glow { font-size: 2.4rem; margin-bottom: 6px; }
  .passcode-title { font-size: 1.3rem; }
  .passcode-hint { font-size: 0.8rem; padding: 4px 12px; margin-bottom: 14px; }

  .keypad-grid {
    gap: 10px;
  }

  .keypad-btn {
    height: 52px;
    font-size: 1.25rem;
  }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  .customize-floating-btn {
    top: 14px;
    left: 14px;
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .audio-control-btn {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 50px 10px 30px 10px;
  }

  .main-title { font-size: 2.3rem; }
  .bday-person-name { font-size: 1.8rem; }
  .make-a-wish-banner { font-size: 2.1rem; }

  .candles-group { gap: 16px; }
  .single-candle { width: 12px; height: 48px; }

  .cake-wrapper {
    width: 230px;
    height: 210px;
    margin: 15px auto;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .gallery-grid { grid-template-columns: 1fr; }

  .customizer-box {
    padding: 20px 16px;
    border-radius: 20px;
  }
}

/* ==========================================================================
   iPHONE 15 / iPHONE 15 PRO OPTIMIZED (393x852pt, Dynamic Island)
   ========================================================================== */
@media (max-width: 430px) and (max-height: 932px) {
  /* Safe area for Dynamic Island & home indicator */
  html, body {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* Lock Screen - full screen compact layout */
  .password-lock-overlay {
    padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom)) 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .passcode-split-container {
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 320px !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  /* HIDE video on small mobile — keypad is the priority */
  .passcode-polaroid-side {
    display: none !important;
  }

  /* Passcode card - compact for iPhone */
  .passcode-card {
    max-width: 100% !important;
    padding: 14px 12px !important;
    border-radius: 20px !important;
  }

  .lock-icon-glow {
    font-size: 1.3rem !important;
    margin-bottom: 4px !important;
  }

  .passcode-title {
    font-size: 1.05rem !important;
    margin-bottom: 6px !important;
  }

  /* Countdown on lock screen - compact */
  .passcode-card > div[style*="background: rgba(0, 0, 0, 0.45)"] {
    padding: 6px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 14px !important;
  }

  .passcode-card > div[style*="background: rgba(0, 0, 0, 0.45)"] > div[style*="font-size: 0.78rem"] {
    font-size: 0.7rem !important;
    margin-bottom: 4px !important;
  }

  .passcode-card > div[style*="background: rgba(0, 0, 0, 0.45)"] span[style*="font-size: 1.25rem"] {
    font-size: 1rem !important;
  }

  .passcode-card > div[style*="background: rgba(0, 0, 0, 0.45)"] div[style*="min-width: 46px"] {
    min-width: 38px !important;
    padding: 4px 6px !important;
    border-radius: 10px !important;
  }

  /* PIN dots */
  .pin-display-box {
    margin-bottom: 8px !important;
    gap: 10px !important;
  }

  .pin-dot {
    width: 13px !important;
    height: 13px !important;
  }

  /* Keypad - properly sized for iPhone touch targets */
  .keypad-grid {
    gap: 8px !important;
    margin-bottom: 6px !important;
    max-width: 240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .keypad-btn {
    height: 46px !important;
    font-size: 1.15rem !important;
    border-radius: 14px !important;
  }

  .keypad-btn.action-key {
    font-size: 0.9rem !important;
  }

  /* Main app after unlock */
  .app-container {
    padding: 55px 10px 90px 10px;
    gap: 25px;
  }

  .celebration-section {
    padding: 18px 12px;
    border-radius: 18px;
  }

  .main-title { font-size: 2rem; }
  .bday-person-name { font-size: 1.6rem; }
  .subtitle-msg { font-size: 0.88rem; line-height: 1.5; }
  .make-a-wish-banner { font-size: 1.8rem; }

  /* Countdown card on home */
  .countdown-card {
    padding: 14px 12px !important;
    border-radius: 16px !important;
  }

  .countdown-card h2 {
    font-size: 0.95rem !important;
  }

  .time-box {
    min-width: 55px !important;
    padding: 8px 6px !important;
    border-radius: 10px !important;
  }

  .time-box span:first-child {
    font-size: 1.4rem !important;
  }

  /* Balloon stage */
  .balloon-stage {
    height: 240px;
  }

  /* Cake */
  .cake-wrapper {
    width: 200px;
    height: 185px;
    margin: 10px auto;
  }

  .candles-group { gap: 14px; }
  .single-candle { width: 10px; height: 42px; }

  /* Girl photo frame */
  .real-girl-photo-frame {
    width: 130px !important;
    height: 150px !important;
    padding: 6px 6px 14px 6px !important;
  }

  .real-girl-photo-img {
    height: 110px !important;
  }

  .real-girl-photo-caption {
    font-size: 1rem !important;
  }

  .speech-bubble {
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  /* Action buttons */
  .action-btn {
    padding: 10px 18px;
    font-size: 0.88rem;
    border-radius: 22px;
    margin-top: 12px;
  }

  /* Love reasons card */
  .love-reason-card {
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  .reason-card-text,
  #reason-text {
    font-size: 1rem !important;
    min-height: 70px !important;
  }

  /* Timeline */
  .timeline-container {
    padding-left: 14px;
    margin-top: 20px;
  }

  .timeline-item {
    margin-bottom: 18px;
    padding-left: 14px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .polaroid-card {
    padding: 8px 8px 14px 8px;
  }

  .polaroid-img,
  img.polaroid-img {
    height: 140px;
    min-height: 140px;
  }

  .polaroid-caption {
    font-size: 1.1rem;
    margin-top: 6px;
  }

  /* Gift box */
  .gift-box-3d {
    width: 110px;
    height: 110px;
    margin: 25px auto 15px auto;
  }

  /* Bottom navigation bar - iPhone safe area */
  .mobile-bottom-nav {
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 6px 10px;
    gap: 4px;
    border-radius: 28px;
  }

  .nav-item-btn {
    font-size: 0.72rem;
    padding: 6px 8px;
    border-radius: 16px;
    gap: 3px;
  }

  .nav-item-btn span {
    display: block;
    font-size: 0.65rem;
  }

  /* Music button */
  .audio-control-btn {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  /* Toast */
  .toast-msg {
    bottom: max(75px, calc(env(safe-area-inset-bottom) + 65px));
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 22px;
  }

  /* Page nav buttons */
  .page-nav-bar {
    gap: 8px;
    margin-top: 10px;
  }

  .page-nav-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 18px;
  }

  /* Lightbox */
  .lightbox-content {
    padding: 12px;
    border-radius: 16px;
  }

  .lightbox-caption {
    font-size: 1.4rem;
  }

  /* Loading screen */
  .heart-loader-icon {
    font-size: 3rem;
  }

  .loading-progress-bar {
    width: 220px;
    height: 6px;
    margin-top: 18px;
  }

  .loading-text-msg {
    font-size: 0.95rem;
    margin-top: 10px;
  }

  /* Coupons grid */
  .coupons-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* ==========================================================================
   ULTRA-RESPONSIVE MOBILE APP ENHANCEMENTS (SMARTPHONES & IPHONES)
   ========================================================================== */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  /* Lock Screen Layout - Ultra Clean Fit & Zero Clipping on Mobile Screens */
  .password-lock-overlay {
    padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom)) 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    align-items: flex-start !important; /* FIXES FLEXBOX TOP CLIPPING BUG */
    justify-content: center !important;
  }

  .passcode-split-container {
    display: flex !important;
    flex-direction: column-reverse !important; /* KEYPAD ON TOP */
    gap: 8px !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: auto !important; /* CENTERING WITHOUT CLIPPING */
    padding-top: 10px !important;
    padding-bottom: 20px !important;
  }

  .passcode-card {
    padding: 10px 10px !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .lock-icon-glow {
    font-size: 1.1rem !important;
    margin-bottom: 2px !important;
  }

  .passcode-title {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
  }

  .passcode-banner {
    padding: 4px 6px !important;
    margin-bottom: 6px !important;
    border-radius: 10px !important;
  }

  .passcode-banner div:first-child {
    font-size: 0.72rem !important;
  }

  .passcode-banner div:last-child {
    font-size: 0.62rem !important;
  }

  .keypad-grid {
    gap: 5px !important;
    max-width: 220px !important;
    margin: 0 auto !important;
  }

  .keypad-btn {
    height: 38px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
  }

  .pin-display-box {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }

  .pin-dot {
    width: 10px !important;
    height: 10px !important;
  }

  /* Compact Video Player Below Keypad on Mobile */
  .passcode-polaroid-side {
    width: 100% !important;
    max-width: 200px !important;
    margin: 0 auto !important;
  }

  .passcode-polaroid-side .polaroid-card {
    padding: 4px 4px 4px 4px !important;
    transform: none !important;
  }

  .passcode-polaroid-side #lock-screen-left-video {
    height: 80px !important;
    border-radius: 6px !important;
  }

  .passcode-polaroid-side .polaroid-caption {
    font-size: 0.68rem !important;
    margin-top: 2px !important;
  }

  .cake-container {
    max-width: 270px !important;
  }

  .cake-layer-top { width: 140px !important; height: 50px !important; }
  .cake-layer-middle { width: 190px !important; height: 50px !important; }
  .cake-layer-bottom { width: 230px !important; height: 50px !important; }

  #separate-cake-slice {
    right: -10px !important;
    transform: scale(0.8) translateY(-50%) !important;
  }
}
