:root {
  color-scheme: dark;
  --mil-bg: #03130a;
  --accent: #9fbf6f;
  --muted: rgba(255,255,255,0.06);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--mil-bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 800px at 50% 50%, rgba(8,22,12,0.46), rgba(2,6,4,0.98) 72%);
  z-index: 9999;
  opacity: 1;
  transition: opacity 260ms linear, visibility 260ms linear;
}

#loader.fade-out { opacity: 0; pointer-events: none; visibility: hidden; }
#loader.removed { display: none; }

.loader-wrap { display: grid; gap: 10px; align-items: center; justify-items: center; text-align: center; }

.spinner {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid var(--muted);
  border-top-color: var(--accent);
  animation: spin 950ms linear infinite;
  box-shadow: 0 0 16px rgba(160,200,120,0.06);
}

@keyframes spin { to { transform: rotate(360deg); } }

.blink {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--accent);
  opacity: 0.92;
  animation: blink 1.4s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.26; } }

/* Canvas fills viewport (keep transparent so DOM map shows through during boot) */
#constellationCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: transparent; /* was an opaque gradient — make transparent so map beneath is visible */
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; transform: scale(.98); }
  .blink { animation: none; }
  #loader { transition: none; }
}
