@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Manrope:wght@400;600&display=swap');

:root {
  --bg-black: #050506;
  --red-900: #3b000a;
  --red-700: #8b001a;
  --red-500: #d21f36;
  --red-300: #ff5b71;
  --white: #f7f5f6;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
  --glass: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.2);
  --bounce: cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Fraunces", "Georgia", serif;
  color: var(--white);
  background: var(--bg-black);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.blobs {
  position: fixed;
  inset: -20vh;
  z-index: 0;
  filter: blur(90px) saturate(140%);
}

.blob {
  position: absolute;
  width: 40vmax;
  height: 40vmax;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--red-300), transparent 60%);
  opacity: 0.7;
  animation: drift 18s var(--bounce) infinite alternate;
}

.b1 { top: 10%; left: 15%; animation-duration: 22s; }
.b2 { top: 45%; right: 5%; animation-duration: 19s; animation-delay: -6s; }
.b3 { bottom: 10%; left: 35%; animation-duration: 26s; animation-delay: -10s; }

.card {
  position: relative;
  z-index: 2;
  width: min(560px, 90vw);
  padding: 48px 48px 40px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.2));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: center;
  animation: floatIn 1.1s var(--bounce);
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  background: rgba(210, 31, 54, 0.18);
  border: 1px solid rgba(255, 91, 113, 0.3);
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.subtitle {
  font-family: "Manrope", "Helvetica", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
}

.actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn {
  --tx: 0px;
  --ty: 0px;
  --scale: 1;
  border: none;
  padding: 14px 30px;
  font-size: 1.05rem;
  border-radius: 14px;
  cursor: pointer;
  font-family: "Manrope", "Helvetica", sans-serif;
  font-weight: 600;
  transition: transform 220ms var(--bounce), box-shadow 220ms var(--bounce), background 220ms ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translate(var(--tx), var(--ty)) scale(var(--scale));
}

.btn:focus-visible {
  outline: 2px solid var(--red-300);
  outline-offset: 3px;
}

.btn.yes {
  background: linear-gradient(140deg, var(--red-500), var(--red-700));
  color: var(--white);
}

.btn.no {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:hover {
  --scale: 1.06;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.btn:active {
  --scale: 0.98;
}

.result {
  min-height: 28px;
  font-family: "Manrope", "Helvetica", sans-serif;
  font-size: 1.1rem;
  color: var(--red-300);
  letter-spacing: 0.02em;
}

.yay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  text-shadow: 0 20px 60px rgba(210, 31, 54, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
  z-index: 3;
}

.yay::before {
  content: "";
  position: absolute;
  width: min(80%, 420px);
  height: min(60%, 220px);
  border-radius: 24px;
  background: rgba(210, 31, 54, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 200ms ease, transform 200ms ease;
}

.card.celebrate .yay {
  animation: yayPop 1.2s var(--bounce) forwards;
}

.card.celebrate .yay::before {
  opacity: 1;
  transform: scale(1);
}

.card.celebrate .heart {
  animation-duration: 3.6s;
  opacity: 0.95;
}

.card.shake {
  animation: shake 0.6s ease;
}

.heart-stream {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--red-500);
  transform: rotate(45deg);
  opacity: 0.85;
  animation: floatUp 6s ease-in infinite;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: inherit;
}

.heart::before { top: -10px; left: 0; }
.heart::after { left: -10px; top: 0; }

.h1 { left: 15%; animation-delay: -1s; }
.h2 { left: 35%; animation-delay: -3s; opacity: 0.6; }
.h3 { left: 55%; animation-delay: -2s; opacity: 0.75; }
.h4 { left: 75%; animation-delay: -4s; opacity: 0.6; }
.h5 { left: 90%; animation-delay: -5s; opacity: 0.5; }

@keyframes floatIn {
  0% { transform: translateY(30px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(80px, -60px, 0) scale(1.15); }
}

@keyframes floatUp {
  0% { transform: translateY(120%) rotate(45deg) scale(0.8); }
  100% { transform: translateY(-160%) rotate(45deg) scale(1.2); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes yayPop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
  .card {
    padding: 36px 28px 30px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
