/* ============================================
   BIRTHDAY WEBSITE - MASTER STYLESHEET
   ============================================ */

/* --- CSS Variables (Customizable Theme) --- */
:root {
  --primary-color: #ff6b9d;
  --secondary-color: #c44dff;
  --accent-color: #ffd700;
  --bg-dark: #0a0a1a;
  --bg-gradient-1: #1a0533;
  --bg-gradient-2: #0d1b2a;
  --text-color: #ffffff;
  --text-muted: #b0b0c0;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.12);
  --button-glow: 0 0 20px rgba(255, 107, 157, 0.4);
  --transition-speed: 0.4s;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  isolation: isolate;
}

#spa-app {
  position: relative;
  min-height: 100vh;
  z-index: 2;
}

.app-screen {
  display: none;
  min-height: 100vh;
}

.app-screen.active {
  display: block;
}

/* --- Utility Classes --- */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.fade-out {
  animation: fadeOut 0.6s ease forwards;
}

.text-center {
  text-align: center;
}

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

/* --- Page Container --- */
.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* ============================================
   PAGE 1: LANDING PAGE
   ============================================ */
.landing-bg {
  background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
}

.landing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-color: #ffd70033; /* Subtle gold tint */
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.8s ease forwards;
}
.landing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.landing-card:hover {
  box-shadow: 0 0 25px rgba(255, 223, 0, 0.8),
              0 0 50px rgba(255, 223, 0, 0.6);
  border: 1px solid rgba(255, 223, 0, 0.6);
  transform: translateY(-15px)  scale(1.05);
}

.detective-cat {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.landing-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.landing-name {
  color: var(--accent-color);
  font-weight: 700;
  -webkit-text-fill-color: var(--accent-color);
}

/* --- Buttons --- */
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  box-shadow: var(--button-glow);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 35px rgba(255, 107, 157, 0.6);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

/* --- Rejection Screen --- */
.rejection-screen {
  text-align: center;
}

.rejection-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff4757;
  margin-bottom: 1.5rem;
  animation: shake 0.5s ease;
}

.attitude-cat {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid #ff4757;
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
}

/* ============================================
   PAGE 2: BMW TRANSITION
   ============================================ */
.transition-bg {
  background: linear-gradient(to right, #0f0c29, #302b63, #24243e);
  overflow: hidden;
  position: relative;
}

.road {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: #333;
  z-index: 1;
}

.road::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #ffd700 0px,
    #ffd700 40px,
    transparent 40px,
    transparent 80px
  );
  animation: roadMove 1s linear infinite;
}

.car-scene {
  position: absolute;
  bottom: 40px;
  right: -300px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  animation: driveAcrossRTL 5.5s ease-in-out forwards;
}

.happy-cat-driver {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  top: -50px;
  left: 60px;
  z-index: 3;
  border: 2px solid var(--accent-color);
  animation: catBounce 0.5s ease-in-out infinite alternate;
}

.car {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
  object-fit: contain;
}

.transition-text {
  position: absolute;
  top: 30%;
  width: 100%;
  text-align: center;
  z-index: 5;
  font-size: clamp(2.4rem, 6.8vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 2px;
  font-family: "Trebuchet MS", "Segoe UI", "Comic Sans MS", cursive;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulseText 1.5s ease-in-out infinite;
}

/* ============================================
   PAGE 3: MAIN CELEBRATION
   ============================================ */
.experience-wrapper {
  width: 100%;
}

.experience-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  padding-top: 6rem;
  z-index: 2;
}

.section-lights {
  overflow: hidden;
}

.ceiling-lights {
  position: absolute;
  top: 0;
  left: 2%;
  width: 96%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 6;
}

.ceiling-light {
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: bulbSwing 3.8s ease-in-out infinite;
}

.ceiling-light:nth-child(even) {
  animation-duration: 4.4s;
}

.ceiling-light .wire {
  width: 2px;
  height: 84px;
  background: linear-gradient(180deg, rgba(200, 200, 200, 0.85), rgba(130, 130, 130, 0.7));
}

.ceiling-light:nth-child(1) .wire { height: 76px; }
.ceiling-light:nth-child(2) .wire { height: 90px; }
.ceiling-light:nth-child(3) .wire { height: 82px; }
.ceiling-light:nth-child(4) .wire { height: 96px; }
.ceiling-light:nth-child(5) .wire { height: 78px; }
.ceiling-light:nth-child(6) .wire { height: 92px; }
.ceiling-light:nth-child(7) .wire { height: 86px; }
.ceiling-light:nth-child(8) .wire { height: 100px; }
.ceiling-light:nth-child(9) .wire { height: 80px; }
.ceiling-light:nth-child(10) .wire { height: 94px; }
.ceiling-light:nth-child(11) .wire { height: 84px; }
.ceiling-light:nth-child(12) .wire { height: 98px; }
.ceiling-light:nth-child(13) .wire { height: 79px; }
.ceiling-light:nth-child(14) .wire { height: 93px; }
.ceiling-light:nth-child(15) .wire { height: 87px; }
.ceiling-light:nth-child(16) .wire { height: 101px; }
.ceiling-light:nth-child(17) .wire { height: 83px; }
.ceiling-light:nth-child(18) .wire { height: 95px; }

.ceiling-light .bulb {
  position: relative;
  display: block;
  width: 28px;
  height: 42px;
  background: url("assets/images/hanging-bulb.png") center/contain no-repeat;
  opacity: 0.45;
  filter: grayscale(1) brightness(0.55);
  box-shadow: 0 0 0 rgba(255, 214, 102, 0);
  transition: filter 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, transform 0.35s ease;
}

.ceiling-light:nth-child(3n) .bulb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8f95a3 0%, #5f6674 60%, #464b56 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ceiling-light:nth-child(3n) .bulb::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 6px;
  border-radius: 2px 2px 1px 1px;
  background: #787f8f;
}

.section-lights.lights-on .ceiling-light .bulb {
  opacity: 1;
  filter: grayscale(0) brightness(1.1);
  box-shadow: 0 0 16px rgba(255, 214, 106, 0.45), 0 0 28px rgba(255, 190, 71, 0.38);
}

.section-lights.lights-on .ceiling-light:nth-child(3n) .bulb {
  background: radial-gradient(circle at 35% 30%, #fff8d6 0%, #ffe07c 46%, #ffca56 100%);
  box-shadow: 0 0 14px rgba(255, 216, 120, 0.65), 0 0 26px rgba(255, 183, 74, 0.45);
}

.section-lights.lights-on .ceiling-light .bulb.is-on {
  transform: scale(1.1);
}

.btn-light-switch {
  position: absolute;
  top: 7.6rem;
  right: 1.6rem;
  z-index: 7;
  background: linear-gradient(135deg, #ffd66a, #ffa940);
  color: #231516;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(255, 196, 84, 0.3);
}

.btn-light-switch::before {
  content: "";
  position: absolute;
  top: -54px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 54px;
  background: linear-gradient(180deg, rgba(235, 235, 235, 0.9), rgba(160, 160, 160, 0.7));
}

.section-content {
  text-align: center;
  max-width: 760px;
}

.section-note {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.8rem;
}

.btn-side {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  box-shadow: 0 0 26px rgba(196, 77, 255, 0.45);
}

.btn-side:hover {
  transform: translateY(-50%) scale(1.04);
}

.celebration-bg {
  background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
  transition: background 1.5s ease;
}

.celebration-bg::before,
.celebration-bg::after {
  content: '';
  position: fixed;
  top: -12vh;
  left: -10vw;
  width: 120vw;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.1s ease, transform 1.1s ease, filter 1.1s ease;
}

.celebration-bg::before {
  height: 44vh;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 223, 122, 0.95) 0%, rgba(255, 208, 92, 0.45) 14%, rgba(255, 199, 73, 0) 34%),
    radial-gradient(circle at 34% -4%, rgba(255, 232, 166, 0.85) 0%, rgba(255, 214, 98, 0.38) 16%, rgba(255, 200, 72, 0) 34%),
    radial-gradient(circle at 56% 0%, rgba(255, 224, 120, 0.9) 0%, rgba(255, 209, 92, 0.42) 15%, rgba(255, 199, 73, 0) 33%),
    radial-gradient(circle at 78% -3%, rgba(255, 235, 175, 0.88) 0%, rgba(255, 217, 105, 0.4) 16%, rgba(255, 203, 75, 0) 34%),
    radial-gradient(circle at 95% 0%, rgba(255, 221, 115, 0.82) 0%, rgba(255, 210, 92, 0.33) 16%, rgba(255, 199, 73, 0) 32%);
  filter: blur(18px);
  transform: translateY(-4%) scaleY(0.95);
}

.celebration-bg::after {
  height: 78vh;
  z-index: 1;
  background:
    linear-gradient(108deg, rgba(255, 217, 89, 0) 36%, rgba(255, 225, 133, 0.24) 50%, rgba(255, 217, 89, 0) 64%),
    linear-gradient(72deg, rgba(255, 217, 89, 0) 35%, rgba(255, 235, 168, 0.18) 50%, rgba(255, 217, 89, 0) 65%),
    radial-gradient(ellipse at top, rgba(255, 219, 109, 0.3) 0%, rgba(255, 204, 77, 0.1) 18%, rgba(255, 196, 72, 0) 48%);
  filter: blur(10px);
  mix-blend-mode: screen;
  transform: translateY(-2%) scaleY(0.92);
}

/* --- Lights Phase --- */
.lights-active {
  background:
    radial-gradient(circle at top, rgba(255, 217, 102, 0.12), transparent 28%),
    linear-gradient(135deg, #120621, #0d1b2a 62%, #16283b) !important;
}

.celebration-bg.lights-active::before {
  opacity: 1;
  animation: ceilingGlow 4.6s ease-in-out infinite alternate;
}

.celebration-bg.lights-active::after {
  opacity: 0.95;
  animation: djSweep 5.2s ease-in-out infinite;
}

.phase-text {
  font-size: 3.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 8px;
  text-align: center;
  animation: zoomIn 0.8s ease forwards;
}

.phase-lights {
  background: linear-gradient(90deg, #ffd700, #ff6b9d, #00d2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.phase-camera {
  background: linear-gradient(90deg, #c44dff, #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.phase-action {
  background: linear-gradient(90deg, #ffd700, #ff4757);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Camera Phase: Boss Message --- */
.camera-content {
  position: relative;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  isolation: isolate;
  overflow: visible;
}

.boss-message {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
  animation: fadeIn 1s ease forwards;
  position: relative;
  z-index: 3;
}

.camera-spotlight-overlay {
  position: absolute;
  left: 50%;
  top: -220px;
  width: min(86vw, 620px);
  height: min(88vh, 760px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.88;
  mix-blend-mode: screen;
  filter: blur(3px);
  background:
    radial-gradient(ellipse 52% 60% at 50% 5%,
      rgba(255, 247, 210, 0.68) 0%,
      rgba(255, 235, 175, 0.46) 20%,
      rgba(255, 208, 110, 0.18) 45%,
      rgba(255, 180, 88, 0) 72%),
    conic-gradient(from 178deg at 50% 0%,
      rgba(255, 244, 205, 0) 0deg 136deg,
      rgba(255, 243, 197, 0.44) 160deg 200deg,
      rgba(255, 244, 205, 0) 224deg 360deg);
  animation: spotlightDrift 16s ease-in-out infinite alternate, spotlightFlicker 6.4s ease-in-out infinite;
}

.boss-image-wrapper {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  transform: scale(1.03);
  animation: bossSpotlightPulse 4.8s ease-in-out 1.1s infinite;
}

.boss-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  box-shadow:
    0 0 42px rgba(255, 222, 143, 0.52),
    0 0 82px rgba(255, 236, 184, 0.28);
  opacity: 0;
  transform-origin: top center;
  animation: bossReveal 1.5s ease forwards, bossSwing 3s ease-in-out 2s infinite, bossSpotlightGlow 4.8s ease-in-out 1.1s infinite;
}

/* --- Balloons --- */
.balloons-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.balloon {
  position: absolute;
  bottom: -120px;
  width: 50px;
  height: 65px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  animation: floatUp 6.2s cubic-bezier(0.22, 0.8, 0.24, 1) forwards;
  opacity: 0.9;
  will-change: bottom, transform, opacity;
  box-shadow: inset -10px -16px 18px rgba(0, 0, 0, 0.14);
}

.balloon::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.5);
}

.birthday-banner {
  position: fixed;
  top: 5vh;
  left: 50%;
  width: min(720px, 82vw);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: center;
  pointer-events: none;
  z-index: 18;
  transform: translate(-50%, -180%);
  opacity: 0;
  animation: bannerDropIn 2s cubic-bezier(0.2, 0.9, 0.24, 1.15) forwards;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.birthday-banner-image-mode {
  width: min(760px, 84vw);
}

.birthday-banner.birthday-banner-compact {
  top: 2vh;
  width: min(460px, 62vw);
  gap: 0.5rem;
}

.birthday-banner-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: top center;
  animation: bannerSway 3.6s ease-in-out 2.1s infinite alternate;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
}

.banner-row {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.banner-row::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, rgba(194, 214, 72, 0.25), #bfd43d 16%, #d9dd6f 50%, #bfd43d 84%, rgba(194, 214, 72, 0.25));
  border-radius: 999px;
}

.banner-row-top::before {
  transform: translateY(0) rotate(-2.2deg);
}

.banner-row-bottom::before {
  top: 0.35rem;
  left: 14%;
  right: 14%;
  transform: translateY(0.35rem) rotate(2.4deg);
}

.banner-flags {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
}

.banner-row-top .banner-flags {
  transform: translateY(0.55rem);
}

.banner-row-bottom .banner-flags {
  transform: translateY(0.95rem);
}

.banner-flag {
  width: clamp(34px, 4vw, 48px);
  height: clamp(54px, 6vw, 68px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.45rem;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  font-family: "Trebuchet MS", "Comic Sans MS", cursive;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  letter-spacing: 0.04em;
  color: rgba(41, 47, 56, 0.92);
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.banner-row-top .banner-flag:nth-child(2n) {
  transform: translateY(0.5rem);
}

.banner-row-bottom .banner-flag:nth-child(2n + 1) {
  transform: translateY(0.65rem);
}

.banner-flag.teal {
  background: linear-gradient(180deg, #1bb4b3, #0a97aa);
}

.banner-flag.lime {
  background: linear-gradient(180deg, #c9da2a, #b4ca1b);
}

.banner-flag.cream {
  background: linear-gradient(180deg, #f6f4ea, #dfe9e9);
}

.banner-knot {
  position: absolute;
  top: -0.15rem;
  width: 30px;
  height: 30px;
}

.banner-knot::before,
.banner-knot::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 10px;
  border: 3px solid #bfd43d;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.banner-knot::before {
  left: 0;
  transform: rotate(-36deg);
}

.banner-knot::after {
  right: 0;
  transform: rotate(36deg);
}

.banner-knot-left {
  left: 1%;
}

.banner-knot-right {
  right: 1%;
}

.banner-row-bottom .banner-knot-left {
  left: 10%;
}

.banner-row-bottom .banner-knot-right {
  right: 10%;
}

/* ============================================
   CINEMATIC OVERLAY
   ============================================ */
.cinematic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.cinematic-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.typewriter-text {
  font-size: 1.6rem;
  color: #ccc;
  font-family: 'Courier New', monospace;
  text-align: center;
  padding: 0 2rem;
  min-height: 2.5rem;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--primary-color);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
}

.cinematic-subtext {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-top: 1.5rem;
  opacity: 0;
  transition: opacity 0.8s ease;
  text-align: center;
  padding: 0 2rem;
}

/* ============================================
   CAKE SECTION
   ============================================ */
.cake-section {
  text-align: center;
  padding: 3rem 2rem;
}

.cut-celebration {
  animation: cakeCelebrate 0.9s ease;
}

#btn-to-wishes {
  margin-top: 1.3rem;
}

.cake-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cake-image {
  width: 280px;
  height: 280px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 2rem;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  filter: drop-shadow(0 8px 25px rgba(255, 215, 0, 0.3));
}

.cake-image:hover {
  transform: scale(1.05);
}

.cake-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-candle {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
  font-weight: 700;
}

.btn-candle:hover {
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  transform: translateY(-3px);
}

.btn-cut {
  background: linear-gradient(135deg, #ff4757, #ff6b9d);
  color: #fff;
  font-weight: 700;
}

.btn-cut:hover {
  box-shadow: 0 0 30px rgba(255, 71, 87, 0.5);
  transform: translateY(-3px);
}

/* ============================================
  PAGE 4: WISHES PAGE
  ============================================ */
.wishes-bg {
  background: linear-gradient(135deg, #1b103f, #2b0b52, #130f40);
}

.wishes-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 780px;
  width: 100%;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 48px rgba(0, 0, 0, 0.42);
}

.wishes-title {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffd700, #ff8c00, #ff6b9d, #c44dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulseText 1.9s ease-in-out infinite;
}

.wishes-subtitle {
  font-size: 1.2rem;
  color: #f4ecff;
  margin-bottom: 1.5rem;
}

.wishes-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.wishes-list li {
  font-size: 1.05rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

/* ============================================
  PAGE 5: QUESTIONS
   ============================================ */
.questions-bg {
  background: linear-gradient(135deg, #1a0533, #0d1b2a);
}

.question-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 550px;
  width: 100%;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.6s ease forwards;
}

.question-number {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.question-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.btn-option {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 14px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-option:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: transparent;
  transform: scale(1.02);
  box-shadow: var(--button-glow);
}

.disclaimer-text {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

/* --- Repelling Button (Not Yet) --- */
.btn-repel {
  position: relative;
  transition: left 0.15s ease, top 0.15s ease;
  cursor: not-allowed;
  user-select: none;
}

/* ============================================
  PAGE 6: BONUS GIFT PAGE
  ============================================ */
.gift-bg {
  background: linear-gradient(135deg, #100a2c, #2b1147, #1f3555);
}

.gift-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 560px;
  width: 100%;
  backdrop-filter: blur(10px);
}

.gift-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.8rem;
}

.gift-title {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #ffd700, #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gift-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

/* ============================================
  PAGE 7: FINAL PAGE
   ============================================ */
.final-bg {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}

.final-content {
  text-align: center;
}

.final-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulseText 2s ease-in-out infinite;
}

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

/* --- Surprise Popup Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(8px);
}

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

.modal-card {
  background: linear-gradient(135deg, #1a1a3e, #2d1b69);
  border: 2px solid var(--accent-color);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.3);
  transform: scale(0.5);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-trophy {
  font-size: 5rem;
  display: block;
  margin-bottom: 1rem;
  animation: float 2s ease-in-out infinite;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.modal-message {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn-award {
  background: linear-gradient(135deg, var(--accent-color), #ff8c00);
  color: #1a1a2e;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.btn-award:hover {
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
  transform: translateY(-3px) scale(1.05);
}

/* ============================================
   CONFETTI CANVAS
   ============================================ */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ============================================
   PARTICLES BACKGROUND
   ============================================ */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.2;
  animation: particleDrift 8s linear infinite;
}

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

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

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bulbSwing {
  0% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
  100% { transform: rotate(-2.5deg); }
}

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bossReveal {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes bossSwing {
  0% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
  100% {
    transform: rotate(-3deg);
  }
}

@keyframes spotlightDrift {
  0% {
    transform: translateX(-50%) rotate(-1.8deg) scale(0.98, 1);
  }
  50% {
    transform: translateX(-50%) rotate(0.9deg) scale(1.01, 1.02);
  }
  100% {
    transform: translateX(-50%) rotate(-0.7deg) scale(1, 0.99);
  }
}

@keyframes spotlightFlicker {
  0%, 100% {
    opacity: 0.84;
    filter: blur(3px) brightness(0.94);
  }
  35% {
    opacity: 0.92;
    filter: blur(2px) brightness(1.03);
  }
  70% {
    opacity: 0.87;
    filter: blur(3.4px) brightness(0.98);
  }
}

@keyframes bossSpotlightGlow {
  0%, 100% {
    box-shadow:
      0 0 40px rgba(255, 222, 143, 0.5),
      0 0 78px rgba(255, 236, 184, 0.24);
  }
  50% {
    box-shadow:
      0 0 52px rgba(255, 229, 160, 0.64),
      0 0 96px rgba(255, 243, 200, 0.34);
  }
}

@keyframes bossSpotlightPulse {
  0%, 100% {
    transform: scale(1.03);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ceilingGlow {
  0% {
    filter: blur(18px) brightness(0.92);
    transform: translateY(-4%) scale(0.98, 0.94);
  }
  50% {
    filter: blur(21px) brightness(1.06);
    transform: translateY(0) scale(1.02, 1);
  }
  100% {
    filter: blur(19px) brightness(0.98);
    transform: translateY(-2%) scale(1, 0.98);
  }
}

@keyframes djSweep {
  0% {
    transform: translate3d(-3%, -2%, 0) rotate(-7deg) scaleY(0.9);
    filter: blur(12px) brightness(0.92);
  }
  50% {
    transform: translate3d(3%, 2%, 0) rotate(7deg) scaleY(1.02);
    filter: blur(8px) brightness(1.08);
  }
  100% {
    transform: translate3d(-2%, 0, 0) rotate(-5deg) scaleY(0.95);
    filter: blur(10px) brightness(0.96);
  }
}

@keyframes pulseText {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

@keyframes cakeCelebrate {
  0% { transform: scale(1); }
  35% { transform: scale(1.05) rotate(-1deg); }
  70% { transform: scale(1.03) rotate(1deg); }
  100% { transform: scale(1); }
}

@keyframes driveAcrossRTL {
  0% { right: -300px; }
  100% { right: 110%; }
}

@keyframes roadMove {
  from { background-position-x: 0; }
  to { background-position-x: -80px; }
}

@keyframes catBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

@keyframes floatUp {
  0% {
    bottom: -120px;
    opacity: 0;
    transform: translateX(0) scale(0.94);
  }
  12% {
    opacity: 0.94;
  }
  58% {
    transform: translateX(var(--balloon-drift-mid, 0px)) scale(1);
  }
  82% {
    bottom: calc(100vh - 110px);
    opacity: 0.95;
    transform: translateX(var(--balloon-drift-end, 0px)) scale(1);
  }
  100% {
    bottom: calc(100vh - 110px);
    opacity: 0.95;
    transform: translateX(var(--balloon-drift-end, 0px)) scale(1);
  }
}

@keyframes bannerDropIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -180%);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, 1.2vh);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes bannerSway {
  0% {
    transform: rotate(-2.4deg) translateY(0);
  }
  50% {
    transform: rotate(0.8deg) translateY(0.25rem);
  }
  100% {
    transform: rotate(2.4deg) translateY(0);
  }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes particleDrift {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% {
    transform: translateY(-10vh) rotate(720deg);
    opacity: 0;
  }
}

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

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

@media (max-width: 600px) {
  .landing-card,
  .question-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

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

  .phase-text {
    font-size: 2.5rem;
    letter-spacing: 4px;
  }

  .detective-cat {
    width: 140px;
    height: 140px;
  }

  .boss-image {
    width: 170px;
    height: 170px;
  }

  .camera-spotlight-overlay {
    top: -170px;
    width: min(96vw, 520px);
    height: min(78vh, 600px);
    opacity: 0.78;
  }

  .cake-image {
    width: 220px;
    height: 220px;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .btn-side {
    position: static;
    transform: none;
    margin-top: 1.2rem;
  }

  .btn-side:hover {
    transform: scale(1.02);
  }

  .typewriter-text {
    font-size: 1.2rem;
  }

  .final-title {
    font-size: 1.8rem;
  }

  .modal-card {
    padding: 2rem;
  }

  .modal-trophy {
    font-size: 3.5rem;
  }
}
