:root {
  --bg: #120808;
  --gold: #fbbf24;
  --crimson: #dc2626;
  --text: #fef2f2;
  --muted: #a8a29e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Syne", sans-serif;
  background: radial-gradient(circle at 50% 20%, #3f1212, var(--bg) 55%);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

header { text-align: center; padding: 2rem 1rem 0.5rem; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--gold), var(--crimson));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub { color: var(--muted); font-family: "DM Mono", monospace; font-size: 0.85rem; }

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  position: relative;
}

.pulse-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid rgba(251, 191, 36, 0.35);
  background: radial-gradient(circle, rgba(220, 38, 38, 0.25), transparent 70%);
  transition: transform 0.05s ease-out;
}

.pulse-ring.hit {
  transform: scale(1.12);
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.45);
  animation: thump 0.12s ease-out;
}

@keyframes thump {
  from { transform: scale(1.18); }
  to { transform: scale(1.12); }
}

.bpm-display {
  font-family: "DM Mono", monospace;
  font-size: 2rem;
  margin: 1.25rem 0;
}

.bpm-display span { color: var(--gold); font-weight: 500; }

.slider-label {
  width: min(360px, 90vw);
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="range"] { width: 100%; accent-color: var(--crimson); margin-top: 0.5rem; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  justify-content: center;
  margin-top: 1.5rem;
}

select, button {
  font-family: "Syne", sans-serif;
  border: 1px solid #44403c;
  background: #1c1917;
  color: var(--text);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
}

button.primary {
  background: linear-gradient(135deg, var(--crimson), #991b1b);
  border: none;
  font-weight: 700;
}

.beat-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
}

.beat-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #44403c;
  transition: background 0.1s, transform 0.1s;
}

.beat-dots span.on {
  background: var(--gold);
  transform: scale(1.25);
}

footer {
  text-align: center;
  padding: 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: "DM Mono", monospace;
}
