:root {
  --bg: #0b1030;
  --bg-top: #182457;
  --bg-bottom: #05070f;
  --panel: #0e1220;
  --accent: #8fd3ff;
  --text: #e7ecf5;
  --text-dim: #8d97ab;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  /* A navy-leaning gradient rather than a flat near-black — brighter,
     bluer near the top (behind the hero) and settling to near-black
     further down. #starfield sits on top of this (transparent, see
     js/starfield.js's clearRect) so the gradient shows through it. */
  background: var(--bg-bottom);
  background: radial-gradient(ellipse 140% 70% at 50% -10%, var(--bg-top) 0%, var(--bg) 45%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

/* Fixed full-viewport backdrop — everything else draws on top of it
   at a higher z-index. See js/starfield.js. */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

/* Title bar — a Windows-blue strip across the full width of the page,
   sitting above the starfield/hero (z-index 2 > starfield's 0 and
   hero's 1). Gradient sweeps from a bright Windows-accent blue down to
   a darker blue, same top-to-bottom "lit from above" logic as the
   page's own body gradient, just a different hue. */
.topbar {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #2b98f0 0%, #0f6fc5 45%, #0a3d7a 100%);
  box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.65);
  padding: 10px 20px;
}

.topbar-title {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: clamp(18px, 3.4vw, 30px);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 10, 30, 0.5);
  margin: 0;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 1050px;
  margin: 0 auto;
  padding-top: 6px;
}

.hero-stage {
  position: relative;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
}

#heroCanvas {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

/* Real, accessible nav links — invisible hit areas positioned exactly
   over each canvas-drawn planet (see js/planets.js:buildNavLinks). The
   circle/glow/label themselves are what's actually VISIBLE; this is
   purely the interactive layer.
   border-radius alone only rounds the paint — the element's actual
   hoverable/clickable box stays the full square, so the corners (which
   sit in empty space between the circularly-cropped planets) still
   register as "on" this planet. clip-path actually clips hit-testing
   too, so hover/click only fire within the true circle. */
.planet-hit {
  position: absolute;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  display: block;
  text-indent: -200%;
  overflow: hidden;
  white-space: nowrap;
  outline: none;
  cursor: pointer;
}
.planet-hit:focus-visible {
  box-shadow: 0 0 0 3px var(--accent);
}

.planet-label {
  position: absolute;
  transform: translate(-50%, 0);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.planet-hit.active + .planet-label,
.planet-hit:hover + .planet-label {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(143, 211, 255, 0.6);
}

main#content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto 140px;
  padding: 13px 32px 26px;
  border-radius: 20px;
  /* Same Windows-blue sweep as .topbar, just with alpha on the
     gradient stops themselves — only the panel fades into the
     starfield behind it; h2/p below keep fully opaque colors, so the
     TEXT doesn't pick up any of that transparency. */
  background: linear-gradient(180deg, rgba(43, 152, 240, 0.32) 0%, rgba(15, 111, 197, 0.32) 45%, rgba(10, 61, 122, 0.32) 100%);
  border: 1px solid rgba(143, 211, 255, 0.25);
  box-shadow: 0 10px 30px rgba(3, 10, 30, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.page {
  display: none;
}
.page.active {
  display: block;
  animation: fadeIn 0.4s ease;
}
.page h2 {
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0; /* kill the browser's default h2 top margin — it was adding extra space on top of the panel's own padding */
  margin-bottom: 10px;
}
.page p {
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
