:root {
  --pink-50: #fff5f8;
  --pink-100: #ffe9f0;
  --pink-200: #ffd5e3;
  --pink-400: #ff7cab;
  --pink-500: #ff5f98;
  --pink-600: #ff3f85;
  --rose-500: #ff4b6e;
  --red-500: #ff335c;
  --white: #ffffff;
  --text: #7a2042;
  --shadow: 0 12px 30px rgba(255, 76, 126, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 164, 196, 0.35), transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(255, 130, 175, 0.32), transparent 38%),
    linear-gradient(145deg, var(--pink-50), var(--pink-100));
  color: var(--text);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  touch-action: manipulation;
}

body.intro-active {
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 82, 137, 0.28), transparent 40%),
    radial-gradient(circle at 75% 25%, rgba(196, 0, 74, 0.35), transparent 45%),
    linear-gradient(160deg, #1b0820, #30091d 48%, #220512);
}

.sparkle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 75% 20%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 65% 75%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 35% 80%, #fff 0 2px, transparent 3px);
  animation: twinkle 4s ease-in-out infinite alternate;
}

.app {
  width: min(94vw, 620px);
  text-align: center;
  padding: 28px 18px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  animation: fadeUp 900ms ease both;
  pointer-events: none;
  opacity: 0;
  transform: translateY(55vh) scale(0.7);
}

.app.app-enter {
  animation: cardEntry 980ms cubic-bezier(0.2, 0.95, 0.22, 1) forwards;
}

.app.app-pop {
  animation: cardPop 460ms ease-out forwards;
}

.app.app-ready {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.app > * {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.app.app-ready > * {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 480ms ease, transform 480ms ease;
}

.app.app-ready > :nth-child(1) {
  transition-delay: 40ms;
}

.app.app-ready > :nth-child(2) {
  transition-delay: 120ms;
}

.app.app-ready > :nth-child(3) {
  transition-delay: 200ms;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 90, 145, 0.24), transparent 45%),
    radial-gradient(circle at 70% 30%, rgba(255, 47, 109, 0.3), transparent 45%),
    linear-gradient(165deg, rgba(17, 3, 15, 0.9), rgba(49, 7, 28, 0.88));
  opacity: 1;
  transition: opacity 700ms ease;
}

.intro-overlay.done {
  opacity: 0;
}

.countdown {
  font-family: "Baloo 2", cursive;
  font-size: clamp(4rem, 16vw, 8.5rem);
  font-weight: 800;
  color: #ffd8e6;
  text-shadow: 0 10px 25px rgba(255, 78, 138, 0.55);
  transform: scale(0.4);
  opacity: 0;
}

.countdown.animate {
  animation: countPulse 660ms ease both;
}

.rabbit-wrap {
  width: 170px;
  height: 158px;
  margin: 2px auto 10px;
  display: grid;
  place-items: center;
  position: relative;
}

.rabbit {
  --rabbit-scale: 1.35;
  width: 94px;
  height: 92px;
  position: relative;
  animation: bunnyIdle 2s ease-in-out infinite;
}

.face {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 88px;
  height: 74px;
  background: #fff;
  border-radius: 46px 46px 40px 40px;
  transform: translateX(-50%);
  box-shadow: 0 10px 20px rgba(255, 112, 160, 0.18);
}

.ear {
  position: absolute;
  top: 0;
  width: 24px;
  height: 54px;
  background: #fff;
  border-radius: 20px;
  transform-origin: center bottom;
}

.ear::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 10px;
  height: 34px;
  background: #ffc1d6;
  border-radius: 12px;
  transform: translateX(-50%);
}

.ear-left {
  left: 18px;
  transform: rotate(-8deg);
}

.ear-right {
  right: 18px;
  transform: rotate(8deg);
}

.eye {
  position: absolute;
  top: 52px;
  width: 8px;
  height: 8px;
  background: #80324f;
  border-radius: 50%;
}

.eye-left {
  left: 31px;
}

.eye-right {
  right: 31px;
}

.blush {
  position: absolute;
  top: 59px;
  width: 12px;
  height: 7px;
  background: rgba(255, 127, 169, 0.45);
  border-radius: 999px;
}

.blush-left {
  left: 18px;
}

.blush-right {
  right: 18px;
}

.nose {
  position: absolute;
  left: 50%;
  top: 57px;
  width: 10px;
  height: 8px;
  background: #ff7ea9;
  border-radius: 999px 999px 70% 70%;
  transform: translateX(-50%);
}

.mouth {
  position: absolute;
  left: 50%;
  top: 66px;
  width: 22px;
  height: 10px;
  border-bottom: 3px solid #80324f;
  border-radius: 0 0 18px 18px;
  transform: translateX(-50%);
}

.tear {
  position: absolute;
  top: 58px;
  width: 6px;
  height: 10px;
  background: #89d7ff;
  border-radius: 999px;
  opacity: 0;
}

.tear-left {
  left: 25px;
}

.tear-right {
  right: 25px;
}

h1 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 2.25rem);
  line-height: 1.2;
  color: #842044;
  letter-spacing: 0.2px;
  transition: transform 300ms ease;
}

.btn-zone {
  width: min(92vw, 450px);
  height: 170px;
  margin: 18px auto 6px;
  position: relative;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: clamp(1rem, 3.2vw, 1.1rem);
  font-weight: 700;
  font-family: "Baloo 2", cursive;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

#yesBtn {
  --yes-scale: 1;
  background: linear-gradient(145deg, var(--pink-500), var(--pink-600));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(255, 59, 125, 0.35);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--yes-scale));
}

#yesBtn:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 30px rgba(255, 59, 125, 0.45);
}

#noBtn {
  background: var(--white);
  color: var(--pink-600);
  border: 2px solid var(--pink-200);
  box-shadow: 0 8px 16px rgba(255, 92, 145, 0.2);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
}

.celebrate .rabbit-wrap,
.app.rabbit-happy .rabbit-wrap {
  animation: bunnyHop 620ms ease-in-out infinite;
}

.app.rabbit-happy .eye {
  height: 4px;
  border-radius: 999px;
}

.app.rabbit-happy .mouth {
  width: 26px;
  height: 12px;
  border-bottom-width: 4px;
}

.app.rabbit-sad .rabbit {
  animation: bunnySad 420ms ease-in-out infinite alternate;
}

.app.rabbit-sad .eye {
  transform: scaleY(0.75);
}

.app.rabbit-sad .mouth {
  border-bottom: 0;
  border-top: 3px solid #80324f;
  border-radius: 16px 16px 0 0;
  top: 68px;
}

.app.rabbit-sad .ear-left {
  transform: rotate(-24deg);
}

.app.rabbit-sad .ear-right {
  transform: rotate(24deg);
}

.app.rabbit-sad .tear {
  opacity: 0.95;
  animation: tearDrop 500ms ease-in infinite;
}

.celebrate h1 {
  animation: popText 520ms ease;
  color: #8b0035;
}

.celebrate #yesBtn {
  animation: yesBounce 600ms ease;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

@keyframes bunnyIdle {
  0%, 100% { transform: translateY(0) scale(var(--rabbit-scale)); }
  50% { transform: translateY(-4px) scale(var(--rabbit-scale)); }
}

@keyframes bunnyHop {
  0%, 100% { transform: translateY(0) scale(var(--rabbit-scale)); }
  30% { transform: translateY(-10px) scale(calc(var(--rabbit-scale) * 1.04)); }
  60% { transform: translateY(0) scale(calc(var(--rabbit-scale) * 0.98)); }
}

@keyframes bunnySad {
  0% { transform: translateY(0) scale(var(--rabbit-scale)); }
  100% { transform: translateY(2px) scale(var(--rabbit-scale)); }
}

@keyframes tearDrop {
  0% {
    transform: translateY(0);
    opacity: 0.95;
  }
  100% {
    transform: translateY(14px);
    opacity: 0;
  }
}

@keyframes popText {
  0% { transform: scale(1); }
  35% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@keyframes yesBounce {
  0% { transform: translate(-50%, -50%) scale(var(--yes-scale, 1)); }
  35% { transform: translate(-50%, -50%) scale(calc(var(--yes-scale, 1) * 1.12)); }
  100% { transform: translate(-50%, -50%) scale(var(--yes-scale, 1)); }
}

@keyframes twinkle {
  from { opacity: 0.16; }
  to { opacity: 0.35; }
}

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

@keyframes countPulse {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }
  25% {
    opacity: 1;
    transform: scale(1.08);
  }
  70% {
    opacity: 1;
    transform: scale(0.98);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes cardEntry {
  0% {
    opacity: 0;
    transform: translateY(60vh) scale(0.62);
  }
  80% {
    opacity: 1;
    transform: translateY(-4px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardPop {
  0% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-3px) scale(1.06);
  }
  45% {
    transform: translateX(-4px) scale(1.02);
  }
  60% {
    transform: translateX(4px) scale(1.02);
  }
  78% {
    transform: translateX(-2px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .app {
    border-radius: 22px;
    padding: 22px 14px 12px;
  }

  .btn-zone {
    height: 160px;
  }

  .rabbit-wrap {
    transform: scale(0.95);
  }
}
