/* ============================================================
   CS BLACK ANGEL — HUD interface
   Deep black ground, thin glowing borders, notched corners,
   corner brackets, monospace telemetry. Electric blue /
   crimson red / violet purple.
   ============================================================ */

:root {
  /* Ground */
  --void:   #04060a;
  --panel:  rgba(10, 14, 21, 0.72);
  --panel-2:rgba(16, 21, 30, 0.82);
  --plate:  #0a0e15;

  /* Neon */
  --electric: #2f9bff;   /* blue   */
  --crimson:  #ff3355;   /* red    */
  --violet:   #a855f7;   /* purple */
  --acid:     #39ff88;   /* kept for online / success only */
  --amber:    #ffb020;
  --danger:   var(--crimson);

  /* Glow strengths */
  --glow-electric: 0 0 12px rgba(47,155,255,0.55);
  --glow-crimson:  0 0 12px rgba(255,51,85,0.55);
  --glow-violet:   0 0 12px rgba(168,85,247,0.55);
  --glow-acid:     0 0 12px rgba(57,255,136,0.55);

  /* Text */
  --text:      #dbe4ef;
  --text-dim:  #8794a8;
  --text-mute: #566072;

  /* Lines */
  --line:        rgba(47,155,255,0.14);
  --line-soft:   rgba(255,255,255,0.06);
  --line-strong: rgba(47,155,255,0.34);

  /* Back-compat: auth.css and older pages reference these */
  --cyan: var(--electric);   --cyan-dim: #0090b0;
  --purple: var(--violet);   --purple-dim: #6d28a8;
  --green: var(--acid);      --green-dim: #1f9c58;
  --yellow: var(--amber);    --red: var(--crimson);
  --surface: var(--panel);   --surface-2: var(--panel-2);
  --bg: var(--void);         --bg-2: var(--plate);
  --border: var(--line-soft);
  --border-strong: var(--line-strong);
  --chrome: var(--text);
  --ember: var(--violet);    --azure: var(--electric);
  --ember-deep: #6d28a8;     --azure-deep: #0090b0;

  --radius: 0px;      /* HUD panels are square — corners get brackets */
  --radius-sm: 0px;
  --notch: 12px;      /* cut-corner size */
  --wrap: 1200px;

  --font-display: 'Chakra Petch', sans-serif;
  --font-body:    'Barlow', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background layers ───────────────────────────── */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.grid-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(52vw 42vh at 10% 0%,  rgba(47,155,255,0.13), transparent 68%),
    radial-gradient(52vw 42vh at 90% 0%,  rgba(255,51,85,0.11), transparent 68%),
    radial-gradient(70vw 52vh at 50% 106%, rgba(168,85,247,0.10), transparent 72%);
}
/* Fine HUD grid + horizon rule */
.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background-image:
    linear-gradient(rgba(47,155,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,155,255,0.05) 1px, transparent 1px),
    linear-gradient(rgba(47,155,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,155,255,0.022) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 22%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 22%, transparent 78%);
}
nav, main, footer, section { position: relative; z-index: 10; }

/* ── Reusable HUD pieces ─────────────────────────── */

/* Corner brackets — the signature frame */
.hud { position: relative; }
.hud::before, .hud::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  pointer-events: none; opacity: .85;
}
.hud::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--electric); border-left: 1px solid var(--electric);
  box-shadow: -1px -1px 8px rgba(47,155,255,0.35);
}
.hud::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--electric); border-right: 1px solid var(--electric);
  box-shadow: 1px 1px 8px rgba(47,155,255,0.35);
}
.hud--violet::before { border-color: var(--violet); box-shadow: -1px -1px 8px rgba(168,85,247,0.35); }
.hud--violet::after  { border-color: var(--violet); box-shadow: 1px 1px 8px rgba(168,85,247,0.35); }
.hud--crimson::before { border-color: var(--crimson); box-shadow: -1px -1px 8px rgba(255,51,85,0.35); }
.hud--crimson::after  { border-color: var(--crimson); box-shadow: 1px 1px 8px rgba(255,51,85,0.35); }
.hud--acid::before   { border-color: var(--acid);   box-shadow: -1px -1px 8px rgba(57,255,136,0.35); }
.hud--acid::after    { border-color: var(--acid);   box-shadow: 1px 1px 8px rgba(57,255,136,0.35); }

/* Notched corner (cut top-right + bottom-left) */
.notch {
  clip-path: polygon(
    0 0, calc(100% - var(--notch)) 0, 100% var(--notch),
    100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch))
  );
}

/* Micro label — the little mono captions all over a game HUD */
.hud-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--text-mute);
}

/* Status badge / chip */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 11px; border: 1px solid var(--line-strong);
  color: var(--electric); background: rgba(47,155,255,0.07);
  text-shadow: 0 0 8px rgba(47,155,255,0.5);
}
.badge--live   { color: var(--acid);   border-color: rgba(57,255,136,0.4);  background: rgba(57,255,136,0.07);  text-shadow: 0 0 8px rgba(57,255,136,0.5); }
.badge--crimson { color: var(--crimson); border-color: rgba(255,51,85,0.4); background: rgba(255,51,85,0.07); text-shadow: 0 0 8px rgba(255,51,85,0.5); }
.badge--violet { color: var(--violet); border-color: rgba(168,85,247,0.4);  background: rgba(168,85,247,0.07);  text-shadow: 0 0 8px rgba(168,85,247,0.5); }
.badge--off    { color: var(--text-mute); border-color: var(--line-soft);   background: transparent; text-shadow: none; }

/* Tick rail — the little measure marks along a HUD edge */
.ticks {
  height: 7px; width: 100%;
  background-image: repeating-linear-gradient(90deg,
    var(--line-strong) 0 1px, transparent 1px 11px);
  opacity: .55;
}

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: rgba(4,6,10,0.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 22px rgba(47,155,255,0.09);
}
.nav::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--electric) 20%, var(--violet) 50%, var(--crimson) 80%, transparent);
  opacity: .7;
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 26px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.logo-img {
  width: 40px; height: 40px; object-fit: contain; display: block;
  filter: drop-shadow(0 0 10px rgba(47,155,255,0.45));
}
.logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0.18em; color: var(--text); text-transform: uppercase;
}
.logo-accent { color: var(--electric); text-shadow: var(--glow-electric); }

.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; color: var(--text-dim); text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 6px 2px; transition: color .15s, text-shadow .15s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--electric); box-shadow: var(--glow-electric);
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--electric); text-shadow: var(--glow-electric); }
.nav-links a:hover::after, .nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--electric); }

.nav-cta {
  display: inline-block; text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--electric); padding: 10px 20px;
  background: rgba(47,155,255,0.08);
  border: 1px solid var(--line-strong);
  text-shadow: var(--glow-electric);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: all .18s;
}
.nav-cta:hover { background: var(--electric); color: #04060a; text-shadow: none; }
.nav-burger {
  display: none; background: rgba(47,155,255,0.06); border: 1px solid var(--line-strong);
  color: var(--electric); padding: 7px 11px; cursor: pointer; font-size: 15px; line-height: 1;
}

/* ── Hero ────────────────────────────────────────── */
.hero { min-height: auto; display: flex; align-items: center; padding: 132px 24px 76px; }
.hero-inner { max-width: 980px; margin: 0 auto; width: 100%; text-align: center; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 7px 16px; border: 1px solid var(--line-strong);
  background: rgba(47,155,255,0.05); margin-bottom: 28px;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: var(--glow-acid); }
@media (prefers-reduced-motion: no-preference) {
  .pulse-dot { animation: pulse 2.2s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
}

.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.02; letter-spacing: 0.03em;
  margin: 0 0 18px; text-transform: uppercase;
  text-shadow: 0 0 34px rgba(47,155,255,0.28);
}
.hero-title .grad {
  background: linear-gradient(100deg, var(--electric) 0%, #a9d4ff 26%, var(--violet) 58%, #ff8098 84%, var(--crimson) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title .thin {
  display: block; font-family: var(--font-mono); font-weight: 400;
  font-size: .17em; letter-spacing: 0.42em; color: var(--text-mute);
  margin-bottom: 1.1em; text-shadow: none;
}

.seam {
  width: 100%; max-width: 660px; height: 1px; margin: 0 auto 28px;
  background: linear-gradient(90deg, transparent, var(--electric) 18%, var(--violet) 50%, var(--crimson) 82%, transparent);
  box-shadow: 0 0 14px rgba(47,155,255,0.4);
}

.hero-sub { font-size: 16px; color: var(--text-dim); max-width: 620px; margin: 0 auto 34px; }

/* Connect readout */
.connect {
  display: flex; align-items: stretch; flex-wrap: wrap;
  max-width: 580px; margin: 0 auto;
  border: 1px solid var(--line-strong); background: var(--panel);
}
.connect-label {
  display: flex; align-items: center; padding: 0 15px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--electric);
  border-right: 1px solid var(--line); background: rgba(47,155,255,0.08);
  text-shadow: var(--glow-electric);
}
.connect-ip {
  flex: 1; min-width: 190px; border: none; background: none; color: var(--text);
  font-family: var(--font-mono); font-size: 15px; padding: 15px 16px; letter-spacing: .04em;
}
.connect-ip:focus { outline: none; }
.connect-btn {
  border: none; border-left: 1px solid var(--line);
  background: rgba(47,155,255,0.05); color: var(--electric);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0 22px; cursor: pointer; transition: all .15s;
}
.connect-btn:hover { background: var(--electric); color: #04060a; }
.connect-btn.ok { background: var(--acid); color: #04060a; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer; border: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 15px 30px; transition: all .18s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-primary { background: var(--electric); color: #04060a; }
.btn-primary:hover { background: #6de6ff; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(47,155,255,0.05); color: var(--electric);
  box-shadow: inset 0 0 0 1px var(--line-strong); text-shadow: var(--glow-electric);
}
.btn-ghost:hover { background: rgba(47,155,255,0.14); }

/* ── Stat readouts ───────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-width: 900px; margin: 52px auto 0;
}
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 22px 18px 20px; transition: border-color .18s, box-shadow .18s;
  min-width: 0; overflow: hidden;
  /* Flex column so every card ends up the same height and its contents stay
     on one centre line, however many lines the value wraps to. */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  min-height: 108px;
}
/* corner brackets */
.stat::before, .stat::after { content: ''; position: absolute; width: 11px; height: 11px; pointer-events: none; }
.stat::before { top: -1px; left: -1px; border-top: 1px solid var(--electric); border-left: 1px solid var(--electric); }
.stat::after  { bottom: -1px; right: -1px; border-bottom: 1px solid var(--electric); border-right: 1px solid var(--electric); }
.stat:hover { border-color: var(--line-strong); box-shadow: 0 0 24px rgba(47,155,255,0.12); }

.stat-value {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1;
  color: var(--electric); margin-bottom: 7px; text-shadow: var(--glow-electric);
}
.stat-value.purple { color: var(--violet); text-shadow: var(--glow-violet); }
.stat-value.red    { color: var(--crimson); text-shadow: var(--glow-crimson); }
.stat-value.green  { color: var(--acid);   text-shadow: var(--glow-acid); }
.stat-value.yellow { color: var(--amber);  text-shadow: 0 0 12px rgba(255,176,32,0.55); }
/* Long string values (map names) shrink to fit instead of spilling out */
/* Long string values such as map names. Kept as normal flow text so the value
   sits on exactly the same left edge as its label - a flex box here was what
   pushed the map name out of line with the caption underneath it. */
.stat-value.text {
  width: 100%;
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 7px 0 6px;
}
.stat-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.20em; text-transform: uppercase; color: var(--text-mute); }

/* ── Sections ────────────────────────────────────── */
.section { padding: 92px 24px; }
.section-inner { max-width: var(--wrap); margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--electric); margin: 0 0 12px;
  text-shadow: var(--glow-electric);
}
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3.2vw, 34px); text-transform: uppercase;
  letter-spacing: 0.04em; margin: 0;
}
.section-sub { color: var(--text-dim); margin: 14px auto 0; max-width: 620px; }

/* ── Module cards ────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 28px 24px 26px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.card::before, .card::after { content: ''; position: absolute; width: 13px; height: 13px; pointer-events: none; transition: border-color .18s; }
.card::before { top: -1px; left: -1px;  border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.card::after  { bottom: -1px; right: -1px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }
.card:hover { transform: translateY(-3px); border-color: rgba(47,155,255,0.28); box-shadow: 0 0 30px rgba(47,155,255,0.13); }
.card:hover::before, .card:hover::after { border-color: var(--electric); }
.card:nth-child(3n+2):hover { border-color: rgba(168,85,247,0.28); box-shadow: 0 0 30px rgba(168,85,247,0.13); }
.card:nth-child(3n+2):hover::before, .card:nth-child(3n+2):hover::after { border-color: var(--violet); }
.card:nth-child(3n):hover { border-color: rgba(255,51,85,0.28); box-shadow: 0 0 30px rgba(255,51,85,0.13); }
.card:nth-child(3n):hover::before, .card:nth-child(3n):hover::after { border-color: var(--crimson); }

.card-icon {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 15px;
  background: rgba(47,155,255,0.08); border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.card:nth-child(3n+2) .card-icon { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.34); }
.card:nth-child(3n) .card-icon   { background: rgba(255,51,85,0.08);  border-color: rgba(255,51,85,0.34); }

.card h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 9px;
}
.card p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* Index marker on a card (HUD module number) */
.card-idx {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--text-mute);
}

/* ── Panels (profile / admin pages) ──────────────── */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 26px; margin-bottom: 20px;
}
.panel::before, .panel::after { content: ''; position: absolute; width: 13px; height: 13px; pointer-events: none; }
.panel::before { top: -1px; left: -1px;  border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.panel::after  { bottom: -1px; right: -1px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }
.panel h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* ── Footer ──────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 32px 24px 46px; margin-top: 30px; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--text-mute); }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a { color: var(--text-mute); text-decoration: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.footer nav a:hover { color: var(--electric); text-shadow: var(--glow-electric); }

:focus-visible { outline: 1px solid var(--electric); outline-offset: 3px; box-shadow: var(--glow-electric); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 880px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
    background: rgba(4,6,10,0.98); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links a::after { display: none; }
  .nav-burger { display: block; }
  .hero { padding-top: 126px; }
  .section { padding: 62px 24px; }
}


/* ── Scrollbar ───────────────────────────────────── */
html {
  scrollbar-width: thin;                             /* Firefox */
  scrollbar-color: var(--electric) var(--void);
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track {
  background: var(--void);
  border-left: 1px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--electric), var(--violet) 55%, var(--crimson));
  border: 2px solid var(--void);
  box-shadow: inset 0 0 6px rgba(255,255,255,0.22);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6ec4ff, #c084fc 55%, #ff6b80);
}
::-webkit-scrollbar-corner { background: var(--void); }
