:root{
  --bg: #0b1020;
  --surface: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --ring: #6366f1;
  --ring-2: rgba(99,102,241,.2);
  --btn: #111827;
  --btn-bd: #1f2937;
  --btn-hov: #1b2436;
  --selected: #1d2444;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

@media (prefers-color-scheme: light) {
  :root{
    --bg: #f4f6fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --ring: #4f46e5;
    --ring-2: rgba(79,70,229,.15);
    --btn: #f8fafc;
    --btn-bd: #e5e7eb;
    --btn-hov: #eef2f7;
    --selected: #eef2ff;
    --shadow: 0 12px 30px rgba(2,6,23,.08);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -20%, rgba(99,102,241,.25), transparent 60%),
              radial-gradient(1200px 600px at 100% 120%, rgba(59,130,246,.2), transparent 55%),
              var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

#welcome-message{
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.card{
  width: min(960px, 100%);
  background: var(--surface);
  border: 1px solid var(--btn-bd);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 3.5vw, 40px);
}

header h2{
  margin: 0 0 6px 0;
  font-size: clamp(22px, 3.2vw, 34px);
  letter-spacing: -0.02em;
}
header p{ margin: 0; color: var(--muted); }

.amount-grid{
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}

.amount{
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--btn-bd);
  background: var(--btn);
  color: var(--text);
  border-radius: 16px;
  padding: 18px 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .05s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.amount .value{ font-size: 22px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.amount:hover{ background: var(--btn-hov); }
.amount:active{ transform: translateY(1px); }
.amount:focus-visible{
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 4px var(--ring-2);
}
.amount.selected{
  border-color: var(--ring);
  background: var(--selected);
  box-shadow: 0 0 0 4px var(--ring-2), inset 0 -18px 30px rgba(99,102,241,.08);
}

.selection{
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
}

.footer{
  margin-top: 26px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.cta{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: linear-gradient(180deg, #7c8bff, #4f46e5);
  color: white;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: filter .15s ease, transform .06s ease;
}
.cta:disabled{ filter: grayscale(.35) brightness(.85); opacity: .75; cursor: not-allowed; }
.cta:active{ transform: translateY(1px); }

.hint{ color: var(--muted); font-size: 14px; }
.spacer{ flex: 1 1 auto; }