﻿:root {
  --bg-1: #fff0f4;
  --bg-2: #ffd9e6;
  --bg-3: #fff7ec;
  --card: #fffafc;
  --text: #5a1f34;
  --yes: #ea4c89;
  --no: #f7e7ee;
  --shadow: 0 16px 48px rgba(165, 43, 92, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
}

body {
  background: radial-gradient(circle at 20% 20%, var(--bg-3), transparent 45%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.card {
  width: min(92vw, 560px);
  min-height: 460px;
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 28px 20px;
  position: relative;
  overflow: hidden;
}

.question-state,
.success-state {
  width: 100%;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.question-state {
  justify-content: center;
  gap: 8px;
  animation: fadeIn 0.5s ease;
}

.question {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 2.8rem);
  line-height: 1.1;
}

.fine-print {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  opacity: 0.75;
}

.button-zone {
  width: min(100%, 460px);
  height: 250px;
  margin-top: 14px;
  position: relative;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  touch-action: manipulation;
  min-width: 102px;
  min-height: 50px;
}

.btn:focus-visible,
.tiny-btn:focus-visible {
  outline: 3px solid #7a2b4f;
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-yes {
  position: absolute;
  background: var(--yes);
  color: #fff;
  z-index: 6;
  pointer-events: auto;
}

.btn-yes:hover {
  filter: brightness(1.05);
}

.btn-no {
  position: absolute;
  background: var(--no);
  color: #653244;
  border: 1px solid #e8c9d6;
  z-index: 2;
}

.btn-no.shake {
  animation: tinyShake 0.28s linear;
}

.success-state {
  justify-content: center;
  gap: 14px;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.success-title {
  margin: 0;
  font-size: clamp(1.5rem, 4.8vw, 2.1rem);
  color: #b83167;
}

.success-image {
  width: min(88vw, 390px);
  max-width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 16px 34px rgba(112, 30, 66, 0.24);
  opacity: 0;
  transform: scale(0.75) translateY(18px);
}

.success-image.in {
  animation: imagePop 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.tiny-btn {
  border: 0;
  background: #f4d9e5;
  color: #612a3f;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
}

.tiny-btn.show {
  animation: revealTiny 0.45s ease forwards;
}

.hidden {
  display: none;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 20;
}

@keyframes tinyShake {
  0% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

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

@keyframes imagePop {
  0% {
    opacity: 0;
    transform: scale(0.75) translateY(18px);
  }
  60% {
    opacity: 1;
    transform: scale(1.04) translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@media (max-width: 480px) {
  .card {
    min-height: 640px;
  }

  .question-state,
  .success-state {
    min-height: 560px;
  }

  .button-zone {
    height: 380px;
    margin-top: 18px;
  }
}
