@font-face {
  font-family: 'Quicksand';
  src: url('fonts/Quicksand/Quicksand-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/Playfair_Display/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink-100: #ffe6f2;
  --pink-200: #ffc6e3;
  --pink-300: #ff9dcc;
  --pink-400: #ff6bb3;
  --pink-500: #ff359a;
  --berry-500: #b41463;
  --berry-700: #7a1d4c;
  font-family: 'Quicksand', 'Playfair Display', 'Segoe UI', sans-serif;
  color: var(--berry-500);
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: var(--pink-200);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(circle at top, var(--pink-100), var(--pink-300));
  background-color: var(--pink-200);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}

.sparkle-layer {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 40%);
  background-size: 180px 180px;
  filter: blur(0.5px);
  animation: sparkleShift 16s linear infinite;
  pointer-events: none;
  opacity: 0.35;
}

.glow-orb {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.55;
  pointer-events: none;
}

.orb-one {
  background: var(--pink-200);
  top: 5%;
  left: 10%;
}

.orb-two {
  background: var(--pink-400);
  bottom: 8%;
  right: 8%;
}

.stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.sticker-shell {
  position: absolute;
}

.stickers img {
  display: block;
  opacity: 0.75;
  filter: drop-shadow(0 10px 20px rgba(180, 20, 99, 0.25));
  transform-origin: center;
}

.storybook-card {
  position: relative;
  width: min(520px, 90vw);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.8rem;
  padding: clamp(1.8rem, 5vw, 2.8rem);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 80px rgba(180, 20, 99, 0.2);
  backdrop-filter: blur(18px);
  z-index: 2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--berry-500);
  margin-bottom: 0.6rem;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 1.5rem;
  color: var(--berry-500);
  text-shadow: 0 10px 30px rgba(180, 20, 99, 0.15);
}

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

.button-shell {
  width: min(220px, 100%);
  height: 64px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Quicksand', sans-serif;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  touch-action: manipulation;
}

.btn-yes {
  background: linear-gradient(130deg, var(--pink-400), var(--pink-500));
  color: #fff;
  box-shadow: 0 15px 40px rgba(255, 53, 154, 0.35);
}

.btn-yes:active,
.btn-yes:hover {
  transform: translateY(-3px);
}

.btn-no {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(180, 20, 99, 0.35);
  color: var(--berry-500);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.not-option {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2rem;
  border: 1px dashed rgba(180, 20, 99, 0.4);
  background: rgba(255, 255, 255, 0.8);
  color: var(--berry-500);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.not-option.visible {
  opacity: 1;
  animation: optionWiggle 0.9s ease-in-out infinite;
}

.answer-message {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 0;
  color: var(--berry-500);
}

.celebration {
  margin-top: 2rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.celebration.visible {
  opacity: 1;
  max-height: 200px;
}

.celebration-heart {
  font-size: 3.5rem;
  animation: thump 1.3s ease infinite;
}

.confetti-piece {
  position: fixed;
  top: -10vh;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  animation: confettiFall 3.6s linear forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes sparkleShift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-90px, -90px, 0);
  }
}

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

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

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--confetti-wobble, 15px), 110vh) rotate(480deg);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .storybook-card {
    border-radius: 1.3rem;
    padding: 1.5rem;
  }

  .buttons {
    flex-direction: column;
  }

  .button-shell {
    width: 100%;
  }
}
