/* =============================================
   PROJECT YELLOW — GLOBAL THEME
   Design language ported from sl-powers-menu / py-tutorial
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
  --gold:        #FFD700;
  --gold-dark:   #B8860B;
  --gold-glow:   rgba(255, 215, 0, 0.3);
  --orange:      #FF8C00;

  --bg-page:     #07070f;
  --bg-deep:     #0a0a14;
  --bg-main:     #14142a;
  --bg-card:     #1b1b36;
  --bg-inner:    #242446;

  --text-pri:    #ffffff;
  --text-sec:    #c0c0d0;
  --text-dim:    #8a8aa0;

  --success:     #00ff88;
  --danger:      #ff4444;
  --warning:     #ffaa00;
  --guard:       #91b0ff;
  --passive:     #9b59b6;

  /* Homeworld / energy accents */
  --w-human:     #ffb340;
  --w-heaven:    #ffe68c;
  --w-hell:      #dc3c28;
  --w-dragon:    #ff7800;
  --w-asgard:    #dcdcff;
  --w-jotun:     #78dcff;
  --w-beyond:    #7800ff;

  --font-hd:     'Orbitron', sans-serif;
  --font-body:   'Rajdhani', sans-serif;

  --radius-lg:   14px;
  --radius-md:   10px;
  --radius-sm:   6px;

  --border-faint: 1px solid rgba(255, 215, 0, 0.15);
  --shadow-gold:  0 0 40px var(--gold-glow), 0 0 80px rgba(255, 215, 0, 0.1);

  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }

body {
  background: var(--bg-page);
  color: var(--text-pri);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Ambient page glow */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 75% -5%, rgba(255, 215, 0, 0.07), transparent 60%),
    radial-gradient(700px 400px at 10% 100%, rgba(120, 0, 255, 0.06), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ffc000; }
::selection { background: rgba(255, 215, 0, 0.3); }

img, iframe { max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-shadow: 0 0 12px var(--gold-glow); }

/* =============================================
   TYPOGRAPHY UTILITIES
   ============================================= */
.orbitron { font-family: var(--font-hd); text-transform: uppercase; letter-spacing: 0.08em; }

.eyebrow {
  font-family: var(--font-hd);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}

.section-heading {
  font-family: var(--font-hd);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin: 10px 0 14px;
}

.grad-text {
  background: linear-gradient(90deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.35));
}

.section-sub {
  color: var(--text-sec);
  font-size: 17px;
  max-width: 680px;
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: none;
  margin: 14px 0;
}

/* =============================================
   LAYOUT
   ============================================= */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.section { padding: 90px 0; position: relative; }

/* =============================================
   NAVBAR
   ============================================= */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(10, 10, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.18);
}

.site-nav .nav-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand .mark {
  width: 42px; height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--gold-glow));
}
.brand .wordmark { line-height: 1.1; }
.brand .wordmark .title {
  font-family: var(--font-hd); font-size: 15px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--text-pri); text-transform: uppercase;
}
.brand .wordmark .subtitle {
  font-family: var(--font-hd); font-size: 8px; font-weight: 500;
  letter-spacing: 0.4em; color: rgba(255, 215, 0, 0.5); text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-links a {
  font-family: var(--font-hd); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-sec); padding: 8px 12px; border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--gold); background: rgba(255, 215, 0, 0.08); text-shadow: none; }
.nav-links a.active { color: var(--gold); background: rgba(255, 215, 0, 0.12); }

.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.player-count {
  font-family: var(--font-hd); font-size: 10px; font-weight: 600;
  letter-spacing: 0.15em; color: var(--text-sec);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.player-count .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim); flex-shrink: 0;
}
.player-count.online { color: var(--success); }
.player-count.online .dot { background: var(--success); box-shadow: 0 0 10px var(--success); animation: pulse-dot 2s ease-in-out infinite; }
.player-count.offline { color: var(--danger); }
.player-count.offline .dot { background: var(--danger); }

@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Compact launch countdown in the player-count slot (site-wide) */
.player-count.counting { color: var(--gold); }
.player-count.counting .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse-dot 2s ease-in-out infinite; }
.player-count.counting .pc-text { font-variant-numeric: tabular-nums; }
/* Orbitron's uppercase D reads as a 0 against digits — set the unit in the body face */
.player-count.counting .cd-u {
  font-family: var(--font-body);
  font-size: 0.95em;
  font-weight: 700;
  text-transform: lowercase;
  opacity: 0.75;
  letter-spacing: 0;
  margin: 0 3px 0 1px;
}

.btn {
  display: inline-block;
  font-family: var(--font-hd); font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer; text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #000; border: none;
  padding: 13px 30px; font-size: 12px;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5); text-shadow: none; }
.btn-ghost {
  background: rgba(255, 215, 0, 0.04);
  color: var(--gold); border: 1px solid rgba(255, 215, 0, 0.4);
  padding: 12px 28px; font-size: 12px;
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(255, 215, 0, 0.1); text-shadow: none; }
.btn-sm { padding: 9px 18px; font-size: 10px; }

.nav-join { padding: 10px 20px; font-size: 10px; }

/* Hamburger */
.nav-burger {
  display: none;
  background: none; border: 1px solid rgba(255, 215, 0, 0.35); border-radius: var(--radius-sm);
  width: 40px; height: 40px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--gold); transition: transform 0.2s, opacity 0.2s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(7, 7, 15, 0.97);
  backdrop-filter: blur(10px);
  z-index: 999;
  padding: 40px 28px;
  flex-direction: column; gap: 6px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-hd); font-size: 16px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-sec); padding: 14px 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}
.mobile-menu a.active, .mobile-menu a:hover { color: var(--gold); }
.mobile-menu .btn { margin-top: 24px; }

/* =============================================
   PANEL CARDS / PILLS / CALLOUTS
   ============================================= */
.panel {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel.accent-left { border-left: 3px solid var(--gold); }

.tag-pill {
  display: inline-block;
  font-family: var(--font-hd); font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.08);
  border-radius: 4px;
  padding: 3px 9px;
  margin: 2px 3px 2px 0;
  white-space: nowrap;
}

.callout {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: start;
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
}
.callout .icon {
  width: 42px; height: 42px; border-radius: 8px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hd); font-size: 18px; font-weight: 900; color: var(--gold);
}
.callout .text { color: var(--text-sec); font-size: 15px; align-self: center; }
.callout.warn { background: rgba(255, 68, 68, 0.06); border-color: rgba(255, 68, 68, 0.35); }
.callout.warn .icon { background: rgba(255, 68, 68, 0.15); border-color: rgba(255, 68, 68, 0.5); color: var(--danger); }
.callout.guard { background: rgba(145, 176, 255, 0.06); border-color: rgba(145, 176, 255, 0.3); }
.callout.guard .icon { background: rgba(145, 176, 255, 0.14); border-color: rgba(145, 176, 255, 0.45); color: var(--guard); }

/* Terminal-style query lines */
.query-lines { display: flex; flex-direction: column; gap: 10px; margin: 28px 0; }
.query-line {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 15px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.45);
  border-left: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 18px;
}
.query-line::before { content: '> '; color: rgba(255, 215, 0, 0.5); }

/* Status badges */
.status-badge {
  display: inline-block;
  font-family: var(--font-hd); font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  border-radius: 4px; padding: 4px 10px;
}
.status-badge.red    { color: var(--danger);  border: 1px solid rgba(255,68,68,0.5);   background: rgba(255,68,68,0.1); }
.status-badge.orange { color: var(--warning); border: 1px solid rgba(255,170,0,0.5);   background: rgba(255,170,0,0.1); }
.status-badge.green  { color: var(--success); border: 1px solid rgba(0,255,136,0.5);   background: rgba(0,255,136,0.08); }
.status-badge.grey   { color: var(--text-dim); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }

/* =============================================
   PAGE HERO (interior pages)
   ============================================= */
.page-hero { padding-top: calc(var(--nav-h) + 70px); padding-bottom: 50px; }
.page-hero .section-sub { margin-top: 4px; }

/* =============================================
   SIDEBAR TOC LAYOUT (world / handbook)
   ============================================= */
.toc-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 48px;
  align-items: start;
}
.toc-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex; flex-direction: column; gap: 2px;
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
}
.toc-sidebar a {
  font-family: var(--font-hd); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.toc-sidebar a:hover { color: var(--text-pri); text-shadow: none; }
.toc-sidebar a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(255, 215, 0, 0.06);
}
.toc-sidebar .toc-num { color: rgba(255, 215, 0, 0.45); margin-right: 8px; }

.chapter { padding: 40px 0 30px; }
.chapter-num {
  font-family: var(--font-hd); font-size: 12px; font-weight: 700;
  letter-spacing: 0.3em; color: var(--gold);
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  padding-top: 16px;
  display: inline-block;
}
.chapter h2 {
  font-family: var(--font-hd); font-size: clamp(22px, 3vw, 32px);
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  margin: 8px 0 18px;
}
.chapter p { color: var(--text-sec); margin-bottom: 16px; max-width: 760px; }
.chapter p strong { color: var(--text-pri); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  background: var(--bg-deep);
  padding: 44px 0 34px;
  margin-top: 60px;
}
.site-footer .footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.site-footer .links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer .links a {
  font-family: var(--font-hd); font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-dim);
}
.site-footer .links a:hover { color: var(--gold); text-shadow: none; }
.site-footer .fine {
  width: 100%;
  font-size: 13px; color: var(--text-dim); margin-top: 10px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .toc-layout { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; border-bottom: 1px solid rgba(255,215,0,0.15); padding-bottom: 14px; }
  .toc-sidebar a { border-left: none; border-bottom: 2px solid transparent; }
  .toc-sidebar a.active { border-bottom-color: var(--gold); }
}

@media (max-width: 700px) {
  .section { padding: 60px 0; }
  .wrap { padding: 0 18px; }
  .site-nav .player-count { display: none; }
  .nav-join { display: none; }
}
