* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
  background: #f6f3ee;
  color: #2e2b27;
  position: relative;
}

.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 0;
}

.cats-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cat {
  position: absolute;
  font-size: 1.8rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.cat1 { top: 8%; left: 8%; animation: float-a 14s ease-in-out infinite; animation-delay: -3s; }
.cat2 { top: 20%; left: 82%; animation: float-b 17s ease-in-out infinite; animation-delay: -9s; }
.cat3 { top: 35%; left: 15%; animation: float-c 15s ease-in-out infinite; animation-delay: -5s; }
.cat4 { top: 50%; left: 88%; animation: float-a 19s ease-in-out infinite reverse; animation-delay: -12s; }
.cat5 { top: 60%; left: 6%; animation: float-b 13s ease-in-out infinite; animation-delay: -4s; }
.cat6 { top: 12%; left: 45%; animation: float-c 16s ease-in-out infinite reverse; animation-delay: -8s; }
.cat7 { top: 72%; left: 30%; animation: float-a 18s ease-in-out infinite; animation-delay: -6s; }
.cat8 { top: 85%; left: 70%; animation: float-b 14s ease-in-out infinite reverse; animation-delay: -10s; }
.cat9 { top: 90%; left: 50%; animation: float-c 20s ease-in-out infinite; animation-delay: -15s; }
.cat10 { top: 25%; left: 60%; animation: float-a 12s ease-in-out infinite reverse; animation-delay: -2s; }

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(6vw, -4vh) rotate(8deg); }
  50% { transform: translate(2vw, 5vh) rotate(-6deg); }
  75% { transform: translate(-6vw, -2vh) rotate(4deg); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(-5vw, 6vh) rotate(-10deg); }
  60% { transform: translate(5vw, -6vh) rotate(8deg); }
}

@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  20% { transform: translate(4vw, 4vh) scale(1.08) rotate(6deg); }
  50% { transform: translate(-4vw, 6vh) scale(0.95) rotate(-8deg); }
  80% { transform: translate(3vw, -5vh) scale(1.05) rotate(4deg); }
}

.scene {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.scene.active {
  display: flex;
  animation: appear 0.6s ease both;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  letter-spacing: 0.15em;
  font-size: clamp(0.75rem, 2.2vw, 0.85rem);
  color: #8a6f5c;
  margin-bottom: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
}

.title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  margin: 0.2rem 0;
  color: #6b3a2f;
  line-height: 1.2;
}

.title.small {
  font-size: clamp(1.9rem, 7vw, 2.4rem);
}

.wave {
  display: inline-block;
  animation: wave 1.8s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(18deg); }
  75% { transform: rotate(-12deg); }
}

.subtitle {
  color: #6e6459;
  margin-top: -0.4rem;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 3.4vw, 1.1rem);
}

.text {
  font-size: clamp(1rem, 3.6vw, 1.1rem);
  line-height: 1.75;
  color: #4a443d;
  max-width: 480px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
}

.small-text {
  font-size: 0.9rem;
  color: #8a7f72;
  margin-top: 1.5rem;
}

.gift-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0;
}

.gift-reveal[hidden] {
  display: none;
}

.bouquet-3d {
  font-size: 5.5rem;
  line-height: 1;
  perspective: 600px;
  transform-style: preserve-3d;
  animation: spin-3d 3.2s linear infinite;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
}

@keyframes spin-3d {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.gift-caption {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  color: #6b3a2f;
  margin-top: 0.8rem;
}

.camera {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.btn {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  margin-top: 1.6rem;
  min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: #6b3a2f;
  color: #fff;
  box-shadow: 0 8px 20px rgba(107, 58, 47, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  background: #582f26;
  box-shadow: 0 10px 24px rgba(107, 58, 47, 0.32);
}

.btn-ghost {
  background: transparent;
  color: #4a443d;
  border: 2px solid #d8d1c6;
}

.btn-back {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  background: transparent;
  border: none;
  color: #6b3a2f;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.btn-back:hover {
  background: rgba(107, 58, 47, 0.08);
}

.text-input {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  width: 100%;
  max-width: 320px;
  padding: 0.8rem 1.1rem;
  margin-top: 1.4rem;
  border-radius: 12px;
  border: 2px solid #d8d1c6;
  background: #fff;
  color: #2e2b27;
}

.text-input:focus {
  outline: none;
  border-color: #6b3a2f;
}

.bar-image {
  max-width: 260px;
  width: 100%;
  border-radius: 16px;
  margin-top: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.result-gif {
  max-width: 220px;
  width: 100%;
  border-radius: 16px;
  margin: 1rem 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.choices {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  width: 100%;
}

#btn-no {
  position: relative;
  transition: transform 0.18s ease;
}

.no-caption {
  min-height: 1.4rem;
  margin-top: 1rem;
  color: #8a6f5c;
  font-size: 0.95rem;
}

.polaroid-frame {
  background: #fff;
  padding: 1rem 1rem 2rem;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transform: rotate(-3deg);
  margin-bottom: 1.5rem;
  border: 1px solid #e8e2d8;
}

.polaroid-photo {
  width: min(220px, 55vw);
  height: min(220px, 55vw);
  background: #efeae2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-radius: 2px;
}

.polaroid-caption {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  color: #6b3a2f;
  margin: 0.6rem 0 0;
}

#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 50%;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

@media (max-width: 600px) {
  .scene {
    padding: 1.75rem 1.1rem;
  }

  .cat {
    font-size: 1.4rem;
    opacity: 0.4;
  }

  .choices {
    flex-direction: column;
    gap: 0.9rem;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

  .camera {
    font-size: 2.4rem;
  }
}

@media (max-width: 360px) {
  .text { font-size: 0.95rem; }
  .btn { padding: 0.8rem 1.6rem; }
}

@media (hover: none) {
  .btn-primary:hover {
    transform: none;
    background: #6b3a2f;
    box-shadow: 0 8px 20px rgba(107, 58, 47, 0.25);
  }
}
