:root {
  --ink: #20121a;
  --muted: rgba(32, 18, 26, 0.7);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --stroke: rgba(32, 18, 26, 0.12);

  --rose: #ff2f6d;
  --coral: #ff6b6b;
  --peach: #ffb3a7;
  --cream: #fff2f5;
  --honey: #ffd166;
  --mint: #1bc6a3;

  --shadow: 0 26px 80px rgba(32, 18, 26, 0.18);
  --shadow-soft: 0 14px 40px rgba(32, 18, 26, 0.12);
  --radius: 26px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Quicksand", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--cream);
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(255, 47, 109, 0.20), transparent 60%),
    radial-gradient(900px 600px at 90% 30%, rgba(255, 209, 102, 0.20), transparent 60%),
    radial-gradient(1000px 700px at 50% 100%, rgba(27, 198, 163, 0.13), transparent 60%),
    linear-gradient(135deg, #fff7fb, #fff1ea);
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2320121a' stroke-opacity='0.18'%3E%3Cpath d='M54 46c0-10 8-18 18-18 8 0 13 4 18 10 5-6 10-10 18-10 10 0 18 8 18 18 0 19-36 40-36 40S54 65 54 46Z'/%3E%3Cpath d='M15 121c0-7 6-13 13-13 6 0 10 3 13 7 3-4 7-7 13-7 7 0 13 6 13 13 0 13-26 29-26 29s-26-16-26-29Z'/%3E%3Cpath d='M106 120c0-7 6-13 13-13 6 0 10 3 13 7 3-4 7-7 13-7 7 0 13 6 13 13 0 13-26 29-26 29s-26-16-26-29Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
  background-repeat: repeat;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.75;
  transform: translateZ(0);
  animation: blobFloat 10s ease-in-out infinite;
  mix-blend-mode: multiply;
}

.blob--a {
  width: 520px;
  height: 520px;
  left: -160px;
  top: -200px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 47, 109, 0.9), rgba(255, 107, 107, 0.0) 70%);
  animation-duration: 12s;
}

.blob--b {
  width: 520px;
  height: 520px;
  right: -200px;
  top: 40px;
  background: radial-gradient(circle at 40% 30%, rgba(255, 209, 102, 0.85), rgba(255, 209, 102, 0.0) 70%);
  animation-duration: 13.5s;
}

.blob--c {
  width: 580px;
  height: 580px;
  left: 25%;
  bottom: -320px;
  background: radial-gradient(circle at 50% 40%, rgba(27, 198, 163, 0.78), rgba(27, 198, 163, 0.0) 70%);
  animation-duration: 14.5s;
}

.shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px 18px 18px;
}

.card {
  width: min(740px, 100%);
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  animation: riseIn 700ms cubic-bezier(0.2, 1, 0.2, 1) both;
}

.card__header {
  padding: 18px 18px 0;
}

.pills {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(32, 18, 26, 0.12);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 18px rgba(32, 18, 26, 0.08);
}

.pill--soft {
  background: linear-gradient(135deg, rgba(255, 47, 109, 0.12), rgba(255, 209, 102, 0.14));
}

.card__body {
  padding: 18px 18px 22px;
}

.title {
  margin: 10px 0 6px;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.title--small {
  font-size: clamp(26px, 3.6vw, 38px);
}

.subtitle {
  margin: 0 0 18px;
  font-size: clamp(14px, 2.3vw, 18px);
  font-weight: 600;
  color: var(--muted);
}

.playground {
  position: relative;
  isolation: isolate;
  height: 176px;
  border-radius: 22px;
  border: 1px solid rgba(32, 18, 26, 0.12);
  background:
    radial-gradient(520px 190px at 20% 10%, rgba(255, 47, 109, 0.18), transparent 60%),
    radial-gradient(520px 220px at 80% 90%, rgba(255, 209, 102, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.48));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.playground::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.62), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.5), transparent 45%);
  opacity: 0.6;
  pointer-events: none;
}

.btn {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(32, 18, 26, 0.16);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 10px 22px rgba(32, 18, 26, 0.14);
}

.btn--yes {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 14px 26px;
  min-width: 140px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  filter: saturate(1.06);
  outline: 2px solid rgba(255, 47, 109, 0.14);
  outline-offset: 3px;
  animation: yesPulse 2.4s ease-in-out infinite;
}

.btn--yes:hover {
  transform: translateX(-50%) translateY(-1px);
  filter: saturate(1.12) brightness(1.02);
  box-shadow: 0 18px 36px rgba(255, 47, 109, 0.26);
}

.btn__shine {
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-130%);
  opacity: 0.9;
  pointer-events: none;
}

.btn--yes:hover .btn__shine {
  animation: shine 900ms ease both;
}

.btn--no {
  position: absolute;
  z-index: 3;
  left: 56%;
  top: 44%;
  padding: 12px 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(32, 18, 26, 0.18);
  box-shadow: 0 12px 26px rgba(32, 18, 26, 0.12);
  transition:
    left 160ms cubic-bezier(0.2, 1, 0.2, 1),
    top 160ms cubic-bezier(0.2, 1, 0.2, 1),
    transform 140ms ease,
    box-shadow 140ms ease;
}

.btn--no:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(32, 18, 26, 0.12);
}

.hint {
  margin: 14px 0 0;
  font-weight: 700;
  color: rgba(32, 18, 26, 0.74);
}

.tries {
  margin: 6px 0 0;
  min-height: 1.2em;
  font-weight: 700;
  color: rgba(255, 47, 109, 0.92);
}

.note {
  margin-top: 10px;
  padding: 16px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(32, 18, 26, 0.18);
  background: rgba(255, 255, 255, 0.55);
}

.note__line {
  margin: 0 0 8px;
  font-weight: 650;
  color: rgba(32, 18, 26, 0.78);
}

.note__line:last-child {
  margin-bottom: 0;
}

.note__sig {
  margin: 10px 0 0;
  font-weight: 800;
  color: rgba(32, 18, 26, 0.92);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn--again {
  color: #fff;
  background: linear-gradient(135deg, rgba(27, 198, 163, 0.98), rgba(27, 198, 163, 0.72));
}

.btn--again:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(27, 198, 163, 0.22);
}

.btn--reset {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(32, 18, 26, 0.18);
}

.btn--reset:hover {
  transform: translateY(-1px);
}

.footer {
  margin-top: 18px;
  opacity: 0.8;
}

.footer__tiny {
  font-weight: 700;
  font-size: 12px;
  color: rgba(32, 18, 26, 0.65);
}

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

.confetti__piece {
  position: absolute;
  top: -12vh;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.92;
  transform: translateY(-12vh) rotate(var(--rot-start, 0deg));
  animation-name: confettiFall;
  animation-duration: var(--dur, 2s);
  animation-delay: var(--delay, 0s);
  animation-timing-function: cubic-bezier(0.18, 0.9, 0.25, 1);
  animation-fill-mode: forwards;
}

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

.heart {
  position: absolute;
  left: var(--x);
  top: calc(100% + 20px);
  font-size: var(--s);
  opacity: 0;
  transform: translateY(0) rotate(var(--r));
  animation: floatHeart var(--t) linear infinite;
  filter: drop-shadow(0 8px 10px rgba(32, 18, 26, 0.10));
}

.heart::before {
  content: "\\2665";
  color: rgba(255, 47, 109, 0.55);
}

@keyframes confettiFall {
  70% {
    opacity: 0.92;
  }
  100% {
    transform: translateY(112vh) rotate(var(--rot-end, 720deg));
    opacity: 0;
  }
}

@keyframes blobFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 18px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

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

@keyframes yesPulse {
  0%,
  100% {
    box-shadow: 0 14px 28px rgba(255, 47, 109, 0.18);
  }
  50% {
    box-shadow: 0 18px 40px rgba(255, 47, 109, 0.26);
  }
}

@keyframes shine {
  to {
    transform: translateX(130%);
  }
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(var(--r));
  }
  10% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translateY(-240px) rotate(calc(var(--r) * -1));
  }
}

@media (max-width: 520px) {
  .shell {
    padding-top: 22px;
  }

  .card__body {
    padding: 16px 14px 20px;
  }

  .playground {
    height: 188px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .card,
  .btn--yes,
  .confetti__piece,
  .heart {
    animation: none !important;
  }

  .btn {
    transition: none !important;
  }

  .btn--no {
    transition: none !important;
  }
}
