/* ==========================================================================
   A Special Surprise for My Rajaoui 💜🦆
   Main Stylesheet (style.css)
   Strictly Zero SVG - CSS3 & Vanilla Styling Only
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & THEME TOKENS
   -------------------------------------------------------------------------- */
:root {
  --bg-main: #F7F3FC;
  --lavender-light: #E9DDF8;
  --purple-primary: #8B5CF6;
  --purple-deep: #6D28D9;
  --purple-dark: #5B21B6;
  --plum-dark: #352347;
  --plum-night: #1E122C;
  --cream-paper: #FFFCF8;
  --cream-card: #FFFFFF;
  --text-dark: #292333;
  --text-muted: #6B627A;
  --lavender-pink: #DCC7F5;
  --raja-green: #008751;
  --raja-green-light: #00ff15;
  --raja-green-glow: rgba(0, 135, 81, 0.35);
  --error-red: #EF4444;
  --error-bg: #FEF2F2;
  
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(139, 92, 246, 0.08);
  --shadow-md: 0 10px 28px rgba(109, 40, 217, 0.12);
  --shadow-lg: 0 20px 45px rgba(53, 35, 71, 0.16);
  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.45);
  
  --transition-fast: 0.22s ease;
  --transition-normal: 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-dark);
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background-color var(--transition-normal);
}

/* --------------------------------------------------------------------------
   3. BACKGROUND AMBIENCE & PARTICLES
   -------------------------------------------------------------------------- */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: floatAmbient 18s infinite ease-in-out alternate;
}

.ambient-shape.s1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--lavender-pink), transparent);
  top: -60px;
  right: -50px;
}

.ambient-shape.s2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--lavender-light), transparent);
  bottom: -80px;
  left: -80px;
  animation-duration: 22s;
  animation-delay: -5s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
  100% { transform: translate(-25px, 20px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   4. LAYOUT & STAGE CONTAINERS
   -------------------------------------------------------------------------- */
.main-container {
  width: 100%;
  max-width: 680px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 18px;
  position: relative;
  z-index: 10;
}

.stage-section {
  width: 100%;
  display: none;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-section.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Theme Variant: Dark Stages (Opening & Closing) */
body.theme-dark {
  background-color: var(--plum-dark);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   5. CARDS & COMMON SURFACES
   -------------------------------------------------------------------------- */
.card {
  width: 100%;
  background: var(--cream-card);
  border: 1.5px solid var(--lavender-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 38px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Dark Card */
.password-card, .closing-card {
  background: rgba(30, 18, 44, 0.88);
  border: 1.5px solid rgba(139, 92, 246, 0.28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), var(--shadow-glow);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   6. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.stage-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.glow-title {
  color: #FFFFFF;
  text-shadow: 0 0 15px rgba(220, 199, 245, 0.7);
}

.text-purple {
  color: var(--purple-deep);
}

.text-green {
  color: var(--raja-green);
}

.stage-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 26px;
  line-height: 1.6;
}

.password-card .stage-subtitle, .closing-card .stage-subtitle {
  color: rgba(233, 221, 248, 0.85);
}

/* --------------------------------------------------------------------------
   7. BUTTONS & CONTROLS
   -------------------------------------------------------------------------- */
.btn {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-normal);
  user-select: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-deep));
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(109, 40, 217, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #996bf9, var(--purple-dark));
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(109, 40, 217, 0.42);
}

.btn-secondary {
  background: var(--lavender-light);
  color: var(--purple-deep);
}

.btn-secondary:hover {
  background: var(--lavender-pink);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--purple-deep);
  border: 2px solid var(--purple-primary);
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.08);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid var(--lavender-pink);
}

.btn-outline-light:hover {
  background: rgba(220, 199, 245, 0.15);
  transform: translateY(-2px);
}

.btn-glow {
  animation: buttonPulse 2.4s infinite ease-in-out;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(109, 40, 217, 0.32); }
  50% { box-shadow: 0 8px 32px rgba(139, 92, 246, 0.65); }
}

.btn-large {
  font-size: 1.25rem;
  padding: 16px 42px;
}

/* --------------------------------------------------------------------------
   8. STAGE 1: PASSWORD SCREEN
   -------------------------------------------------------------------------- */
.night-sky-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  color: var(--lavender-pink);
  font-size: 1.2rem;
  opacity: 0.6;
  animation: starTwinkle 3s infinite ease-in-out alternate;
}

.star.s1 { top: 12%; left: 15%; animation-delay: 0s; }
.star.s2 { top: 25%; right: 18%; animation-delay: 0.8s; font-size: 1.4rem; }
.star.s3 { top: 68%; left: 22%; animation-delay: 1.6s; }
.star.s4 { bottom: 18%; right: 14%; animation-delay: 2.2s; }
.star.s5 { top: 45%; right: 35%; animation-delay: 1.1s; font-size: 1rem; }

@keyframes starTwinkle {
  0% { opacity: 0.3; transform: scale(0.85); }
  100% { opacity: 0.95; transform: scale(1.2); }
}

.lock-icon-wrapper {
  margin: 0 auto 20px;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-lock-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pulse-glow {
  animation: lockGlow 3s infinite ease-in-out;
}

@keyframes lockGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 24px rgba(186, 137, 255, 0.85)); transform: scale(1.04); }
}

.pin-container {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 10px auto 26px;
  direction: ltr; /* keep left-to-right digit flow */
}

.pin-digit {
  width: 58px;
  height: 64px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: all var(--transition-fast);
}

.pin-digit:focus {
  border-color: var(--purple-primary);
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.feedback-box {
  margin-top: 22px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  animation: fadeInDown 0.35s ease;
}

.feedback-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.feedback-box.hint {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #E9DDF8;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   9. STAGE 2: PASSWORD SUCCESS
   -------------------------------------------------------------------------- */
.celebration-badge {
  font-size: 3.2rem;
  margin-bottom: 12px;
  animation: bounceBadge 1.2s infinite ease-in-out;
}

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

.success-duck-preview {
  width: 170px;
  height: 170px;
  margin: 10px auto 26px;
}

.duck-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.float-anim {
  animation: floating 4s infinite ease-in-out;
}

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

/* --------------------------------------------------------------------------
   10. STAGE 3: THE SURPRISE QUESTION (YES OR NO)
   -------------------------------------------------------------------------- */
.scrapbook-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.decor-corner {
  position: absolute;
  width: 85px;
  height: 85px;
  object-fit: contain;
  opacity: 0.85;
}


.decor-tl {
  top: 0;
  left: 0;
  transform: rotate(0deg);
}

.decor-tr {
  top: 0;
  right: 0;
 transform: scaleX(-1);
}

.decor-bl {
  bottom: 0;
  left: 0;
  transform: rotate(270deg);
}

.decor-br {
  bottom: 0;
  right: 0;
  transform: rotate(180deg);
}

.gift-illustration-wrapper {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
}

.gift-box-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gift-question-card {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.button-choice-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  width: 100%;
  min-height: 80px;
  position: relative;
}

.btn-no {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1.2), background-color var(--transition-fast);
  cursor: pointer;
  z-index: 5;
}

/* --------------------------------------------------------------------------
   11. STAGE 4: FUNNY "NO" SCREEN (DUCK WITH KNIFE)
   -------------------------------------------------------------------------- */
.duck-knife-wrapper {
  width: 190px;
  height: 190px;
  margin: 0 auto 18px;
}

.duck-illustration-knife {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wobble-anim {
  animation: wobble 3s infinite ease-in-out;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.speech-bubble {
  position: relative;
  background: var(--cream-paper);
  border: 1.5px solid var(--lavender-light);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin: 18px auto 26px;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 10px 12px 10px;
  border-style: solid;
  border-color: transparent transparent var(--cream-paper) transparent;
}

/* --------------------------------------------------------------------------
   12. STAGE 5: "YES" CONFIRMATION (CALM DUCK WITH HEART)
   -------------------------------------------------------------------------- */
.duck-heart-wrapper {
  width: 190px;
  height: 190px;
  margin: 0 auto 18px;
}

.duck-illustration-heart {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pulse-slow {
  animation: heartPulse 3.5s infinite ease-in-out;
}

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

/* --------------------------------------------------------------------------
   13. STAGE 6: MEMORY INTRODUCTION
   -------------------------------------------------------------------------- */
.polaroid-stack-preview {
  position: relative;
  width: 200px;
  height: 170px;
  margin: 0 auto 24px;
}

.mini-polaroid {
  position: absolute;
  width: 130px;
  height: 140px;
  background: var(--cream-paper);
  border: 1px solid var(--lavender-light);
  border-radius: var(--radius-sm);
  padding: 8px 8px 24px 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.mini-polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.mini-polaroid.p1 {
  top: 0;
  left: 10px;
  transform: rotate(-8deg);
}

.mini-polaroid.p2 {
  top: 10px;
  right: 10px;
  transform: rotate(6deg);
}

.polaroid-stack-preview:hover .mini-polaroid.p1 {
  transform: rotate(-14deg) translateY(-6px);
}

.polaroid-stack-preview:hover .mini-polaroid.p2 {
  transform: rotate(12deg) translateY(-6px);
}

/* --------------------------------------------------------------------------
   14. STAGE 7: INTERACTIVE MEMORY GALLERY
   -------------------------------------------------------------------------- */
#stage-memory-gallery {
  max-width: 820px;
}

.gallery-header {
  text-align: center;
  margin-bottom: 24px;
}

.gallery-groups-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.memory-group-section {
  background: var(--cream-card);
  border: 1.5px solid var(--lavender-light);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.group-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1.5px dashed var(--lavender-light);
  padding-bottom: 12px;
}

.group-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple-deep);
}

.group-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--lavender-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

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

.photo-card {
  background: var(--cream-paper);
  border: 1px solid var(--lavender-light);
  border-radius: var(--radius-md);
  padding: 10px 10px 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.photo-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-primary);
}

.photo-thumbnail-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--lavender-light);
}

.photo-thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-card:hover .photo-thumbnail-box img {
  transform: scale(1.06);
}

.photo-card-caption {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-dark);
}

.gallery-footer {
  text-align: center;
  margin-top: 36px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   15. STAGE 8: CINEMATIC PURPLE TRANSITION
   -------------------------------------------------------------------------- */
.stage-cinematic {
  position: relative;
  min-height: 80vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.cinematic-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.cinematic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(30, 18, 44, 0.4), rgba(30, 18, 44, 0.85));
}

.cinematic-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: #FFFFFF;
  padding: 30px 20px;
  max-width: 580px;
}

.cinematic-heading {
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  line-height: 1.5;
  animation: fadeInScale 0.6s ease;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.countdown-wrapper {
  margin: 30px auto;
}

.countdown-number {
  font-size: 5.5rem;
  font-weight: 900;
  color: var(--lavender-pink);
  text-shadow: 0 0 25px rgba(220, 199, 245, 0.9);
  animation: countPop 0.85s infinite ease-in-out;
}

@keyframes countPop {
  0% { transform: scale(0.7); opacity: 0; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

.readiness-card, .readiness-warning-card {
  background: rgba(30, 18, 44, 0.88);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  animation: fadeInDown 0.45s ease;
}

.readiness-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: #FFFFFF;
}

.readiness-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.duck-mini-knife {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.warning-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #F87171;
  margin-bottom: 8px;
}

.warning-desc {
  font-size: 1.15rem;
  font-weight: 600;
  color: #E9DDF8;
  margin-bottom: 22px;
}

/* --------------------------------------------------------------------------
STAGE 9: RAJA QUIZ — PREMIUM DESIGN
-------------------------------------------------------------------------- */

/* Quiz Club Crest */
.club-crest-wrapper {
width: 150px;
height: 150px;
margin: 0 auto 22px;
padding: 0;

display: flex;
align-items: center;
justify-content: center;

overflow: hidden;
border-radius: 22px;

background: var(--cream-paper);
border: 1px solid rgba(0, 135, 81, 0.25);

box-shadow: 0 8px 25px rgba(0, 135, 81, 0.14);
}

.raja-crest-img {
display: block;
width: 100%;
height: 100%;

object-fit: cover;
object-position: center;
}


.club-crest-wrapper:hover {
transform: translateY(-3px);

box-shadow:
0 14px 35px rgba(0, 135, 81, 0.15),
0 0 0 7px rgba(0, 135, 81, 0.045);
}


/* Quiz Status */
.quiz-status-bar {
margin-bottom: 28px;
}

.quiz-step-counter {
font-size: 0.95rem;
font-weight: 800;
color: var(--purple-deep);

text-align: center;
margin-bottom: 12px;

letter-spacing: 0.3px;
}

/* Progress Track */
.quiz-progress-bar {
width: 100%;
height: 9px;

background: rgba(126, 69, 199, 0.12);
border-radius: var(--radius-full);

overflow: hidden;
position: relative;
}

.quiz-progress-fill {
height: 100%;

background: linear-gradient(
90deg,
var(--raja-green) 0%,
#22A06B 45%,
var(--purple-primary) 100%
);

border-radius: var(--radius-full);

transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: 0 0 12px rgba(0, 135, 81, 0.18);
}

/* Question */
.quiz-question-text {
font-size: clamp(1.2rem, 2.5vw, 1.55rem);
font-weight: 800;

color: var(--text-dark);
line-height: 1.8;

text-align: center;

margin: 0 0 28px;
padding: 20px 18px;

background: linear-gradient(
135deg,
rgba(255, 255, 255, 0.85),
rgba(250, 245, 255, 0.8)
);

border: 1px solid rgba(167, 123, 221, 0.18);
border-radius: 20px;

box-shadow: 0 5px 20px rgba(50, 30, 70, 0.035);
}

/* Answer Options */
.quiz-options-grid {
display: grid;
grid-template-columns: 1fr;

gap: 13px;
margin-bottom: 22px;
}

.quiz-option-btn {
font-family: inherit;
font-size: 1.05rem;
font-weight: 700;

width: 100%;
min-height: 66px;

padding: 14px 18px;

background: var(--cream-paper);
border: 1.5px solid rgba(167, 123, 221, 0.25);
border-radius: 17px;

color: var(--text-dark);
cursor: pointer;

text-align: right;

display: flex;
align-items: center;
gap: 14px;

position: relative;
overflow: hidden;

box-shadow: 0 3px 10px rgba(40, 20, 60, 0.025);

transition:
background 0.22s ease,
border-color 0.22s ease,
box-shadow 0.22s ease,
transform 0.22s ease;
}

.quiz-option-btn:hover {
background: #FAF7FF;
border-color: var(--purple-primary);

transform: translateY(-2px);

box-shadow: 0 7px 18px rgba(126, 69, 199, 0.10);
}

.quiz-option-btn:focus-visible {
outline: 3px solid rgba(126, 69, 199, 0.35);
outline-offset: 3px;
}

/* Option Letter Badge */
.option-badge {
display: inline-flex;
align-items: center;
justify-content: center;

width: 36px;
height: 36px;
min-width: 36px;

background: rgba(126, 69, 199, 0.12);
border: 1px solid rgba(126, 69, 199, 0.08);
border-radius: 12px;

font-size: 0.95rem;
font-weight: 800;

color: var(--purple-deep);
flex-shrink: 0;

transition:
background 0.22s ease,
color 0.22s ease,
border-radius 0.22s ease;
}

.quiz-option-btn:hover .option-badge {
background: var(--purple-primary);
color: #FFFFFF;
border-radius: 50%;
}

/* Correct Answer */
.quiz-option-btn.correct {
background: var(--raja-green-light) !important;
border-color: var(--raja-green) !important;
color: var(--raja-green) !important;

box-shadow: 0 5px 18px rgba(0, 135, 81, 0.12);
}

.quiz-option-btn.correct .option-badge {
background: var(--raja-green) !important;
color: #FFFFFF !important;
border-color: transparent;
}

/* Wrong Answer */
.quiz-option-btn.wrong {
background: var(--error-bg) !important;
border-color: var(--error-red) !important;
color: var(--error-red) !important;

box-shadow: 0 5px 18px rgba(220, 50, 70, 0.08);
}

.quiz-option-btn.wrong .option-badge {
background: var(--error-red) !important;
color: #FFFFFF !important;
border-color: transparent;
}

/* Answer Feedback */
.quiz-feedback {
margin-top: 18px;
padding: 16px 20px;

border-radius: 16px;

font-size: 1.05rem;
font-weight: 800;
line-height: 1.7;

text-align: center;

animation: fadeInDown 0.3s ease;
}

.quiz-feedback.correct-feedback {
background: var(--raja-green-light);
border: 1px solid rgba(0, 135, 81, 0.3);
color: var(--raja-green);
}

/* Retry Area */
.quiz-retry-box {
margin-top: 24px;
padding: 20px;

text-align: center;

background: rgba(255, 245, 245, 0.75);
border: 1px solid rgba(220, 50, 70, 0.16);
border-radius: 18px;

animation: fadeInDown 0.35s ease;
}

.retry-msg {
font-size: 1.1rem;
font-weight: 800;

color: var(--error-red);
line-height: 1.7;

margin-bottom: 16px;
}

/* Responsive Quiz */
@media (max-width: 600px) {
.club-crest-wrapper {
width: 125px;
height: 125px;
padding: 10px;
margin-bottom: 18px;
border-radius: 23px;
}

.quiz-status-bar {
margin-bottom: 22px;
}

.quiz-question-text {
padding: 17px 14px;
margin-bottom: 20px;
border-radius: 16px;
}

.quiz-options-grid {
gap: 11px;
}

.quiz-option-btn {
min-height: 60px;
padding: 12px 14px;
font-size: 0.98rem;
gap: 11px;
}

.option-badge {
width: 33px;
height: 33px;
min-width: 33px;
border-radius: 10px;
}
}

@media (prefers-reduced-motion: reduce) {
.club-crest-wrapper,
.quiz-progress-fill,
.quiz-option-btn,
.option-badge {
transition: none;
}
}


/* --------------------------------------------------------------------------
   17. STAGE 10: GIFT UNLOCKING
   -------------------------------------------------------------------------- */
.raja-victory-badge {
  font-size: 3rem;
  margin-bottom: 10px;
  animation: bounceBadge 1.2s infinite ease-in-out;
}

.gift-box-stage-wrapper {
  width: 220px;
  height: 220px;
  margin: 10px auto 30px;
  position: relative;
}

.gift-lid-box {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gift-anim-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gift-lid-box.opening {
  animation: giftOpenAnim 1s forwards ease-in-out;
}

@keyframes giftOpenAnim {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(1.12) rotate(-6deg); }
  70% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) translateY(-10px); }
}

/* --------------------------------------------------------------------------
   18. STAGE 11: THREE LETTERS SELECTION (CAT & ENVELOPES)
   -------------------------------------------------------------------------- */
.cat-illustration-wrapper {
  width: 210px;
  height: 210px;
  margin: 0 auto 18px;
}

.cat-envelopes-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.envelopes-grid {
  display: grid;
  grid-template-columns: minmax(170px, 230px);
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.envelope-item {
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.envelope-preview-card {
  background: var(--cream-paper);
  border: 1.5px solid var(--lavender-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.envelope-item:hover .envelope-preview-card {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-primary);
}

.envelope-icon {
  font-size: 2.6rem;
}

.envelope-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--purple-deep);
}

.read-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--lavender-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.envelope-item.read .read-status {
  background: var(--raja-green-light);
  color: var(--raja-green);
}

.envelope-item.locked .envelope-preview-card {
  opacity: 0.7;
  border-style: dashed;
}

.envelope-item.unlocked-final .envelope-preview-card {
  opacity: 1;
  border-style: solid;
  border-color: #F59E0B;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
  animation: finalGlowPulse 2s infinite alternate;
}

@keyframes finalGlowPulse {
  from { box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
  to { box-shadow: 0 0 30px rgba(139, 92, 246, 0.6); }
}

.letter-warning-toast {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 2px solid var(--purple-primary);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
  width: 90%;
  max-width: 440px;
  animation: popUpToast 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popUpToast {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.toast-duck-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.toast-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.4;
  text-align: right;
}

/* --------------------------------------------------------------------------
   19. STAGE 12: FINAL PERSONAL LETTER SCREEN
   -------------------------------------------------------------------------- */
.final-letter-card {
  max-width: 650px;
  background: var(--cream-paper);
}

.duo-photos-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin: 24px auto 30px;
}

.circle-photo-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.circle-photo-wrapper {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--lavender-pink), var(--purple-primary));
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.22);
  transition: transform var(--transition-normal);
}

.circle-photo-wrapper:hover {
  transform: scale(1.06);
}

.circle-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.photo-badge {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple-deep);
  background: var(--lavender-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.letter-paper-sheet {
  background: #FFFFFF;
  border: 1.5px solid var(--lavender-light);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  margin-bottom: 28px;
  box-shadow: inset 0 2px 10px rgba(139, 92, 246, 0.04);
  text-align: right;
  line-height: 1.9;
}

.letter-text-flow p {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(10px);
  animation: revealPara 0.6s forwards ease;
}

.letter-text-flow p:last-child {
  margin-bottom: 0;
}

@keyframes revealPara {
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   20. STAGE 13: CLOSING SCREEN (RESTING DUCK)
   -------------------------------------------------------------------------- */
.duck-resting-wrapper {
  width: 220px;
  height: 220px;
  margin: 10px auto 24px;
}

.duck-resting-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.breath-anim {
  animation: duckBreathe 4s infinite ease-in-out;
}

@keyframes duckBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04) translateY(-4px); }
}

.closing-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.closing-quote {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--lavender-pink);
  margin-bottom: 34px;
  line-height: 1.8;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   21. MODALS
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 18, 44, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--cream-paper);
  border: 1.5px solid var(--lavender-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px 24px;
  position: relative;
  animation: popUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--lavender-light);
  color: var(--purple-deep);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--purple-primary);
  color: #FFFFFF;
}

.modal-photo-wrapper {
width: 100%;
height: min(55vh, 520px);
min-height: 250px;

border-radius: var(--radius-md);
overflow: hidden;
margin-bottom: 20px;

background: #000;

display: flex;
align-items: center;
justify-content: center;
}

.modal-photo-wrapper img {
display: block;

/* Keep the entire image visible */
max-width: 100%;
max-height: 100%;

width: auto;
height: auto;

object-fit: contain;
object-position: center;

border-radius: var(--radius-sm);
}

.modal-info-pane {
  text-align: right;
  margin-bottom: 22px;
}

.modal-photo-caption {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple-deep);
  margin-bottom: 8px;
}

.modal-photo-story {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.8;
}

.modal-nav-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.btn-modal-nav {
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--purple-primary);
  background: transparent;
  color: var(--purple-deep);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modal-nav:hover {
  background: var(--purple-primary);
  color: #FFFFFF;
}

/* Letter Modal */
.letter-modal-header {
  text-align: center;
  margin-bottom: 18px;
}

.letter-stamp {
  font-size: 3rem;
  display: block;
  margin-bottom: 6px;
}

.letter-modal-sender {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--purple-deep);
}

.letter-modal-body {
  background: #FFFFFF;
  border: 1px solid var(--lavender-light);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  margin-bottom: 24px;
  text-align: right;
  line-height: 1.9;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   22. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .main-container {
    padding: 16px 12px;
  }

  .card {
    padding: 28px 18px;
    border-radius: var(--radius-md);
  }

  .stage-title {
    font-size: 1.5rem;
  }

  .stage-subtitle {
    font-size: 0.95rem;
  }

  .btn {
    font-size: 1rem;
    padding: 12px 26px;
  }

  .pin-digit {
    width: 48px;
    height: 56px;
    font-size: 1.5rem;
  }

  .duo-photos-container {
    gap: 16px;
  }

  .circle-photo-wrapper {
    width: 110px;
    height: 110px;
  }

  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 380px) {
  .photos-grid {
    grid-template-columns: 1fr;
  }

  .pin-digit {
    width: 42px;
    height: 50px;
    font-size: 1.3rem;
  }
}

/* --------------------------------------------------------------------------
   22. STAGE 10 & 11: QUIZ VICTORY & ANIMATED COMEDY SONG THEATRE
   -------------------------------------------------------------------------- */
.quiz-celebration-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: cardFadeIn 0.5s ease;
}

.song-teaser-bubble {
  background: linear-gradient(135deg, #FAF5FF, #F3E8FF);
  border: 2px dashed #A855F7;
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin: 10px 0 16px;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.15);
  animation: floatSubtle 4s infinite ease-in-out;
}

.song-teaser-bubble .teaser-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--purple-deep);
  margin-bottom: 4px;
}

.song-teaser-bubble .teaser-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Song Stage Container */
#stage-song {
  width: 100%;
}

.song-card {
  width: 100%;
  max-width: 660px;
  padding: 18px;
  background: #241635;
  border: 1px solid rgba(167, 123, 221, 0.3);
  box-shadow: 0 15px 45px rgba(18, 10, 28, 0.6), 0 0 30px rgba(126, 69, 199, 0.25);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

/* Audio Player Toolbar */
.song-player-bar {
  background: rgba(36, 22, 53, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(167, 123, 221, 0.35);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.player-main-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  background: #7E45C7;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(126, 69, 199, 0.35);
  transition: all var(--transition-fast);
}

.audio-btn:hover {
  background: #9055dc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(126, 69, 199, 0.5);
}

.audio-btn:active {
  transform: translateY(0);
}

.audio-btn.btn-restart,
.audio-btn.btn-mute {
  padding: 8px 12px;
  background: rgba(167, 123, 221, 0.25);
  border: 1px solid rgba(167, 123, 221, 0.4);
}

.audio-btn.btn-restart:hover,
.audio-btn.btn-mute:hover {
  background: rgba(167, 123, 221, 0.4);
}

.player-timeline-wrapper {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.song-progress-slider {
  flex: 1;
  accent-color: #A77BDD;
  height: 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.song-time-display {
  font-size: 0.85rem;
  font-weight: 700;
  color: #E9DDF7;
  letter-spacing: 0.5px;
  direction: ltr;
  white-space: nowrap;
}

/* Scene Pills Navigation */
.scene-nav-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.scene-nav-pills::-webkit-scrollbar {
  display: none;
}

.scene-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #DCC7F5;
  border: 1px solid rgba(167, 123, 221, 0.25);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.scene-pill:hover {
  background: rgba(167, 123, 221, 0.2);
  color: #FFFFFF;
}

.scene-pill.active {
  background: #7E45C7;
  color: #FFFFFF;
  border-color: #A77BDD;
  box-shadow: 0 2px 10px rgba(126, 69, 199, 0.4);
}

/* Song Theatre Stage */
.song-theatre {
  width: 100%;
  height: 380px;
  background: radial-gradient(circle at 50% 25%, #352347 0%, #170c23 100%);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(167, 123, 221, 0.35);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

/* Autoplay Prompt Overlay */
.autoplay-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(23, 12, 35, 0.88);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.autoplay-prompt-box {
  background: #352347;
  border: 2px solid #7E45C7;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: popIn 0.4s ease;
}

.autoplay-prompt-box h3 {
  font-size: 1.3rem;
  color: #E9DDF7;
}

.autoplay-prompt-box p {
  font-size: 0.95rem;
  color: #DCC7F5;
  margin-bottom: 8px;
}

.music-note-icon {
  font-size: 2.2rem;
  animation: floatSubtle 3s infinite ease-in-out;
}

/* Theatre Sky & Clouds */
.theatre-sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.theatre-stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, #e9ddf7, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 120px, #ffd700, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 240px 60px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 320px 140px, #e9ddf7, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 400px 50px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 480px 110px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 550px 70px, #ffd700, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 300px 200px;
  opacity: 0.6;
}

.theatre-cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(167, 123, 221, 0.15);
  filter: blur(25px);
  pointer-events: none;
}

.theatre-cloud.c1 {
  width: 200px;
  height: 80px;
  top: 30px;
  left: -50px;
  animation: cloudDrift 24s infinite linear;
}

.theatre-cloud.c2 {
  width: 240px;
  height: 90px;
  top: 70px;
  right: -60px;
  animation: cloudDrift 30s infinite linear reverse;
}

@keyframes cloudDrift {
  0% { transform: translateX(0); }
  50% { transform: translateX(60px); }
  100% { transform: translateX(0); }
}

/* Comic Flash Effect */
.theatre-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.flash-active {
  animation: lightningAnim 0.6s ease;
}

@keyframes lightningAnim {
  0% { opacity: 0; }
  15% { opacity: 0.9; }
  30% { opacity: 0.1; }
  45% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* Camera Shake */
.shake-active {
  animation: shakeAnim 0.5s ease;
}

@keyframes shakeAnim {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-4px, 3px); }
  30% { transform: translate(5px, -3px); }
  45% { transform: translate(-3px, -2px); }
  60% { transform: translate(4px, 2px); }
  75% { transform: translate(-2px, 1px); }
}

/* Scene Layers */
.song-scene-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.song-scene-layer.active {
  opacity: 1;
  visibility: visible;
}

/* Scene Speech Bubbles */
.scene-speech-bubble {
  position: absolute;
  bottom: 18px;
  background: #FFFFFF;
  color: #292333;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  border: 2px solid #7E45C7;
  z-index: 25;
  animation: bubblePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.scene-speech-bubble p {
  font-size: 1.15rem;
  font-weight: 800;
  color: #292333;
  margin: 0;
}

.scene-speech-bubble.fire-bubble {
  border-color: #EF4444;
}

/* ACT 1: House Scene */
.house-container {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.song-house-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.scene-duck-shocked {
  position: absolute;
  bottom: -5px;
  right: -30px;
  width: 130px;
  height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.duck-watching-leave {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.backdrop-faint {
  opacity: 0.4;
  transform: scale(0.85);
  position: absolute;
  left: 20px;
  bottom: 40px;
}

/* ACT 2: Arrival */
.duck-arrival-container {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.duck-arrival-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

.waddle-in {
  animation: waddleEntrance 1s ease forwards, floatSubtle 3s infinite ease-in-out 1s;
}

@keyframes waddleEntrance {
  0% { transform: translateX(180px) rotate(15deg); opacity: 0; }
  60% { transform: translateX(-15px) rotate(-8deg); opacity: 1; }
  80% { transform: translateX(8px) rotate(4deg); }
  100% { transform: translateX(0) rotate(0deg); opacity: 1; }
}

.floating-sparkles-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-sparkles-layer .sp {
  position: absolute;
  font-size: 1.4rem;
  animation: floatSparkle 2.5s infinite ease-in-out;
}

.floating-sparkles-layer .sp.s1 { top: -10px; left: 15px; animation-delay: 0s; }
.floating-sparkles-layer .sp.s2 { top: 20px; right: -15px; animation-delay: 0.8s; }
.floating-sparkles-layer .sp.s3 { bottom: 20px; left: -10px; animation-delay: 1.5s; }

@keyframes floatSparkle {
  0%, 100% { transform: translateY(0) scale(0.9); opacity: 0.7; }
  50% { transform: translateY(-12px) scale(1.2); opacity: 1; }
}

/* ACT 3: Parents Walking */
.parents-walking-track {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.parents-walking-actor {
  position: absolute;
  bottom: 50px;
  right: -240px;
  width: 220px;
  height: 220px;
  animation: parentsCrossScreen 7s linear infinite;
}

.parents-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.walking-bob {
  animation: walkingBob 0.6s infinite ease-in-out;
}

@keyframes walkingBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-3deg); }
}

@keyframes parentsCrossScreen {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(-880px); opacity: 0; }
}

/* ACT 4: Housekeeper Panic */
.housekeeper-actor-container {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.housekeeper-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

.hair-pull-anim {
  animation: hairPullTremble 0.25s infinite alternate ease-in-out;
}

@keyframes hairPullTremble {
  0% { transform: scale(1) rotate(-3deg) translateY(0); }
  50% { transform: scale(1.05) rotate(0deg) translateY(-8px); }
  100% { transform: scale(0.97) rotate(3deg) translateY(2px); }
}

.panic-effects {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.panic-effects .p-drop {
  position: absolute;
  font-size: 1.5rem;
  animation: sweatDrop 1s infinite ease-in;
}

.panic-effects .p-drop.d1 { top: 20px; left: 10px; animation-delay: 0.1s; }
.panic-effects .p-drop.d2 { top: 30px; right: 15px; animation-delay: 0.5s; }

.panic-effects .p-excl {
  position: absolute;
  top: -15px;
  left: 45%;
  font-size: 1.8rem;
  color: #EF4444;
  animation: floatExcl 0.8s infinite alternate ease-in-out;
}

@keyframes sweatDrop {
  0% { transform: translateY(0) scale(0.6); opacity: 1; }
  100% { transform: translateY(35px) scale(1); opacity: 0; }
}

@keyframes floatExcl {
  0% { transform: translateY(0) scale(0.9); }
  100% { transform: translateY(-8px) scale(1.2); }
}

/* ACT 5: Chef in Kitchen */
.kitchen-backdrop-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
  z-index: 1;
}

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

.chef-actor-container {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  margin-bottom: 25px;
}

.chef-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

.chef-panic-hop {
  animation: chefHop 0.5s infinite alternate ease-in-out;
}

@keyframes chefHop {
  0% { transform: translateY(0) rotate(-4deg); }
  100% { transform: translateY(-16px) rotate(4deg); }
}

.flames-container {
  position: absolute;
  bottom: -15px;
  left: -20px;
  width: 120px;
  height: 120px;
  pointer-events: none;
}

.fire-sprite {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.7));
}

.flame-flicker {
  animation: flameFlickerAnim 0.3s infinite alternate ease-in-out;
}

.flame-flicker-alt {
  left: 30px;
  bottom: -5px;
  width: 75px;
  height: 75px;
  animation: flameFlickerAnim 0.38s infinite alternate-reverse ease-in-out;
}

@keyframes flameFlickerAnim {
  0% { transform: scale(0.92) rotate(-3deg); opacity: 0.85; }
  100% { transform: scale(1.12) rotate(4deg); opacity: 1; }
}

.smoke-sprite {
  position: absolute;
  top: -40px;
  left: 10px;
  width: 70px;
  height: 70px;
  object-fit: contain;
  opacity: 0.7;
}

.smoke-drift {
  animation: smokeRise 1.8s infinite ease-out;
}

.smoke-drift-delayed {
  left: 40px;
  top: -50px;
  animation: smokeRise 2.2s infinite ease-out 0.8s;
}

@keyframes smokeRise {
  0% { transform: translateY(20px) scale(0.6); opacity: 0.8; }
  100% { transform: translateY(-50px) scale(1.3); opacity: 0; }
}

/* Song Finale Overlay */
.song-finale-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 18, 44, 0.92);
  backdrop-filter: blur(8px);
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.finale-card {
  background: #352347;
  border: 2px solid #7E45C7;
  border-radius: var(--radius-xl);
  padding: 28px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(126, 69, 199, 0.35);
  animation: cardFadeIn 0.5s ease;
  max-width: 420px;
}

.finale-emoji {
  font-size: 2.5rem;
}

.finale-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
}

.finale-subtitle {
  font-size: 1.05rem;
  color: #E9DDF7;
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   23. ACCESSIBILITY: REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
