*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0a1a;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f8f4ff;
  --muted: #c4b8d9;
  --accent: #ff6b9d;
  --accent-2: #c77dff;
  --yes: #3dd68c;
  --yes-hover: #2bc47a;
  --no: #ff7b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #2a1545 0%, var(--bg) 55%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.shape-1 {
  width: 420px;
  height: 420px;
  background: #7b2cbf;
  top: -120px;
  left: -80px;
  animation: float 12s ease-in-out infinite;
}

.shape-2 {
  width: 360px;
  height: 360px;
  background: #ff6b9d;
  bottom: -100px;
  right: -60px;
  animation: float 14s ease-in-out infinite reverse;
}

.shape-3 {
  width: 280px;
  height: 280px;
  background: #4cc9f0;
  top: 40%;
  left: 60%;
  animation: float 10s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -20px) scale(1.05); }
}

.card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 2.5rem 2rem 2rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.fade-out {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent-2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.25rem;
  line-height: 1.1;
}

.message {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 2rem;
}

.message strong {
  color: #ffd6e8;
  font-weight: 600;
}

.message .sub {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}

.buttons {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  min-height: 56px;
  margin-bottom: 1.25rem;
  touch-action: manipulation;
}

.buttons.play-zone {
  min-height: 140px;
}

.btn {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-yes {
  background: linear-gradient(135deg, var(--yes) 0%, #2dd4a0 100%);
  color: #062a1a;
  box-shadow: 0 8px 24px rgba(61, 214, 140, 0.35);
}

.btn-yes:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 32px rgba(61, 214, 140, 0.45);
}

.btn-yes:active {
  transform: scale(0.98);
}

.btn-no {
  position: relative;
  background: rgba(255, 123, 123, 0.15);
  color: #ffb4b4;
  border: 1px solid rgba(255, 123, 123, 0.35);
  transition: left 0.2s ease, top 0.2s ease, transform 0.2s ease;
}

.btn-no.is-dodging {
  position: absolute;
  z-index: 2;
}

.btn-no:hover {
  background: rgba(255, 123, 123, 0.22);
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0.85;
}

.hint.bounce {
  animation: hint-bounce 0.5s ease;
}

@keyframes hint-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); color: var(--accent); }
}

/* Celebration overlay */
.celebration {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 10, 26, 0.75);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.6s ease;
}

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

.celebration-inner {
  position: relative;
  text-align: center;
  padding: 2.5rem 2rem;
  background: linear-gradient(160deg, rgba(255, 107, 157, 0.15), rgba(199, 125, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  max-width: 420px;
  animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.celebration h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2rem);
  margin-bottom: 0.75rem;
}

.celebration p {
  color: var(--muted);
  line-height: 1.6;
}

.hearts {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 2rem;
}

.hearts span {
  animation: heart-float 1.2s ease-in-out infinite;
}

.hearts span:nth-child(2) { animation-delay: 0.2s; }
.hearts span:nth-child(3) { animation-delay: 0.4s; }
.hearts span:nth-child(4) { animation-delay: 0.6s; }

@keyframes heart-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0.6;
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Yes button pulse after celebration */
.btn-yes.pulse {
  animation: yes-pulse 0.6s ease;
}

@keyframes yes-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(61, 214, 140, 0.35); }
  50% { box-shadow: 0 0 40px rgba(61, 214, 140, 0.8); }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding-top: max(1.5rem, env(safe-area-inset-top));
  }

  .card {
    padding: 1.75rem 1.25rem 1.5rem;
    margin-top: 0.5rem;
    border-radius: 22px;
  }

  .eyebrow {
    font-size: 0.75rem;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
    margin-bottom: 1rem;
  }

  .message {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }

  .message .sub {
    font-size: 0.88rem;
  }

  .buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    min-height: 130px;
    padding: 0.5rem 0;
  }

  .buttons.play-zone {
    min-height: 160px;
  }

  .btn {
    min-height: 48px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }

  .btn-yes {
    flex-shrink: 0;
    width: auto;
    max-width: none;
  }

  .btn-no:not(.is-dodging) {
    flex-shrink: 0;
    width: auto;
    max-width: none;
  }

  .hint {
    font-size: 0.85rem;
    padding: 0 0.25rem;
  }

  .celebration-inner {
    padding: 2rem 1.25rem;
    margin: 0 0.5rem;
  }
}
