:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #22c55e;
  --danger: #ef4444;
  --neutral: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px 24px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1 {
  margin: 0 0 24px;
  font-size: 1.25rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.time {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 24px;
}

.buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

button {
  flex: 1;
  padding: 14px 0;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--neutral);
  color: var(--text);
  transition: opacity 0.15s ease, transform 0.1s ease;
}

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

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button.primary {
  background: var(--accent);
  color: #052e16;
}

button.primary.running {
  background: var(--danger);
  color: #450a0a;
}

.laps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
}

.laps li {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px;
  border-bottom: 1px solid var(--neutral);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.laps li:first-child {
  color: var(--text);
}
