/* SOL // Sonnensystem — Holo-Design (dunkel, cyan/magenta, monospace) */

:root {
  --bg: #020610;
  --panel: rgba(4, 14, 28, 0.86);
  --line: rgba(0, 229, 255, 0.28);
  --line-soft: rgba(0, 229, 255, 0.12);
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --green: #33ff99;
  --amber: #ffc14d;
  --text: #c8ecf4;
  --text-dim: #6f9fae;
  --mono: 'Cascadia Code', Consolas, 'JetBrains Mono', Menlo, monospace;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow: hidden;
}

#view { position: fixed; inset: 0; }
#view canvas { display: block; }

/* Label-Ebene (CSS2D) */
#labels {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.lbl {
  pointer-events: auto;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.8), 0 0 2px #000;
  white-space: nowrap;
  user-select: none;
}
.lbl:hover { color: #fff; }
.lbl.sel { color: var(--magenta); text-shadow: 0 0 10px rgba(255, 43, 214, 0.9); }
.lbl-moon { font-size: 9px; color: #9fd4e2; opacity: 0.9; display: none; }
.lbl-moon.show { display: block; }
.lbl-small { font-size: 9px; color: #b9a8e8; opacity: 0.85; }
.lbl-au { font-size: 9px; color: #38606e; pointer-events: none; text-transform: none; }
.lbl-iss { color: var(--magenta); font-size: 12px; text-shadow: 0 0 10px rgba(255, 43, 214, 0.9); }
.lbl-sat { color: var(--green); font-size: 10px; }
body.labels-off .lbl { display: none; }

/* Scanlines-Overlay */
#scanlines {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 60;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* Panels allgemein */
.panel {
  position: fixed;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.12), inset 0 0 24px rgba(0, 229, 255, 0.04);
  backdrop-filter: blur(7px);
  z-index: 20;
}

/* Topbar */
#topbar {
  top: 0; left: 0; right: 0;
  height: 46px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  border-width: 0 0 1px 0;
}
#topbar h1 {
  font-size: 15px;
  letter-spacing: 0.32em;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
  font-weight: 600;
}
#topbar h1 b { color: var(--magenta); text-shadow: 0 0 12px rgba(255, 43, 214, 0.7); }
#simDate { margin-left: auto; font-size: 12px; color: var(--text); letter-spacing: 0.08em; }
#simSpeed { font-size: 11px; color: var(--amber); min-width: 82px; text-align: right; }

.badge {
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge-ok { color: var(--green); border-color: rgba(51, 255, 153, 0.5); text-shadow: 0 0 8px rgba(51, 255, 153, 0.6); }
.badge-sim { color: var(--magenta); border-color: rgba(255, 43, 214, 0.5); text-shadow: 0 0 8px rgba(255, 43, 214, 0.6); }
.badge-warn { color: var(--amber); border-color: rgba(255, 193, 77, 0.5); text-shadow: 0 0 8px rgba(255, 193, 77, 0.6); }

/* Linkes Panel: Liste + Layer */
#sidebar {
  top: 56px; left: 10px; bottom: 74px;
  width: 250px;
  display: flex; flex-direction: column;
  padding: 10px;
  gap: 8px;
}
#search {
  width: 100%;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 8px;
  outline: none;
}
#search:focus { border-color: var(--cyan); box-shadow: 0 0 10px rgba(0, 229, 255, 0.25); }
#objList {
  flex: 1;
  overflow-y: auto;
  font-size: 12px;
}
#objList details { margin-bottom: 4px; }
#objList summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 2px;
  user-select: none;
}
.obj-item {
  padding: 3px 8px;
  cursor: pointer;
  color: var(--text);
  border-left: 2px solid transparent;
}
.obj-item:hover { background: rgba(0, 229, 255, 0.08); border-left-color: var(--cyan); }
.obj-item.sel { background: rgba(255, 43, 214, 0.1); border-left-color: var(--magenta); color: #fff; }
.obj-hint { padding: 4px 8px; font-size: 10px; color: var(--text-dim); }

#layerBox { border-top: 1px solid var(--line-soft); padding-top: 8px; }
#layerBox label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 2px 8px 2px 0;
  cursor: pointer;
}
#layerBox input { accent-color: var(--cyan); }

/* Zeitleiste unten */
#timebar {
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
}
#timebar button {
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  padding: 4px 10px;
  cursor: pointer;
}
#timebar button:hover { background: rgba(0, 229, 255, 0.16); box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
#timebar button.active { color: var(--magenta); border-color: rgba(255, 43, 214, 0.5); }
#dateJump {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 6px;
  color-scheme: dark;
}

/* Info-Panel rechts */
#infoPanel {
  top: 56px; right: 10px;
  width: 300px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding: 12px;
}
#infoPanel.hidden { display: none; }
#infoHead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
#infoTitle {
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}
#infoKind {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  border: 1px solid rgba(255, 43, 214, 0.45);
  padding: 2px 6px;
}
#infoClose {
  margin-left: auto;
  background: none; border: none;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  font-family: var(--mono);
}
#infoClose:hover { color: var(--magenta); }
#infoBody .row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11.5px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line-soft);
}
#infoBody .row span { color: var(--text-dim); }
#infoBody .row b { color: var(--text); font-weight: 600; text-align: right; }
#infoBody .desc {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #a8cfdb;
}

/* Fußnote */
#footnote {
  position: fixed;
  right: 12px; bottom: 12px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #3d6572;
  z-index: 15;
  text-align: right;
}

.boot-error {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--amber);
  border: 1px solid var(--amber);
  background: var(--panel);
  padding: 18px 26px;
  z-index: 99;
}

/* Schmale Screens: Panels einklappbar halten */
@media (max-width: 900px) {
  #sidebar { width: 200px; }
  #infoPanel { width: 250px; }
}
@media (max-width: 640px) {
  #sidebar { display: none; }
  #topbar h1 { font-size: 11px; letter-spacing: 0.2em; }
}
