:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(ellipse at 50% 120%, #2a1450 0%, #0b0818 60%, #05030d 100%);
  color: #fff;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
main {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 1rem; text-align: center;
}
h1 { margin: 0; font-size: 1.2rem; letter-spacing: .5em; text-transform: uppercase; opacity: .6; font-weight: 600; }
.count {
  margin: 0; font-size: clamp(4rem, 18vw, 9rem); font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1;
  text-shadow: 0 0 30px rgba(255, 90, 90, .5);
}
.count.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.25) rotate(-2deg); } 100% { transform: scale(1); } }

button {
  position: relative; width: min(60vw, 280px); aspect-ratio: 1; border-radius: 50%;
  border: 0; cursor: pointer; color: #fff;
  font-size: clamp(1.5rem, 6vw, 2.2rem); font-weight: 900; letter-spacing: .15em;
  background: radial-gradient(circle at 35% 30%, #ff8a8a 0%, #e51d1d 45%, #9c0808 100%);
  box-shadow: 0 12px 0 #5e0303, 0 18px 40px rgba(255, 0, 0, .45), inset 0 -6px 14px rgba(0,0,0,.35), inset 0 6px 14px rgba(255,255,255,.35);
  transition: transform .06s, box-shadow .06s;
  -webkit-tap-highlight-color: transparent;
  animation: pulse 2.4s ease-in-out infinite;
}
button:hover { filter: brightness(1.08); }
button:active, button.down {
  transform: translateY(10px);
  box-shadow: 0 2px 0 #5e0303, 0 6px 20px rgba(255, 0, 0, .5), inset 0 -4px 10px rgba(0,0,0,.35), inset 0 4px 10px rgba(255,255,255,.3);
}
button:focus-visible { outline: 4px solid #fff; outline-offset: 6px; }
@keyframes pulse { 50% { filter: brightness(1.12); } }

.hint { margin: 0; opacity: .4; font-size: .85rem; }
.hint:empty { display: none; }

/* CSS sparkle bursts: small DOM stars flung out from the click point */
.spark {
  position: fixed; z-index: 3; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  pointer-events: none; background: var(--c); box-shadow: 0 0 10px var(--c);
  animation: fly .9s cubic-bezier(.1, .7, .3, 1) forwards;
}
@keyframes fly {
  to { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  button { animation: none; }
  .count.bump { animation: none; }
}
