:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e8eef4;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --error: #ef4444;
  --border: #2d3a4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, #1e293b 0%, var(--bg) 55%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

#startBtn {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

#startBtn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#startBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  margin: 1rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.running {
  color: var(--text);
}

.progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 3px;
  transition: width 0.25s ease;
}

.metrics {
  display: grid;
  gap: 0.75rem;
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.metric h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.value {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.error {
  margin: 1rem 0 0;
  color: var(--error);
  font-size: 0.9rem;
}

.card.done .status {
  color: var(--success);
}
