/* ==========================================================================
   CSS variables for themes, colors and fonts
   ========================================================================== */
:root {
  --primary-pink: hsl(348, 100%, 73%);
  --primary-pink-dark: hsl(348, 90%, 65%);
  --soft-lavender: hsl(265, 80%, 88%);
  --soft-peach: hsl(20, 100%, 92%);
  --sparkle-gold: hsl(45, 100%, 60%);
  --dark-plum: hsl(280, 50%, 20%);
  
  --bg-gradient: linear-gradient(135deg, hsl(320, 100%, 94%) 0%, hsl(265, 90%, 92%) 100%);
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 8px 32px 0 rgba(255, 94, 126, 0.12);
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

/* Theme Overrides */
body[data-theme="purple"] {
  --primary-pink: hsl(270, 100%, 75%);
  --primary-pink-dark: hsl(270, 90%, 65%);
  --glass-shadow: 0 8px 32px 0 rgba(168, 85, 247, 0.15);
  --bg-gradient: linear-gradient(135deg, hsl(280, 100%, 94%) 0%, hsl(240, 90%, 92%) 100%);
}

body[data-theme="blue"] {
  --primary-pink: hsl(210, 100%, 73%);
  --primary-pink-dark: hsl(210, 90%, 63%);
  --glass-shadow: 0 8px 32px 0 rgba(59, 130, 246, 0.15);
  --bg-gradient: linear-gradient(135deg, hsl(210, 100%, 94%) 0%, hsl(180, 90%, 92%) 100%);
}

body[data-theme="mint"] {
  --primary-pink: hsl(150, 80%, 65%);
  --primary-pink-dark: hsl(150, 90%, 55%);
  --glass-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.15);
  --bg-gradient: linear-gradient(135deg, hsl(150, 100%, 94%) 0%, hsl(100, 90%, 92%) 100%);
}

body[data-theme="gold"] {
  --primary-pink: hsl(40, 100%, 65%);
  --primary-pink-dark: hsl(40, 90%, 55%);
  --glass-shadow: 0 8px 32px 0 rgba(245, 158, 11, 0.15);
  --bg-gradient: linear-gradient(135deg, hsl(45, 100%, 94%) 0%, hsl(25, 90%, 92%) 100%);
}

/* ==========================================================================
   Global Resets
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* Disable touch blue outline in Chrome */
}

body, html {
  width: 100%;
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--dark-plum);
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Floating Background Hearts
   ========================================================================== */
#hearts-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bg-heart {
  position: absolute;
  bottom: -50px;
  color: rgba(255, 94, 126, 0.25);
  animation: floatUp 12s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(1.3);
    opacity: 0;
  }
}

/* ==========================================================================
   Confetti Canvas
   ========================================================================== */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
  pointer-events: none;
}

/* ==========================================================================
   CAT INTRO POPUP — Card Style
   ========================================================================== */
.cat-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 5, 40, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.cat-popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.cat-popup-overlay.dismiss {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* The white card */
.cat-popup-card {
  background: #fff;
  border-radius: 32px;
  padding: 28px 24px 22px;
  width: 82%;
  max-width: 310px;
  text-align: center;
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.2),
    0 20px 60px rgba(0,0,0,0.45),
    0 0 50px rgba(255, 94, 126, 0.35);
  animation: cardPop 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes cardPop {
  0%   { transform: scale(0.72) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0);        opacity: 1; }
}

/* Cat image — no cropping, full image visible */
.cat-popup-gif {
  width: 100%;
  max-width: 230px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  border-radius: 16px;
  image-rendering: -webkit-optimize-contrast;
}

.cat-popup-heading {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark-plum);
  margin-bottom: 8px;
}

.cat-tap-hint {
  font-size: 0.82rem;
  color: rgba(80, 30, 80, 0.6);
  font-family: var(--font-body);
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ==========================================================================
   Screen Management (Unlock & Main App)
   ========================================================================== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.screen.hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  z-index: 0;
}

.screen.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 10;
}

/* ==========================================================================
   LOCK SCREEN STYLE
   ========================================================================== */
#lock-screen {
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--bg-gradient);
}

.lock-card {
  width: 100%;
  max-width: 350px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  z-index: 5;
  animation: lockEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lockEntrance {
  0% { transform: translateY(50px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.lock-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: radial-gradient(circle, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(255, 94, 126, 0.3);
}

.pulse-icon {
  font-size: 2.2rem;
  color: white;
  animation: pulseScale 2s infinite ease-in-out;
}

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

.lock-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-plum);
  margin-bottom: 8px;
}

.lock-subtitle {
  font-size: 0.9rem;
  color: rgba(60, 20, 60, 0.7);
  line-height: 1.4;
  margin-bottom: 25px;
}

.passcode-dots {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--primary-pink);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.dot.filled {
  background-color: var(--primary-pink);
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(255, 94, 126, 0.5);
}

.passcode-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 260px;
  margin: 0 auto 20px;
}

.key {
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-plum);
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s, transform 0.15s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.key:active {
  background-color: var(--primary-pink);
  color: white;
  transform: scale(0.9);
}

.check-key {
  color: var(--primary-pink);
}
.check-key:active {
  background-color: var(--primary-pink-dark);
}

.lock-hint {
  font-size: 0.75rem;
  color: rgba(60, 20, 60, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Shaking animation on wrong passcode */
.shake {
  animation: shakeEffect 0.5s ease-in-out;
}

@keyframes shakeEffect {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ==========================================================================
   MAIN APPLICATION
   ========================================================================== */
#main-app {
  height: 100%;
}

.app-header {
  height: 65px;
  padding: 0 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 8;
  flex-shrink: 0;
}

.music-controller {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(255, 94, 126, 0.25);
  cursor: pointer;
  transition: transform 0.2s;
}

.music-controller:active {
  transform: scale(0.95);
}

.music-controller.playing i {
  animation: musicSpin 3s linear infinite;
}

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

.app-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--primary-pink-dark);
}

.text-gold {
  color: var(--sparkle-gold);
  font-size: 1.2rem;
  animation: spinGold 4s linear infinite;
}

@keyframes spinGold {
  50% { transform: scale(1.2); opacity: 0.8; }
}

.app-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 20px 85px 20px; /* offset bottom nav */
  z-index: 5;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   PROGRESS BAR & STAGE STYLES
   ========================================================================== */
.progress-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 90px;
}

.progress-outer {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 94, 126, 0.15);
}

.progress-inner {
  height: 100%;
  background: linear-gradient(to right, var(--primary-pink), var(--primary-pink-dark));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(60, 20, 60, 0.5);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.journey-stage {
  display: none;
}

.journey-stage.active-stage {
  display: block;
  animation: slideInStage 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInStage {
  0% { transform: translateX(25px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--dark-plum);
  margin-bottom: 6px;
}

.section-desc {
  font-size: 0.85rem;
  color: rgba(60, 20, 60, 0.6);
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.4;
  padding: 0 10px;
}

/* ==========================================================================
   JOURNEY FOOTER & ACTION BUTTONS
   ========================================================================== */
.app-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  padding-bottom: env(safe-area-inset-bottom, 10px);
  z-index: 10;
}

.footer-btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  user-select: none;
}

.footer-btn.primary {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 94, 126, 0.25);
}

.footer-btn.primary:active {
  transform: scale(0.95);
}

.footer-btn.secondary {
  background: rgba(60, 20, 60, 0.05);
  color: var(--dark-plum);
}

.footer-btn.secondary:active {
  background: rgba(60, 20, 60, 0.1);
  transform: scale(0.95);
}

.footer-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.footer-spacer {
  flex-grow: 1;
}

.action-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 25px;
}

.journey-next-btn {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 32px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 94, 126, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.journey-next-btn:active {
  transform: scale(0.95);
}

.glow-btn {
  animation: heartPulse-btn 2s infinite ease-in-out;
}

@keyframes heartPulse-btn {
  0%, 100% { box-shadow: 0 6px 18px rgba(255, 94, 126, 0.3); }
  50% { box-shadow: 0 8px 24px rgba(255, 94, 126, 0.55); transform: scale(1.03); }
}

.celebration-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-pink-dark);
  background: rgba(255, 94, 126, 0.12);
  padding: 6px 18px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 auto 15px;
  text-align: center;
}

.final-card {
  background: linear-gradient(135deg, var(--dark-plum) 0%, #17001d 100%);
  color: white;
  border-radius: 26px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(21, 0, 26, 0.25);
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(255, 94, 126, 0.2);
}

.final-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(to right, #ffffff, var(--primary-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.final-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
}

.final-emoji {
  font-size: 1.8rem;
  letter-spacing: 6px;
}

.game-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-pink-dark);
  background: rgba(255, 94, 126, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ==========================================================================
   SECTION: HOME STYLING
   ========================================================================== */
.animate-fade-in {
  opacity: 0;
  transform: translateY(15px);
  animation: smoothFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in:nth-child(2) { animation-delay: 0.15s; }
.animate-fade-in:nth-child(3) { animation-delay: 0.3s; }

@keyframes smoothFade {
  100% { opacity: 1; transform: translateY(0); }
}

.welcome-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  margin-bottom: 20px;
}

.cake-image-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.cover-image {
  width: 100%;
  height: auto;
  display: block;
}

.card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-pink-dark);
  background: rgba(255, 94, 126, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wishes-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.wishes-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(60, 20, 60, 0.8);
}

.letter-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(255, 94, 126, 0.4);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 20px;
  position: relative;
}

.letter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 94, 126, 0.15);
  padding-bottom: 10px;
}

.letter-icon {
  font-size: 1.4rem;
  color: var(--primary-pink-dark);
}

.letter-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.letter-body {
  line-height: 1.6;
  font-size: 0.92rem;
  color: var(--dark-plum);
}

.italic-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 12px;
}

.letter-signature {
  text-align: right;
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 1rem;
  color: var(--primary-pink-dark);
}

.countdown-card {
  background: linear-gradient(135deg, var(--dark-plum) 0%, #15001a 100%);
  color: white;
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(21, 0, 26, 0.2);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.countdown-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  z-index: 2;
  position: relative;
}

.floating-mini-hearts {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.floating-heart-mini {
  font-size: 1.1rem;
  animation: heartWiggle 2s infinite ease-in-out;
}

.floating-heart-mini:nth-child(2) { animation-delay: 0.4s; }
.floating-heart-mini:nth-child(3) { animation-delay: 0.8s; }

.text-pink { color: var(--primary-pink); }
.text-lavender { color: var(--soft-lavender); }

@keyframes heartWiggle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(15deg); }
}

/* ==========================================================================
   SECTION: GALLERY (Polaroid deck)
   ========================================================================== */
.polaroid-container {
  display: flex;
  justify-content: center;
  width: 100%;
  perspective: 1000px;
  padding-bottom: 25px;
}

.polaroid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  max-width: 320px;
}

/* Card 3D Flip Mechanics */
.polaroid-card {
  width: 100%;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

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

.polaroid-front, .polaroid-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.05);
}

.polaroid-front {
  z-index: 2;
  transform: rotate(0deg);
}

.polaroid-back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at top right, var(--soft-peach) 0%, white 100%);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.photo-frame {
  width: 100%;
  flex-grow: 1;
  background-color: #f7f7f7;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

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

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.red-tint {
  background: linear-gradient(135deg, #ffe3e8 0%, #ffc4cf 100%);
}

.violet-tint {
  background: linear-gradient(135deg, #eee3ff 0%, #d8c4ff 100%);
}

.placeholder-icon {
  font-size: 4rem;
  color: white;
  text-shadow: 0 4px 10px rgba(0,0,0,0.05);
  animation: pulseScale 3s infinite ease-in-out;
}

.polaroid-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  color: #554;
  padding-top: 15px;
  padding-bottom: 5px;
}

.polaroid-back-content {
  padding: 20px;
}

.polaroid-back-content i {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.polaroid-back-content h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.polaroid-back-content p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(60, 20, 60, 0.85);
}

/* ==========================================================================
   SECTION: WISH JAR
   ========================================================================== */
.jar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 260px;
  position: relative;
  margin-top: 10px;
  margin-bottom: 30px;
}

.jar-wrapper {
  width: 150px;
  height: 210px;
  position: relative;
  cursor: pointer;
  transform-origin: bottom center;
}

.jar-wrapper:active {
  animation: shakeJar 0.4s ease;
}

@keyframes shakeJar {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg) scale(0.98); }
  75% { transform: rotate(8deg) scale(0.98); }
}

.jar-lid {
  width: 90px;
  height: 24px;
  background: linear-gradient(to right, #e6c587, #cfa862);
  border-radius: 8px 8px 3px 3px;
  margin: 0 auto;
  border-bottom: 2px solid #b5924d;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.jar-body {
  width: 140px;
  height: 180px;
  background: rgba(255, 255, 255, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-top: none;
  border-radius: 10px 10px 40px 40px;
  margin: 0 auto;
  box-shadow: inset 0 8px 10px rgba(255, 255, 255, 0.4), 
              0 8px 20px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-reflection {
  position: absolute;
  top: 0;
  left: 10px;
  width: 15px;
  height: 90%;
  background: rgba(255, 255, 255, 0.4);
  transform: skewX(-10deg);
  border-radius: 10px;
  filter: blur(1px);
}

.jar-notes-inside {
  position: absolute;
  width: 100%;
  height: 100%;
}

.jar-note {
  position: absolute;
  width: 25px;
  height: 18px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform: rotate(15deg);
}

.note-1 { background-color: var(--primary-pink); top: 120px; left: 30px; transform: rotate(-25deg); }
.note-2 { background-color: var(--soft-lavender); top: 130px; right: 28px; transform: rotate(15deg); }
.note-3 { background-color: #ffd8a8; top: 100px; left: 55px; transform: rotate(40deg); }
.note-4 { background-color: #ffc9c9; top: 140px; left: 62px; transform: rotate(-5deg); }

.jar-label {
  background: #fdfaf6;
  border: 1px dashed #b5924d;
  color: #7c5c22;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: bold;
  padding: 4px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  z-index: 2;
  transform: rotate(-3deg);
  user-select: none;
}

.jar-glow {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* Modal style Card for displayed Wish */
.wish-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 88%;
  max-width: 320px;
  background: white;
  border-radius: 28px;
  padding: 30px 24px;
  box-shadow: 0 15px 40px rgba(60, 20, 60, 0.25);
  z-index: 100;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wish-card.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.wish-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  box-shadow: inset 0 0 25px rgba(255, 94, 126, 0.15);
  pointer-events: none;
}

.wish-index {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-pink-dark);
  letter-spacing: 1px;
  background: rgba(255, 94, 126, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 15px;
}

#wish-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--dark-plum);
  margin-bottom: 25px;
}

.wish-next-btn {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
  border: none;
  border-radius: 25px;
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 94, 126, 0.3);
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
}

.wish-next-btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   SECTION: COUPONS
   ========================================================================== */
.coupons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.coupon-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.03);
  border: 1px solid rgba(255, 94, 126, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Ticket dashed separator lines */
.coupon-card::before, .coupon-card::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--bg-gradient);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
}
.coupon-card::before { left: -8px; }
.coupon-card::after { right: -8px; }

.coupon-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: repeating-linear-gradient(to bottom, var(--primary-pink), var(--primary-pink) 6px, transparent 6px, transparent 12px);
}

.coupon-content {
  padding-left: 12px;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.coupon-icon {
  font-size: 1.5rem;
  color: var(--primary-pink-dark);
  margin-bottom: 8px;
}

.coupon-content h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--dark-plum);
}

.coupon-content p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(60, 20, 60, 0.7);
  margin-bottom: 12px;
  flex-grow: 1;
}

.redeem-btn {
  align-self: flex-start;
  background: var(--glass-bg);
  border: 1.5px solid var(--primary-pink);
  border-radius: 20px;
  color: var(--primary-pink-dark);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.redeem-btn:active {
  transform: scale(0.95);
}

.coupon-badge {
  display: none;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2b8a3e;
  background-color: #ebfbee;
  border: 1px solid #c3e6cb;
  padding: 4px 12px;
  border-radius: 20px;
  align-items: center;
  gap: 4px;
}

/* Coupon Redeemed State */
.coupon-card[data-redeemed="true"] {
  background: #fbfbfb;
  border-color: rgba(0,0,0,0.06);
  opacity: 0.8;
}

.coupon-card[data-redeemed="true"] .coupon-pattern {
  background: repeating-linear-gradient(to bottom, #ced4da, #ced4da 6px, transparent 6px, transparent 12px);
}

.coupon-card[data-redeemed="true"] .coupon-icon {
  color: #868e96;
}

.coupon-card[data-redeemed="true"] .redeem-btn {
  display: none;
}

.coupon-card[data-redeemed="true"] .coupon-badge {
  display: inline-flex;
}

.reset-coupons-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 10px;
}

.reset-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(60, 20, 60, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  transition: background-color 0.2s;
}

.reset-btn:active {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--dark-plum);
}

/* ==========================================================================
   COUNTDOWN TIMER STYLES
   ========================================================================= */
.countdown-timer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  max-width: 280px;
  margin: 15px auto 20px;
}

.time-block {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.time-block span {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-pink);
  text-shadow: 0 0 10px rgba(255, 94, 126, 0.3);
}

.time-block label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.cat-bubble {
  background: #fff0f3;
  border: 1px dashed var(--primary-pink);
  border-radius: 16px;
  padding: 10px 15px;
  font-size: 0.82rem;
  color: var(--primary-pink-dark);
  font-style: italic;
  margin: 12px auto;
  max-width: 280px;
  line-height: 1.4;
  box-shadow: 0 4px 10px rgba(255, 94, 126, 0.05);
}

/* Scratch Card Styles */
.scratch-container {
  position: relative;
  width: 100%;
  min-height: 180px;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
}

#scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.4s ease;
  touch-action: none; /* Disable native touch scrolling on canvas scratch */
}

/* Cute Meter Clicker Game Styles */
.clicker-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  margin-bottom: 20px;
}

.clicker-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark-plum);
}

.clicker-desc {
  font-size: 0.78rem;
  color: rgba(60, 20, 60, 0.6);
  margin-bottom: 15px;
}

.meter-container {
  width: 100%;
  height: 22px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  border: 1.5px solid rgba(255, 94, 126, 0.25);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.meter-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, var(--primary-pink), var(--primary-pink-dark));
  transition: width 0.15s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.meter-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dark-plum);
}

.clicker-heart-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
  border: none;
  color: white;
  font-size: 2.1rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 94, 126, 0.35);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  outline: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

.clicker-heart-btn:active {
  transform: scale(0.9);
  box-shadow: 0 3px 8px rgba(255, 94, 126, 0.2);
}

.clicker-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-pink-dark);
  margin-top: 15px;
  min-height: 20px;
}

/* Wish Popup Cat Image Styles */
.wish-cat-container {
  width: 90px;
  height: 90px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-pink);
  box-shadow: 0 4px 10px rgba(255, 94, 126, 0.15);
}

.wish-popup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ambient: Theme Switcher */
.theme-switcher {
  display: flex;
  gap: 6px;
  align-items: center;
}
.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}
.theme-dot:hover {
  transform: scale(1.25);
}

/* Ambient: Shooting Stars */
.shooting-stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: linear-gradient(90deg, #fff, transparent);
  animation: shoot 2.2s linear infinite;
  opacity: 0.8;
}
@keyframes shoot {
  0% {
    transform: rotate(-35deg) translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(-35deg) translateX(250px) scale(0);
    opacity: 0;
  }
}

/* Ambient: Future Riya Notification */
.future-notif {
  position: fixed;
  top: 15px;
  left: 5%;
  width: 90%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  transform: translateY(-80px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}
.future-notif.show {
  transform: translateY(0);
  opacity: 1;
}
.notif-inner {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  position: relative;
}
.notif-icon {
  font-size: 1.5rem;
}
.notif-text {
  flex-grow: 1;
}
.notif-text strong {
  display: block;
  font-size: 0.82rem;
  color: var(--dark-plum);
  text-align: left;
}
.notif-text p {
  font-size: 0.76rem;
  color: rgba(60, 20, 60, 0.8);
  margin-top: 2px;
  text-align: left;
}
.notif-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: rgba(60, 20, 60, 0.4);
  cursor: pointer;
  align-self: flex-start;
}

/* Welcome Stage: Age Counter */
.age-counter-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 16px;
  margin: 15px auto;
  max-width: 310px;
  box-shadow: var(--glass-shadow);
  text-align: center;
}
.age-counter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-pink-dark);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.age-counter-display {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
  margin: 8px 0;
}
.age-counter-display span {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark-plum);
}
.age-counter-display small {
  font-size: 0.68rem;
  color: rgba(60, 20, 60, 0.6);
  margin-right: 6px;
}

/* Stage: Love Letter */
.envelope-scene {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 30px auto;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.envelope {
  position: relative;
  width: 200px;
  height: 130px;
  background: #f87171;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  cursor: pointer;
  z-index: 10;
  transition: transform 0.4s ease;
}
.envelope:hover {
  transform: translateY(-4px) scale(1.02);
}
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-top: 75px solid #ef4444;
  transform-origin: top;
  transition: transform 0.4s ease 0.2s, border-top-color 0.4s;
  z-index: 12;
}
.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  border-top-color: #f87171;
  z-index: 8;
}
.envelope-body {
  position: absolute;
  inset: 0;
  background: #f87171;
  border-radius: 0 0 16px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11;
}
.envelope-heart {
  font-size: 2.2rem;
  animation: heartPulse-btn 1.5s infinite;
}
.love-letter {
  position: absolute;
  top: 15px;
  width: 190px;
  height: 180px;
  background: #fff;
  border-radius: 12px;
  padding: 16px 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  z-index: 9;
  transform: translateY(0);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s, opacity 0.5s ease 0.6s;
  overflow-y: auto;
  text-align: left;
}
.love-letter.reveal {
  transform: translateY(-80px) scale(1.22);
  opacity: 1;
  z-index: 15;
}
.love-letter-header {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: var(--primary-pink-dark);
  border-bottom: 1px dashed var(--soft-lavender);
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.love-letter p {
  font-size: 0.62rem;
  line-height: 1.4;
  color: rgba(60, 20, 60, 0.9);
  margin-bottom: 8px;
}
.love-letter-sign {
  font-size: 0.58rem;
  text-align: right;
  border-top: 1px dashed var(--soft-lavender);
  padding-top: 4px;
  color: var(--dark-plum);
}

/* Stage: 15 Reasons */
.reasons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 310px;
  margin: 15px auto;
  max-height: 380px;
  overflow-y: auto;
  padding: 5px;
}
.reason-item {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px 14px;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.reason-item.locked {
  background: rgba(255, 255, 255, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.45);
}
.reason-item.locked:active {
  transform: scale(0.97);
}
.reason-item.revealed {
  box-shadow: var(--glass-shadow);
  border-color: var(--primary-pink);
  background: white;
}
.reason-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-pink);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}
.reason-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark-plum);
  text-align: left;
}

/* Stage: Birthday Timeline */
.timeline {
  position: relative;
  max-width: 300px;
  margin: 20px auto;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--primary-pink-dark);
  opacity: 0.35;
}
.tl-item {
  position: relative;
  margin-bottom: 22px;
  cursor: pointer;
  text-align: left;
}
.tl-dot {
  position: absolute;
  left: -28px;
  top: 0;
  width: 18px;
  height: 18px;
  background: white;
  border: 2px solid var(--primary-pink);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.65rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.tl-item:hover .tl-dot {
  transform: scale(1.22);
}
.tl-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px 14px;
  transition: all 0.3s ease;
}
.tl-content strong {
  font-size: 0.8rem;
  color: var(--dark-plum);
  display: block;
}
.tl-detail {
  font-size: 0.72rem;
  color: rgba(60, 20, 60, 0.75);
  margin-top: 4px;
  display: none;
}
.tl-item.expanded .tl-content {
  background: white;
  box-shadow: var(--glass-shadow);
  border-color: var(--primary-pink);
}
.tl-item.expanded .tl-detail {
  display: block;
}

/* Stage: Guess the Memory Quiz */
.quiz-container {
  max-width: 310px;
  margin: 15px auto;
}
.quiz-card {
  background: white;
  border-radius: 24px;
  padding: 22px 18px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}
.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
  margin-bottom: 18px;
  overflow: hidden;
}
#quiz-prog-fill {
  height: 100%;
  background: var(--primary-pink);
  width: 0%;
  transition: width 0.3s ease;
}
.quiz-question {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-plum);
  margin-bottom: 18px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-opt-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 14px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark-plum);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.quiz-opt-btn:active {
  transform: scale(0.98);
}
.quiz-opt-btn.correct {
  background: #34d399;
  border-color: #10b981;
  color: white;
}
.quiz-opt-btn.wrong {
  background: #f87171;
  border-color: #ef4444;
  color: white;
}
.quiz-result {
  background: white;
  border-radius: 24px;
  padding: 28px 18px;
  box-shadow: var(--glass-shadow);
  text-align: center;
}
.quiz-result-emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* Stage: Virtual Gift Box */
.gift-scene {
  width: 100%;
  max-width: 300px;
  height: 250px;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.gift-box {
  position: relative;
  width: 130px;
  height: 120px;
  background: #ff5e7e;
  border-radius: 0 0 12px 12px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 94, 126, 0.25);
  transition: transform 0.2s;
}
.gift-box:hover {
  transform: scale(1.03);
}
.gift-lid {
  position: absolute;
  top: -16px;
  left: -5px;
  width: 140px;
  height: 22px;
  background: #ff7c96;
  border-radius: 6px;
  box-shadow: 0 3px 5px rgba(0,0,0,0.1);
  transform-origin: bottom left;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gift-lid.pop-off {
  transform: translate(60px, -90px) rotate(45deg);
  opacity: 0;
}
.gift-bow {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
}
.gift-ribbon-h {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 15px;
  background: #fbbf24;
  transform: translateY(-50%);
}
.gift-ribbon-v {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  width: 15px;
  background: #fbbf24;
  transform: translateX(-50%);
}
.gift-message {
  background: white;
  border-radius: 24px;
  padding: 24px 16px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  text-align: center;
  max-width: 280px;
  animation: cardPop 0.5s ease forwards;
}
.gift-msg-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

/* Stage: Birthday Slot Machine */
.slot-machine {
  background: #1e1b4b;
  border-radius: 28px;
  padding: 22px 16px;
  max-width: 290px;
  margin: 15px auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 4px solid #fbbf24;
}
.slot-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #0f172a;
  border-radius: 16px;
  padding: 16px 8px;
  margin-bottom: 20px;
}
.slot-reel {
  background: white;
  border-radius: 8px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
.slot-lever-wrap {
  text-align: center;
}
.slot-lever-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: none;
  padding: 12px 28px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e1b4b;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(251, 191, 36, 0.35);
  transition: all 0.1s ease;
}
.slot-lever-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.2);
}
.slot-prize {
  margin-top: 15px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px dashed #fbbf24;
  padding: 8px 12px;
  border-radius: 12px;
}
.slot-prize p {
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Stage: Blow the Candles Cake */
.cake-scene {
  max-width: 310px;
  margin: 25px auto;
  text-align: center;
}
.candles-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  height: 65px;
  align-items: flex-end;
}
.candle {
  position: relative;
  width: 10px;
  height: 40px;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
}
.candle-body {
  width: 100%;
  height: 100%;
  border-radius: 3px 3px 0 0;
}
.flame {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 15px;
  background: radial-gradient(circle, #fbbf24 20%, #f97316 70%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flicker 0.15s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
@keyframes flicker {
  0% { transform: translateX(-50%) scale(1) rotate(-1deg); }
  100% { transform: translateX(-50%) scale(1.1) rotate(1deg); }
}
.candle.blown .flame {
  display: none;
}
.cake-base-display {
  width: 160px;
  margin: 0 auto;
  position: relative;
}
.cake-layer {
  width: 100%;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.06);
}
.c-layer-1 {
  height: 30px;
  background: #fbcfe8;
  border-top: 3px solid #f472b6;
  font-size: 0.58rem;
  font-weight: 700;
  color: #db2777;
  display: flex;
  justify-content: center;
  align-items: center;
}
.c-layer-2 {
  height: 25px;
  background: #fce7f3;
  margin-top: -2px;
  width: 180px;
  margin-left: -10px;
  border-radius: 6px 6px 0 0;
  border-top: 3px solid #f472b6;
}
.c-layer-3 {
  height: 20px;
  background: #db2777;
  width: 200px;
  margin-left: -20px;
  margin-top: -2px;
  border-radius: 6px 6px 0 0;
}
.candles-blown-msg {
  margin-top: 20px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px dashed #34d399;
  padding: 10px 14px;
  border-radius: 16px;
}
.candles-blown-msg p {
  color: #047857;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Welcome Stage: Lyrics Ticker */
.lyrics-ticker-container {
  overflow: hidden;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px 12px;
  max-width: 310px;
  margin: 15px auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.lyrics-ticker-inner {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 15s linear infinite;
}
.lyrics-ticker-inner span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary-pink-dark);
}
@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Creator Credit Centered in Footer Bar */
.footer-credit {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(60, 20, 60, 0.42);
  font-family: var(--font-body);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.footer-credit .fa-heart {
  color: var(--primary-pink-dark);
  font-size: 0.68rem;
  margin: 0 2px;
  animation: heartBeat 1.4s ease-in-out infinite;
}

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


