:root {
  --bg: #0f1419;
  --card: #1a2332;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --success: #22c55e;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(34, 197, 94, 0.08), transparent);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.gauge-wrap {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
}

.gauge {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
}

.gauge-bg {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-linecap: round;
}

.gauge-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.speed-display {
  position: absolute;
  left: 50%;
  bottom: 28%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.speed-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.speed-unit {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.phase-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.btn-start {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-start:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-start:active:not(:disabled) {
  transform: translateY(0);
}

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

.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.result-item {
  text-align: center;
}

.result-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.result-value {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hint {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-version {
  display: block;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-sep {
  opacity: 0.5;
  user-select: none;
}

@media (max-width: 400px) {
  .speed-value {
    font-size: 2rem;
  }
  .results {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
