:root {
  --bg: #070a0f;
  --panel: #0d1219;
  --border: #1c2632;
  --text: #e6edf3;
  --muted: #8b98a5;
  --cyan: #67e8f9;
  --sky: #7dd3fc;
  --amber: #fbbf24;
  --mint: #34d399;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  align-self: center;
}

.brand h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.tagline {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.stats {
  display: flex;
  gap: 22px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--mint);
}

.stat-value.amber {
  color: var(--amber);
}

.stat-value.dim {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- stage ---------- */

.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(103, 232, 249, 0.05), transparent 60%),
    var(--bg);
  padding: 14px;
}

#sim {
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  max-width: 100%;
  max-height: 100%;
}

.progress {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sky), var(--mint));
  transition: width 0.2s ease-out;
}

/* ---------- controls ---------- */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.controls-group {
  display: flex;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #131b25;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  background: #1a2532;
  border-color: #2b3a4c;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn.primary {
  background: #0e2a33;
  border-color: #155e70;
  color: var(--cyan);
}

.btn.primary:hover {
  background: #123844;
}

.speed {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.speed input[type="range"] {
  width: 160px;
  accent-color: var(--cyan);
}

.speed-val {
  font-family: var(--mono);
  color: var(--text);
  min-width: 48px;
}

@media (max-width: 720px) {
  .stats {
    gap: 14px;
  }
  .tagline {
    display: none;
  }
}
