/* =========================================================
   ✨ BIRTHDAYMAGIC - ULTRA PROFESSIONAL & SLEEK AESTHETIC
   ========================================================= */

:root {
  /* Default Theme: Cosmic Magical */
  --bg-gradient: radial-gradient(circle at 50% 10%, #170a30 0%, #0c051a 55%, #05020a 100%);
  --accent-primary: #a855f7;
  --accent-secondary: #ec4899;
  --accent-glow: rgba(168, 85, 247, 0.4);
  --accent-gold: #facc15;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: rgba(22, 14, 38, 0.72);
  --card-border: rgba(216, 180, 254, 0.18);
  --glass-blur: 20px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-handwriting: 'Dancing Script', cursive;
  --font-party: 'Pacifico', cursive;
}

/* THEMES */
body.theme-magical {
  --bg-gradient: radial-gradient(circle at 50% 10%, #170a30 0%, #0c051a 55%, #05020a 100%);
  --accent-primary: #a855f7;
  --accent-secondary: #ec4899;
  --accent-glow: rgba(168, 85, 247, 0.4);
  --accent-gold: #fbbf24;
  --card-bg: rgba(22, 14, 38, 0.75);
  --card-border: rgba(216, 180, 254, 0.2);
}

body.theme-romantic {
  --bg-gradient: radial-gradient(circle at 50% 10%, #380718 0%, #1d030d 55%, #0c0106 100%);
  --accent-primary: #f43f5e;
  --accent-secondary: #fda4af;
  --accent-glow: rgba(244, 63, 94, 0.4);
  --accent-gold: #fde047;
  --card-bg: rgba(38, 8, 20, 0.75);
  --card-border: rgba(253, 164, 175, 0.2);
}

body.theme-neon {
  --bg-gradient: radial-gradient(circle at 50% 10%, #022436 0%, #01111c 55%, #00080d 100%);
  --accent-primary: #06b6d4;
  --accent-secondary: #3b82f6;
  --accent-glow: rgba(6, 182, 212, 0.45);
  --accent-gold: #22c55e;
  --card-bg: rgba(4, 26, 40, 0.78);
  --card-border: rgba(34, 211, 238, 0.25);
}

body.theme-pastel {
  --bg-gradient: radial-gradient(circle at 50% 10%, #26163b 0%, #140d21 55%, #08040f 100%);
  --accent-primary: #c084fc;
  --accent-secondary: #f472b6;
  --accent-glow: rgba(192, 132, 252, 0.4);
  --accent-gold: #67e8f9;
  --card-bg: rgba(30, 18, 48, 0.75);
  --card-border: rgba(244, 114, 182, 0.2);
}

body.theme-royal {
  --bg-gradient: radial-gradient(circle at 50% 10%, #281d04 0%, #140e02 55%, #070501 100%);
  --accent-primary: #f59e0b;
  --accent-secondary: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.4);
  --accent-gold: #fef08a;
  --card-bg: rgba(34, 24, 5, 0.8);
  --card-border: rgba(251, 191, 36, 0.25);
}

body.theme-sunset {
  --bg-gradient: radial-gradient(circle at 50% 10%, #3e1206 0%, #220803 55%, #0f0201 100%);
  --accent-primary: #f97316;
  --accent-secondary: #ec4899;
  --accent-glow: rgba(249, 115, 22, 0.4);
  --accent-gold: #fde047;
  --card-bg: rgba(44, 15, 8, 0.75);
  --card-border: rgba(251, 146, 60, 0.2);
}

body.theme-aurora {
  --bg-gradient: radial-gradient(circle at 50% 10%, #03362a 0%, #021a14 55%, #010a08 100%);
  --accent-primary: #10b981;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(16, 185, 129, 0.4);
  --accent-gold: #34d399;
  --card-bg: rgba(3, 34, 26, 0.78);
  --card-border: rgba(52, 211, 153, 0.25);
}

body.theme-sakura {
  --bg-gradient: radial-gradient(circle at 50% 10%, #3b102b 0%, #1f0616 55%, #0d020a 100%);
  --accent-primary: #ec4899;
  --accent-secondary: #f472b6;
  --accent-glow: rgba(236, 72, 153, 0.4);
  --accent-gold: #fbcfe8;
  --card-bg: rgba(45, 12, 33, 0.76);
  --card-border: rgba(244, 114, 182, 0.25);
}

body.theme-ocean {
  --bg-gradient: radial-gradient(circle at 50% 10%, #062244 0%, #031224 55%, #01070e 100%);
  --accent-primary: #0284c7;
  --accent-secondary: #38bdf8;
  --accent-glow: rgba(2, 132, 199, 0.4);
  --accent-gold: #7dd3fc;
  --card-bg: rgba(4, 25, 50, 0.78);
  --card-border: rgba(56, 189, 248, 0.25);
}

body.theme-cyberpunk {
  --bg-gradient: radial-gradient(circle at 50% 10%, #171d03 0%, #0c0f01 55%, #050600 100%);
  --accent-primary: #84cc16;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(132, 204, 22, 0.4);
  --accent-gold: #a3e635;
  --card-bg: rgba(19, 24, 4, 0.82);
  --card-border: rgba(163, 230, 53, 0.25);
}

body.theme-vintage {
  --bg-gradient: radial-gradient(circle at 50% 10%, #301f14 0%, #1b100a 55%, #0c0704 100%);
  --accent-primary: #d97706;
  --accent-secondary: #f59e0b;
  --accent-glow: rgba(217, 119, 6, 0.4);
  --accent-gold: #fde68a;
  --card-bg: rgba(38, 24, 15, 0.78);
  --card-border: rgba(245, 158, 11, 0.22);
}

body.theme-midnight {
  --bg-gradient: radial-gradient(circle at 50% 10%, #181926 0%, #0d0e15 55%, #050508 100%);
  --accent-primary: #818cf8;
  --accent-secondary: #c7d2fe;
  --accent-glow: rgba(129, 140, 248, 0.4);
  --accent-gold: #e0e7ff;
  --card-bg: rgba(20, 21, 33, 0.8);
  --card-border: rgba(199, 210, 254, 0.2);
}

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  transition: background 0.6s ease;
  line-height: 1.5;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}


/* Ambient Elements */
#ambientCanvasContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

#fireworksCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Fairy Lights */
.fairy-lights {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-around;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fairy-lights.active {
  opacity: 1;
  transform: translateY(0);
}

.fairy-bulb {
  width: 14px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  animation: bulbGlow 1.8s infinite alternate ease-in-out;
}

.fairy-bulb::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 3px;
  width: 8px;
  height: 5px;
  background: #374151;
  border-radius: 2px;
}

@keyframes bulbGlow {
  0% { transform: scale(0.9); opacity: 0.5; filter: drop-shadow(0 0 4px currentColor); }
  100% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 16px currentColor); }
}

/* Floating Balloons */
.balloon-container {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  overflow: hidden;
}

.floating-balloon {
  position: absolute;
  bottom: -150px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  animation: floatUpward 8s linear infinite;
  box-shadow: inset -8px -8px 15px rgba(0,0,0,0.25), inset 8px 8px 15px rgba(255,255,255,0.4);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease;
}

.floating-balloon:hover {
  transform: scale(1.12);
}

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

@keyframes floatUpward {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.9; }
  90% { opacity: 0.9; }
  100% { transform: translateY(-120vh) rotate(15deg); opacity: 0; }
}

.popped-blessing-popup {
  position: fixed;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #1e1b4b;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 100;
  animation: floatFadeOut 1.5s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes floatFadeOut {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 1; }
  100% { transform: translate(-50%, -80px) scale(1.1); opacity: 0; }
}

/* Glass Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 20px var(--accent-glow);
}

/* =========================================================
   CREATOR STUDIO - MODERN 3-STEP WIZARD
   ========================================================= */
.creator-container {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

/* Top Navigation */
.studio-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.brand-badge {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.03);
}

.app-hero {
  text-align: center;
  margin-bottom: 30px;
}

.main-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Studio Grid Layout */
.studio-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.studio-controls {
  padding: 28px;
}

/* Wizard Navigation Tabs */
.wizard-nav {
  display: flex;
  background: rgba(10, 5, 20, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.wizard-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.wizard-tab.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.tab-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Wizard Pages */
.wizard-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.wizard-page.active {
  display: block;
}

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

.section-intro {
  margin-bottom: 20px;
}

.section-intro h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-intro p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

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

.label-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.label-with-actions label {
  margin-bottom: 0;
}

.msg-action-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-text-link:hover {
  opacity: 0.8;
}

.btn-text-link.text-muted {
  color: var(--text-muted);
}

.btn-text-link.text-muted:hover {
  color: #f43f5e;
  opacity: 1;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
}

.input-wrapper input,
.form-group textarea,
.styled-select,
.styled-datetime {
  width: 100%;
  background: rgba(12, 7, 22, 0.65);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 11px 14px 11px 40px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-group textarea {
  padding-left: 14px;
  resize: vertical;
  line-height: 1.5;
}

.styled-select,
.styled-datetime {
  padding-left: 14px;
  cursor: pointer;
}

.input-wrapper input:focus,
.form-group textarea:focus,
.styled-select:focus,
.styled-datetime:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(18, 10, 32, 0.85);
}

/* Relation Preset Cards */
.relation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.relation-card {
  background: rgba(15, 8, 26, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.relation-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.relation-card.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-glow);
}

.rel-icon { font-size: 1.3rem; }
.rel-title { font-size: 0.75rem; font-weight: 600; color: var(--text-main); text-align: center; }

/* Theme Selector */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-card {
  background: rgba(10, 5, 20, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.theme-card.active {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px var(--accent-glow);
}

.theme-preview {
  width: 100%;
  height: 32px;
  border-radius: 6px;
}

.magical-preview { background: linear-gradient(135deg, #a855f7, #ec4899, #1a0b36); }
.romantic-preview { background: linear-gradient(135deg, #f43f5e, #fda4af, #3b0718); }
.neon-preview { background: linear-gradient(135deg, #06b6d4, #3b82f6, #032030); }
.pastel-preview { background: linear-gradient(135deg, #c084fc, #f472b6, #2a1b40); }
.royal-preview { background: linear-gradient(135deg, #f59e0b, #fbbf24, #2a1f05); }
.sunset-preview { background: linear-gradient(135deg, #f97316, #ec4899, #431407); }
.aurora-preview { background: linear-gradient(135deg, #10b981, #06b6d4, #03221a); }
.sakura-preview { background: linear-gradient(135deg, #ec4899, #f472b6, #2d0c21); }
.ocean-preview { background: linear-gradient(135deg, #0284c7, #38bdf8, #041932); }
.cyberpunk-preview { background: linear-gradient(135deg, #84cc16, #06b6d4, #131804); }
.vintage-preview { background: linear-gradient(135deg, #d97706, #f59e0b, #26180f); }
.midnight-preview { background: linear-gradient(135deg, #818cf8, #c7d2fe, #141521); }

.theme-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 3D Parallax & Depth Effects */
.has-3d-tilt {
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
  will-change: transform;
}

.has-3d-tilt-inner {
  transform: translateZ(28px);
}

/* Photo Dropzone */
.photo-dropzone {
  display: block;
  border: 2px dashed var(--card-border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(10, 5, 20, 0.3);
  transition: all 0.2s ease;
}

.photo-dropzone:hover {
  border-color: var(--accent-primary);
  background: rgba(168, 85, 247, 0.08);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.upload-icon { font-size: 1.5rem; }
.dropzone-content span { font-size: 0.88rem; font-weight: 600; }
.dropzone-content small { color: var(--text-muted); font-size: 0.75rem; }

.photo-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toggles Box */
.extra-toggles-card {
  background: rgba(10, 5, 20, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
}

.toggle-group {
  margin-bottom: 12px;
}

.toggle-group:last-child {
  margin-bottom: 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-label input { display: none; }

.toggle-slider {
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  position: relative;
  transition: all 0.25s ease;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toggle-label input:checked + .toggle-slider {
  background: var(--accent-primary);
}

.toggle-label input:checked + .toggle-slider::after {
  transform: translateX(18px);
}

.toggle-text {
  font-size: 0.85rem;
  font-weight: 500;
}

.toggle-extra-fields {
  margin-top: 8px;
  padding-left: 48px;
}

.toggle-extra-fields input {
  width: 100%;
  background: rgba(15, 10, 26, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 0.85rem;
}

/* Wizard Action Buttons */
.wizard-actions {
  display: flex;
  margin-top: 24px;
}

.wizard-actions.dual {
  gap: 12px;
}

.btn-primary, .btn-secondary, .btn-action-glow, .share-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* RIGHT PANEL: PHONE SIMULATOR */
.studio-preview-panel {
  position: sticky;
  top: 20px;
}

.preview-device-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 300px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.preview-test-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--accent-gold);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-test-pill:hover {
  background: var(--accent-primary);
  color: #fff;
}

.device-frame {
  width: 300px;
  height: 560px;
  background: #000;
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px var(--accent-glow);
  border: 3px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.device-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 14px;
  background: #000;
  border-radius: 12px;
  z-index: 10;
}

.device-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-gradient);
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-preview-content {
  text-align: center;
  padding: 16px;
}

.mini-gift-box {
  font-size: 3.5rem;
  animation: giftWobble 2s infinite ease-in-out;
  margin-bottom: 8px;
}

.mini-balloon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.mini-to-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.mini-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.mini-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
}

/* =========================================================
   SHARE MODAL
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  padding: 28px;
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
}

.modal-icon-badge {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.link-box {
  display: flex;
  background: rgba(10, 5, 20, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.link-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

.btn-copy {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 0 16px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.share-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.highlight-box {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--accent-primary);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.mask-btn {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}

.whatsapp-btn {
  grid-column: span 2;
  background: #25D366;
  color: #fff;
}


.view-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
}

.download-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
}

.qr-code-section {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.qrcode-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   OVERLAY SCREENS (Countdown & Passcode)
   ========================================================= */
.overlay-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.countdown-card,
.passcode-card {
  max-width: 440px;
  width: 100%;
  padding: 32px 24px;
  text-align: center;
}

.hourglass-icon, .lock-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.countdown-timer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}

.cd-unit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-unit span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.cd-unit small {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cd-colon {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.passcode-input-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.passcode-input-row input {
  flex: 1;
  background: rgba(15, 10, 26, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  outline: none;
}

.error-msg {
  color: #f87171;
  font-size: 0.82rem;
  margin-top: 10px;
}

/* =========================================================
   SURPRISE STORY EXPERIENCE (FULLSCREEN)
   ========================================================= */
.surprise-experience-container {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-gradient);
}

.experience-toolbar {
  position: fixed;
  top: 20px;
  right: 28px;
  display: flex;
  gap: 10px;
  z-index: 50;
}

.toolbar-pill {
  background: rgba(15, 10, 26, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.toolbar-pill:hover {
  background: rgba(255, 255, 255, 0.15);
}

.toolbar-pill.highlight {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
}

.experience-stage {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 80px;
  box-sizing: border-box;
  margin: auto 0;
}

.stage-step {
  display: none;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  animation: slideFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.stage-step.step-active {
  display: block;
  margin: 0 auto;
}

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

/* STEP 1: Gift Box */
.floating-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.glow-heading {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 0 20px var(--accent-glow);
}

.lead-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.interactive-gift-box {
  width: 160px;
  height: 160px;
  position: relative;
  cursor: pointer;
  margin: 16px auto;
  animation: giftWobble 2.5s infinite ease-in-out;
}

@keyframes giftWobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-2.5deg); }
  75% { transform: translateY(-6px) rotate(2.5deg); }
}

.gift-body {
  width: 140px;
  height: 105px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 0 0 14px 14px;
  position: absolute;
  bottom: 0;
  left: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 25px var(--accent-glow);
}

.gift-lid {
  width: 160px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 10px;
  position: absolute;
  top: 28px;
  left: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.interactive-gift-box.opened .gift-lid {
  transform: translateY(-40px) rotate(-20deg);
  opacity: 0;
}

.gift-ribbon-vertical {
  width: 20px;
  height: 100%;
  background: var(--accent-gold);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gift-ribbon-horizontal {
  width: 100%;
  height: 20px;
  background: var(--accent-gold);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gift-ribbon-bow {
  width: 34px;
  height: 16px;
  border: 3.5px solid var(--accent-gold);
  border-radius: 50% 50% 0 0;
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
}

.tap-hint-pulse {
  margin-top: 18px;
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.95rem;
  animation: pulseHint 1.5s infinite alternate ease-in-out;
}

@keyframes pulseHint {
  0% { opacity: 0.6; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1.03); }
}

/* Scene Headers */
.scene-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  display: inline-block;
}

.scene-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.scene-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
}

.score-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: var(--accent-gold);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.btn-action-glow {
  padding: 14px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 25px var(--accent-glow);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action-glow:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-action-glow.small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* =========================================================
   REALISTIC 3D LUXURY ENVELOPE & WAX SEAL
   ========================================================= */
.envelope-wrapper {
  width: 280px;
  height: 190px;
  margin: 20px auto;
  position: relative;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.3s ease;
}

.envelope-wrapper:hover {
  transform: translateY(-4px) scale(1.03);
}

.envelope-front {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a0818, #18030e);
  border: 2px solid var(--accent-gold);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(250, 204, 21, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  overflow: hidden;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 100px solid #3d0a22;
  transform-origin: top;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 5;
}

.envelope-wrapper.opened .envelope-flap {
  transform: rotateX(180deg);
  opacity: 0;
}

.wax-seal {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, #e11d48 0%, #9f1239 70%, #4c0519 100%);
  border: 3px solid #facc15;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4), 0 0 15px rgba(225, 29, 72, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.4s ease;
  animation: sealPulse 2s infinite alternate ease-in-out;
}

@keyframes sealPulse {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.08); box-shadow: 0 8px 25px rgba(0,0,0,0.8), 0 0 25px rgba(250, 204, 21, 0.8); }
}

.envelope-wrapper.opened .wax-seal {
  transform: translateX(-50%) scale(1.4) rotate(45deg);
  opacity: 0;
}

.wax-seal-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.envelope-stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 2px dashed rgba(250, 204, 21, 0.7);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  border-radius: 4px;
  letter-spacing: 1px;
}

.envelope-to-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.envelope-to-label strong {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

/* =========================================================
   REALISTIC CANDLE WICK, SMOKE PUFFS & SPARKLERS
   ========================================================= */
.candle-wick {
  width: 2px;
  height: 6px;
  background: #111;
  margin-bottom: -1px;
  border-radius: 1px;
}

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

.smoke-puff.active {
  animation: realisticSmoke 1.8s forwards ease-out;
}

@keyframes realisticSmoke {
  0% { opacity: 0.8; transform: translate(-50%, 0) scale(0.8); filter: blur(1px); }
  50% { opacity: 0.5; transform: translate(-70%, -25px) scale(2.2); filter: blur(3px); }
  100% { opacity: 0; transform: translate(-30%, -55px) scale(3.5); filter: blur(6px); }
}

/* Sparkler Fountain on Cake */
.sparkler-fountain {
  position: absolute;
  top: 40px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.sparkler-fountain.active {
  opacity: 1;
}

.spark-emitter {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 10px #facc15;
  animation: fountainSparks 0.2s infinite alternate;
}

@keyframes fountainSparks {
  0% { box-shadow: 0 -15px 15px #facc15, 5px -25px 20px #f43f5e, -5px -35px 25px #fbbf24; }
  100% { box-shadow: 0 -25px 25px #fff, -8px -40px 30px #facc15, 8px -50px 35px #f97316; }
}

.highlight-knife {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
  animation: knifePulse 1.2s infinite alternate ease-in-out;
}

@keyframes knifePulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); box-shadow: 0 12px 35px rgba(239, 68, 68, 0.7); }
}

/* Polaroid Developing Animation */
.polaroid-card.developing .polaroid-img-wrapper img {
  animation: developFilm 2s forwards ease-in-out;
}

@keyframes developFilm {
  0% { filter: brightness(0.1) grayscale(1); }
  60% { filter: brightness(0.6) sepia(0.6); }
  100% { filter: brightness(1) grayscale(0) sepia(0); }
}


.cake-container {
  width: 240px;
  height: 240px;
  position: relative;
  margin: 20px auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.candles-holder {
  display: flex;
  gap: 22px;
  margin-bottom: -4px;
  z-index: 5;
}

.candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.candle-stick {
  width: 9px;
  height: 34px;
  background: repeating-linear-gradient(45deg, #f43f5e, #f43f5e 5px, #fff 5px, #fff 10px);
  border-radius: 3px;
}

.flame {
  width: 12px;
  height: 20px;
  background: radial-gradient(ellipse at bottom, #fff 0%, #fef08a 30%, #f97316 70%, #dc2626 100%);
  border-radius: 50% 50% 35% 35%;
  margin-bottom: 2px;
  box-shadow: 0 0 15px #f97316, 0 0 25px #facc15;
  animation: flickerFlame 0.15s infinite alternate ease-in-out;
  transition: all 0.4s ease;
}

.flame.blown-out {
  opacity: 0;
  transform: scale(0.2) translateY(-8px);
}

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

/* REAL PHYSICAL CAKE SLICING & CUT SEPARATION */
.cake-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s ease;
}

.cake-layers-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cake-body.sliced .cake-layers-wrapper {
  transform: translateX(-14px) rotate(-1deg);
}

/* Slicing Slash Light Beam */
.cake-cut-slash {
  position: absolute;
  top: -10px;
  left: 60%;
  width: 4px;
  height: 150px;
  background: linear-gradient(to bottom, #ffffff, #fef08a, #f59e0b, #ef4444);
  box-shadow: 0 0 15px #fff, 0 0 25px #facc15, 0 0 35px #ef4444;
  opacity: 0;
  z-index: 15;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}

.cake-body.sliced .cake-cut-slash {
  animation: slashCutBeam 0.6s forwards ease-out;
}

@keyframes slashCutBeam {
  0% { opacity: 0; transform: scaleY(0); }
  30% { opacity: 1; transform: scaleY(1); }
  70% { opacity: 0.8; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}

/* Separating Cut Slice Piece */
.cake-cut-slice-piece {
  position: absolute;
  top: 0;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 12;
  opacity: 0;
  transform: translate(0, 0) scale(0.9);
  transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.cake-body.sliced .cake-cut-slice-piece {
  opacity: 1;
  transform: translate(44px, 10px) rotate(8deg) scale(1);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.6));
}

.slice-cherry-topping {
  font-size: 1.1rem;
  margin-bottom: -5px;
  z-index: 4;
}

.slice-frosting-top {
  width: 32px;
  height: 8px;
  background: #ffffff;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slice-piece-layer {
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.piece-layer-1 {
  width: 34px;
  height: 22px;
  background: linear-gradient(to right, #f472b6, #ec4899);
}

.piece-layer-2 {
  width: 44px;
  height: 24px;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  margin-top: -2px;
}

.piece-layer-3 {
  width: 52px;
  height: 28px;
  background: linear-gradient(to right, #8b5cf6, #7c3aed);
  margin-top: -2px;
}

.cake-layer {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cake-layer-top {
  width: 130px;
  height: 40px;
  background: linear-gradient(to right, #f472b6, #ec4899, #db2777);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cake-layer-middle {
  width: 165px;
  height: 44px;
  background: linear-gradient(to right, #fbbf24, #f59e0b, #d97706);
  margin-top: -5px;
}

.cake-layer-bottom {
  width: 200px;
  height: 48px;
  background: linear-gradient(to right, #8b5cf6, #7c3aed, #6d28d9);
  margin-top: -5px;
}

.cake-plate {
  width: 230px;
  height: 10px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  margin-top: -3px;
}

.cake-top-frosting {
  position: absolute;
  top: 0;
  width: 130px;
  height: 12px;
  background: #fff;
  border-radius: 10px 10px 0 0;
  z-index: 2;
}

.cake-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.cake-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 12px;
}

/* STEP 5: GRAND FIREWORKS */
.grand-birthday-title {
  font-family: var(--font-party);
  font-size: 2.8rem;
  letter-spacing: 1.5px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.glow-text-grand {
  background: linear-gradient(135deg, #facc15, #f43f5e, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.6));
}

.grand-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 30px;
}

.popper-button-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-popper {
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-popper:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.04);
}

/* STEP 6: CARD & POLAROIDS */
.final-wish-card-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 60px;
}

.wish-card-glass {
  padding: 36px 30px;
  text-align: left;
  position: relative;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px var(--accent-glow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wish-card-glass::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(250, 204, 21, 0.14) 52%,
    transparent 65%
  );
  transform: rotate(25deg);
  animation: holographicCardShimmer 7s infinite ease-in-out;
  pointer-events: none;
}

@keyframes holographicCardShimmer {
  0% { transform: translateY(-110%) rotate(25deg); }
  25%, 100% { transform: translateY(110%) rotate(25deg); }
}

.card-top-decor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seal-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seal-icon-btn:hover {
  transform: scale(1.18) rotate(15deg);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.6);
  background: rgba(250, 204, 21, 0.2);
}

.seal-icon-btn:active {
  transform: scale(0.92);
}

.seal-icon { 
  font-size: 1.6rem; 
  animation: sealSparkle 2s infinite alternate ease-in-out;
}

@keyframes sealSparkle {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 4px #facc15); }
  100% { transform: scale(1.15) rotate(12deg); filter: drop-shadow(0 0 14px #facc15); }
}

.narrator-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-main);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.narrator-pill-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--accent-gold);
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.narrator-pill-btn.speaking {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border-color: transparent;
  animation: speakingPulse 1.2s infinite alternate ease-in-out;
}

@keyframes speakingPulse {
  0% { box-shadow: 0 0 10px var(--accent-glow); }
  100% { box-shadow: 0 0 22px var(--accent-glow); }
}

/* Double-Tap Big Heart Burst */
.card-heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 5rem;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
}

.card-heart-burst.active {
  animation: bigHeartPop 0.85s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bigHeartPop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0.9; }
  45% { transform: translate(-50%, -50%) scale(1.4) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 25px rgba(244, 63, 94, 0.9)); }
  75% { transform: translate(-50%, -50%) scale(1.2) rotate(10deg); opacity: 0.9; }
  100% { transform: translate(-50%, -65%) scale(1.6) rotate(15deg); opacity: 0; filter: blur(4px); }
}

@keyframes sealSparkle {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 4px #facc15); }
  100% { transform: scale(1.15) rotate(12deg); filter: drop-shadow(0 0 14px #facc15); }
}

.card-date-badge {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: var(--accent-gold);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.2);
}

.card-to-heading {
  font-family: var(--font-handwriting);
  font-size: 2.7rem;
  color: var(--accent-gold);
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
  animation: gentleGlowHeading 3s infinite alternate ease-in-out;
}

@keyframes gentleGlowHeading {
  0% { text-shadow: 0 0 10px rgba(250, 204, 21, 0.3); }
  100% { text-shadow: 0 0 25px rgba(250, 204, 21, 0.7), 0 0 40px rgba(244, 63, 94, 0.4); }
}

.typed-message-box {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #f8fafc;
  margin-bottom: 24px;
  min-height: 70px;
  white-space: pre-wrap;
  letter-spacing: 0.2px;
}

.card-signature {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
}

.card-signature strong {
  font-size: 1.25rem;
  color: var(--accent-primary);
  margin-top: 4px;
  text-shadow: 0 0 12px var(--accent-glow);
}

.interactive-reaction-bar {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.reaction-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.reaction-btn:hover {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 22px var(--accent-glow);
}

.reaction-btn:active {
  transform: scale(0.92);
}

.reaction-btn.reacted {
  animation: reactionPopEffect 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
}

@keyframes reactionPopEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(6deg); }
  100% { transform: scale(1); }
}

/* Floating Reaction Particle Physics */
.floating-reaction-emoji-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 1.6rem;
  animation: floatReactionParticle 1.1s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes floatReactionParticle {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dest-x), var(--dest-y)) scale(var(--scale)) rotate(var(--rot));
  }
}

.reaction-plus-one-pill {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.8);
  animation: floatPlusOne 0.9s forwards ease-out;
}

@keyframes floatPlusOne {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  30% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  80% { opacity: 1; transform: translateY(-24px) scale(1); }
  100% { opacity: 0; transform: translateY(-38px) scale(0.9); }
}

/* Polaroid Gallery */
.polaroid-gallery-section {
  text-align: center;
}

.gallery-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.polaroid-cards-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 3D Flip Polaroid Cards */
.polaroid-card-3d {
  background: transparent;
  width: 170px;
  height: 235px;
  perspective: 1000px;
  cursor: pointer;
  transition: transform 0.3s ease;
  user-select: none;
}

.polaroid-card-3d:hover {
  transform: translateY(-4px) scale(1.05);
  z-index: 10;
}

.polaroid-card-3d:nth-child(even) { transform: rotate(-2.5deg); }
.polaroid-card-3d:nth-child(odd) { transform: rotate(2.5deg); }
.polaroid-card-3d:hover { transform: rotate(0deg) translateY(-4px) scale(1.06); }

.polaroid-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.polaroid-card-3d.flipped .polaroid-card-inner {
  transform: rotateY(180deg);
}

.polaroid-card-front,
.polaroid-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(250, 204, 21, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.polaroid-card-front {
  background: #ffffff;
  padding: 10px 10px 14px;
}

.polaroid-card-front::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 12px;
  background: rgba(250, 204, 21, 0.45);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  border-radius: 2px;
}

.polaroid-card-back {
  background: linear-gradient(135deg, #1e1233, #120924);
  color: #fff;
  border: 2px solid var(--accent-gold);
  transform: rotateY(180deg);
  padding: 18px 14px 14px;
}

.polaroid-back-stamp {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  border: 1px dashed var(--accent-gold);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  align-self: center;
}

.polaroid-back-note {
  font-family: var(--font-handwriting);
  font-size: 1.15rem;
  color: #fef08a;
  line-height: 1.4;
  margin: auto 0;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
  word-break: break-word;
}

.polaroid-back-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

.polaroid-card {
  background: #ffffff;
  padding: 10px 10px 22px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  width: 155px;
  transition: all 0.3s ease;
  position: relative;
}

.polaroid-card:nth-child(even) { transform: rotate(-3deg); }
.polaroid-card:nth-child(odd) { transform: rotate(3deg); }

.polaroid-card:hover {
  transform: rotate(0) scale(1.08);
  z-index: 10;
  box-shadow: 0 16px 36px rgba(0,0,0,0.7);
}

.polaroid-card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 14px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.polaroid-img-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 3px;
  background: #f1f5f9;
}

.polaroid-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-caption {
  margin-top: 8px;
  font-family: var(--font-handwriting);
  font-size: 0.92rem;
  color: #1e293b;
  text-align: center;
}

/* Cake Flavor & Music Selectors Grid */
.cake-flavor-selector-grid,
.music-vibe-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .cake-flavor-selector-grid,
  .music-vibe-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.flavor-card,
.music-card {
  background: rgba(10, 5, 20, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.flavor-card:hover,
.music-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.flavor-card.active,
.music-card.active {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 12px var(--accent-glow);
}

.flavor-emoji,
.music-emoji {
  font-size: 1.4rem;
}

.flavor-title,
.music-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

/* Chocolate Flavor */
.cake-body.flavor-chocolate .cake-layer-top,
.cake-body.flavor-chocolate .piece-layer-1 {
  background: linear-gradient(to right, #451a03, #78350f, #3b1402) !important;
}
.cake-body.flavor-chocolate .cake-layer-middle,
.cake-body.flavor-chocolate .piece-layer-2 {
  background: linear-gradient(to right, #78350f, #92400e, #451a03) !important;
}
.cake-body.flavor-chocolate .cake-layer-bottom,
.cake-body.flavor-chocolate .piece-layer-3 {
  background: linear-gradient(to right, #290e02, #451a03, #1c0901) !important;
}
.cake-body.flavor-chocolate .cake-top-frosting,
.cake-body.flavor-chocolate .slice-frosting-top {
  background: #fde047 !important;
}

/* Vanilla Gold Flavor */
.cake-body.flavor-gold .cake-layer-top,
.cake-body.flavor-gold .piece-layer-1 {
  background: linear-gradient(to right, #fef08a, #facc15, #eab308) !important;
}
.cake-body.flavor-gold .cake-layer-middle,
.cake-body.flavor-gold .piece-layer-2 {
  background: linear-gradient(to right, #facc15, #f59e0b, #d97706) !important;
}
.cake-body.flavor-gold .cake-layer-bottom,
.cake-body.flavor-gold .piece-layer-3 {
  background: linear-gradient(to right, #f59e0b, #d97706, #b45309) !important;
}
.cake-body.flavor-gold .cake-top-frosting,
.cake-body.flavor-gold .slice-frosting-top {
  background: #ffffff !important;
}

/* Blueberry Sparkle Flavor */
.cake-body.flavor-blueberry .cake-layer-top,
.cake-body.flavor-blueberry .piece-layer-1 {
  background: linear-gradient(to right, #6366f1, #4f46e5, #4338ca) !important;
}
.cake-body.flavor-blueberry .cake-layer-middle,
.cake-body.flavor-blueberry .piece-layer-2 {
  background: linear-gradient(to right, #818cf8, #6366f1, #3730a3) !important;
}
.cake-body.flavor-blueberry .cake-layer-bottom,
.cake-body.flavor-blueberry .piece-layer-3 {
  background: linear-gradient(to right, #312e81, #3730a3, #1e1b4b) !important;
}
.cake-body.flavor-blueberry .cake-top-frosting,
.cake-body.flavor-blueberry .slice-frosting-top {
  background: #e0e7ff !important;
}

/* Sparkle Brush Canvas */
#sparkleBrushCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

.photo-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-thumb-note-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--card-border);
  color: #fff;
  font-size: 0.72rem;
  padding: 4px 6px;
  border-radius: 6px;
  margin-top: 4px;
  outline: none;
  font-family: var(--font-main);
  box-sizing: border-box;
}

.photo-thumb-note-input:focus {
  border-color: var(--accent-gold);
}

/* Footer Actions */
.final-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.final-footer-actions button {
  width: 100%;
  max-width: 440px;
}

.create-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
}

.create-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.download-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

/* =========================================================
   MILESTONE BOND STATS BADGES
   ========================================================= */
.milestone-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  justify-content: flex-start;
}

.milestone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* =========================================================
   INTERACTIVE SCRATCH-TO-REVEAL CARD COUPON
   ========================================================= */
.scratch-card-section {
  margin: 10px 0 20px;
  background: rgba(15, 10, 26, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.scratch-card-header {
  margin-bottom: 14px;
}

.scratch-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.scratch-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.scratch-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.scratch-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 140px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(250, 204, 21, 0.15);
  border: 2px solid var(--accent-gold);
  background: #0f0728;
}

.scratch-reward-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  background: linear-gradient(135deg, #2e0854, #120326);
  box-sizing: border-box;
}

.scratch-reward-layer .reward-icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.scratch-reward-layer .reward-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}

.scratch-reward-layer .reward-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.reward-status-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

#scratchCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  z-index: 2;
  transition: opacity 0.5s ease;
}

#scratchCanvas:active {
  cursor: grabbing;
}

/* =========================================================
   VOICE RECORDER (STUDIO) & VOICE PLAYER (WISH CARD)
   ========================================================= */
.voice-recorder-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.voice-recorder-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-voice-record {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-voice-record.recording {
  background: #ef4444;
  color: #fff;
  animation: pulseRecording 1s infinite alternate ease-in-out;
}

@keyframes pulseRecording {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
  100% { transform: scale(1.04); box-shadow: 0 0 20px rgba(239, 68, 68, 0.9); }
}

.record-timer {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ef4444;
}

.card-voice-player {
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(10px);
}

.btn-voice-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
  transition: all 0.2s ease;
}

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

.voice-player-details {
  flex: 1;
  overflow: hidden;
}

.voice-player-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.voice-equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.voice-equalizer-bars span {
  width: 3px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.card-voice-player.playing .voice-equalizer-bars span {
  animation: equalize 0.8s infinite alternate ease-in-out;
}

.card-voice-player.playing .voice-equalizer-bars span:nth-child(2) { animation-delay: 0.15s; }
.card-voice-player.playing .voice-equalizer-bars span:nth-child(3) { animation-delay: 0.3s; }
.card-voice-player.playing .voice-equalizer-bars span:nth-child(4) { animation-delay: 0.45s; }
.card-voice-player.playing .voice-equalizer-bars span:nth-child(5) { animation-delay: 0.2s; }
.card-voice-player.playing .voice-equalizer-bars span:nth-child(6) { animation-delay: 0.5s; }
.card-voice-player.playing .voice-equalizer-bars span:nth-child(7) { animation-delay: 0.1s; }
.card-voice-player.playing .voice-equalizer-bars span:nth-child(8) { animation-delay: 0.35s; }

@keyframes equalize {
  0% { height: 3px; }
  100% { height: 16px; }
}

.voice-duration {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================================
   SONG DEDICATION ANTHEM CARD
   ========================================================= */
.song-dedication-card {
  margin: 14px 0 20px;
  background: rgba(15, 10, 26, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(10px);
}

.vinyl-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, #111 30%, #222 35%, #111 50%, #222 65%, #000 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  animation: spinVinyl 6s linear infinite;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.vinyl-center {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.song-dedication-info {
  flex: 1;
  text-align: left;
}

.dedication-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-gold);
}

.song-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin: 2px 0;
}

.song-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================================
   LIGHTBOX MODAL FOR POLAROIDS
   ========================================================= */
.image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 2;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
  margin-top: 10px;
  font-family: var(--font-handwriting);
  font-size: 1.3rem;
  color: var(--accent-gold);
}

.lightbox-close {
  position: absolute;
  top: -38px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* RESPONSIVE & MOBILE POLISH */
@media (max-width: 880px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-preview-panel { display: none; }
  .main-title { font-size: 1.85rem; }
  .grand-birthday-title { font-size: 2.1rem; }
  
  .experience-toolbar { 
    top: max(16px, env(safe-area-inset-top)); 
    right: max(20px, env(safe-area-inset-right)); 
    gap: 8px;
  }
  .toolbar-pill { 
    padding: 6px 10px; 
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .creator-container { 
    padding: 12px 10px 50px; 
  }
  
  .studio-nav {
    padding: 8px 16px;
    margin-bottom: 16px;
  }
  
  .app-hero {
    margin-bottom: 20px;
  }
  
  .main-title {
    font-size: 1.65rem;
  }

  .subtitle {
    font-size: 0.88rem;
  }

  .studio-controls { 
    padding: 16px 12px; 
    border-radius: 18px;
  }

  .wizard-nav {
    gap: 2px;
    padding: 3px;
    margin-bottom: 18px;
  }

  .wizard-tab { 
    padding: 8px 4px; 
    font-size: 0.74rem; 
    gap: 4px;
  }
  
  .tab-number {
    width: 18px;
    height: 18px;
    font-size: 0.68rem;
  }

  .relation-grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 6px;
  }

  .relation-card {
    padding: 8px 4px;
  }

  .rel-icon { font-size: 1.2rem; }
  .rel-title { font-size: 0.7rem; }

  .theme-selector-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 8px;
  }

  .form-row { flex-direction: column; }
  
  .input-wrapper input,
  .form-group textarea,
  .styled-select,
  .styled-datetime {
    font-size: 16px; /* Prevents auto-zoom on iOS inputs */
    padding: 10px 12px 10px 38px;
  }

  .btn-primary, .btn-secondary, .btn-action-glow, .share-btn {
    padding: 14px 18px;
    font-size: 0.95rem;
    width: 100%;
  }

  /* Surprise Experience Mobile Scaling */
  .experience-stage {
    padding: max(60px, env(safe-area-inset-top)) 16px max(30px, env(safe-area-inset-bottom));
    min-height: 100dvh;
  }

  .stage-step {
    max-width: 100%;
  }

  .glow-heading { 
    font-size: 1.9rem; 
  }

  .lead-text {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .interactive-gift-box {
    width: 140px;
    height: 140px;
  }

  .gift-body {
    width: 120px;
    height: 90px;
    left: 10px;
  }

  .gift-lid {
    width: 140px;
    height: 28px;
  }

  .scene-title {
    font-size: 1.7rem;
  }

  .scene-sub {
    font-size: 0.92rem;
    margin-bottom: 20px;
  }

  .cake-container {
    width: 210px;
    height: 210px;
    margin: 10px auto 14px;
  }

  .cake-layer-top { width: 115px; height: 36px; }
  .cake-layer-middle { width: 145px; height: 38px; }
  .cake-layer-bottom { width: 175px; height: 42px; }
  .cake-plate { width: 200px; height: 8px; }

  .grand-birthday-title { 
    font-size: 2rem; 
  }

  .grand-subtitle {
    font-size: 0.95rem;
    margin-bottom: 22px;
  }

  .card-to-heading { 
    font-size: 2.1rem; 
  }

  .typed-message-box { 
    font-size: 0.95rem; 
    line-height: 1.6;
  }

  .wish-card-glass { 
    padding: 22px 16px; 
    border-radius: 20px;
  }

  .polaroid-card {
    width: 135px;
    padding: 8px 8px 18px;
  }

  .modal-card {
    padding: 20px 16px;
    border-radius: 18px;
  }
}

