/* Subtle powered-HUD detailing used across the site.
   Keep these accents restrained: they should read as hardware/emissive cues,
   not as a full-screen neon or CRT effect. */

:root {
  --hud-green: #9dcc58;
  --hud-green-soft: rgba(157, 204, 88, .16);
  --hud-green-faint: rgba(157, 204, 88, .055);
}

/* A very faint archival Battlezone image under the entire site. The dark
   overlays keep it atmospheric rather than turning it into page content. */
body {
  background:
    radial-gradient(circle at 73% 8%, rgba(104,142,71,.10), transparent 34rem),
    linear-gradient(180deg, rgba(5,9,6,.88), rgba(3,6,4,.95) 38rem, rgba(2,4,3,.985) 100%),
    url("./assets/decor/bztemp.bmp") center top / cover fixed no-repeat,
    #040605;
}

/* Battlezone pages have a more specific background rule in battlezone-decor.css;
   repeat the faint bztemp treatment at matching specificity so the full-site
   backdrop stays consistent there too. */
body:has(.nav-parent.active[href="./battlezone.html"]) {
  background:
    radial-gradient(circle at 68% 8%, rgba(157,204,88,.11), transparent 34rem),
    linear-gradient(180deg, rgba(3,7,4,.84), rgba(3,6,4,.96) 42rem, rgba(2,4,3,.99) 100%),
    url("./assets/decor/bztemp.bmp") center top / cover fixed no-repeat,
    #030504;
}

/* Localized scan bands: title displays get the clearest treatment. */
.page-titlebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 5px,
      rgba(190, 230, 132, .035) 6px,
      transparent 7px 10px
    ),
    linear-gradient(90deg, rgba(157,204,88,.03), transparent 68%);
  opacity: .72;
}

/* Selected/featured surfaces get a much fainter internal HUD texture. */
.project-card.featured,
.panel,
.watcher-lobby,
.watcher-summary > div {
  position: relative;
  overflow: hidden;
}

.project-card.featured::after,
.panel::after,
.watcher-lobby::after,
.watcher-summary > div::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 7px,
    rgba(157,204,88,.018) 8px,
    transparent 9px 13px
  );
  opacity: .8;
}

/* The personal Battlezone history block gets its own muted archival backdrop. */
body:has(.battlezone-home-titlebar) .content-body > .lede {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5,13,7,.88), rgba(5,10,7,.94) 72%, rgba(4,8,5,.97)),
    url("./assets/decor/battle800x600.png") center 48% / cover no-repeat;
  border-left-color: #91df5e;
  box-shadow:
    inset 0 0 32px rgba(0,0,0,.35),
    inset 0 1px rgba(173,220,112,.035);
  text-shadow: 0 1px 2px rgba(0,0,0,.72);
}

/* Mods retain bztemp outside the page frame but use a distinct release-era
   screenshot as a muted internal page texture. */
body:has(.subnav a.active[href="./battlezone-mods.html"]) .content-shell {
  background:
    linear-gradient(180deg, rgba(10,16,11,.93), rgba(5,9,6,.975) 32rem, rgba(4,7,5,.992)),
    url("./assets/decor/HighresScreenshot00005.png") center top / cover no-repeat;
}

body:has(.subnav a.active[href="./battlezone-mods.html"]) .page-titlebar {
  background:
    linear-gradient(90deg, rgba(19,36,19,.91), rgba(8,14,9,.965) 62%, rgba(6,10,7,.985)),
    url("./assets/decor/HighresScreenshot00005.png") center 46% / cover no-repeat;
}

/* Tiny tank-console style indicator lamps on metadata labels. */
.label::before,
.profile-link .network::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 2px;
  background: #7da64b;
  box-shadow: 0 0 5px rgba(157,204,88,.34);
  opacity: .72;
}

/* Keep the Battlezone section selector available on long catalog/detail pages. */
body:has(.nav-parent.active[href="./battlezone.html"]) .anchor-tabs {
  position: sticky;
  top: 10px;
  z-index: 18;
  margin-left: -8px;
  margin-right: -8px;
  padding: 8px;
  border: 1px solid rgba(65,86,69,.82);
  background:
    repeating-linear-gradient(to bottom, transparent 0 7px, rgba(157,204,88,.018) 8px, transparent 9px 13px),
    rgba(7,12,8,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0,0,0,.20), inset 0 1px rgba(255,255,255,.018);
}

/* Navigation behaves like a powered selector bank. */
.anchor-tabs a {
  position: relative;
}

.anchor-tabs a.active-tab::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #b7e56b;
  box-shadow: 0 0 7px rgba(157,204,88,.58);
}

.anchor-tabs a.active-tab {
  padding-left: 19px;
  box-shadow:
    inset 0 -1px rgba(157,204,88,.2),
    0 0 10px rgba(157,204,88,.035);
}

.nav-link.active::before,
.nav-parent.active::before {
  box-shadow: 0 0 8px rgba(157,204,88,.42);
}

.subnav a.active {
  text-shadow: 0 0 7px rgba(157,204,88,.22);
}

/* Live Games gets a functional state lamp and lobby-count badge when the
   lightweight sidebar status probe can reach Game Watcher. */
.subnav a.live-nav-state {
  padding-right: 34px;
}
.subnav a.live-nav-state::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #4b574c;
  box-shadow: none;
  opacity: .62;
}
.subnav a.live-nav-state.is-live-online::after {
  background: #a9df62;
  box-shadow: 0 0 7px rgba(157,204,88,.62), 0 0 13px rgba(157,204,88,.16);
  opacity: 1;
}
.live-nav-badge {
  position: absolute;
  right: 4px;
  top: 50%;
  min-width: 15px;
  padding: 1px 3px;
  transform: translateY(-50%);
  border: 1px solid rgba(157,204,88,.24);
  background: rgba(8,14,9,.88);
  color: #a9c887;
  text-align: center;
  font: 700 .52rem/1.3 Consolas, "Courier New", monospace;
  opacity: 0;
}
.subnav a.is-live-online .live-nav-badge {
  opacity: .86;
}

/* Small powered marker before major section headings/status readouts. */
.section-rule h2::before,
.status-line span:first-child::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  border-radius: 1px;
  background: #6f9544;
  box-shadow: 0 0 6px rgba(157,204,88,.28);
  vertical-align: 2px;
  opacity: .7;
}

/* A couple of restrained illuminated edges, like active cockpit controls. */
.side-logo strong {
  text-shadow: 0 0 9px rgba(157,204,88,.12);
}

.card-links a:hover,
.small-button:hover,
.anchor-tabs a:hover,
.anchor-tabs a:focus-visible {
  box-shadow: 0 0 10px rgba(157,204,88,.08);
}

/* Corner instrumentation ticks without replacing the cards' own backgrounds. */
.project-card,
.panel,
.profile-link {
  position: relative;
}

.project-card::before,
.panel::before,
.profile-link::before {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 24px;
  height: 24px;
  pointer-events: none;
  border-top: 1px solid rgba(157,204,88,.11);
  border-right: 1px solid rgba(157,204,88,.045);
  opacity: .8;
}

/* Battlezone vehicle art is integrated directly into the telemetry footer.
   The source art has a light matte. Inverting it turns that matte black, then
   screen blending makes the black disappear while retaining the vehicle as a
   faint greenish HUD silhouette. */
body:has(.nav-parent.active[href="./battlezone.html"]) .status-line {
  isolation: isolate;
}

body:has(.nav-parent.active[href="./battlezone.html"]) .status-line::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 48px;
  transform: translate(-50%, -50%);
  background: url("./assets/decor/df261c42-a893-4468-891b-8e6c33a77261.png") center / contain no-repeat;
  opacity: .17;
  filter: invert(1) sepia(.35) saturate(1.35) hue-rotate(35deg) brightness(.88) contrast(1.18);
  mix-blend-mode: screen;
  pointer-events: none;
}

body:has(.nav-parent.active[href="./battlezone.html"]) .status-line > span {
  position: relative;
  z-index: 1;
}

/* Preserve a distinct live-status light: functional state should be brighter
   than purely decorative indicators. */
.watcher-dot.is-online {
  box-shadow:
    0 0 12px rgba(157,204,88,.42),
    0 0 22px rgba(157,204,88,.12);
}

@media (max-width: 860px) {
  body,
  body:has(.nav-parent.active[href="./battlezone.html"]) {
    background-attachment: scroll;
  }
  body:has(.nav-parent.active[href="./battlezone.html"]) .anchor-tabs {
    top: 66px;
  }
}

@media (max-width: 660px) {
  .page-titlebar::before { opacity: .5; }
  .label::before,
  .profile-link .network::before { margin-right: 6px; }
  body:has(.nav-parent.active[href="./battlezone.html"]) .anchor-tabs {
    top: 62px;
    margin-left: -4px;
    margin-right: -4px;
    padding: 6px;
  }
  body:has(.nav-parent.active[href="./battlezone.html"]) .status-line::after {
    width: 58px;
    height: 38px;
    opacity: .13;
  }
}
