

:root {
  --bg:         #080c12;
  --bg-2:       #0d1520;
  --bg-3:       #111d2a;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.14);
  --text:       #d8e4f0;
  --text-muted: rgba(216,228,240,0.45);
  --accent:     #f0a500;
  --accent-dim: rgba(240,165,0,0.15);
  --blue:       #388bfd;
  --blue-dim:   rgba(56,139,253,0.12);
  --mono:       'DM Mono', monospace;
  --sans:       'Syne', sans-serif;
}

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

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(8,12,18,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2px;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--text); background: rgba(255,255,255,0.07); }

.nav-met {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 48px 40px 0;
  max-width: 1100px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}



@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}


h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.subtitle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ── TRAJECTORY PAGE ── */
.trajectory-page main, main.trajectory-page {
  padding-bottom: 48px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 32px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-2);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-2); }

.stat-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-value.phase-val {
  font-size: 14px;
  line-height: 1.3;
  color: var(--accent);
}

.stat-unit {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.06em;
}

.canvas-wrap {
  margin: 0 40px;
  max-width: calc(1100px - 80px);
  position: relative;
  background: var(--bg-2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

#traj-canvas {
  width: 100%;
  height: 340px;
  display: block;
}

.canvas-legend {
  position: absolute;
  bottom: 16px;
  right: 20px;
  display: flex;
  gap: 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.legend-dot {
  width: 20px;
  height: 1.5px;
}
.legend-dot.traveled  { background: rgba(255,255,255,0.75); }
.legend-dot.remaining { background: rgba(255,255,255,0.15); }

/* ── SPACECRAFT PAGE ── */
main.spacecraft-page {
  padding-bottom: 48px;
}

.spacecraft-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  padding: 32px 40px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.rocket-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 72px;
}

#rocket {
  width: 100%;
  max-width: 240px;
}

.part { transition: opacity 0.25s ease; }

.click-hint {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 12px;
  transition: opacity 0.3s;
}

.info-column {
  padding-top: 8px;
}

.info-card {
  background: var(--bg-2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  min-height: 360px;
}

.info-placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 40px;
  opacity: 0.3;
}
.info-placeholder-line {
  height: 10px;
  background: var(--border-2);
  border-radius: 4px;
  width: 100%;
}
.info-placeholder-line.short { width: 55%; }

.info-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--border);
}

.info-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}

.info-manufacturer {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.info-description {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--border);
  gap: 16px;
}
.spec-row:last-child { border-bottom: none; }

.spec-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.spec-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  text-align: right;
}

.reset-btn {
  background: none;
  border: 0.5px solid var(--border-2);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.reset-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: rgba(255,255,255,0.04);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .page-header { padding: 32px 20px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; padding: 24px 20px; }
  .canvas-wrap { margin: 0 20px; }
  .spacecraft-layout { grid-template-columns: 1fr; padding: 24px 20px; }
  .rocket-column { position: static; }
  .stat-value { font-size: 20px; }
}