/* ============================================================================
 * APOLLO 11 EARTH-TO-MOON INTERACTIVE MISSION — STYLESHEET (ULTRA-REFINED)
 * High-craft NASA Houston MOCR + AGC DSKY + FDAI 8-Ball Telemetry UI
 * ============================================================================ */

:root {
  --bg-deep: #02050c;
  --bg-panel: rgba(7, 15, 30, 0.88);
  --bg-panel-elevated: rgba(13, 27, 52, 0.92);
  --border-subtle: rgba(56, 182, 255, 0.22);
  --border-bright: rgba(0, 229, 255, 0.58);

  --text-primary: #f0f6fc;
  --text-secondary: #94b8e0;
  --text-muted: #5d7ea3;

  --accent-cyan: #00e5ff;
  --accent-blue: #38bdf8;
  --accent-gold: #ffd166;
  --accent-amber: #f59e0b;
  --accent-flame: #ff6b35;
  --accent-green: #10b981;
  --dsky-green: #39ff88;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.mission-app {
  display: grid;
  grid-template-rows: 58px 1fr 112px;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 45%, #071328 0%, #02050c 100%);
}

/* ==================== TOP HEADER ==================== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(4, 10, 22, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  z-index: 20;
  gap: 10px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apollo-patch {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}

.brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  font-weight: 600;
}

.brand-main {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-telemetry-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(11, 24, 48, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 5px 13px;
  border-radius: 999px;
}

.met-box {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.met-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.met-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dsky-green);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(57, 255, 136, 0.35);
}

.header-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
}

.stage-pill-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-code-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 209, 102, 0.16);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 209, 102, 0.45);
}

.stage-name-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-mode-group {
  display: flex;
  background: rgba(9, 19, 38, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.mode-btn, .action-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.mode-btn:hover, .action-btn:hover {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.12);
}

.mode-btn.active {
  background: rgba(0, 229, 255, 0.18);
  color: var(--accent-cyan);
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.18);
}

.action-btn {
  background: rgba(11, 24, 46, 0.85);
  border-color: var(--border-subtle);
}

.action-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.14);
}

/* ==================== MAIN WORKSPACE GRID ==================== */
.main-workspace {
  display: grid;
  grid-template-columns: 266px 1fr 312px;
  gap: 10px;
  padding: 9px 12px;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
}

/* Cinema Full-Viewport Mode */
.main-workspace[data-cinema="true"] {
  grid-template-columns: 1fr;
}
.main-workspace[data-cinema="true"] .hud-sidebar {
  display: none;
}

.hud-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  z-index: 10;
}

.hud-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 9px 11px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ==================== LEFT SIDEBAR: STACK, FDAI 8-BALL & DSKY ==================== */
.stack-card {
  flex: 1.05;
  min-height: 0;
}

.stack-visualizer {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  flex: 1;
  justify-content: space-between;
  padding: 2px 0;
}

.stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(148, 184, 224, 0.16);
  background: rgba(15, 30, 58, 0.55);
  font-size: 10.5px;
  transition: all 0.22s ease;
}

.stack-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

.stack-item-state {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
}

.stack-item.status-active {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.11);
}
.stack-item.status-active .stack-item-state {
  color: var(--accent-cyan);
}

.stack-item.status-firing {
  border-color: rgba(255, 107, 53, 0.85);
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.26), rgba(255, 209, 102, 0.14));
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.25);
}
.stack-item.status-firing .stack-item-state {
  color: var(--accent-gold);
  font-weight: 700;
}

.stack-item.status-jettisoned {
  opacity: 0.34;
  border-style: dashed;
}
.stack-item.status-jettisoned .stack-item-state {
  color: var(--text-muted);
}

.stack-legend {
  display: flex;
  justify-content: space-around;
  padding-top: 5px;
  border-top: 1px solid rgba(148, 184, 224, 0.12);
  font-size: 9.5px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  display: inline-block;
}
.dot.firing { background: var(--accent-flame); box-shadow: 0 0 6px var(--accent-flame); }
.dot.active { background: var(--accent-cyan); }
.dot.jettisoned { background: var(--text-muted); }

/* FDAI "8-Ball" Attitude Card */
.fdai-card {
  flex: 0.65;
}

.fdai-mode-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.28);
  padding: 1px 6px;
  border-radius: 4px;
}

.fdai-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

#fdaiCanvas {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid #334155;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 229, 255, 0.12);
  flex-shrink: 0;
}

.fdai-readouts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.fdai-axis-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 22, 42, 0.75);
  border: 1px solid rgba(56, 182, 255, 0.15);
  padding: 3px 7px;
  border-radius: 4px;
}

.axis-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-secondary);
}

.axis-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

/* DSKY Guidance Computer Card */
.dsky-card {
  flex: 0.92;
}

.dsky-contact-light {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 28, 48, 0.8);
  color: rgba(148, 184, 224, 0.35);
  border: 1px solid rgba(148, 184, 224, 0.2);
  transition: all 0.2s ease;
}

.dsky-contact-light.lit {
  background: rgba(0, 229, 255, 0.28);
  color: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.dsky-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  flex: 1;
}

.dsky-left-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.dsky-lamps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  flex: 1;
}

.dsky-lamp {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.05;
  background: #0b1320;
  color: #364966;
  border: 1px solid #1c2d48;
  border-radius: 3px;
  padding: 2px;
}

.dsky-lamp.active-green {
  background: rgba(57, 255, 136, 0.18);
  color: var(--dsky-green);
  border-color: rgba(57, 255, 136, 0.6);
  text-shadow: 0 0 6px rgba(57, 255, 136, 0.5);
}

.dsky-lamp.active-amber {
  background: rgba(245, 158, 11, 0.28);
  color: #fde047;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.dsky-mini-keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.dsky-key-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
}
.dsky-key-btn:hover {
  background: #334155;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.dsky-screen {
  background: #040d09;
  border: 1px solid rgba(57, 255, 136, 0.32);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
}

.dsky-top-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(57, 255, 136, 0.16);
  padding-bottom: 4px;
}

.dsky-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dsky-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(57, 255, 136, 0.65);
}

.dsky-digits {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--dsky-green);
  text-shadow: 0 0 8px rgba(57, 255, 136, 0.45);
}

.dsky-reg {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  padding-top: 2px;
}

.reg-lbl {
  font-size: 8.5px;
  color: rgba(57, 255, 136, 0.6);
}

.reg-val {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--dsky-green);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(57, 255, 136, 0.35);
}

/* ==================== CENTER CANVAS STAGE ==================== */
.canvas-stage-container {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  gap: 10px;
}

/* View Mode Layout Switching */
.main-workspace[data-view-mode="stage"] .canvas-stage-container {
  grid-template-columns: 1fr;
}
.main-workspace[data-view-mode="stage"] .orbit-pane {
  display: none;
}
.main-workspace[data-view-mode="stage"] .pip-orbit-box {
  display: flex;
}

.main-workspace[data-view-mode="split"] .canvas-stage-container {
  grid-template-columns: 1fr 1fr;
}
.main-workspace[data-view-mode="split"] .pip-orbit-box {
  display: none;
}

.main-workspace[data-view-mode="orbit"] .canvas-stage-container {
  grid-template-columns: 1fr;
}
.main-workspace[data-view-mode="orbit"] .spacecraft-pane {
  display: none;
}

.viewport-pane {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: #02050c;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.viewport-pane canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewport-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(5, 13, 28, 0.84);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.viewport-badge.top-left {
  top: 12px;
  left: 12px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}
.badge-dot.cyan {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.camera-zoom-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  background: rgba(5, 13, 28, 0.84);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: 7px;
}

.zoom-btn {
  background: rgba(16, 34, 64, 0.8);
  color: var(--text-primary);
  border: 1px solid transparent;
  width: 26px;
  height: 24px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.zoom-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Picture-in-Picture (PiP) Orbital Radar Box */
.pip-orbit-box {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 256px;
  height: 156px;
  background: rgba(4, 10, 22, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.42);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.pip-orbit-box:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.pip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(10, 24, 48, 0.9);
  border-bottom: 1px solid rgba(56, 182, 255, 0.2);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.pip-expand-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-gold);
}

#pipOrbitCanvas {
  flex: 1;
  width: 100%;
  height: 100%;
}

/* ==================== RIGHT SIDEBAR: BRIEFING & COMMS ==================== */
.briefing-card {
  flex: 1.25;
  justify-content: space-between;
}

.stage-step-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
}

.stage-sub-en {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
}

.brief-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2px 0 5px;
}

.brief-desc {
  font-size: 12px;
  line-height: 1.54;
  color: #dbeafe;
  margin-bottom: 6px;
}

.brief-tech-note {
  font-size: 11px;
  line-height: 1.44;
  color: var(--text-secondary);
  background: rgba(14, 30, 58, 0.65);
  border-left: 3px solid var(--accent-cyan);
  padding: 5px 8px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 6px;
}

.telemetry-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tele-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.tele-box {
  background: rgba(11, 23, 45, 0.78);
  border: 1px solid rgba(56, 182, 255, 0.18);
  border-radius: 6px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
}

.tele-label {
  font-size: 9.5px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.tele-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.tele-val.highlight-cyan {
  color: var(--accent-cyan);
}

.tele-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Radio Comms Card */
.comms-card {
  flex: 0.75;
  justify-content: space-between;
}

.quindar-btn {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.quindar-btn:hover {
  background: rgba(0, 229, 255, 0.24);
}

.comms-current {
  background: rgba(4, 11, 24, 0.85);
  border: 1px solid rgba(56, 182, 255, 0.22);
  border-radius: 7px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.comms-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comms-speaker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-gold);
}

.comms-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
}

.comms-zh {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.42;
}

.comms-en {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.32;
}

/* ==================== BOTTOM TIMELINE DECK ==================== */
.bottom-deck {
  background: rgba(5, 11, 24, 0.95);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 16px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 20;
}

.transport-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.transport-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  background: rgba(14, 29, 56, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.ctrl-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.16);
}

.ctrl-btn.primary-play {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  border-color: var(--accent-cyan);
  color: #ffffff;
  min-width: 82px;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.28);
}

/* Scrubber Range Bar */
.scrubber-container {
  position: relative;
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
}

.timeline-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(30, 58, 95, 0.75);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  z-index: 2;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px var(--accent-gold);
  cursor: grab;
}

.scrubber-progress-fill {
  position: absolute;
  left: 0;
  top: 8px;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

/* Playback Speed Selector */
.speed-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 22, 44, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 6px;
}

.speed-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  margin-right: 2px;
}

.speed-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.speed-btn.active {
  background: rgba(255, 209, 102, 0.2);
  color: var(--accent-gold);
}

/* 10-Stage Milestone Navigation Bar */
.stage-timeline-bar {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin-top: 6px;
}

.stage-milestone-btn {
  background: rgba(11, 24, 48, 0.78);
  border: 1px solid rgba(56, 182, 255, 0.2);
  border-radius: 6px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
  overflow: hidden;
}

.stage-milestone-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.14);
}

.stage-milestone-btn.passed {
  border-color: rgba(0, 229, 255, 0.42);
  background: rgba(0, 229, 255, 0.08);
}

.stage-milestone-btn.active {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.22), rgba(255, 209, 102, 0.06));
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.22);
}

.milestone-num {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stage-milestone-btn.active .milestone-num {
  color: var(--accent-gold);
}

.milestone-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
  margin-top: 1px;
}

.milestone-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  background: var(--accent-gold);
  width: 0%;
}

/* Responsive adjustments */
@media (max-width: 1240px) {
  .main-workspace {
    grid-template-columns: 235px 1fr 275px;
  }
  .brand-main {
    font-size: 13px;
  }
}
