:root {
  --bg:        #060B0C;
  --bg2:       #0C1618;
  --bg3:       #112024;
  --surface:   #112024;
  --surface2:  #182C31;
  --border:    rgba(111,175,200,.10);
  --border2:   rgba(111,175,200,.18);
  --accent:    #6FAFC8;
  --accent2:   #8DC6D6;
  --accent3:   #E2EEED;
  --rad:       oklch(72% .14 80);
  --rad2:      oklch(66% .14 80);
  --danger:    oklch(52% .18 25);
  --text:      #E2EEED;
  --text2:     #A8B5B6;
  --text3:     #6E8488;
  --mono:      'Share Tech Mono', monospace;
  --title:     'Russo One', sans-serif;
  --body:      'Barlow', sans-serif;
  --radius:    6px;
  --shadow:    0 4px 24px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: #060B0C;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent3); }
img { display: block; max-width: 100%; }
code { font-family: var(--mono); color: var(--accent3); background: rgba(111,175,200,.07); padding: 2px 6px; border-radius: 3px; font-size: .9em; }
h1,h2,h3,h4 { font-family: var(--title); line-height: 1.2; }

/* Background layers (same stack as launcher) */
.bg-image {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background: url('/img/fon.png') center / cover no-repeat;
  filter: saturate(.6) brightness(.8);
}
.bg-overlay {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(6,11,12,.20) 0%,
      rgba(6,11,12,.03) 25%,
      rgba(6,11,12,.03) 70%,
      rgba(6,11,12,.25) 100%),
    linear-gradient(90deg,
      rgba(6,11,12,.10) 0%,
      transparent 20%,
      transparent 80%,
      rgba(6,11,12,.10) 100%);
}
.bg-scanlines {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,.04) 3px, rgba(0,0,0,.04) 4px
  );
}
.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.65) 78%, rgba(0,0,0,.88) 100%);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

[id] { scroll-margin-top: 80px; }

/* Main content area has a subtle dark wash so text stays readable */
main {
  position: relative; z-index: 1;
}

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,11,12,.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226,238,237,.07);
}
/* glowing top edge */
.navbar::before {
  content: '';
  display: block; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(226,238,237,.15) 20%,
    rgba(226,238,237,.35) 50%,
    rgba(226,238,237,.15) 80%, transparent 100%
  );
}
.nav-inner {
  display: flex; align-items: center; justify-content: flex-start;
  height: 56px; gap: 12px;
  max-width: 1600px; margin: 0 auto; padding: 0 20px;
}

/* brand */
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; flex-shrink: 0; color: inherit;
}
.nav-brand img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.nav-logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.nav-brand-stack { display: flex; flex-direction: column; gap: 1px; }
.nav-brand-name {
  font-family: var(--title); font-size: 1.1rem;
  color: var(--text); line-height: 1; white-space: nowrap;
}
/* legacy */
.brand-icon { color: var(--rad); font-size: 1.1rem; }

/* links */
.nav-links {
  display: flex; list-style: none; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
  margin-left: auto;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text2);
  padding: 5px 10px 4px; border-radius: 2px;
  font-family: var(--mono); font-size: .8rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  transition: color .15s;
  white-space: nowrap; display: block; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--accent3);
  border-bottom: 2px solid var(--accent);
}
.nav-links a.active::before { content: ''; }
.nav-shop-link { color: var(--rad) !important; }
.nav-shop-link:hover { color: var(--rad2) !important; background: oklch(72% .14 80 / .07) !important; }

/* clock in navbar */
.nav-clock {
  font-family: var(--mono); font-size: .68rem;
  color: #6FAFC8; letter-spacing: .07em;
  flex-shrink: 0; white-space: nowrap;
}
.nav-profile-link { display: flex; align-items: center; gap: 7px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); }
.nav-admin-link { color: var(--rad) !important; padding: 6px 12px !important; font-size: 1.15rem !important; }
.nav-logout { color: var(--danger) !important; }
.btn-steam-nav {
  display: flex; align-items: center; gap: 7px;
  background: rgba(111,175,200,.08);
  color: var(--accent3) !important;
  padding: 5px 13px 5px 10px !important;
  border-radius: var(--radius);
  border: 1px solid rgba(111,175,200,.35);
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em;
  text-transform: uppercase; flex-shrink: 0;
  transition: background .18s, border-color .18s, color .18s;
}
.btn-steam-nav:hover {
  background: rgba(111,175,200,.18) !important;
  border-color: rgba(111,175,200,.7) !important;
  color: #E2EEED !important;
}
.nav-burger {
  display: none; background: none; border: 1px solid var(--border2);
  color: var(--text2); padding: 5px 9px; border-radius: var(--radius);
  cursor: pointer; font-size: .95rem; flex-shrink: 0;
}
@media (max-width: 1280px) {
  .nav-burger { display: block; }
  .nav-links {
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: color-mix(in srgb, var(--bg) 98%, transparent); flex-direction: column;
    padding: 8px 0; gap: 0; border-bottom: 1px solid var(--border2);
    overflow-x: unset;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 20px; width: 100%; font-size: .9rem; }
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  background: transparent;
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.hero-scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,.05) 3px, rgba(0,0,0,.05) 4px
  );
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px; align-items: center;
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 96px 20px 80px;
}
.hero-badge {
  display: inline-block;
  background: rgba(111,175,200,.12);
  border: 1px solid rgba(111,175,200,.4);
  color: var(--accent3); font-family: var(--mono); font-size: .78rem;
  letter-spacing: .2em; padding: 5px 14px; border-radius: 3px;
  margin-bottom: 24px; text-transform: uppercase;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100%{opacity:.8} 50%{opacity:1} }
.hero-title {
  font-family: var(--title);
  line-height: 0.9;
  letter-spacing: -.02em;
  margin-bottom: 28px;
  display: flex; flex-direction: column; gap: 0;
}

/* shared line styles */
.ht-edge,
.ht-dark {
  display: block;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  color: var(--text);
  line-height: .88;
  letter-spacing: -.01em;
  text-transform: uppercase;
  position: relative;
  text-shadow:
    0 0 80px rgba(0,0,0,.9),
    0 2px 8px rgba(0,0,0,.95);
}

/* glitch layers on both lines */
.ht-edge::before, .ht-edge::after,
.ht-dark::before, .ht-dark::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%; overflow: hidden; pointer-events: none;
  font-family: inherit; font-size: inherit;
  font-weight: inherit; letter-spacing: inherit;
}

/* glitch layers — both lines fire in sync */
.ht-edge::before, .ht-dark::before { color: rgba(111,175,200,.85); animation: htGlitchA 5s linear infinite 0s backwards; }
.ht-edge::after,  .ht-dark::after  { color: rgba(111,175,200,.5);  animation: htGlitchB 5s linear infinite 0.08s backwards; }

@keyframes htGlitchA {
  0%, 69.9% {
    animation-timing-function: step-end;
    opacity: 0; transform: none; clip-path: inset(0 0 100% 0);
  }
  70% {
    animation-timing-function: step-end;
    opacity: 1; transform: translateX(-7px); clip-path: inset(18% 0 56% 0);
  }
  70.7% {
    animation-timing-function: step-end;
    opacity: 1; transform: translateX(5px); clip-path: inset(54% 0 18% 0);
  }
  71.4% {
    animation-timing-function: step-end;
    opacity: 1; transform: translateX(-3px); clip-path: inset(8% 0 75% 0);
  }
  72%, 100% {
    opacity: 0; transform: none; clip-path: inset(0 0 100% 0);
  }
}
@keyframes htGlitchB {
  0%, 74.9% {
    animation-timing-function: step-end;
    opacity: 0; transform: none; clip-path: inset(0 0 100% 0);
  }
  75% {
    animation-timing-function: step-end;
    opacity: 1; transform: translateX(8px); clip-path: inset(32% 0 42% 0);
  }
  75.7% {
    animation-timing-function: step-end;
    opacity: 1; transform: translateX(-4px); clip-path: inset(64% 0 12% 0);
  }
  76.4%, 100% {
    opacity: 0; transform: none; clip-path: inset(0 0 100% 0);
  }
}
.ip-val { color: var(--accent3); font-family: var(--mono); font-size: 1rem; }
.btn-copy {
  background: rgba(111,175,200,.14); border: 1px solid rgba(111,175,200,.3);
  color: var(--accent); padding: 4px 10px; border-radius: 4px;
  cursor: pointer; font-size: .78rem; font-family: var(--mono); transition: all .2s;
}
.btn-copy:hover { background: rgba(111,175,200,.25); }

/* ── Hero LEFT column ────────────────────────────────────── */

/* Zone broadcast header — blinking radio transmission style */
.hero-broadcast {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .73rem; letter-spacing: .12em;
  color: var(--text3); text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-broadcast-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(111,175,200,.4);
  animation: broadcastPulse 1.8s ease-in-out infinite;
}
@keyframes broadcastPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
.hero-broadcast-text { color: var(--accent3); }
.hero-broadcast-sep { color: var(--text3); opacity: .3; letter-spacing: .04em; flex-shrink: 0; }
.hero-broadcast-id { color: var(--text3); }

/* Atmospheric tagline */
.hero-tagline {
  color: var(--text); font-size: 1rem; line-height: 1.85;
  margin-bottom: 20px; max-width: 52ch;
}

/* Zone metrics strip */
.hero-metrics {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: .75rem;
  margin-bottom: 28px;
}
.hero-metric { display: flex; align-items: center; gap: 6px; }
.hero-metric-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.hero-metric-dot--on {
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  animation: metricBlink 2.4s ease-in-out infinite;
}
.hero-metric-dot--warn {
  background: var(--rad);
  box-shadow: 0 0 5px var(--rad);
  animation: metricBlink 1.6s ease-in-out infinite;
}
@keyframes metricBlink { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero-metric-label { color: var(--text3); letter-spacing: .04em; }
.hero-metric-sep { color: var(--text3); opacity: .35; }

/* Connection panel */
.hero-conn-panel {
  background: rgba(12,22,24,.25);
  border: 1px solid rgba(226,238,237,.10);
  border-radius: 4px; overflow: hidden;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}
.hero-conn-header {
  padding: 6px 14px;
  background: rgba(17,32,36,.25);
  border-bottom: 1px solid rgba(226,238,237,.07);
  font-family: var(--mono); font-size: .72rem;
  color: var(--text2); letter-spacing: .12em;
}
.hero-conn-body {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
}

/* Terminal command buttons */
.hero-commands { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-cmd {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .85rem;
  padding: 9px 18px; border-radius: 4px;
  cursor: pointer; transition: all .18s; letter-spacing: .04em;
  text-decoration: none; line-height: 1;
}
.hero-cmd-prompt { font-size: .78rem; opacity: .65; flex-shrink: 0; }
.hero-cmd-ghost {
  background: rgba(17,32,36,.80);
  border: 1px solid rgba(111,175,200,.22);
  color: var(--text2) !important;
}
.hero-cmd-ghost:hover {
  border-color: var(--accent); color: var(--accent) !important;
  background: rgba(111,175,200,.08);
}
.hero-cmd-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: rgba(6,11,12,.95) !important; font-weight: 700;
}
.hero-cmd-accent:hover { background: var(--accent3); border-color: var(--accent3); }
.hero-cmd-accent .hero-cmd-prompt { opacity: .5; }

/* PDA Terminal */
.pda-terminal {
  background: rgba(12,22,24,.25);
  border: 1px solid rgba(226,238,237,.10);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  backdrop-filter: blur(12px);
}
.pda-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  background: rgba(17,32,36,.25);
  border-bottom: 1px solid rgba(226,238,237,.07);
}
.pda-title {
  font-family: var(--mono); font-size: .8rem;
  color: var(--text); letter-spacing: .12em;
}
.pda-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 8px; gap: 4px;
}
.pda-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 12px;
  background: rgba(17,32,36,.80);
  border: 1px solid rgba(111,175,200,.08);
  border-radius: 4px;
  gap: 8px;
}
.pda-stat-key {
  font-family: var(--mono); font-size: .73rem;
  color: var(--text3); letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
.pda-stat-val {
  font-family: var(--title); font-size: 1.1rem;
  color: var(--accent3);
}
.pda-stat-sm { font-size: .8rem !important; word-break: break-all; text-align: right; }
.pda-mods { padding: 12px 16px; border-top: 1px solid var(--border2); }
.pda-mods-label {
  font-family: var(--mono); font-size: .72rem;
  color: var(--text3); letter-spacing: .1em;
  margin-bottom: 8px; text-transform: uppercase;
}
.pda-mods-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pda-footer {
  padding: 9px 16px;
  border-top: 1px solid var(--border2);
  background: #0C1618;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.pda-vt-link {
  font-family: var(--mono); font-size: .73rem;
  color: var(--text3); letter-spacing: .05em; transition: color .2s;
}
.pda-vt-link:hover { color: var(--text2); }
.pda-offline { padding: 20px 16px; font-family: var(--mono); font-size: .85rem; color: var(--text3); }

/* ── PDA multi-server list ───────────────────────────────── */
.pda-server-list { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.pda-srv-row {
  padding: 10px 12px;
  background: rgba(17,32,36,.25);
  border: 1px solid rgba(226,238,237,.06);
  border-radius: 4px;
}
.pda-srv-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 7px;
}
.pda-srv-name {
  font-family: var(--title); font-size: .88rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pda-srv-badge {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  white-space: nowrap; flex-shrink: 0;
}
.pda-srv-badge.online  { color: var(--accent3); }
.pda-srv-badge.offline { color: var(--text3); }
.pda-srv-bar {
  height: 4px; background: rgba(111,175,200,.1);
  border-radius: 2px; overflow: hidden; margin-bottom: 6px;
}
.pda-srv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #A8B5B6, #E2EEED);
  border-radius: 2px;
  transition: width .4s ease;
}
.pda-srv-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pda-srv-players {
  font-family: var(--mono); font-size: .78rem;
  color: var(--accent3); font-weight: 600;
}
.pda-srv-queue {
  font-family: var(--mono); font-size: .72rem;
  color: var(--rad); opacity: .8;
}
.pda-srv-map {
  font-family: var(--mono); font-size: .72rem;
  color: var(--text3); margin-left: auto;
}
.pda-srv-restart {
  font-family: var(--mono); font-size: .72rem;
  color: var(--text3);
}
.pda-srv-offline-line {
  font-family: var(--mono); font-size: .75rem;
  color: var(--text3); opacity: .6;
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; padding: 80px 20px 60px; }
  .hero { min-height: unset; }
  .pda-terminal { max-width: 520px; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 2.8rem; }
}

.hero-scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: var(--text3); animation: bounce 2s infinite; font-size: 1.2rem;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(111,175,200,.35);
  border: 1px solid rgba(226,238,237,.20);
  color: var(--text) !important; font-weight: 700; font-family: var(--body);
  padding: 10px 22px; border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; transition: all .2s; letter-spacing: .02em;
  backdrop-filter: blur(6px);
}
.btn-primary:hover { background: rgba(111,175,200,.55); border-color: rgba(226,238,237,.35); transform: translateY(-1px); }
.btn-primary.btn-large { padding: 13px 30px; font-size: 1rem; }

.btn-launcher {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text) !important; font-weight: 600;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: .9rem; transition: all .2s;
}
.btn-launcher:hover { border-color: var(--accent); color: var(--accent) !important; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text2) !important; padding: 9px 20px; border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent) !important; }
.btn-steam-large {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #c6d4df !important; padding: 13px 28px;
  border-radius: var(--radius); border: 1px solid #4a7fa0;
  font-size: 1rem; font-weight: 600; transition: all .2s; line-height: 1;
}
.btn-steam-large svg { flex-shrink: 0; display: block; }
.btn-steam-large:hover { filter: brightness(1.2); transform: translateY(-1px); }
.btn-discord-footer {
  display: inline-block;
  background: #5865f2; color: #fff !important;
  padding: 8px 18px; border-radius: var(--radius);
  font-size: .88rem; margin-top: 8px; transition: opacity .2s;
}
.btn-discord-footer:hover { opacity: .85; }
.btn-danger-sm {
  background: oklch(52% .18 25 / .15); border: 1px solid oklch(52% .18 25 / .4);
  color: #e74c3c; padding: 4px 10px; border-radius: 4px;
  cursor: pointer; font-size: .8rem;
}
.btn-secondary-sm {
  background: rgba(111,175,200,.1); border: 1px solid var(--border);
  color: var(--accent); padding: 4px 10px; border-radius: 4px;
  cursor: pointer; font-size: .8rem;
}
.btn-collection {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #1b2838, #2a475e); color: #c6d4df !important;
  padding: 9px 18px; border-radius: var(--radius); border: 1px solid #4a7fa0;
  font-size: .88rem; transition: all .2s;
}
.btn-collection:hover { filter: brightness(1.2); }

/* ── SECTION TITLES ──────────────────────────────────────── */
.section { padding: 70px 0; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--text);
  margin-bottom: 36px; position: relative;
}
.section-title::after {
  content: ''; display: block; width: 40px; height: 2px;
  background: var(--accent); margin-top: 10px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
}
.section-header .section-title { margin-bottom: 0; }
.section-sub { color: var(--text3); margin-bottom: 28px; }
.muted-text { color: var(--text3); font-style: italic; }

/* ── SERVER CARD ─────────────────────────────────────────── */
.server-card {
  background: rgba(12,22,24,.25); border: 1px solid rgba(226,238,237,.10);
  border-radius: 10px; padding: 28px; box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.server-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.server-card-header h2 { font-size: 1.2rem; }
.status-badge {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .12em;
  padding: 4px 12px; border-radius: 20px; font-weight: 700;
}
.status-badge.online {
  background: rgba(111,175,200,.15); color: var(--accent3);
  border: 1px solid rgba(111,175,200,.35);
  animation: onlinePulse 2s ease-in-out infinite;
}
.status-badge.offline {
  background: oklch(52% .18 25 / .12); color: var(--danger);
  border: 1px solid oklch(52% .18 25 / .25);
}
@keyframes onlinePulse { 0%,100%{opacity:.8} 50%{opacity:1} }

.stats-grid-4, .stats-grid-3 { display: grid; gap: 16px; }
.stats-grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stats-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat-card {
  background: rgba(12,22,24,.25); border: 1px solid rgba(226,238,237,.10);
  border-radius: 8px; padding: 20px; text-align: center;
  transition: border-color .2s, transform .2s;
  backdrop-filter: blur(6px);
}
.stat-card:hover { border-color: rgba(111,175,200,.35); transform: translateY(-2px); }
.accent-card { border-color: rgba(226,238,237,.15) !important; background: rgba(12,22,24,.25) !important; }
.stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-num { font-family: var(--title); font-size: 1.8rem; color: var(--accent3); }
.stat-num-sm { font-size: 1rem !important; word-break: break-word; line-height: 1.3; }
.stat-lbl { color: var(--text3); font-size: .83rem; margin-top: 4px; letter-spacing: .04em; }

.mods-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border2); }
.mods-label { color: var(--text3); font-size: .83rem; font-family: var(--mono); letter-spacing: .06em; flex-shrink: 0; }
.mod-tag { background: rgba(111,175,200,.07); border: 1px solid var(--border2); color: var(--text2); font-size: .82rem; padding: 3px 9px; border-radius: 12px; font-family: var(--mono); transition: border-color .2s, color .2s; }
.mod-tag:hover { border-color: var(--accent2); color: var(--accent3); }
.mods-collection { margin-top: 14px; }

/* ── INDEX FACTIONS GRID ─────────────────────────────────── */
.idx-factions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(111,175,200,.10);
  border: 1px solid rgba(111,175,200,.14);
  border-radius: 6px;
  overflow: hidden;
}

/* base card */
.ifc {
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none;
  background: var(--bg);
  overflow: hidden;
  transition: background .2s;
  cursor: pointer;
}
.ifc:hover { background: var(--bg2); }

/* icon zone — the "screen" */
.ifc-screen {
  position: relative;
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: #060B0C;
  overflow: hidden;
  flex-shrink: 0;
}
/* CRT scanlines */
.ifc-screen::before {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,.20) 2px, rgba(0,0,0,.20) 3px
  );
}
/* radial glow */
.ifc-screen::after {
  content: '';
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 58%,
    rgba(111,175,200,.06) 0%, transparent 70%);
  transition: background .25s;
}
.ifc:hover .ifc-screen::after {
  background: radial-gradient(ellipse 80% 70% at 50% 58%,
    rgba(111,175,200,.18) 0%, transparent 70%);
}

/* record badge top-left */
.ifc-rec {
  position: absolute; top: 7px; left: 9px; z-index: 3;
  font-family: var(--mono); font-size: .56rem; letter-spacing: .09em;
  color: rgba(111,175,200,.45);
}

/* the icon image */
.ifc-icon {
  width: 80px; height: 80px;
  object-fit: contain;
  position: relative; z-index: 3;
  filter: saturate(.75) brightness(.9);
  transition: filter .25s, transform .25s;
  image-rendering: crisp-edges;
}
.ifc:hover .ifc-icon {
  filter: saturate(1.05) brightness(1.1) drop-shadow(0 0 10px rgba(111,175,200,.55));
  transform: scale(1.08);
}

/* body */
.ifc-body {
  padding: 10px 14px 12px;
  background: #0C1618;
  border-top: 1px solid rgba(111,175,200,.10);
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column;
}
.ifc-name {
  font-family: var(--title);
  font-size: .95rem; color: var(--text);
  line-height: 1.2; margin-bottom: 3px;
  transition: color .15s;
}
.ifc:hover .ifc-name { color: var(--accent3); }
.ifc-desc {
  font-family: var(--mono); font-size: .6rem;
  color: var(--text3); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* apply button — revealed on hover */
.ifc-apply {
  margin-top: auto; padding-top: 7px;
  opacity: 0; pointer-events: none;
  transition: opacity .18s;
}
.ifc:hover .ifc-apply { opacity: 1; pointer-events: auto; }
.ifc-apply-btn {
  width: 100%;
  background: rgba(111,175,200,.10);
  border: 1px solid rgba(111,175,200,.32);
  color: var(--accent3); border-radius: 2px;
  padding: 4px 0; font-size: .63rem; cursor: pointer;
  font-family: var(--mono); letter-spacing: .07em;
  transition: background .15s;
}
.ifc-apply-btn:hover { background: rgba(111,175,200,.22); }

/* JOIN discord bar */
.ifc-discord-bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 1px;
  padding: 11px 18px;
  background: var(--bg);
  border: 1px solid rgba(111,175,200,.14);
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  color: #6FAFC8;
  transition: background .2s, color .2s, border-color .2s;
}
.ifc-discord-bar:hover {
  background: rgba(111,175,200,.07);
  border-color: rgba(111,175,200,.3);
  color: var(--accent3);
}
.ifc-discord-bar__text {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  flex: 1; text-align: center;
}
.ifc-discord-bar__arrow {
  font-family: var(--mono); font-size: .8rem;
  transition: transform .2s;
}
.ifc-discord-bar:hover .ifc-discord-bar__arrow { transform: translateX(4px); }

@media (max-width: 900px) {
  .idx-factions-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .idx-factions-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) {
  .idx-factions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── NEWS ────────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card {
  background: rgba(24,44,49,.80); border: 1px solid rgba(111,175,200,.14);
  border-radius: 10px; padding: 24px;
  transition: border-color .2s, transform .2s;
  backdrop-filter: blur(6px);
}
.news-card:hover { border-color: rgba(111,175,200,.4); transform: translateY(-2px); }
.news-tag {
  display: inline-block; font-size: .83rem; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
  font-family: var(--mono);
}
.tag-news   { background: rgba(111,175,200,.1);  color: var(--accent3); border: 1px solid rgba(111,175,200,.2); }
.tag-update { background: oklch(72% .14 80 / .1);   color: var(--rad);    border: 1px solid oklch(72% .14 80 / .2); }
.tag-event  { background: rgba(111,175,200,.1);       color: #A8B5B6;       border: 1px solid rgba(111,175,200,.2); }
.news-title { font-size: 1.05rem; color: var(--text); margin-bottom: 10px; }
.news-excerpt { color: var(--text2); font-size: .88rem; margin-bottom: 14px; line-height: 1.6; }
.news-meta { display: flex; gap: 16px; color: var(--text3); font-size: .83rem; }

/* ── CTA ─────────────────────────────────────────────────── */
.cta-section { background: transparent; border-top: 1px solid rgba(111,175,200,.10); }
.cta-box {
  text-align: center; padding: 50px 30px;
  background: rgba(24,44,49,.82); border: 1px solid rgba(111,175,200,.18);
  border-radius: 12px; max-width: 600px; margin: 0 auto;
  backdrop-filter: blur(8px);
}
.cta-box h2 { font-size: 1.9rem; margin-bottom: 12px; }
.cta-box p { color: var(--text2); margin-bottom: 28px; }

/* ── PROFILE ─────────────────────────────────────────────── */
.profile-section { padding-top: 40px; }
.profile-header {
  display: flex; gap: 28px; align-items: flex-start;
  background: rgba(12,22,24,.25); border: 1px solid rgba(226,238,237,.10);
  border-radius: 12px; padding: 32px; margin-bottom: 40px;
  flex-wrap: wrap; position: relative;
  backdrop-filter: blur(12px);
}
.profile-avatar-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.profile-avatar { width: 100px; height: 100px; border-radius: 10px; border: 2px solid var(--border); }
.role-badge {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-size: .65rem; white-space: nowrap; padding: 2px 8px;
  border-radius: 10px; letter-spacing: .06em; font-family: var(--mono);
}
.role-admin          { background: oklch(52% .18 25 / .2);  color: #e574c3; border: 1px solid oklch(52% .18 25 / .5); }
.role-curator        { background: oklch(52% .18 25 / .15); color: #e74c3c; border: 1px solid #c0392b; }
.role-senior_curator { background: oklch(52% .18 25 / .15); color: #e74c3c; border: 1px solid #c0392b; }
.role-faction_leader { background: rgba(149,165,166,.15); color: #95a5a6; border: 1px solid #7f8c8d; }
.role-faction_deputy { background: rgba(149,165,166,.15); color: #95a5a6; border: 1px solid #7f8c8d; }
.role-player         { background: rgba(111,175,200,.1); color: var(--accent3); border: 1px solid var(--accent2); }
.role-faction-member { background: rgba(111,175,200,.15); color: #8DC6D6; border: 1px solid #6FAFC8; }
.role-eventologist   { background: rgba(111,175,200,.18); color: #A8B5B6; border: 1px solid #6FAFC8; }
.admin-table .role-badge, .faction-table .role-badge { position: static; transform: none; display: inline-block; }

.profile-info { flex: 1; min-width: 200px; }
.profile-name { font-size: 1.7rem; margin-bottom: 6px; }
.profile-faction { color: var(--rad); font-size: .88rem; margin-bottom: 10px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text3); font-size: .82rem; margin-bottom: 12px; }
.profile-bio { color: var(--text2); font-size: .92rem; line-height: 1.6; }
.ban-notice {
  background: oklch(52% .18 25 / .12); border: 1px solid oklch(52% .18 25 / .3);
  color: #e74c3c; padding: 10px 14px; border-radius: 6px;
  margin-top: 12px; font-size: .88rem;
}
.stats-section { margin-top: 10px; }

.kd-bar-section { margin-top: 36px; background: rgba(12,22,24,.25); border: 1px solid rgba(226,238,237,.10); border-radius: 10px; padding: 24px; backdrop-filter: blur(12px); }
.kd-bar-section h3 { font-size: 1rem; margin-bottom: 16px; color: var(--text2); }
.kd-bar-wrap { display: flex; align-items: center; gap: 16px; }
.kd-kills, .kd-deaths { font-family: var(--title); min-width: 80px; font-size: 1.1rem; }
.kd-kills { color: var(--accent3); text-align: right; }
.kd-deaths { color: var(--danger); }
.kd-bar { flex: 1; height: 14px; background: oklch(52% .18 25 / .25); border-radius: 7px; overflow: hidden; }
.kd-fill { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent3)); border-radius: 7px; transition: width .5s ease; }

/* ── SERVER SWITCHER ─────────────────────────────────────── */
.srv-switcher-wrap {
  margin-bottom: 28px;
}
.srv-switcher-label {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(111,175,200,.55);
  margin-bottom: 10px;
}
.srv-switcher {
  display: flex; gap: 0; flex-wrap: wrap;
  background: #060B0C;
  border: 1px solid rgba(111,175,200,.22);
  border-radius: 6px;
  padding: 3px;
  width: fit-content;
}
.srv-switcher__btn {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase; text-decoration: none;
  padding: 9px 22px; border-radius: 4px;
  color: #6FAFC8;
  transition: background .15s, color .15s;
}
.srv-switcher__btn:hover { color: var(--text1); background: rgba(111,175,200,.08); }
.srv-switcher__btn.active {
  background: rgba(111,175,200,.20);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(111,175,200,.30);
}

/* ── LEADERBOARD ─────────────────────────────────────────── */
.lb-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.lb-filter-btn {
  padding: 8px 18px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text2);
  font-size: .85rem; transition: all .2s;
}
.lb-filter-btn:hover, .lb-filter-btn.active {
  border-color: var(--accent); color: var(--accent3);
  background: rgba(111,175,200,.08);
}
.lb-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table thead { background: var(--surface2); }
.lb-table th {
  padding: 12px 16px; text-align: left; font-size: .83rem;
  color: var(--text3); letter-spacing: .06em; font-family: var(--mono);
  border-bottom: 1px solid var(--border);
}
.lb-table td { padding: 12px 16px; border-bottom: 1px solid var(--border2); font-size: .9rem; }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover { background: rgba(111,175,200,.03); }
.rank-1 { background: oklch(72% .14 80 / .06) !important; }
.rank-2 { background: rgba(180,180,180,.04) !important; }
.rank-3 { background: rgba(180,100,30,.05) !important; }
.lb-rank { width: 50px; text-align: center; }
.medal { font-size: 1.2rem; }
.rank-num { color: var(--text3); font-family: var(--mono); }
.lb-name a { color: var(--text); }
.lb-name a:hover { color: var(--accent3); }
.lb-main-stat { color: var(--accent3); font-family: var(--title); font-size: 1rem; }

/* ── STATS / SEARCH ──────────────────────────────────────── */
.search-form { max-width: 600px; margin-bottom: 32px; }
.search-row { display: flex; gap: 10px; }
.search-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 11px 16px; border-radius: var(--radius);
  font-family: var(--mono); font-size: .9rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-hint { color: var(--text3); font-size: .8rem; margin-top: 8px; }
.stats-result-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.stats-result-header { margin-bottom: 28px; }
.stats-result-header h2 { font-size: 1.4rem; margin-bottom: 6px; }
.steam-id-display { display: block; color: var(--text3); font-size: .82rem; margin-top: 6px; }

/* ── NOTICES ─────────────────────────────────────────────── */
.notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: .9rem; }
.notice-warn { background: rgba(24,44,49,.4); border: 1px solid rgba(111,175,200,.4); color: #8DC6D6; }
.notice-info { background: rgba(24,44,49,.4); border: 1px solid rgba(111,175,200,.4); color: #8DC6D6; }

/* ── MODALS ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal {
  background: var(--surface2); border: 1px solid rgba(111,175,200,.5);
  border-radius: 12px; padding: 36px; max-width: 480px; width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,.7);
}
.modal h2 { font-size: 1.3rem; margin-bottom: 24px; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; color: var(--text2); font-size: .85rem; margin-bottom: 6px; letter-spacing: .03em; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: var(--radius);
  font-family: var(--body); font-size: .9rem;
}
select option { background: var(--bg3); color: var(--text); }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* ── ADMIN ───────────────────────────────────────────────── */
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 32px; }
.admin-nav-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 14px 16px; border-radius: 8px; color: var(--text2);
  transition: all .2s; text-align: center; display: flex;
  align-items: center; justify-content: center; min-height: 52px;
  font-size: .88rem; line-height: 1.3;
}
.admin-nav-card:hover { border-color: var(--accent); color: var(--accent3); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.admin-table th { background: var(--surface2); padding: 11px 14px; text-align: left; font-size: .83rem; color: var(--text3); letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border2); font-size: .88rem; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(111,175,200,.03); }
.admin-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
.banned-row { background: oklch(52% .18 25 / .06) !important; }

/* ── ERROR PAGE ──────────────────────────────────────────── */
.error-page { text-align: center; padding: 100px 20px; }
.error-code { font-family: var(--title); font-size: 8rem; color: var(--accent); opacity: .15; line-height: 1; margin-bottom: 16px; }
.error-page h1 { font-size: 1.8rem; margin-bottom: 28px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(111,175,200,.12);
  background: rgba(6,11,12,.75);
  padding: 50px 0 20px;
  margin-top: 40px;
  backdrop-filter: blur(10px);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 36px; }
.footer-brand { font-size: 1.1rem; }
.footer-desc { color: var(--text3); font-size: .82rem; margin-top: 8px; }
.footer h4 { color: var(--text2); font-size: .85rem; letter-spacing: .06em; margin-bottom: 14px; font-family: var(--mono); }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: var(--text3); font-size: .88rem; }
.footer-nav a:hover { color: var(--accent3); }
.footer-ip { color: var(--text3); font-size: .88rem; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid var(--border2); padding-top: 20px; text-align: center; }
.footer-bottom p { color: var(--text3); font-size: .83rem; letter-spacing: .04em; }

/* ── DROPDOWN ────────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  cursor: pointer; color: var(--text2); font-size: .9rem;
  padding: 4px 8px; border-radius: var(--radius);
  transition: color .2s; user-select: none;
}
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active { color: var(--accent3); }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 160px; z-index: 200;
  box-shadow: var(--shadow); flex-direction: column;
  list-style: none; padding: 6px 0;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu li a {
  display: block; padding: 9px 16px; color: var(--text2); font-size: .88rem;
  transition: background .15s, color .15s;
}
.nav-dropdown-menu li a:hover { background: var(--bg3); color: var(--accent3); }

/* ── PAGES (rules, wiki, guides, etc.) ───────────────────── */
.page-section { padding-top: 40px; }
.page-container { max-width: 960px; }
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-header .section-title { margin-bottom: 0; }
.page-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 44px;
  color: var(--text2); line-height: 1.85; font-size: .97rem;
}
.page-content h1,.page-content h2,.page-content h3,.page-content h4 { scroll-margin-top: 80px; }
.page-content h1,.page-content h2,.page-content h3 { color: var(--text); font-family: var(--title); margin: 1.4em 0 .5em; }
.page-content p { margin-bottom: 1em; }
.page-content ul,.page-content ol { padding-left: 1.6em; margin-bottom: 1em; }
.page-content li { margin-bottom: .5em; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.page-content strong { color: var(--text); }
.page-content table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
.page-content th,.page-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.page-content th { background: var(--bg3); color: var(--text); }
@media (max-width: 600px) { .page-content { padding: 20px 16px; } }

/* ── RULES ───────────────────────────────────────────────── */
.rules-layout { display: grid; grid-template-columns: 256px 1fr; gap: 28px; align-items: start; max-width: 1200px; }
.rules-sidebar {
  position: sticky; top: 74px;
  max-height: calc(100vh - 90px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.rules-sidebar-inner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 14px; }
.rules-search-wrap { position: relative; margin-bottom: 14px; }
.rules-search {
  width: 100%; box-sizing: border-box;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 8px 32px 8px 11px; font-size: .83rem; outline: none;
  transition: border-color .2s;
}
.rules-search:focus { border-color: var(--accent); }
.rules-search::placeholder { color: var(--text3); }
.rules-search-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text3);
  cursor: pointer; font-size: .83rem; display: flex;
  align-items: center; padding: 2px; transition: color .15s;
}
.rules-search-clear:hover { color: var(--text); }
.rules-toc-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; font-family: var(--mono); }
.rules-toc { display: flex; flex-direction: column; gap: 1px; }
.toc-link {
  display: block; color: var(--text2); font-size: .82rem;
  padding: 5px 10px; border-radius: 4px; text-decoration: none;
  line-height: 1.4; transition: color .15s, background .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toc-link:hover { color: var(--text); background: rgba(111,175,200,.06); }
.toc-link.active { color: var(--accent3); background: rgba(111,175,200,.1); }
.toc-h1 { font-weight: 600; }
.toc-h2 { padding-left: 14px; }
.toc-h3 { padding-left: 24px; font-size: .82rem; color: var(--text3); }
.toc-h4 { padding-left: 34px; font-size: .83rem; color: var(--text3); }
.search-hl { background: oklch(72% .14 80 / .32); color: var(--text); border-radius: 2px; padding: 0 1px; }
.rules-main { min-width: 0; }
.rules-toc-toggle { display: none; }
@media (max-width: 920px) {
  .rules-layout { grid-template-columns: 1fr; }
  .rules-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    z-index: 300; transform: translateX(-110%);
    transition: transform .25s ease;
    background: var(--bg); border-right: 1px solid var(--border);
    padding: 20px 16px; max-height: 100vh; overflow-y: auto;
    scrollbar-width: thin;
  }
  .rules-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.5); }
  .rules-sidebar-inner { background: none; border: none; padding: 0; }
  .rules-toc-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text2); padding: 6px 14px; border-radius: var(--radius);
    cursor: pointer; font-size: .83rem; transition: all .15s;
  }
  .rules-toc-toggle:hover { border-color: var(--accent); color: var(--accent3); }
}

/* ── GUIDES ──────────────────────────────────────────────── */
.guides-grid { display: flex; flex-direction: column; gap: 12px; }
.guide-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
  text-decoration: none; transition: border-color .2s, transform .15s;
}
.guide-card:hover { border-color: rgba(111,175,200,.4); transform: translateX(4px); }
.guide-num { font-family: var(--mono); font-size: 1.3rem; color: var(--accent2); min-width: 36px; opacity: .7; }
.guide-body { flex: 1; }
.guide-title { color: var(--text); font-size: 1rem; font-family: var(--title); margin: 0 0 4px; }
.guide-preview { color: var(--text3); font-size: .85rem; margin: 0; }
.guide-empty { font-style: italic; }
.guide-arrow { color: var(--accent2); font-size: 1.1rem; }
.guide-card:hover .guide-arrow { color: var(--accent3); }

/* ── WIKI ────────────────────────────────────────────────── */
.wiki-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wiki-cat-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  text-decoration: none; transition: border-color .2s, transform .15s;
}
.wiki-cat-card:hover { border-color: rgba(111,175,200,.4); transform: translateY(-2px); }
.wiki-cat-icon { font-size: 1.8rem; min-width: 36px; text-align: center; }
.wiki-cat-info { flex: 1; }
.wiki-cat-name { color: var(--text); font-size: .95rem; font-family: var(--title); }
.wiki-cat-count { color: var(--text3); font-size: .83rem; font-family: var(--mono); margin-top: 2px; }
.wiki-cat-arrow { color: var(--text3); }
.wiki-cat-card:hover .wiki-cat-arrow { color: var(--accent3); }

.wiki-articles-list { display: flex; flex-direction: column; gap: 8px; }
.wiki-article-row {
  display: flex; align-items: baseline; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  text-decoration: none; transition: border-color .2s;
}
.wiki-article-row:hover { border-color: rgba(111,175,200,.4); }
.wiki-article-title { color: var(--text); font-size: .95rem; font-family: var(--title); min-width: 180px; }
.wiki-article-preview { color: var(--text3); font-size: .82rem; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wiki-article-arrow { color: var(--text3); margin-left: auto; }
.wiki-article-row:hover .wiki-article-arrow { color: var(--accent3); }

.wiki-admin-group { margin-bottom: 10px; }
.wiki-admin-cat-title { color: var(--text2); font-size: .92rem; font-family: var(--mono); margin: 20px 0 8px; letter-spacing: .05em; }

/* ── NEWS LIST / ARTICLE ─────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s;
}
.news-card:hover { border-color: rgba(111,175,200,.4); transform: translateY(-2px); }
.news-card-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.news-category {
  font-family: var(--mono); font-size: .83rem; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 3px; text-transform: uppercase;
}
.news-cat-news   { background: rgba(111,175,200,.15); color: var(--accent3); border: 1px solid var(--accent2); }
.news-cat-update { background: oklch(72% .14 80 / .12);  color: var(--rad);    border: 1px solid var(--rad2); }
.news-cat-event  { background: oklch(52% .18 25 / .12);  color: #e74c3c;       border: 1px solid #922b21; }
.news-cat-ivent  { background: rgba(111,175,200,.15);     color: #A8B5B6;       border: 1px solid #6FAFC8; }
.news-date { color: var(--text3); font-size: .82rem; font-family: var(--mono); }
.news-card-title { color: var(--text); font-size: 1.15rem; margin: 0 0 10px; font-family: var(--title); }
.news-card-preview { color: var(--text2); font-size: .9rem; line-height: 1.6; margin: 0; }
.news-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.news-author { color: var(--text3); font-size: .82rem; }
.news-read-more { color: var(--accent2); font-size: .82rem; font-family: var(--mono); }
.news-card:hover .news-read-more { color: var(--accent3); }

.news-back { display: inline-block; color: var(--text3); font-size: .85rem; margin-bottom: 24px; }
.news-back:hover { color: var(--accent3); }
.news-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; }
.news-article-title { color: var(--text); font-family: var(--title); font-size: 1.6rem; margin: 14px 0 28px; }
.news-article-body { color: var(--text2); line-height: 1.8; font-size: .96rem; }
.news-article-body p { margin-bottom: 1em; min-height: 1em; }
.news-article-body h1,.news-article-body h2,.news-article-body h3,.news-article-body h4 { color: var(--text); margin: 1.5em 0 .5em; font-family: var(--title); }
.news-article-body ul, .news-article-body ol { padding-left: 1.5em; margin-bottom: 1em; }
.news-article-body li { margin-bottom: .4em; }
.news-article-body strong { color: var(--text); font-weight: 600; }
.news-article-body em { font-style: italic; }
.news-article-body img { max-width: 100%; border-radius: var(--radius); margin: 1em 0; }
.news-article-body blockquote {
  padding: 12px 18px 12px 20px;
  margin: 1em 0;
  background: rgba(111,175,200,.05);
  border: 1px solid rgba(111,175,200,.2);
  border-radius: 4px;
  color: var(--text3);
  font-style: italic;
}
@media (max-width: 600px) { .news-article { padding: 20px 16px; } }

/* ── GIVEAWAY ────────────────────────────────────────────── */
.giveaway-active {
  background: var(--surface); border: 1px solid rgba(111,175,200,.3);
  border-radius: var(--radius); padding: 32px 36px;
  box-shadow: 0 0 30px rgba(111,175,200,.06);
}
.giveaway-badge {
  display: inline-block; background: oklch(52% .18 25 / .15); color: #e74c3c;
  border: 1px solid #922b21; font-family: var(--mono); font-size: .83rem;
  letter-spacing: .1em; padding: 3px 10px; border-radius: 3px; margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.giveaway-title { font-family: var(--title); font-size: 1.6rem; color: var(--text); margin: 0 0 12px; }
.giveaway-prize { color: var(--rad); font-size: 1.05rem; margin-bottom: 12px; }
.giveaway-prize strong { color: var(--rad); }
.giveaway-desc { color: var(--text2); margin-bottom: 20px; line-height: 1.6; }
.giveaway-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.giveaway-meta-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.giveaway-meta-item.accent { border-color: rgba(111,175,200,.3); }
.giveaway-meta-label { color: var(--text3); font-size: .82rem; font-family: var(--mono); display: block; margin-bottom: 4px; }
.giveaway-meta-val { color: var(--text); font-size: 1rem; font-family: var(--title); }
.giveaway-meta-item.accent .giveaway-meta-val { color: var(--accent3); font-size: 1.3rem; }
.giveaway-how { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-top: 20px; }
.giveaway-how h3 { color: var(--text2); font-size: .9rem; font-family: var(--mono); margin: 0 0 8px; letter-spacing: .05em; }
.giveaway-how p { color: var(--text3); font-size: .88rem; line-height: 1.6; margin: 0; }
.giveaway-how strong { color: var(--accent3); }

.giveaway-past-list { display: flex; flex-direction: column; gap: 10px; }
.giveaway-past-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; flex-wrap: wrap;
}
.giveaway-past-title { color: var(--text); font-family: var(--title); font-size: .95rem; }
.giveaway-past-prize { color: var(--rad); font-size: .85rem; margin: 2px 0; }
.giveaway-past-date { color: var(--text3); font-size: .83rem; font-family: var(--mono); }
.giveaway-past-winner { text-align: right; }
.winner-label { color: var(--text3); font-size: .82rem; font-family: var(--mono); display: block; margin-bottom: 2px; }
.winner-name { color: var(--accent3); font-family: var(--title); font-size: 1rem; }

/* ── FACTIONS ────────────────────────────────────────────── */
.factions-terminal {
  position: relative;
}
.factions-terminal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.factions-terminal-label {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  color: var(--text3); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.factions-terminal-label::before {
  content: '';
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--accent);
  animation: fTermBlink 2.2s ease-in-out infinite;
}
@keyframes fTermBlink { 0%,100%{opacity:1} 50%{opacity:.3} }
.factions-terminal-count {
  font-family: var(--mono); font-size: .7rem; color: var(--text3);
  background: rgba(111,175,200,.07);
  border: 1px solid rgba(111,175,200,.18);
  padding: 3px 10px; border-radius: 3px;
  letter-spacing: .06em;
}

/* faction grid */
.faction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0;
  border: 1px solid rgba(111,175,200,.14);
  border-radius: 6px;
  overflow: hidden;
}

.faction-card {
  position: relative;
  display: block;
  text-decoration: none;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: background .2s;
  border-right: 1px solid rgba(111,175,200,.10);
  border-bottom: 1px solid rgba(111,175,200,.10);
}
.faction-card::after {
  content: '';
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,.06) 3px, rgba(0,0,0,.06) 4px
  );
  opacity: 0; transition: opacity .2s;
}
.faction-card:hover { background: color-mix(in srgb, var(--bg2) 95%, transparent); }
.faction-card:hover::after { opacity: 1; }

/* banner */
.fc-banner {
  position: relative; height: 80px; overflow: hidden;
}
.fc-banner img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(.5) brightness(.6);
  transition: filter .3s;
}
.faction-card:hover .fc-banner img { filter: saturate(.8) brightness(.75); }
.fc-banner-fallback {
  width: 100%; height: 100%;
  background: #060B0C;
}
/* bottom fade */
.fc-banner::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 36px; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
}

/* meta row inside body */
.fc-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.fc-rec-id {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .09em;
  color: rgba(111,175,200,.5);
}
.fc-status {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 2px;
  display: flex; align-items: center; gap: 4px;
}
.fc-status-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.fc-status--open   { background: rgba(111,175,200,.14); color: #8DC6D6; }
.fc-status--open .fc-status-dot   { background: #8DC6D6; animation: fcDotBlink 1.8s ease-in-out infinite; }
.fc-status--invite { background: oklch(60% .12 80 / .14); color: oklch(72% .12 80); }
.fc-status--invite .fc-status-dot { background: oklch(72% .12 80); }
.fc-status--closed { background: oklch(52% .18 25 / .14); color: oklch(65% .14 25); }
.fc-status--closed .fc-status-dot { background: oklch(62% .14 25); }
@keyframes fcDotBlink { 0%,100%{opacity:1;box-shadow:0 0 4px #8DC6D6} 50%{opacity:.3;box-shadow:none} }

/* body */
.fc-body {
  padding: 10px 14px 12px;
  position: relative; z-index: 2;
}
.fc-top {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 9px;
}
.fc-emblem {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid rgba(111,175,200,.25);
  object-fit: cover;
}
.fc-emblem-fallback {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid rgba(111,175,200,.18);
  background: rgba(111,175,200,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--accent2);
}
.fc-info { flex: 1; min-width: 0; }
.fc-name {
  font-family: var(--title); font-size: .9rem;
  color: var(--text); line-height: 1.2;
  margin-bottom: 3px;
  transition: color .15s;
}
.faction-card:hover .fc-name { color: var(--accent3); }
.fc-motto {
  font-family: var(--mono); font-size: .67rem;
  color: var(--text3); font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* member count bar */
.fc-foot {
  display: flex; align-items: center; gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(111,175,200,.07);
}
.fc-members-label {
  font-family: var(--mono); font-size: .72rem;
  color: #6FAFC8; letter-spacing: .06em;
  white-space: nowrap;
}
.fc-members-label span { color: #E2EEED; font-weight: 700; font-size: .85rem; }
.fc-bar-wrap {
  flex: 1; height: 3px;
  background: rgba(111,175,200,.08);
  border-radius: 2px; overflow: hidden;
}
.fc-bar-fill {
  height: 100%; border-radius: 2px;
  background: rgba(111,175,200,.6);
  transition: width .4s ease;
}
.faction-card:hover .fc-bar-fill { background: var(--accent); }

@media (max-width: 600px) {
  .faction-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .faction-grid { grid-template-columns: 1fr; }
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #182C31; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent2); }

::selection { background: rgba(111,175,200,.25); color: #fff; }
