:root {
  --ink: 33 25 40;
  --muted: 120 108 130;
  --accent: 236 72 153;
  --success: 34 197 94;
  --border: 234 224 240;

  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

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

body {
  min-height: 100vh;
  font-family: 'Poppins', system-ui, sans-serif;
  color: rgb(var(--ink));
  background: radial-gradient(120% 100% at 15% 0%, #ffe1ef 0%, #ffe9d6 45%, #e4ecff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

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

.stage {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.card {
  background: white;
  border: 1px solid rgb(var(--border));
  border-radius: 22px;
  padding: 2.25rem 2rem;
  text-align: center;
  box-shadow: 0 30px 60px -30px rgb(var(--accent) / 0.35);
}

.card--success[hidden],
.card[hidden] {
  display: none;
}

.card--success {
  animation: pop-in 420ms var(--ease-out-expo);
}

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

@media (prefers-reduced-motion: reduce) {
  .card--success {
    animation: none;
  }
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgb(var(--accent) / 0.12);
  color: rgb(var(--accent));
  margin-bottom: 1.1rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.lede {
  color: rgb(var(--muted));
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.6rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1.5px solid rgb(var(--border));
  border-radius: 12px;
  outline: none;
  transition: border-color 200ms ease;
}

input:focus {
  border-color: rgb(var(--accent));
}

button {
  width: 100%;
  padding: 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  background: rgb(var(--accent));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 150ms var(--ease-out-quad),
    background-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  button:hover {
    background: rgb(219 39 119);
  }
}

button:active {
  transform: scale(0.98);
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.card--success h1 {
  color: rgb(var(--success));
}

.btn-ghost {
  background: rgb(var(--border) / 0.6);
  color: rgb(var(--muted));
  margin-top: 0.4rem;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    background: rgb(var(--border));
    color: rgb(var(--ink));
  }
}
