:root {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --accent: #38bdf8;
  --accent-2: #f87171;
  --text: #f1f5f9;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  padding: 24px;
}

.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
}

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

.display {
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

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

.btn {
  flex: 1;
  padding: 14px 0;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #334155;
  color: var(--text);
  transition: transform 0.1s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover:not(:disabled) {
  background: #475569;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #0f172a;
}

.btn-primary:hover:not(:disabled) {
  background: #7dd3fc;
}

.btn-primary.running {
  background: var(--accent-2);
  color: #1e0a0a;
}

.btn-primary.running:hover:not(:disabled) {
  background: #fca5a5;
}

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

.laps li {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #334155;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

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

.laps::-webkit-scrollbar {
  width: 6px;
}

.laps::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}
