:root {
  --bg: #060a13;
  --panel: rgba(17, 25, 40, 0.72);
  --panel-solid: #0f1726;
  --line: rgba(148, 170, 210, 0.12);
  --line-strong: rgba(148, 170, 210, 0.22);
  --text: #e7edf7;
  --muted: #8a97ad;
  --dim: #5d6a80;
  --tn: #00a9ce;
  --ntn: #f58220;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.muted { color: var(--muted); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(6, 10, 19, 0.92);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
}

.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 30px; height: 30px; }
.logo .orbit { fill: none; stroke: var(--tn); stroke-width: 1.6; opacity: 0.7; }
.logo .planet { fill: var(--tn); }
.logo .sat { fill: var(--ntn); }
.brand-name { font-weight: 700; letter-spacing: 0.22em; font-size: 14px; }
.brand-sub { color: var(--muted); font-size: 13px; padding-left: 10px; border-left: 1px solid var(--line-strong); }

.legend { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.legend .item { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.legend b { color: var(--text); font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot.tn { background: var(--tn); box-shadow: 0 0 8px rgba(0, 169, 206, 0.8); }
.dot.ntn { background: var(--ntn); box-shadow: 0 0 8px rgba(245, 130, 32, 0.8); }

#map { flex: 1; min-height: 0; }

.note {
  position: fixed;
  left: 12px;
  bottom: 10px;
  z-index: 1000;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(6, 10, 19, 0.78);
  font-size: 12px;
}

.leaflet-container { background: #0a101b; font-family: var(--sans); }
.leaflet-bar a, .leaflet-control-layers { background: var(--panel-solid) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-layers { border-radius: 9px !important; }
.leaflet-control-attribution { background: rgba(6, 10, 19, 0.7) !important; color: var(--dim) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-tooltip { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); font-size: 12px; }
.leaflet-tooltip-top::before { border-top-color: var(--line-strong); }

.pin { position: relative; width: 18px; height: 18px; }
.pin span { position: absolute; inset: 3px; border-radius: 50%; border: 2px solid #0a101b; background: var(--tn); box-shadow: 0 0 12px rgba(0, 169, 206, 0.8); }
.pin.ntn span { background: var(--ntn); box-shadow: 0 0 12px rgba(245, 130, 32, 0.8); }
.pin.fresh::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; color: var(--tn); opacity: 0.5; animation: ping 2s infinite; }
.pin.ntn.fresh::before { color: var(--ntn); }

@keyframes ping {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(3); opacity: 0; }
}

@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: stretch; padding: 12px 16px; }
}
