:root {
  --bg: #0d0d12;
  --bg-deep: #080810;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #f3f1ee;
  --muted: #c9c3bb;
  --gold: #ffd700;
  --rose: #b76e79;
  --sparkle: rgba(255, 215, 0, 0.6);
  --berry: #ff6b81;
  --shadow: rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --transition: 0.35s ease;
  --heart-red: #e74c3c;
  --heart-pink: #ff6b9d;
  --handwriting: 'Dancing Script', cursive;
  --handwriting-alt: 'Caveat', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   GLOBAL SCROLLBAR STYLING (Mac & Windows)
   ============================================ */

/* Hide scrollbars but keep functionality */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 157, 0.3) transparent;
}

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 157, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 157, 0.5);
}

/* Hide scrollbar for specific elements but allow scroll */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  font-family: "Lato", sans-serif;
  background: radial-gradient(circle at 20% 20%, #2b1f25 0%, transparent 45%),
    radial-gradient(circle at 80% 10%, #2a2620 0%, transparent 40%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 32px 16px 40px;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(183, 110, 121, 0.15), transparent 55%),
    radial-gradient(circle at 20% 70%, rgba(255, 215, 0, 0.08), transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: glowDrift 18s ease-in-out infinite;
}

.cursor-glow {
  position: fixed;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45), transparent 60%);
  box-shadow: 0 0 18px rgba(255, 107, 129, 0.35);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0.8;
}

.app {
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.finale {
  position: fixed;
  inset: 0;
  padding: 28px 18px 40px;
  display: none;
  overflow-y: auto;
  background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.1), transparent 55%),
    radial-gradient(circle at 70% 20%, rgba(255, 107, 129, 0.12), transparent 60%),
    rgba(10, 10, 12, 0.96);
  z-index: 4;
}

.finale.active {
  display: block;
}

.finale.auto .finale-actions .secondary {
  opacity: 0.65;
}

.finale-inner {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.finale-step {
  display: none;
  gap: 18px;
}

.finale-step.active {
  display: grid;
  gap: 18px;
  animation: fadeInUp 0.6s ease both;
}

.finale-hero {
  text-align: center;
  padding: 28px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.finale-hero h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 10px;
}

.finale-hero p {
  color: var(--muted);
}

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

.finale-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}

.carousel-caption {
  min-height: 24px;
  color: var(--muted);
  text-align: center;
  font-family: var(--handwriting-alt);
  font-size: 1.1rem;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
}

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

.carousel-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}

.carousel-controls button {
  pointer-events: all;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.7);
  color: var(--text);
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.carousel-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.carousel-dots span.active {
  background: var(--gold);
}

.finale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cake-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 30px 20px 80px;
  min-height: 280px;
}

.cake.hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

.cake.pop {
  animation: popIn 0.6s ease forwards;
}

.cake-message {
  min-height: 24px;
  color: var(--muted);
}

.cake-slice {
  position: absolute;
  width: 50px;
  height: 36px;
  background: linear-gradient(150deg, #ffd7b3, #ff8fa3);
  border-radius: 0 0 12px 12px;
  right: 18px;
  bottom: 24px;
  opacity: 0;
  transform: translateX(0) rotate(0deg);
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.cake-slice.cut {
  opacity: 1;
  transform: translateX(36px) rotate(12deg);
}

.balloon-stage {
  display: grid;
  gap: 12px;
  text-align: center;
}

.balloon-timer {
  font-size: 1.6rem;
  letter-spacing: 0.15em;
  color: var(--gold);
}

/* ============================================
   REALISTIC 3D BALLOONS
   ============================================ */

.balloon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 24px;
  padding: 20px;
}

.balloon {
  width: 90px;
  height: 110px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  position: relative;
  cursor: pointer;
  animation: balloonFloat 3s ease-in-out infinite;
  transition: transform 0.3s ease;
  border: none;
  margin: 0 auto;

  /* Base balloon with realistic 3D shading */
  background:
    /* Main highlight - top left */
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
    /* Secondary highlight */
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    /* Rim light on right side */
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    /* Main gradient body */
    linear-gradient(160deg, #ff6b9d 0%, #e84393 50%, #c0392b 100%);

  box-shadow:
    /* Inner glow */
    inset 0 -20px 40px rgba(0, 0, 0, 0.15),
    inset 0 10px 30px rgba(255, 255, 255, 0.2),
    /* Outer shadow */
    0 15px 35px rgba(0, 0, 0, 0.3),
    /* Soft ambient shadow */
    0 5px 15px rgba(0, 0, 0, 0.2);
}

.balloon:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow:
    inset 0 -20px 40px rgba(0, 0, 0, 0.15),
    inset 0 10px 30px rgba(255, 255, 255, 0.2),
    0 20px 45px rgba(0, 0, 0, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Pink/Rose balloon */
.balloon:nth-child(1) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #ff8fab 0%, #ff6b9d 40%, #e84393 70%, #be2f6a 100%);
  animation-delay: 0s;
}

/* Gold/Yellow balloon */
.balloon:nth-child(2) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.95) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
    linear-gradient(160deg, #ffe066 0%, #ffd700 40%, #f4c430 70%, #daa520 100%);
  animation-delay: 0.5s;
}

/* Red balloon */
.balloon:nth-child(3) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.85) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #ff7878 0%, #e74c3c 40%, #c0392b 70%, #962d22 100%);
  animation-delay: 1s;
}

/* Purple/Mauve balloon */
.balloon:nth-child(4) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #d4a5c9 0%, #b76e9b 40%, #9b59b6 70%, #7d3c98 100%);
  animation-delay: 1.5s;
}

/* Realistic balloon string */
.balloon::after {
  content: "";
  position: absolute;
  bottom: -50px;
  left: 50%;
  width: 2px;
  height: 50px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
    rgba(200, 200, 200, 0.9) 0%,
    rgba(180, 180, 180, 0.7) 50%,
    rgba(150, 150, 150, 0.5) 100%);
  border-radius: 1px;
  /* Curvy string effect */
  animation: stringWobble 2s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes stringWobble {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  25% { transform: translateX(-50%) rotate(2deg); }
  75% { transform: translateX(-50%) rotate(-2deg); }
}

/* Balloon knot - more realistic teardrop shape */
.balloon-knot {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 14px solid;
  border-top-color: inherit;
  background: transparent;
  border-radius: 0;
}

/* Teal/Aqua balloon */
.balloon:nth-child(5) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #81ecec 0%, #00cec9 40%, #00b894 70%, #00a885 100%);
  animation-delay: 2s;
}

/* Coral/Orange balloon */
.balloon:nth-child(6) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #fab1a0 0%, #e17055 40%, #d63031 70%, #c23616 100%);
  animation-delay: 2.5s;
}

/* Sky Blue balloon */
.balloon:nth-child(7) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.95) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
    linear-gradient(160deg, #74b9ff 0%, #0984e3 40%, #0652DD 70%, #1B1464 100%);
  animation-delay: 3s;
}

/* Mint Green balloon */
.balloon:nth-child(8) {
  background:
    radial-gradient(ellipse 40% 40% at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 35% 20%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse 20% 60% at 85% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #a3e4d7 0%, #52be80 40%, #27ae60 70%, #1e8449 100%);
  animation-delay: 3.5s;
}

.balloon:nth-child(1) .balloon-knot { border-top-color: #e84393; }
.balloon:nth-child(2) .balloon-knot { border-top-color: #daa520; }
.balloon:nth-child(3) .balloon-knot { border-top-color: #c0392b; }
.balloon:nth-child(4) .balloon-knot { border-top-color: #9b59b6; }
.balloon:nth-child(5) .balloon-knot { border-top-color: #00b894; }
.balloon:nth-child(6) .balloon-knot { border-top-color: #d63031; }
.balloon:nth-child(7) .balloon-knot { border-top-color: #0984e3; }
.balloon:nth-child(8) .balloon-knot { border-top-color: #27ae60; }

/* Realistic floating animation */
@keyframes balloonFloat {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  25% {
    transform: translateY(-8px) rotate(1deg);
  }
  50% {
    transform: translateY(-3px) rotate(-0.5deg);
  }
  75% {
    transform: translateY(-10px) rotate(0.5deg);
  }
}

/* Pop animation - more dramatic */
.balloon.popped {
  animation: balloonPop 0.4s ease-out forwards;
}

@keyframes balloonPop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  20% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.balloon.popped::after,
.balloon.popped .balloon-knot {
  opacity: 0;
}

.balloon-message {
  min-height: 50px;
  color: var(--text);
  font-family: var(--handwriting);
  font-size: 1.2rem;
  padding: 12px 16px;
  background: rgba(255, 107, 157, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.final-reveal {
  font-family: var(--handwriting);
  font-size: 1.5rem;
  color: var(--heart-pink);
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(231, 76, 60, 0.1));
  border: 1px solid rgba(255, 107, 157, 0.3);
  border-radius: 16px;
  animation: revealUp 0.8s ease forwards;
}

.wish-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
}

.wish-stack p {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.finale-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.12), transparent 55%),
    rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  z-index: 3;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

.intro-card {
  width: min(520px, 90%);
  padding: 36px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.9s ease both;
}

.intro-card h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.intro-greeting {
  min-height: 64px;
  color: var(--muted);
  margin-bottom: 20px;
}

.intro-passcode {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.intro-passcode input {
  width: min(260px, 100%);
  text-align: center;
}

.intro-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 0.9s ease both;
}

.overline {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--gold);
}

h1 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

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

.floating-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-emoji {
  position: absolute;
  font-size: 22px;
  opacity: 0;
  animation: floatUp 7s linear forwards;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4));
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 60%);
  box-shadow: 0 0 12px var(--sparkle);
  animation: twinkle 3.8s ease-in-out infinite;
}

.sparkle.s1 {
  top: 12%;
  left: 15%;
  animation-delay: 0s;
}

.sparkle.s2 {
  top: 24%;
  right: 12%;
  animation-delay: 1s;
}

.sparkle.s3 {
  bottom: 18%;
  left: 8%;
  animation-delay: 1.6s;
}

.sparkle.s4 {
  bottom: 20%;
  right: 16%;
  animation-delay: 2.2s;
}

.sparkle.s5 {
  top: 50%;
  left: 50%;
  animation-delay: 2.8s;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
  min-height: 580px;
  position: relative;
  overflow: visible;
  z-index: 1;
}

/* Minimal Level Indicator */
.level-indicator {
  display: flex;
  justify-content: center;
  padding: 12px 20px;
  margin-top: 16px;
}

.level-indicator span {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card.effect-blur::after {
  content: \"\";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 60%);
  opacity: 0.6;
  filter: blur(24px);
  pointer-events: none;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 530px;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.card.revealed .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.card-face.front {
  justify-content: center;
  background: rgba(13, 13, 18, 0.95);
  border-radius: var(--radius);
}

.card-face.back {
  transform: rotateY(180deg);
  padding-top: 20px;
  padding-bottom: 20px;
  background: rgba(13, 13, 18, 0.95);
  border-radius: var(--radius);
}

/* Custom scrollbar for back face */
.card-face.back::-webkit-scrollbar {
  width: 6px;
}

.card-face.back::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.card-face.back::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold), var(--rose));
  border-radius: 3px;
}

.card-face.back::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--rose), var(--berry));
}

.prompt {
  font-size: 1.2rem;
  font-weight: 500;
}

.hint {
  color: var(--rose);
  cursor: pointer;
  font-size: 0.95rem;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(360px, 100%);
}

input[type="text"] {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 1rem;
  transition: border var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

button {
  font-family: "Lato", sans-serif;
}

.primary {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--gold), var(--berry), var(--rose));
  color: #1a1416;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(183, 110, 121, 0.35);
}

.secondary {
  padding: 10px 20px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.memory {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.memory img {
  width: 100%;
  max-width: 420px;
  height: auto;
  max-height: 280px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 107, 157, 0.12);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.memory video,
.memory .memory-video {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 260px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
}

/* Special styling for memory video in card */
.memory-video {
  background: rgba(0, 0, 0, 0.3);
  animation: videoGlow 3s ease-in-out infinite alternate;
}

@keyframes videoGlow {
  0% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35),
      0 0 15px rgba(255, 107, 157, 0.1);
  }
  100% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35),
      0 0 25px rgba(255, 107, 157, 0.2);
  }
}

.memory h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  margin-top: 4px;
}

.memory p {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 90%;
  line-height: 1.5;
}

.memory .hint {
  font-size: 0.85rem;
  margin-top: 4px;
}

.wish-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.wish-row span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cake-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ============================================
   REALISTIC 3-TIER BIRTHDAY CAKE
   ============================================ */

.cake {
  width: 200px;
  height: 200px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.4));
}

/* Cake plate */
.cake::before {
  content: '';
  position: absolute;
  bottom: -8px;
  width: 180px;
  height: 16px;
  background: linear-gradient(180deg, #f5f5f5, #e0e0e0);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Bottom tier */
.cake-body {
  width: 160px;
  height: 55px;
  border-radius: 12px 12px 16px 16px;
  background: linear-gradient(180deg,
    #fff5f5 0%,
    #ffe4e8 20%,
    #ffb6c1 50%,
    #ff9aa8 80%,
    #e8808c 100%);
  position: absolute;
  bottom: 8px;
  box-shadow:
    inset 0 -8px 20px rgba(0, 0, 0, 0.15),
    inset 0 4px 10px rgba(255, 255, 255, 0.5),
    0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Bottom tier frosting line */
.cake-body::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 165px;
  height: 12px;
  background: linear-gradient(180deg, #fff, #ffe4ec);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Middle tier */
.cake-top {
  width: 120px;
  height: 45px;
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg,
    #fff8f0 0%,
    #ffe4d4 20%,
    #ffcba4 50%,
    #f4a574 80%,
    #e09060 100%);
  position: absolute;
  bottom: 58px;
  box-shadow:
    inset 0 -6px 15px rgba(0, 0, 0, 0.12),
    inset 0 3px 8px rgba(255, 255, 255, 0.6),
    0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Middle tier frosting */
.cake-top::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 125px;
  height: 10px;
  background: linear-gradient(180deg, #fff, #fff5e6);
  border-radius: 6px 6px 0 0;
}

/* Frosting drips container */
.cake-drip {
  position: absolute;
  bottom: 58px;
  width: 120px;
  height: 30px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* Individual drips */
.cake-drip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  width: 12px;
  height: 22px;
  background: linear-gradient(180deg, #fff, #ffe4ec);
  border-radius: 0 0 50% 50%;
  box-shadow:
    25px 5px 0 0 #fff,
    25px 5px 0 0 #ffe4ec,
    50px -3px 0 2px #fff,
    75px 8px 0 -1px #fff,
    95px 2px 0 1px #ffe4ec;
}

/* Multiple candles */
.candle {
  position: absolute;
  bottom: 98px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.candle::before {
  content: '';
  width: 8px;
  height: 35px;
  background: linear-gradient(90deg,
    #ff6b8a 0%,
    #ff8fa3 30%,
    #ffb6c1 50%,
    #ff8fa3 70%,
    #ff6b8a 100%);
  border-radius: 3px 3px 4px 4px;
  box-shadow:
    -20px 5px 0 0 #87ceeb,
    20px -3px 0 0 #98fb98,
    inset 0 -5px 10px rgba(0,0,0,0.1);
  position: relative;
}

/* Candle wicks */
.candle::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: linear-gradient(180deg, #333, #666);
  border-radius: 1px;
  box-shadow: -20px 5px 0 0 #444, 20px -3px 0 0 #444;
}

/* Flame */
.flame {
  position: absolute;
  top: -28px;
  left: 50%;
  width: 10px;
  height: 18px;
  background: radial-gradient(ellipse at 50% 90%,
    #fff 0%,
    #fffacd 15%,
    #ffd700 35%,
    #ffa500 55%,
    #ff6347 75%,
    transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: translateX(-50%);
  animation: realisticFlame 0.4s ease-in-out infinite alternate;
  filter: blur(0.5px);
  box-shadow:
    0 0 15px 5px rgba(255, 200, 0, 0.5),
    0 0 30px 10px rgba(255, 150, 0, 0.3),
    -20px 5px 15px 5px rgba(255, 200, 0, 0.4),
    20px -3px 15px 5px rgba(255, 200, 0, 0.4);
}

/* Inner flame glow */
.flame::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 10px;
  background: radial-gradient(ellipse, #fff 0%, #fffacd 50%, transparent 100%);
  border-radius: 50%;
}

@keyframes realisticFlame {
  0% {
    transform: translateX(-50%) scaleY(1) scaleX(1) rotate(-2deg);
  }
  100% {
    transform: translateX(-50%) scaleY(1.15) scaleX(0.9) rotate(2deg);
  }
}

.flame.out {
  opacity: 0;
  transform: translateX(-50%) scale(0.3) translateY(-10px);
  transition: all 0.5s ease-out;
  box-shadow: none;
}

/* Smoke effect after blowing out candle */
.flame.out::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 40px;
  background: linear-gradient(180deg,
    rgba(200, 200, 200, 0.6) 0%,
    rgba(180, 180, 180, 0.3) 50%,
    transparent 100%);
  border-radius: 50%;
  animation: smokeRise 2s ease-out forwards;
  opacity: 1;
}

@keyframes smokeRise {
  0% {
    transform: translateX(-50%) translateY(0) scaleX(1);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-50%) translateY(-30px) scaleX(1.5);
    opacity: 0.3;
  }
  100% {
    transform: translateX(-50%) translateY(-60px) scaleX(2);
    opacity: 0;
  }
}

/* Cake decorations - sprinkles effect */
.cake-body::after {
  content: '• • • • • • •';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow:
    0 12px 0 rgba(255, 215, 0, 0.8),
    0 24px 0 rgba(135, 206, 235, 0.8);
}

/* Slice cut effect */
.cake-slice {
  position: absolute;
  width: 45px;
  height: 55px;
  right: 10px;
  bottom: 8px;
  opacity: 0;
  transform: translateX(0) rotate(0deg);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.cake-slice::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    #fff5f5 0%,
    #ffe4e8 30%,
    #d4a5a5 100%);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  border-radius: 0 8px 8px 0;
}

/* Slice inner layers visible */
.cake-slice::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 15px;
  width: 35px;
  height: 25px;
  background: repeating-linear-gradient(180deg,
    #fff5e6 0px,
    #fff5e6 4px,
    #ffb6c1 4px,
    #ffb6c1 8px,
    #fff5e6 8px,
    #fff5e6 12px,
    #e8a090 12px,
    #e8a090 16px
  );
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.cake-slice.cut {
  opacity: 1;
  transform: translateX(50px) rotate(15deg);
}

.cake.glow {
  filter: drop-shadow(0 0 30px rgba(255, 200, 100, 0.6));
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
}

.photo-strip img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.progress-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.growth {
  width: 72px;
  height: 72px;
  transition: transform 0.5s ease;
  transform: scale(calc(0.55 + (var(--progress) * 0.7)));
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

.growth svg {
  width: 100%;
  height: 100%;
}

.seed {
  fill: #8b5d5d;
}

.bloom {
  fill: rgba(255, 215, 0, 0.7);
}

.petal {
  fill: rgba(183, 110, 121, 0.75);
}

.stem {
  fill: rgba(200, 180, 140, 0.8);
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 20, 0.8);
  color: var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(14px);
}

.celebration-banner {
  position: relative;
  height: 90px;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(255, 215, 0, 0.15), rgba(255, 107, 129, 0.08));
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.celebration-banner .ribbon {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 8px,
    transparent 8px,
    transparent 16px
  );
  opacity: 0.5;
}

.celebration-banner .balloons {
  position: absolute;
  right: 16px;
  top: 10px;
  display: flex;
  gap: 12px;
}

.celebration-banner .balloons span {
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle at 30% 30%, #fff, transparent 60%),
    linear-gradient(160deg, rgba(255, 215, 0, 0.8), rgba(183, 110, 121, 0.6));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  animation: float 4s ease-in-out infinite;
}

.celebration-banner .balloons span:nth-child(2) {
  background: radial-gradient(circle at 30% 30%, #fff, transparent 60%),
    linear-gradient(160deg, rgba(255, 107, 129, 0.8), rgba(255, 215, 0, 0.4));
  animation-delay: 1s;
}

.celebration-banner .balloons span:nth-child(3) {
  background: radial-gradient(circle at 30% 30%, #fff, transparent 60%),
    linear-gradient(160deg, rgba(183, 110, 121, 0.8), rgba(255, 107, 129, 0.4));
  animation-delay: 2s;
}

.fab svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.fab.active {
  color: var(--rose);
}

.fab:hover {
  transform: translateY(-3px);
}

#resetProgress {
  position: fixed;
  bottom: 10px;
  left: 10px;
  opacity: 0;
  background: transparent;
  color: transparent;
  border: none;
  font-size: 12px;
  padding: 10px;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease both;
}

.shake {
  animation: shake 0.4s ease;
}

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

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

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

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

@keyframes floatUp {
  0% {
    transform: translateY(40px) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(-480px) scale(1.1);
    opacity: 0;
  }
}

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

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

@keyframes popOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

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

/* ============================================
   TABLET BREAKPOINT (1024px and below)
   ============================================ */
@media (max-width: 1024px) {
  body {
    padding: 24px 16px 32px;
  }

  .app {
    width: min(720px, 100%);
  }

  .intro-card {
    width: min(480px, 92%);
    padding: 32px 24px;
  }

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

  .finale-hero h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  .balloon-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .balloon {
    width: 80px;
    height: 100px;
  }

  .love-reasons {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MOBILE BREAKPOINT (720px and below)
   ============================================ */
@media (max-width: 720px) {
  body {
    padding: 16px 12px 24px;
  }

  .app {
    gap: 20px;
  }

  h1 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .intro-card {
    width: 95%;
    padding: 28px 20px;
  }

  .intro-card h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .intro-greeting {
    font-size: 0.95rem;
    min-height: 100px;
  }

  .love-counter {
    padding: 12px 16px;
  }

  .counter-value {
    font-size: 1.2rem;
  }

  .card {
    padding: 16px 12px;
    min-height: 520px;
  }

  .card-inner {
    min-height: 480px;
  }

  .card-face {
    padding: 12px 8px;
    gap: 12px;
  }

  .card-face.back {
    padding-top: 16px;
  }

  .prompt {
    font-size: 1.05rem;
  }

  .memory {
    gap: 10px;
  }

  .memory img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
  }

  .memory video,
  .memory .memory-video {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 12px;
  }

  .memory h3 {
    font-size: 1.2rem;
  }

  .memory p {
    font-size: 0.9rem;
  }

  .finale {
    padding: 20px 12px 32px;
  }

  .finale-hero {
    padding: 20px 16px;
  }

  .finale-hero h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .finale-card {
    padding: 16px;
  }

  .balloon-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 12px;
  }

  .balloon {
    width: 65px;
    height: 82px;
  }

  .balloon::after {
    height: 35px;
    bottom: -35px;
  }

  .balloon-message {
    font-size: 1.05rem;
    padding: 10px 12px;
  }

  .love-reason {
    padding: 12px;
  }

  .love-reason-number {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .love-reason-text {
    font-size: 1rem;
  }

  .cake {
    transform: scale(0.85);
  }

  #letterBody {
    font-size: 1.1rem;
  }

  .wish-stack p {
    padding: 10px 14px;
    font-size: 1rem;
  }

  .fab {
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
  }

  .fab svg {
    width: 22px;
    height: 22px;
  }

  .cursor-glow {
    display: none;
  }

  .level-indicator span {
    font-size: 0.8rem;
    padding: 6px 16px;
  }
}

/* ============================================
   SMALL MOBILE BREAKPOINT (480px and below)
   ============================================ */
@media (max-width: 480px) {
  body {
    padding: 12px 8px 20px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .overline {
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .intro-card {
    padding: 24px 16px;
    border-radius: 20px;
  }

  .intro-card h2 {
    font-size: 1.4rem;
  }

  .intro-greeting {
    font-size: 0.9rem;
  }

  .intro-passcode input {
    width: 100%;
  }

  .card {
    padding: 12px 10px;
    min-height: 480px;
    border-radius: 14px;
  }

  .card-inner {
    min-height: 450px;
  }

  .card-face {
    padding: 10px 6px;
    gap: 10px;
  }

  .prompt {
    font-size: 1rem;
  }

  .input-row {
    width: 100%;
  }

  input[type="text"] {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .primary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .secondary {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .memory img {
    max-height: 160px;
    border-radius: 10px;
  }

  .memory video,
  .memory .memory-video {
    max-height: 150px;
    border-radius: 10px;
  }

  .memory h3 {
    font-size: 1.1rem;
  }

  .memory p {
    font-size: 0.85rem;
  }

  .finale-hero {
    padding: 16px 12px;
    border-radius: 16px;
  }

  .finale-hero h2 {
    font-size: 1.4rem;
  }

  .finale-hero p {
    font-size: 0.9rem;
  }

  .finale-card {
    padding: 14px;
    border-radius: 16px;
  }

  .balloon-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 8px;
  }

  .balloon {
    width: 55px;
    height: 70px;
  }

  .balloon::after {
    height: 28px;
    bottom: -28px;
  }

  .balloon-knot {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid;
  }

  .balloon-message {
    font-size: 0.95rem;
    min-height: 40px;
  }

  .final-reveal {
    font-size: 1.2rem;
    padding: 14px;
  }

  .love-reason {
    padding: 10px;
    gap: 10px;
  }

  .love-reason-text {
    font-size: 0.95rem;
  }

  .cake {
    transform: scale(0.75);
  }

  .cake-message {
    font-size: 0.9rem;
  }

  .carousel-controls button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .carousel-caption {
    font-size: 1rem;
    padding: 10px 12px;
  }

  .carousel-counter {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  #letterBody {
    font-size: 1rem;
    line-height: 1.6;
  }

  .wish-stack p {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .fab {
    right: 10px;
    bottom: 10px;
    width: 44px;
    height: 44px;
  }

  .level-indicator {
    padding: 8px 12px;
  }

  .level-indicator span {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
}

@media (hover: none) {
  .cursor-glow {
    display: none;
  }
}

/* ============================================
   STARFIELD & NIGHT SKY EFFECTS
   ============================================ */

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkleStar 3s ease-in-out infinite;
}

.star.large {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3);
}

.shooting-star {
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
  border-radius: 50%;
  animation: shootingStar 3s ease-in-out infinite;
  opacity: 0;
}

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

@keyframes shootingStar {
  0% { transform: translateX(0) translateY(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateX(-500px) translateY(300px); opacity: 0; }
}

/* ============================================
   FIREFLIES EFFECT
   ============================================ */

.fireflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255, 230, 150, 0.9), rgba(255, 200, 100, 0.4), transparent);
  border-radius: 50%;
  animation: fireflyFloat 8s ease-in-out infinite;
  box-shadow: 0 0 15px 5px rgba(255, 220, 100, 0.4);
}

@keyframes fireflyFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(30px, -40px) scale(1.2);
    opacity: 1;
  }
  50% {
    transform: translate(-20px, -60px) scale(0.8);
    opacity: 0.6;
  }
  75% {
    transform: translate(40px, -30px) scale(1.1);
    opacity: 0.9;
  }
}

/* ============================================
   HEARTBEAT ANIMATION
   ============================================ */

.heartbeat-container {
  margin-bottom: 20px;
}

.heartbeat-svg {
  width: 60px;
  height: 60px;
  fill: var(--heart-red);
  filter: drop-shadow(0 0 20px rgba(231, 76, 60, 0.5));
  animation: heartbeat 1.2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

/* ============================================
   LOVE COUNTER
   ============================================ */

.love-counter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px;
  margin: 16px 0;
  background: rgba(255, 107, 157, 0.1);
  border: 1px solid rgba(255, 107, 157, 0.2);
  border-radius: 16px;
}

.counter-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.counter-value {
  font-family: var(--handwriting);
  font-size: 1.4rem;
  color: var(--heart-pink);
  letter-spacing: 0.02em;
}

/* ============================================
   FLOATING HEARTS ON CLICK
   ============================================ */

.heart-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  font-size: 24px;
  animation: floatHeart 2s ease-out forwards;
  pointer-events: none;
  user-select: none;
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-150px) scale(1.2) rotate(15deg);
    opacity: 0;
  }
}

/* ============================================
   HANDWRITING STYLES
   ============================================ */

.handwriting {
  font-family: var(--handwriting);
}

.handwriting-alt {
  font-family: var(--handwriting-alt);
}

#letterBody {
  font-family: var(--handwriting);
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text);
}

/* ============================================
   REASONS I LOVE YOU SECTION
   ============================================ */

.love-reasons {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.love-reason {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 107, 129, 0.08);
  border: 1px solid rgba(255, 107, 129, 0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(-20px);
}

.love-reason.visible {
  opacity: 1;
  transform: translateX(0);
}

.love-reason:hover {
  background: rgba(255, 107, 129, 0.15);
  transform: translateX(5px);
}

.love-reason-number {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--heart-pink), var(--rose));
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.love-reason-text {
  font-family: var(--handwriting-alt);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.4;
}

/* ============================================
   ENHANCED INTRO STYLES
   ============================================ */

.intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(139, 69, 100, 0.15), transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(255, 215, 0, 0.08), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(183, 110, 121, 0.1), transparent 45%),
    rgba(8, 8, 16, 0.95);
  backdrop-filter: blur(10px);
  z-index: 3;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.intro-card {
  width: min(520px, 90%);
  padding: 40px 32px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(255, 107, 157, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: fadeInUp 1s ease both, glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 107, 157, 0.1); }
  50% { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 80px rgba(255, 107, 157, 0.2); }
}

.intro-greeting {
  min-height: 80px;
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ============================================
   ENHANCED FINALE STYLES
   ============================================ */

.finale-hero h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--gold), var(--rose), var(--berry));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wish-stack p {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--handwriting-alt);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.wish-stack p:hover {
  background: rgba(255, 107, 157, 0.1);
  transform: translateX(8px);
  border-color: rgba(255, 107, 157, 0.3);
}

/* ============================================
   POLAROID STYLE PHOTOS
   ============================================ */

.polaroid-frame {
  background: #fff;
  padding: 12px 12px 40px;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
}

.polaroid-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

.polaroid-frame img {
  border-radius: 2px;
}

.polaroid-caption {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--handwriting);
  font-size: 1rem;
  color: #333;
}

/* ============================================
   ROMANTIC CURSOR TRAIL
   ============================================ */

.cursor-heart {
  position: fixed;
  pointer-events: none;
  font-size: 12px;
  animation: cursorHeartFade 1s ease-out forwards;
  z-index: 9999;
}

@keyframes cursorHeartFade {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.5) translateY(-30px); }
}

/* ============================================
   MAGIC SPARKLE BURST
   ============================================ */

.sparkle-burst {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkleBurst 0.8s ease-out forwards;
  box-shadow: 0 0 10px var(--gold);
}

@keyframes sparkleBurst {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ============================================
   ENHANCED BUTTON EFFECTS
   ============================================ */

.primary {
  position: relative;
  overflow: hidden;
}

.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.primary:hover::before {
  left: 100%;
}

/* ============================================
   ROMANTIC MESSAGE REVEAL
   ============================================ */

.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.8s ease forwards;
}

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

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--gold);
  margin-left: 4px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================
   ENHANCED PHOTO CAROUSEL
   ============================================ */

/* Ken Burns Effect */
.carousel-slide img {
  animation: none;
  transform-origin: center center;
  transition: transform 0.6s ease;
}

.carousel-slide.ken-burns-active img {
  animation: kenBurns 8s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% {
    transform: scale(1) translateX(0) translateY(0);
  }
  100% {
    transform: scale(1.15) translateX(-2%) translateY(-2%);
  }
}

/* Caption Animation */
.carousel-caption {
  min-height: 32px;
  color: var(--muted);
  text-align: center;
  font-family: var(--handwriting);
  font-size: 1.2rem;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.08), rgba(255, 215, 0, 0.05));
  border-radius: 12px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-caption.caption-animate {
  animation: captionFadeIn 0.6s ease forwards;
}

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

/* Progress Bar for Auto-play */
.carousel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--heart-pink));
  animation: carouselProgress 4s linear infinite;
  border-radius: 0 0 18px 18px;
}

@keyframes carouselProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Enhanced Carousel Controls */
.carousel-controls button {
  pointer-events: all;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.8);
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.carousel-controls button:hover {
  background: rgba(255, 107, 157, 0.6);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
}

/* Double-click hint */
.carousel::before {
  content: 'Double-click to view full size';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.carousel:hover::before {
  opacity: 1;
}

/* Enhanced Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.carousel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-dots span:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.2);
}

.carousel-dots span.active {
  background: linear-gradient(135deg, var(--gold), var(--heart-pink));
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 107, 157, 0.5);
}

/* ============================================
   FULLSCREEN PHOTO VIEWER
   ============================================ */

.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fullscreen-viewer.active {
  opacity: 1;
  visibility: visible;
}

.fullscreen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
}

.fullscreen-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: scale(0.9);
  transition: transform 0.4s ease;
}

.fullscreen-viewer.active .fullscreen-content {
  transform: scale(1);
}

.fullscreen-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 107, 157, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.15);
  animation: photoFloat 4s ease-in-out infinite;
}

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

.fullscreen-caption {
  font-family: var(--handwriting);
  font-size: 1.5rem;
  color: var(--text);
  text-align: center;
  padding: 16px 32px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(255, 215, 0, 0.1));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: captionFadeIn 0.6s ease 0.3s both;
}

.fullscreen-close {
  position: absolute;
  top: -50px;
  right: -20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.fullscreen-close:hover {
  background: rgba(255, 107, 157, 0.5);
  transform: rotate(90deg) scale(1.1);
}

/* ============================================
   ENHANCED PHOTO TRANSITIONS
   ============================================ */

.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-slide:hover img {
  transform: scale(1.02);
}

/* Photo frame glow effect */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 107, 157, 0.1);
}

/* Romantic vignette overlay */
.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* Heart decoration on carousel */
.carousel-slide::before {
  content: '';
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6b9d'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  opacity: 0.7;
  z-index: 5;
  animation: heartPulse 1.5s ease-in-out infinite;
}

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

/* Photo Counter */
.carousel-counter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text);
  z-index: 10;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--handwriting-alt);
  letter-spacing: 0.1em;
}

/* Swipe indicator for mobile */
@media (max-width: 768px) {
  .carousel::before {
    content: 'Swipe or tap arrows';
  }

  .carousel-counter {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}

/* Touch-friendly larger buttons on mobile */
@media (hover: none) and (pointer: coarse) {
  .carousel-controls button {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  .carousel-dots span {
    width: 14px;
    height: 14px;
  }
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(139, 69, 100, 0.2), transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(255, 215, 0, 0.1), transparent 40%),
    var(--bg-deep);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.loading-heart {
  width: 80px;
  height: 80px;
}

.loading-heart svg {
  width: 100%;
  height: 100%;
  fill: var(--heart-red);
  filter: drop-shadow(0 0 30px rgba(231, 76, 60, 0.6));
  animation: loadingHeartbeat 1s ease-in-out infinite;
}

@keyframes loadingHeartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.loading-text {
  font-family: var(--handwriting);
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 0.05em;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--heart-pink), var(--rose));
  border-radius: 4px;
  animation: loadingProgress 2s ease-in-out forwards;
}

@keyframes loadingProgress {
  0% { width: 0%; }
  20% { width: 20%; }
  50% { width: 60%; }
  80% { width: 85%; }
  100% { width: 100%; }
}

/* ============================================
   CUSTOM VIDEO PLAYER STYLING
   ============================================ */

.finale-card video {
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 107, 157, 0.1);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 10, 15, 0.9));
}

.finale-card video::-webkit-media-controls-panel {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}

.finale-card video::-webkit-media-controls-play-button {
  filter: brightness(1.2);
}

.finale-card video::-webkit-media-controls-timeline {
  filter: hue-rotate(320deg) saturate(1.5);
}

/* Video container wrapper for better styling */
.video-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 107, 157, 0.15);
}

.video-wrapper::before {
  content: '💕';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.5rem;
  z-index: 10;
  opacity: 0.8;
  animation: heartPulse 1.5s ease-in-out infinite;
}

/* ============================================
   SUCCESS ANIMATION
   ============================================ */

.success-glow {
  animation: successGlow 0.6s ease-out;
}

@keyframes successGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 30px 15px rgba(255, 215, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}
