/* ==========================================================================
   Wedding Anniversary Interactive Site - Stylesheet
   ========================================================================== */

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
  --deep-red: #DC143C;
  --hot-pink: #FF1493;
  --gold: #FFD700;
  --marigold: #FF8C00;
  --deep-purple: #800080;
  --maroon: #800000;
  --cream: #FFF8DC;
  --light-pink: #FFE4E1;
  --dark-brown: #3E2723;
  --rose: #E8A0BF;

  --font-script: 'Great Vibes', cursive;
  --font-body: 'Poppins', sans-serif;
  --font-handwritten: 'Indie Flower', cursive;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--cream) 0%, var(--light-pink) 50%, var(--cream) 100%);
  color: var(--dark-brown);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- Screen System ---------- */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  position: relative;
  padding: 2rem 1rem;
  z-index: 1;
  overflow: hidden;
}

.screen.active {
  display: flex;
}

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

.screen.fade-in {
  animation: fadeIn 0.6s ease-in-out forwards;
}

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

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

/* ---------- Floating Hearts Background ---------- */
#floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.heart {
  position: absolute;
  bottom: -40px;
  font-size: var(--heart-size, 16px);
  color: var(--heart-color, var(--hot-pink));
  opacity: 0;
  will-change: transform, opacity;
  animation: heartRise var(--heart-duration, 8s) ease-in-out forwards;
}

@keyframes heartRise {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.5);
  }
  8% {
    opacity: var(--heart-opacity, 0.5);
    transform: translateY(-8vh) translateX(calc(var(--heart-sway, 30px) * 0.1)) scale(1);
  }
  25% {
    opacity: var(--heart-opacity, 0.5);
    transform: translateY(-25vh) translateX(calc(var(--heart-sway, 30px) * -0.4));
  }
  50% {
    opacity: var(--heart-opacity, 0.5);
    transform: translateY(-50vh) translateX(calc(var(--heart-sway, 30px) * 0.6));
  }
  75% {
    opacity: calc(var(--heart-opacity, 0.5) * 0.35);
    transform: translateY(-75vh) translateX(calc(var(--heart-sway, 30px) * -0.3));
  }
  100% {
    opacity: 0;
    transform: translateY(-105vh) translateX(calc(var(--heart-sway, 30px) * 0.5));
  }
}

/* ---------- Music Toggle ---------- */
.music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, var(--deep-red), var(--maroon));
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.music-toggle.playing {
  animation: musicPulse 1s ease-in-out infinite;
}

.music-toggle.paused .music-icon {
  opacity: 0.5;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(220, 20, 60, 0.6); }
}

/* ---------- Typography ---------- */
.heading-script {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  color: var(--deep-red);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  text-align: center;
  line-height: 1.3;
}

.subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #666;
  margin-top: 0.5rem;
  text-align: center;
}

.emoji {
  font-style: normal;
}

/* ---------- Rangoli Border Decoration ---------- */
.rangoli-border {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px, var(--gold) 15px,
    transparent 15px, transparent 20px,
    var(--deep-red) 20px, var(--deep-red) 35px,
    transparent 35px, transparent 40px,
    var(--marigold) 40px, var(--marigold) 55px,
    transparent 55px, transparent 60px
  );
}

.rangoli-bottom {
  top: auto;
  bottom: 0;
}

/* ---------- Decorative Mandala ---------- */
.decorative-mandala {
  width: 60px;
  height: 60px;
  position: relative;
  margin: 0 auto 1rem;
  opacity: 0.3;
}

.decorative-mandala::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: mandalaSpin 20s linear infinite;
}

.decorative-mandala::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px dashed var(--marigold);
  border-radius: 50%;
  animation: mandalaSpin 15s linear infinite reverse;
}

.bottom-mandala {
  margin: 1rem auto 0;
}

@keyframes mandalaSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   SCREEN 1: The Question
   ========================================================================== */
.question-content {
  text-align: center;
  position: relative;
  padding: 2rem;
  max-width: 850px;
  width: 100%;
}

.buttons-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0 1rem;
  position: relative;
  min-height: 70px;
}

.no-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.btn-yes {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  padding: 0.8rem 2.5rem;
  background: linear-gradient(135deg, var(--deep-red), var(--hot-pink));
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(220, 20, 60, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  letter-spacing: 1px;
}

.btn-yes:hover {
  box-shadow: 0 12px 40px rgba(220, 20, 60, 0.6);
  filter: brightness(1.05);
}

.btn-yes:active {
  transform: scale(0.95) !important;
}

.btn-yes.pulse-urgent {
  animation: pulseUrgent 0.6s ease-in-out infinite;
}

@keyframes pulseUrgent {
  0%, 100% { box-shadow: 0 8px 30px rgba(220, 20, 60, 0.4); }
  50% { box-shadow: 0 8px 50px rgba(220, 20, 60, 0.8), 0 0 60px rgba(255, 20, 147, 0.3); }
}

.heart-emoji {
  font-style: normal;
  display: inline-block;
  animation: heartBeat 1.5s ease-in-out infinite;
}

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

.btn-no {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.6rem;
  background: rgba(240, 240, 240, 0.95);
  color: #555;
  border: 1.5px solid #999;
  border-radius: 50px;
  cursor: pointer;
  transition: left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.3s ease,
              font-size 0.3s ease,
              padding 0.3s ease;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.no-hint {
  font-family: var(--font-handwritten);
  font-size: 0.95rem;
  color: #999;
  margin-top: 0.4rem;
  transition: opacity 0.4s ease;
}

.no-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.dodge-messages {
  min-height: 2.5rem;
  font-family: var(--font-handwritten);
  color: var(--hot-pink);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0;
  transition: opacity 0.5s ease;
  padding: 0 1rem;
  margin-top: 1.5rem;
  text-align: center;
  width: 100%;
}

.dodge-messages.visible {
  opacity: 1;
}

/* ==========================================================================
   SCREEN 2: Anniversary Card
   ========================================================================== */

/* Deep warm background */
.screen-card-bg {
  background: linear-gradient(160deg, #1a0a0e 0%, #2a0e14 25%, #1e0b10 50%, #150810 80%, #0e0508 100%);
  position: relative;
  overflow: hidden;
}

/* Warm radial glow behind card */
.screen-card-bg::before {
  content: '';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(120, 30, 40, 0.2) 0%, rgba(80, 15, 25, 0.1) 40%, transparent 70%);
  pointer-events: none;
}

/* Subtle top accent light */
.screen-card-bg::after {
  content: '';
  position: absolute;
  top: -5%;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 30%;
  background: radial-gradient(ellipse, rgba(150, 50, 60, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Bokeh lights */
.bokeh-lights {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bokeh-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: bokehFloat 8s ease-in-out infinite;
}

.bokeh-dot:nth-child(1) {
  width: 100px; height: 100px;
  top: 10%; left: 8%;
  background: radial-gradient(circle, rgba(180, 50, 60, 0.1) 0%, transparent 70%);
  animation-delay: 0s;
  animation-duration: 9s;
}
.bokeh-dot:nth-child(2) {
  width: 140px; height: 140px;
  top: 60%; right: 5%;
  background: radial-gradient(circle, rgba(160, 40, 50, 0.08) 0%, transparent 70%);
  animation-delay: 1.5s;
  animation-duration: 11s;
}
.bokeh-dot:nth-child(3) {
  width: 70px; height: 70px;
  top: 25%; right: 20%;
  background: radial-gradient(circle, rgba(200, 70, 80, 0.1) 0%, transparent 70%);
  animation-delay: 3s;
  animation-duration: 7s;
}
.bokeh-dot:nth-child(4) {
  width: 120px; height: 120px;
  bottom: 15%; left: 15%;
  background: radial-gradient(circle, rgba(150, 35, 45, 0.08) 0%, transparent 70%);
  animation-delay: 2s;
  animation-duration: 10s;
}
.bokeh-dot:nth-child(5) {
  width: 60px; height: 60px;
  top: 45%; left: 3%;
  background: radial-gradient(circle, rgba(180, 50, 60, 0.12) 0%, transparent 70%);
  animation-delay: 4s;
  animation-duration: 8s;
}
.bokeh-dot:nth-child(6) {
  width: 90px; height: 90px;
  top: 5%; right: 35%;
  background: radial-gradient(circle, rgba(140, 30, 40, 0.07) 0%, transparent 70%);
  animation-delay: 5s;
  animation-duration: 12s;
}
.bokeh-dot:nth-child(7) {
  width: 80px; height: 80px;
  bottom: 25%; right: 30%;
  background: radial-gradient(circle, rgba(170, 45, 55, 0.1) 0%, transparent 70%);
  animation-delay: 1s;
  animation-duration: 9s;
}
.bokeh-dot:nth-child(8) {
  width: 50px; height: 50px;
  bottom: 40%; left: 40%;
  background: radial-gradient(circle, rgba(190, 60, 70, 0.08) 0%, transparent 70%);
  animation-delay: 6s;
  animation-duration: 7s;
}

@keyframes bokehFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
  20% { opacity: 1; }
  50% { opacity: 0.7; transform: translateY(-20px) scale(1.1); }
  80% { opacity: 1; }
}

/* Floating petals container */
.floating-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.petal {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  will-change: transform, opacity;
  animation: petalFall var(--petal-duration, 6s) ease-in-out forwards;
  animation-delay: var(--petal-delay, 0s);
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translateY(-20px) translateX(0) rotate(0deg) scale(0.5);
  }
  10% {
    opacity: var(--petal-opacity, 0.5);
    transform: translateY(5vh) translateX(calc(var(--petal-sway, 30px) * 0.3)) rotate(45deg) scale(1);
  }
  40% {
    opacity: var(--petal-opacity, 0.5);
    transform: translateY(35vh) translateX(calc(var(--petal-sway, 30px) * -0.5)) rotate(120deg);
  }
  70% {
    opacity: calc(var(--petal-opacity, 0.5) * 0.5);
    transform: translateY(65vh) translateX(calc(var(--petal-sway, 30px) * 0.7)) rotate(240deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(calc(var(--petal-sway, 30px) * -0.2)) rotate(360deg);
  }
}

/* Title on dark background */
.card-title-light {
  color: rgba(255, 235, 225, 0.9) !important;
  text-shadow: 0 0 30px rgba(200, 100, 100, 0.2), 0 2px 4px rgba(0,0,0,0.3) !important;
  font-size: clamp(1.6rem, 3.8vw, 2.8rem) !important;
}

.card-screen-title {
  margin-bottom: 1.5rem;
  opacity: 0;
}

.screen.active .card-screen-title {
  animation: slideUpFade 1s ease-out 0.3s forwards;
}

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

.card-scene {
  perspective: 5000px;
  width: min(92vw, 780px);
  height: min(65vh, 460px);
  margin: 0 auto;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 40px rgba(100, 20, 30, 0.15));
  position: relative;
  z-index: 1;
  transition: width 0.8s ease, margin-left 0.8s ease, transform 0.8s ease;
}

.anniversary-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: translateX(-25%);
  transition: transform 1s ease-in-out;
}

.anniversary-card.open-half {
  transform: translateX(0%);
}

.anniversary-card.open-fully {
  transform: translateX(0%);
}

/* Photo frame (inside card-front-inner) */
.card-photo-frame {
  background: #fff;
  padding: 8px 8px 28px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  transform: rotate(-2deg);
  transition: transform 0.5s ease;
  border-radius: 2px;
  max-width: 80%;
  max-height: 85%;
}

.card-photo-frame:hover {
  transform: rotate(0deg) scale(1.03);
}

.card-photo-img {
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 1px;
}

/* Card Inside Right Panel (message — behind front cover) */
.card-inside {
  position: absolute;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(180deg, #faf5f0 0%, #f5ede7 100%);
  border-radius: 0 12px 12px 0;
  box-shadow: inset 3px 0 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 2rem;
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.card-greeting {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--deep-red);
  margin-bottom: 0.5rem;
}

.card-message {
  font-family: var(--font-handwritten);
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  color: var(--dark-brown);
  line-height: 1.65;
}

.card-signed {
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--deep-red);
  margin-top: 0.8rem;
}

/* Card Front (the folding cover) */
.card-front {
  position: absolute;
  right: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1s linear;
  z-index: 10;
}

.anniversary-card.open-half .card-front {
  transform: rotateY(-90deg);
}

.anniversary-card.open-fully .card-front {
  transform: rotateY(-180deg);
}

/* Card Front Outer Face — deep red velvet */
.card-front-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(180, 40, 50, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(150, 30, 40, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #5a0a15 0%, #7a1520 30%, #6a1018 50%, #4a0810 80%, #3a060c 100%);
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 0.5rem;
  overflow: hidden;
}

/* Velvet texture noise overlay */
.card-front-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  border-radius: 0 12px 12px 0;
  pointer-events: none;
}

/* Soft light shimmer */
.card-front-outer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 200, 200, 0.03) 45%,
    rgba(255, 220, 220, 0.06) 50%,
    rgba(255, 200, 200, 0.03) 55%,
    transparent 60%
  );
  animation: shimmer 5s linear infinite;
  pointer-events: none;
}

@keyframes shimmer {
  from { transform: translateX(-30%) translateY(-30%); }
  to { transform: translateX(30%) translateY(30%); }
}

/* Elegant thin frame inset on card */
.card-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0 6px 6px 0;
  pointer-events: none;
  z-index: 2;
}

/* Floating 3D hearts container */
.card-floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Heart shape via inline SVG background */
.card-heart {
  position: absolute;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23d43040'/%3E%3Cstop offset='100%25' stop-color='%23881520'/%3E%3C/linearGradient%3E%3C/defs%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' fill='url(%23g)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 3px 8px rgba(100, 10, 15, 0.5));
}

/* Individual heart positions & sizes */
.card-heart-1 {
  top: 8%;
  left: 12%;
  width: 38px; height: 38px;
  animation: heartFloat1 5s ease-in-out infinite;
}
.card-heart-2 {
  top: 15%;
  right: 12%;
  width: 44px; height: 44px;
  animation: heartFloat2 6s ease-in-out infinite;
}
.card-heart-3 {
  top: 48%;
  left: 6%;
  width: 32px; height: 32px;
  animation: heartFloat3 5.5s ease-in-out infinite;
}
.card-heart-4 {
  bottom: 10%;
  right: 12%;
  width: 40px; height: 40px;
  animation: heartFloat4 6.5s ease-in-out infinite;
}
.card-heart-5 {
  bottom: 25%;
  left: 18%;
  width: 34px; height: 34px;
  animation: heartFloat5 5s ease-in-out infinite;
}
.card-heart-6 {
  bottom: 8%;
  left: 40%;
  width: 28px; height: 28px;
  animation: heartFloat6 7s ease-in-out infinite;
}

/* Each heart has its own subtle float with slight rotation */
@keyframes heartFloat1 {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-6px) rotate(-5deg); }
}
@keyframes heartFloat2 {
  0%, 100% { transform: translateY(0) rotate(8deg); }
  50% { transform: translateY(-8px) rotate(12deg); }
}
@keyframes heartFloat3 {
  0%, 100% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-5px) rotate(-10deg); }
}
@keyframes heartFloat4 {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(-7px) rotate(10deg); }
}
@keyframes heartFloat5 {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-6px) rotate(-3deg); }
}
@keyframes heartFloat6 {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-5px) rotate(8deg); }
}

/* Title group */
.card-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 3;
}

.card-title-top {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 6px;
  text-transform: uppercase;
}

.card-title {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3rem);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  margin-top: -0.2rem;
  text-align: center;
  line-height: 1.15;
}

.btn-open-card {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  padding: 0.6rem 1.8rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  z-index: 3;
  letter-spacing: 2px;
  margin-top: 1rem;
}

.btn-open-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

/* Card Front Inner Face (backside of cover — shows photo when opened) */
.card-front-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #f8f0ea 0%, #f2e8e0 50%, #f8f0ea 100%);
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Card navigation buttons */
.card-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.2rem;
  position: relative;
  z-index: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.btn-nav {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.8rem;
  background: transparent;
  color: rgba(255, 220, 210, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s ease;
  letter-spacing: 1px;
}

.btn-nav:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   SCREEN 3: Balloon Pop Game
   ========================================================================== */
.balloon-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.balloon {
  cursor: pointer;
  position: absolute;
  pointer-events: auto;
  bottom: -180px;
  animation: balloonRise var(--rise-duration, 8s) linear forwards;
  animation-delay: var(--rise-delay, 0s);
  left: var(--rise-x, 50%);
  transform: translateX(-50%);
  z-index: 1;
}

.balloon:hover {
  filter: brightness(1.15);
}

/* Gentle side-to-side sway while rising */
.balloon .balloon-body {
  animation: balloonSway 2.5s ease-in-out infinite;
  animation-delay: var(--sway-delay, 0s);
}

@keyframes balloonRise {
  0% { bottom: -180px; opacity: 0; }
  5% { opacity: 1; }
  90% { opacity: 1; }
  100% { bottom: 110%; opacity: 0; }
}

@keyframes balloonSway {
  0%, 100% { transform: rotate(-3deg) translateX(0); }
  50% { transform: rotate(3deg) translateX(10px); }
}

.balloon-body {
  width: 75px;
  height: 95px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -8px -8px 15px rgba(0,0,0,0.1);
}

/* Balloon shine */
.balloon-body::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 22px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  top: 14px;
  left: 14px;
  transform: rotate(-30deg);
}

/* Balloon knot */
.balloon-knot {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  margin: 0 auto;
  position: relative;
}

/* Balloon string */
.balloon-string {
  width: 1.5px;
  height: 45px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.balloon-string::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    180deg,
    #ccc 0px, #ccc 4px,
    #aaa 4px, #aaa 8px
  );
}

.balloon-number {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

/* Golden balloon */
.balloon.golden .balloon-body {
  width: 85px;
  height: 105px;
  background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700) !important;
  box-shadow: inset -8px -8px 15px rgba(0,0,0,0.1), 0 0 25px rgba(255, 215, 0, 0.5);
  animation: balloonSway 2.5s ease-in-out infinite, goldenGlow 2s ease-in-out infinite;
}

@keyframes goldenGlow {
  0%, 100% { box-shadow: inset -8px -8px 15px rgba(0,0,0,0.1), 0 0 25px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: inset -8px -8px 15px rgba(0,0,0,0.1), 0 0 40px rgba(255, 215, 0, 0.7); }
}

.balloon.golden .balloon-number {
  font-size: 1.8rem;
}

/* Pop animation */
.balloon.popping {
  animation: balloonPop 0.35s ease-out forwards !important;
  pointer-events: none;
}

@keyframes balloonPop {
  0% { transform: translateX(-50%) scale(1); opacity: 1; }
  40% { transform: translateX(-50%) scale(1.4); opacity: 0.7; }
  100% { transform: translateX(-50%) scale(0.1); opacity: 0; }
}

/* Burst particles */
.burst-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  animation: burstFly 0.5s ease-out forwards;
}

@keyframes burstFly {
  from { transform: translate(0, 0) scale(1); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* Image modal */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.image-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.image-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  max-width: min(90vw, 500px);
  max-height: 80vh;
  border: 6px solid var(--gold);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.3), 0 20px 60px rgba(0,0,0,0.4);
  animation: modalZoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--cream);
}

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

.modal-content img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.btn-close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--maroon);
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 10;
}

.btn-close-modal:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   SCREEN 4: Final Date Reveal
   ========================================================================== */
.final-reveal-content {
  text-align: center;
  padding: 1rem 1rem;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.final-heading {
  font-size: clamp(2.2rem, 6vw, 3.5rem) !important;
  margin-bottom: 0.2rem;
  opacity: 0;
}

.final-subheading {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255, 220, 210, 0.8);
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
  opacity: 0;
}

.screen.active .final-subheading {
  animation: fadeIn 1s ease-out 1s forwards;
}

.final-anniversary-text {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
  opacity: 0;
}

.screen.active .final-anniversary-text {
  animation: fadeIn 1s ease-out 1.5s forwards;
}

.screen.active .final-heading {
  animation: finalHeadingIn 1.2s ease-out 0.3s forwards;
}

@keyframes finalHeadingIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.date-card {
  background: linear-gradient(160deg, var(--maroon) 0%, var(--deep-red) 50%, var(--maroon) 100%);
  color: var(--gold);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 20px;
  border: 3px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), inset 0 0 30px rgba(255, 215, 0, 0.05);
  max-width: 450px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  opacity: 0;
}

.screen.active .date-card {
  animation: dateCardIn 1s ease-out 0.8s forwards;
}

/* Gold shimmer on date card */
.date-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 215, 0, 0.06) 45%,
    rgba(255, 215, 0, 0.12) 50%,
    rgba(255, 215, 0, 0.06) 55%,
    transparent 70%
  );
  animation: shimmer 5s linear infinite;
}

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

/* Ornamental decorations */
.date-ornament {
  height: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.date-ornament::before,
.date-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.top-ornament::after,
.top-ornament::before {
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

/* Venue card styling */
.venue-card {
  background: linear-gradient(160deg, var(--maroon) 0%, var(--deep-red) 50%, var(--maroon) 100%);
  color: var(--gold);
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 0 30px rgba(255, 215, 0, 0.05);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  opacity: 0;
}

.screen.active .venue-card {
  animation: dateCardIn 1s ease-out 0.8s forwards;
}

/* Gold shimmer on venue card */
.venue-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 215, 0, 0.06) 45%,
    rgba(255, 215, 0, 0.12) 50%,
    rgba(255, 215, 0, 0.06) 55%,
    transparent 70%
  );
  animation: shimmer 5s linear infinite;
}

.date-info {
  padding: 0.5rem 0;
  position: relative;
  z-index: 1;
}

.date-row {
  padding: 0.6rem 0;
}

.date-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  display: block;
  color: rgba(255, 215, 0, 0.7);
  font-weight: 300;
}

.date-value {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  display: block;
  margin-top: 0.3rem;
  color: rgba(255, 235, 220, 0.95);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.date-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto;
}

.final-footer {
  font-family: var(--font-handwritten);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #ff6b6b;
  margin-top: 1rem;
  opacity: 0;
}

.screen.active .final-footer {
  animation: fadeIn 1s ease-out 2s forwards;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
  /* --- Screen 1: Question --- */
  .question-content {
    padding: 1.5rem;
  }

  .heading-script {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .buttons-row {
    margin: 1.5rem 0 0.8rem;
  }

  /* --- Screen 2: Card --- */
  .card-scene {
    width: 95vw;
    height: min(55vh, 400px);
  }

  .card-screen-title {
    margin-bottom: 1rem;
  }

  .card-front-inner {
    padding: 1rem;
  }

  .card-photo-img {
    max-height: 240px;
  }

  .card-photo-frame {
    padding: 6px 6px 22px;
  }

  .card-inside {
    padding: 1rem 1.2rem;
  }

  .card-message {
    font-size: 0.85rem;
    line-height: 1.55;
  }

  /* --- Screen 3: Balloons --- */
  .balloon-body {
    width: 65px;
    height: 82px;
  }

  /* --- Screen 4: Final --- */
  .final-heading {
    font-size: clamp(2.2rem, 6vw, 3.2rem) !important;
  }

  .final-subheading {
    font-size: 1rem;
  }

  .final-anniversary-text {
    font-size: clamp(1.5rem, 4.5vw, 2rem);
  }

  .venue-card {
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1.2rem, 3.5vw, 2rem);
  }

  .date-label {
    font-size: 0.8rem;
  }

  .date-value {
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  }

  .final-footer {
    font-size: 1.1rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .screen {
    padding: 1rem 0.6rem;
  }

  /* --- Screen 1: Question --- */
  .question-content {
    padding: 1rem 0.5rem;
  }

  .heading-script {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    line-height: 1.35;
  }

  .subtitle {
    font-size: 1.1rem;
    margin-top: 0.5rem;
  }

  .btn-yes {
    font-size: 1.2rem;
    padding: 0.8rem 2.5rem;
  }

  .btn-no {
    font-size: 0.85rem;
    padding: 0.45rem 1.4rem;
  }

  .buttons-row {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin: 1.2rem 0 0.5rem;
    min-height: auto;
  }

  .no-hint {
    font-size: 0.9rem;
  }

  .dodge-messages {
    font-size: 1.05rem;
    margin-top: 0.8rem;
    min-height: 2rem;
  }

  /* --- Screen 2: Card --- */
  .card-title-light {
    font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
  }

  .card-screen-title {
    margin-bottom: 0.4rem;
  }

  .card-scene {
    width: 170vw;
    height: min(70vh, 480px);
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .card-scene.card-opened {
    width: 96vw;
    margin-left: auto;
    transform: none;
  }

  .card-front-outer {
    padding: 1.5rem 1.2rem;
  }

  .card-title-top {
    font-size: 0.7rem;
    letter-spacing: 5px;
  }

  .card-title {
    font-size: clamp(1.8rem, 6.5vw, 2.4rem);
    margin-top: -0.1rem;
    line-height: 1.15;
  }

  .btn-open-card {
    font-size: 0.9rem;
    padding: 0.6rem 1.8rem;
    margin-top: 0.8rem;
  }

  .card-front-inner {
    padding: 0.6rem;
  }

  .card-inside {
    padding: 0.6rem 0.8rem;
  }

  .card-greeting {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }

  .card-message {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .card-signed {
    font-size: 1rem;
    margin-top: 0.4rem;
  }

  .card-photo-img {
    max-height: 180px;
  }

  .card-photo-frame {
    padding: 4px 4px 16px;
    max-width: 85%;
    max-height: 90%;
    transform: rotate(-1.5deg);
  }

  .card-nav-buttons {
    margin-top: 0.8rem;
    gap: 1rem;
  }

  .btn-nav {
    font-size: 0.9rem;
    padding: 0.55rem 1.6rem;
  }

  /* Card floating hearts smaller on mobile */
  .card-heart-1, .card-heart-3, .card-heart-5, .card-heart-6 {
    transform: scale(0.7);
  }
  .card-heart-2, .card-heart-4 {
    transform: scale(0.75);
  }

  .card-frame {
    inset: 8px;
  }

  /* --- Screen 3: Balloons --- */
  #balloon-heading {
    font-size: clamp(1.5rem, 6vw, 2rem);
    padding-top: 0.5rem;
  }

  #surprises-counter {
    font-size: 0.95rem;
  }

  .balloon-body {
    width: 58px;
    height: 73px;
  }

  .balloon-string {
    height: 35px;
  }

  .balloon-number {
    font-size: 1.2rem;
  }

  .balloon.golden .balloon-body {
    width: 68px;
    height: 85px;
  }

  .balloon.golden .balloon-number {
    font-size: 1.5rem;
  }

  .modal-content {
    max-width: 92vw;
    border-width: 4px;
    border-radius: 12px;
  }

  .btn-close-modal {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    top: 8px;
    right: 8px;
  }

  /* --- Screen 4: Final --- */
  .final-reveal-content {
    padding: 0.5rem 0.5rem;
  }

  .final-heading {
    font-size: clamp(2rem, 7vw, 2.8rem) !important;
    margin-bottom: 0.15rem;
  }

  .final-subheading {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
  }

  .final-anniversary-text {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    margin-bottom: 0.6rem;
  }

  .venue-card {
    padding: 1rem 1.2rem;
    max-width: 90%;
    border-radius: 16px;
  }

  .date-row {
    padding: 0.4rem 0;
  }

  .date-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
  }

  .date-value {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    margin-top: 0.2rem;
  }

  .date-divider {
    width: 40px;
  }

  .final-footer {
    font-size: 1.05rem;
    margin-top: 0.6rem;
  }

  .music-toggle {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    bottom: 15px;
    right: 15px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .screen {
    padding: 0.8rem 0.5rem;
  }

  /* --- Screen 1 --- */
  .heading-script {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }

  .subtitle {
    font-size: 1rem;
  }

  .btn-yes {
    font-size: 1.1rem;
    padding: 0.7rem 2.2rem;
  }

  .buttons-row {
    margin: 1rem 0 0.3rem;
  }

  .dodge-messages {
    font-size: 0.95rem;
  }

  /* --- Screen 2 --- */
  .card-scene {
    width: 175vw;
    height: min(65vh, 420px);
  }

  .card-scene.card-opened {
    width: 98vw;
  }

  .card-title-light {
    font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
  }

  .card-screen-title {
    margin-bottom: 0.3rem;
  }

  .card-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.15;
  }

  .card-title-top {
    font-size: 0.6rem;
    letter-spacing: 3px;
  }

  .btn-open-card {
    font-size: 0.75rem;
    padding: 0.45rem 1.3rem;
    margin-top: 0.5rem;
  }

  .card-message {
    font-size: 0.7rem;
    line-height: 1.45;
  }

  .card-greeting {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }

  .card-signed {
    font-size: 0.9rem;
    margin-top: 0.3rem;
  }

  .card-inside {
    padding: 0.5rem 0.6rem;
  }

  .card-photo-img {
    max-height: 150px;
  }

  .card-nav-buttons {
    margin-top: 0.5rem;
  }

  .btn-nav {
    font-size: 0.8rem;
    padding: 0.45rem 1.3rem;
  }

  /* --- Screen 3 --- */
  #balloon-heading {
    font-size: clamp(1.3rem, 5.5vw, 1.8rem);
  }

  #surprises-counter {
    font-size: 0.85rem;
  }

  .balloon-body {
    width: 52px;
    height: 65px;
  }

  .balloon-number {
    font-size: 1.1rem;
  }

  .balloon.golden .balloon-body {
    width: 62px;
    height: 78px;
  }

  /* --- Screen 4 --- */
  .final-heading {
    font-size: clamp(1.8rem, 6.5vw, 2.3rem) !important;
  }

  .final-subheading {
    font-size: 0.85rem;
  }

  .final-anniversary-text {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    margin-bottom: 0.4rem;
  }

  .venue-card {
    padding: 0.8rem 1rem;
    border-radius: 12px;
  }

  .date-label {
    font-size: 0.7rem;
  }

  .date-value {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  }

  .final-footer {
    font-size: 0.95rem;
    margin-top: 0.4rem;
  }
}

/* Landscape phones — prevent card from being too tall */
@media (max-height: 500px) {
  .screen {
    padding: 0.5rem;
  }

  .card-scene {
    height: min(55vh, 250px);
  }

  .card-screen-title {
    margin-bottom: 0.3rem;
  }

  .card-title-light {
    font-size: 1.3rem !important;
  }

  .heading-script {
    font-size: 1.4rem;
  }

  .question-content {
    padding: 0.5rem;
  }

  .buttons-row {
    margin: 0.8rem 0 0.3rem;
  }

  .final-reveal-content {
    padding: 0.3rem;
  }

  .venue-card {
    padding: 0.6rem 0.8rem;
  }

  .date-row {
    padding: 0.3rem 0;
  }
}
