:root {
  color-scheme: dark;
  --bg: #080a0c;
  --panel: #14191d;
  --line: #2d363d;
  --text: #eef3f6;
  --muted: #8fa0ac;
  --accent: #35d39a;
  --bad: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: grid;
  grid-template-columns: 300px 1fr;
}

aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100vh;
  padding: 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.panel-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.panel-tab { min-height: 34px; padding: 0 8px; color: var(--muted); }
.panel-tab.active { border-color: var(--accent); background: #17352d; color: var(--text); }
.side-panel { display: none; min-height: 0; overflow-y: auto; padding-right: 3px; }
.side-panel.active { display: flex; flex-direction: column; gap: 12px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 18px; }
.panel-heading p { margin-top: 5px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; }
.satellite-list { display: grid; gap: 10px; }
.satellite-card { display: grid; gap: 8px; padding: 9px; text-align: left; background: #10161a; }
.satellite-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(53, 211, 154, 0.22); }
.satellite-card img { width: 100%; height: 108px; object-fit: cover; border-radius: 4px; background: #050708; }
.satellite-card strong { font-size: 14px; }
.satellite-card small { color: var(--muted); line-height: 1.4; }
.scene-badge { color: var(--accent); font-size: 11px; }

h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.stat {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.stat.compact {
  padding: 4px 0;
}

.stat span,
p {
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

select,
input,
button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #1d2429;
  color: var(--text);
  font: inherit;
}

button {
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: #52606a;
  background: #263039;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.check-row input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.country-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #10161a;
}

.diagnostics {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #10161a;
}

.diagnostics .stat {
  margin: 0;
}

.diagnostics strong {
  font-variant-numeric: tabular-nums;
}

.country-card strong {
  font-size: 18px;
}

.country-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

p {
  margin: 8px 0 0;
  line-height: 1.45;
}

p.good {
  color: var(--accent);
}

p.bad {
  color: var(--bad);
}

main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, #111820 0, #080a0c 64%);
}

.globe-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58vw, 68vh);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 68% 27%, rgba(124, 166, 138, 0.78) 0 7%, transparent 7.5%),
    radial-gradient(ellipse at 57% 48%, rgba(95, 145, 116, 0.75) 0 15%, transparent 15.5%),
    radial-gradient(ellipse at 35% 38%, rgba(111, 157, 126, 0.72) 0 12%, transparent 12.5%),
    radial-gradient(circle at 34% 28%, #2f7892 0, #155069 52%, #092938 78%, #06151d 100%);
  box-shadow: inset -4.5rem -2rem 7rem rgba(0, 0, 0, 0.62), -2rem 2.5rem 8rem rgba(29, 132, 169, 0.16);
  opacity: 0.8;
  pointer-events: none;
}

canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

.hint {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  color: rgba(238, 243, 246, 0.7);
  font-size: 12px;
  pointer-events: none;
}

@media (max-width: 820px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  aside {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
