/* ============================================================
   C.W.F — Community Board  |  style.css  v2
   Cold Steel + Neon Blue / Purple / Green Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:             #050810;
  --surface:        #090e1a;
  --surface-2:      #0d1525;
  --surface-3:      #111c2f;
  --border:         #192847;
  --border-dim:     #0f1e35;

  --accent:         #00aaff;
  --accent-dim:     #007de8;
  --accent-glow:    rgba(0, 170, 255, 0.16);
  --accent-glow-s:  rgba(0, 170, 255, 0.32);

  --highlight:      #a855f7;
  --highlight-dim:  #7e22ce;
  --highlight-glow: rgba(168, 85, 247, 0.22);

  --accent-green:   #00e5a0;
  --green-glow:     rgba(0, 229, 160, 0.20);

  --steel:          #8fb2e3;
  --text:           #cfe3ff;
  --text-muted:     #4e6a96;
  --text-dim:       #2d4a6e;
  --danger:         #ff4560;
  --warn:           #f59e0b;

  --radius:         8px;
  --radius-lg:      16px;
  --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:          62px;
  --mono:           'JetBrains Mono', monospace;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* subtle scanline */
body::after {
  content: ''; position: fixed; inset: 0;
  pointer-events: none; z-index: 9000;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px);
}

/* ── NAV ──────────────────────────────────────────────────── */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(5,8,16,0.94);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 40px rgba(0,170,255,0.07);
}
.nav-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.3;
}
.nav-brand { display: flex; align-items: center; gap: 4px; text-decoration: none; z-index: 1; -webkit-user-select: none; user-select: none; }
.brand-glyph { font-size: 1.6rem; font-weight: 800; color: var(--accent); font-family: var(--mono); text-shadow: 0 0 16px var(--accent-glow-s); letter-spacing: -2px; }
.brand-name { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.brand-one { color: var(--accent); text-shadow: 0 0 10px var(--accent); }

.nav-links { display: flex; gap: 0; align-items: center; z-index: 1; }
.nav-link {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em;
  padding: 0.45rem 1rem; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-glow); }
.nav-right { display: flex; align-items: center; gap: 0.6rem; z-index: 1; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.7rem 1.6rem; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none; letter-spacing: 0.02em; font-family: 'Inter', sans-serif;
}
.btn-sm { padding: 0.45rem 1rem; font-size: 0.78rem; }
.btn-primary { background: var(--accent); color: #021424; box-shadow: 0 0 18px var(--accent-glow-s); }
.btn-primary:hover { background: #2ddcff; box-shadow: 0 0 30px rgba(0,170,255,0.5); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); background: var(--accent-glow); transform: translateY(-1px); }
.btn-purple { background: var(--highlight); color: #1a003d; box-shadow: 0 0 18px var(--highlight-glow); }
.btn-purple:hover { background: #c177ff; transform: translateY(-1px); }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  height: 600px;
  background: #020508;
  margin-top: var(--nav-h);
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; z-index: 0;
}

/* Horizontal scanning beam */
.hero-scan-beam {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,170,255,0.6), rgba(0,170,255,0.9), rgba(0,170,255,0.6), transparent);
  box-shadow: 0 0 20px rgba(0,170,255,0.5), 0 0 60px rgba(0,170,255,0.2);
  z-index: 1;
  animation: scanBeam 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanBeam {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Glowing orbs */
.hero-orb {
  position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
  animation: orbPulse 6s ease-in-out infinite;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  top: -150px; left: -100px;
  background: radial-gradient(circle, rgba(0,170,255,0.12) 0%, transparent 70%);
  animation-delay: 0s;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  bottom: -120px; right: -80px;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
  animation-delay: 2s;
}
.hero-orb-3 {
  width: 300px; height: 300px;
  top: 30%; right: 15%;
  background: radial-gradient(circle, rgba(0,229,160,0.08) 0%, transparent 70%);
  animation-delay: 4s;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.15); opacity: 1; }
}

/* Hero overlay content */
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
  background: linear-gradient(180deg, rgba(2,5,8,0.05) 0%, rgba(2,5,8,0.4) 55%, rgba(2,5,8,1) 100%);
}

/* Typewriter eyebrow */
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  color: var(--accent); letter-spacing: 0.22em;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero-cursor-blink {
  display: inline-block; color: var(--accent);
  animation: blink 0.8s step-end infinite;
  font-size: 0.65rem;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Hero title with glitch layers */
.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; color: #fff;
  margin-bottom: 1.1rem; text-transform: uppercase;
  position: relative;
}
.hero-line-1 {
  display: block;
  animation: glitchLine 8s infinite;
}
.hero-line-2 {
  display: block;
  color: var(--accent);
  text-shadow: 0 0 50px rgba(0,170,255,0.85), 0 0 100px rgba(0,170,255,0.4);
  animation: accentPulse 3s ease-in-out infinite, glitchAccent 8s infinite 1s;
}
@keyframes accentPulse {
  0%, 100% { text-shadow: 0 0 40px rgba(0,170,255,0.7), 0 0 80px rgba(0,170,255,0.3); }
  50%       { text-shadow: 0 0 70px rgba(0,170,255,1), 0 0 130px rgba(0,170,255,0.5), 0 0 200px rgba(0,170,255,0.2); }
}
@keyframes glitchLine {
  0%, 90%, 100% { transform: translate(0); clip-path: none; }
  91%  { transform: translate(-3px, 1px); clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); }
  92%  { transform: translate(3px, -1px); clip-path: none; }
  93%  { transform: translate(-2px, 0); clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); }
  94%  { transform: translate(0); clip-path: none; }
}
@keyframes glitchAccent {
  0%, 88%, 100% { transform: translate(0); }
  89% { transform: translate(4px, -2px); filter: hue-rotate(20deg); }
  90% { transform: translate(-4px, 1px); filter: hue-rotate(-20deg); }
  91% { transform: translate(0); filter: none; }
}

/* Hero CTA pulse ring */
.hero-btn-pulse { position: relative; }
.hero-btn-pulse::before {
  content: ''; position: absolute; inset: -4px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulseRing 2.5s ease-out infinite;
}
@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hero-sub {
  font-size: 1rem; color: var(--steel);
  max-width: 560px; margin-bottom: 2rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* Floating ambient data tags */
.hft {
  position: absolute; z-index: 1;
  font-family: var(--mono); font-size: 0.62rem;
  color: rgba(0,170,255,0.35);
  letter-spacing: 0.15em; pointer-events: none;
  animation: hftFloat 8s ease-in-out infinite;
}
.hft-1 { top: 18%; left: 6%;  animation-delay: 0s;   animation-duration: 9s; }
.hft-2 { top: 35%; right: 5%; animation-delay: 1.5s; animation-duration: 11s; color: rgba(168,85,247,0.3); }
.hft-3 { bottom: 22%; left: 8%; animation-delay: 3s;  animation-duration: 8s; color: rgba(0,229,160,0.3); }
.hft-4 { top: 60%; right: 9%; animation-delay: 2s;   animation-duration: 10s; }
.hft-5 { top: 12%; right: 18%; animation-delay: 4s;  animation-duration: 12s; color: rgba(0,229,160,0.25); }
.hft-6 { bottom: 30%; right: 25%; animation-delay: 1s; animation-duration: 9.5s; color: rgba(168,85,247,0.25); }
@keyframes hftFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.6; }
  33%       { transform: translateY(-8px) translateX(4px); opacity: 1; }
  66%       { transform: translateY(6px) translateX(-3px); opacity: 0.4; }
}

/* ── STATS BAR ────────────────────────────────────────────── */
.stats-bar {
  display: flex; justify-content: center; flex-wrap: wrap;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.3rem 2.5rem; border-right: 1px solid var(--border);
  flex: 1; min-width: 130px;
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--mono); font-size: 1.8rem; font-weight: 700;
  color: var(--accent); text-shadow: 0 0 14px var(--accent-glow); line-height: 1;
}
.stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-top: 0.3rem; }

/* ── CONTAINER ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section-label {
  font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent); margin-bottom: 0.55rem; opacity: 0.8;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 700; color: #fff; margin-bottom: 0.45rem; letter-spacing: -0.02em; }
.section-desc { color: var(--text-muted); font-size: 0.93rem; max-width: 600px; margin-bottom: 3rem; }

/* ── CATEGORY CARDS — horizontal stack ─────────────────────── */
.cat-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cat-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 0;
  text-decoration: none; color: var(--text);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
}
.cat-card:hover { transform: translateY(-3px); }

.cat-card-inner {
  display: flex; align-items: stretch; gap: 0;
  min-height: 140px;
}

/* left accent strip */
.cat-card-left {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem; padding: 2rem 1.75rem;
  min-width: 110px;
  border-right: 1px solid var(--border-dim);
  background: rgba(5,8,16,0.4);
}
.cat-num {
  font-family: var(--mono); font-size: 0.6rem;
  color: var(--text-dim); letter-spacing: 0.25em;
}
.cat-icon-wrap {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.cat-card:hover .cat-icon-wrap { transform: scale(1.08); }
.cat-icon-wrap-cyan   { background: rgba(0,170,255,0.1); border: 1px solid rgba(0,170,255,0.25); color: var(--accent); }
.cat-icon-wrap-purple { background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.25); color: var(--highlight); }
.cat-icon-wrap-green  { background: rgba(0,229,160,0.1); border: 1px solid rgba(0,229,160,0.25); color: var(--accent-green); }
.cat-card:hover .cat-icon-wrap-cyan   { box-shadow: 0 0 22px rgba(0,170,255,0.35); }
.cat-card:hover .cat-icon-wrap-purple { box-shadow: 0 0 22px rgba(168,85,247,0.35); }
.cat-card:hover .cat-icon-wrap-green  { box-shadow: 0 0 22px rgba(0,229,160,0.35); }

/* body */
.cat-card-body { flex: 1; padding: 1.6rem 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cat-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cat-title { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.cat-thread-count {
  font-family: var(--mono); font-size: 0.65rem;
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--border-dim);
  color: var(--text-muted); background: rgba(255,255,255,0.03);
  white-space: nowrap;
}
.cat-desc { font-size: 0.86rem; color: var(--text-muted); line-height: 1.7; flex: 1; }

/* subcategory tag pills */
.cat-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.cat-tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.05em;
  padding: 4px 11px; border-radius: 20px; border: 1px solid;
  transition: all var(--transition); white-space: nowrap;
}
.cat-tag-cyan   { color: var(--accent);       border-color: rgba(0,170,255,0.2);   background: rgba(0,170,255,0.06); }
.cat-tag-purple { color: var(--highlight);    border-color: rgba(168,85,247,0.2);  background: rgba(168,85,247,0.06); }
.cat-tag-green  { color: var(--accent-green); border-color: rgba(0,229,160,0.2);   background: rgba(0,229,160,0.06); }
.cat-card:hover .cat-tag-cyan   { border-color: rgba(0,170,255,0.4);  background: rgba(0,170,255,0.1); }
.cat-card:hover .cat-tag-purple { border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.1); }
.cat-card:hover .cat-tag-green  { border-color: rgba(0,229,160,0.4);  background: rgba(0,229,160,0.1); }

/* right arrow */
.cat-card-arrow {
  display: flex; align-items: center; justify-content: center;
  padding: 0 1.5rem; font-size: 1.3rem;
  color: var(--text-dim); transition: color var(--transition), transform var(--transition);
  border-left: 1px solid var(--border-dim);
  background: rgba(5,8,16,0.2);
}
.cat-card:hover .cat-card-arrow { transform: translateX(4px); }
.cat-cyan:hover  .cat-card-arrow { color: var(--accent); }
.cat-purple:hover .cat-card-arrow { color: var(--highlight); }
.cat-green:hover  .cat-card-arrow { color: var(--accent-green); }

/* left border colour glow */
.cat-glow {
  position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  border-radius: 0;
}
.cat-cyan   .cat-glow { background: var(--accent); box-shadow: 2px 0 16px rgba(0,170,255,0.4); }
.cat-purple .cat-glow { background: var(--highlight); box-shadow: 2px 0 16px rgba(168,85,247,0.4); }
.cat-green  .cat-glow { background: var(--accent-green); box-shadow: 2px 0 16px rgba(0,229,160,0.4); }

.cat-cyan   { border-color: rgba(0,170,255,0.15); }
.cat-purple { border-color: rgba(168,85,247,0.15); }
.cat-green  { border-color: rgba(0,229,160,0.12); }
.cat-cyan:hover   { border-color: rgba(0,170,255,0.4);  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 25px rgba(0,170,255,0.15); }
.cat-purple:hover { border-color: rgba(168,85,247,0.4); box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 25px rgba(168,85,247,0.15); }
.cat-green:hover  { border-color: rgba(0,229,160,0.4);  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 25px rgba(0,229,160,0.15); }

/* ── ACTIVITY FEED ────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 3px; }
.activity-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border-dim);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}
.activity-row:hover { background: var(--surface-2); border-color: var(--border); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-cyan   { background: var(--accent);       box-shadow: 0 0 6px var(--accent); }
.dot-purple { background: var(--highlight);    box-shadow: 0 0 6px var(--highlight); }
.dot-green  { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.activity-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.activity-title { font-size: 0.9rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { font-family: var(--mono); font-size: 0.62rem; color: var(--text-dim); }
.activity-confirms { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.cat-badge-cyan   { color: var(--accent); }
.cat-badge-purple { color: var(--highlight); }
.cat-badge-green  { color: var(--accent-green); }

/* ── BOARD LAYOUT ─────────────────────────────────────────── */
.board-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}
.panel { border-bottom: 1px solid var(--border); }
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: rgba(5,8,16,0.55);
  border-bottom: 1px solid var(--border-dim);
}
.panel-title { font-family: var(--mono); font-size: 0.58rem; color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; }
.panel-status { font-family: var(--mono); font-size: 0.56rem; color: var(--text-dim); }
.online-count { font-size: 2.2rem; font-weight: 700; color: var(--accent-green); text-shadow: 0 0 14px var(--green-glow); font-family: var(--mono); }
.online-label { font-family: var(--mono); font-size: 0.56rem; color: var(--text-dim); letter-spacing: 0.16em; text-transform: uppercase; }
.pbar-row { display: flex; align-items: center; gap: 8px; }
.pbar-track { height: 3px; background: #111; flex: 1; border-radius: 2px; }
.pbar-fill { height: 100%; background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); transition: width 0.6s; border-radius: 2px; }

/* Category group headers in sidebar */
.sidebar-cat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 6px;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: #fff;

  background: rgba(5,8,16,0.3);
  cursor: pointer; -webkit-user-select: none; user-select: none;
  transition: color var(--transition);
}
.sidebar-cat-header:hover { color: var(--text-muted); }
.sidebar-cat-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sidebar-cat-dot-cyan   { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.sidebar-cat-dot-purple { background: var(--highlight); box-shadow: 0 0 5px var(--highlight); }
.sidebar-cat-dot-green  { background: var(--accent-green); box-shadow: 0 0 5px var(--accent-green); }

/* Channel list items */
.channel-list { 
  list-style: none; margin-bottom: 0.5rem; 
  max-height: 250px; overflow-y: auto; 
}
.channel-list::-webkit-scrollbar { width: 4px; }
.channel-list::-webkit-scrollbar-track { background: transparent; }
.channel-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.channel-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.channel-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px 8px 28px;
  cursor: pointer; font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  color: var(--text); letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(9,14,26,0.8);
  transition: color var(--transition), background var(--transition), padding-left var(--transition);
  position: relative;
}
.channel-item::before {
  content: '#'; position: absolute; left: 14px;
  color: var(--text-dim); opacity: 0.4; font-size: 0.6rem;
  transition: color var(--transition), opacity var(--transition);
}
.channel-item:hover { color: var(--text-muted); background: rgba(255,255,255,0.02); }
.channel-item:hover::before { color: var(--accent); opacity: 0.7; }
.channel-item.active {
  color: var(--accent); background: rgba(0,170,255,0.06);
  border-left: 2px solid var(--accent); padding-left: 26px;
}
.channel-item.active::before { color: var(--accent); opacity: 1; }
.channel-item.ch-purple.active { color: var(--highlight); border-left-color: var(--highlight); background: rgba(168,85,247,0.06); }
.channel-item.ch-purple.active::before { color: var(--highlight); }
.channel-item.ch-purple:hover { color: var(--highlight); }
.channel-item.ch-green.active { color: var(--accent-green); border-left-color: var(--accent-green); background: rgba(0,229,160,0.06); }
.channel-item.ch-green.active::before { color: var(--accent-green); }
.channel-item.ch-green:hover { color: var(--accent-green); }
.channel-count {
  font-size: 0.56rem; color: var(--text-dim);
  background: rgba(255,255,255,0.04); border-radius: 10px;
  padding: 1px 6px; border: 1px solid var(--border-dim);
}
.channel-item.active .channel-count { border-color: rgba(0,170,255,0.3); color: var(--accent); }

/* Glowing General Channels */
.channel-item.glowing-channel {
  box-shadow: inset 0 0 12px rgba(0, 170, 255, 0.15), 0 0 8px rgba(0, 170, 255, 0.1);
  border-left: 2px solid var(--accent);
  background: rgba(0, 170, 255, 0.08);
  font-weight: 700;
}
.channel-item.glowing-channel:hover { background: rgba(0, 170, 255, 0.12); }
.channel-item.glowing-channel::before {
  content: '⚲'; color: var(--accent); opacity: 1;
  text-shadow: 0 0 8px var(--accent-glow);
  font-size: 0.9rem; left: 11px;
}

.channel-item.ch-purple.glowing-channel {
  box-shadow: inset 0 0 12px rgba(168, 85, 247, 0.15), 0 0 8px rgba(168, 85, 247, 0.1);
  border-left-color: var(--highlight);
  background: rgba(168, 85, 247, 0.08);
}
.channel-item.ch-purple.glowing-channel:hover { background: rgba(168, 85, 247, 0.12); }
.channel-item.ch-purple.glowing-channel::before { color: var(--highlight); text-shadow: 0 0 8px var(--highlight-glow); }

.channel-item.ch-green.glowing-channel {
  box-shadow: inset 0 0 12px rgba(0, 229, 160, 0.15), 0 0 8px rgba(0, 229, 160, 0.1);
  border-left-color: var(--accent-green);
  background: rgba(0, 229, 160, 0.08);
}
.channel-item.ch-green.glowing-channel:hover { background: rgba(0, 229, 160, 0.12); }
.channel-item.ch-green.glowing-channel::before { color: var(--accent-green); text-shadow: 0 0 8px var(--green-glow); }


/* Category items (top-level) */
.cat-nav-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; cursor: pointer;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-dim);
  transition: color var(--transition), background var(--transition);
}
.cat-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.cat-nav-item.active { color: var(--accent); background: rgba(0,170,255,0.07); }
.cat-nav-item.cat-nav-purple.active { color: var(--highlight); background: rgba(168,85,247,0.07); }
.cat-nav-item.cat-nav-green.active { color: var(--accent-green); background: rgba(0,229,160,0.07); }
.cat-nav-count { font-size: 0.62rem; color: var(--text-dim); }

/* Tier badges */
.tier-badge { font-family: var(--mono); font-size: 0.56rem; padding: 1px 6px; border: 1px solid; border-radius: 3px; }
.tier-RECRUIT    { color: #7a9cc4; border-color: #1a3255; }
.tier-OPERATOR   { color: var(--accent); border-color: var(--accent-dim); }
.tier-SPECIALIST { color: var(--highlight); border-color: var(--highlight-dim); }
.tier-ADMIN      { color: #ff4560; border-color: #7a0022; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
#main-content { padding: 1.75rem; background: var(--bg); overflow-y: auto; }

.board-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 1.4rem; overflow: hidden;
}
.board-header-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 18px; border-bottom: 1px solid var(--border-dim);
}
.board-header-label { font-family: var(--mono); font-size: 0.65rem; color: var(--accent); letter-spacing: 0.16em; }
.board-header-controls {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 18px;
}
.board-thread-count { font-family: var(--mono); font-size: 0.62rem; color: var(--text-dim); }

/* Thread table */
.thread-table { width: 100%; border-collapse: collapse; }
.thread-row { border-bottom: 1px solid var(--border-dim); cursor: pointer; transition: background var(--transition); }
.thread-row:hover { background: rgba(9, 14, 30, 0.8); }
.thread-title-cell { padding: 14px 18px; }
.thread-title-text { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 5px; line-height: 1.4; }
.thread-meta { font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim); }
.thread-confirms { color: var(--accent); }
.thread-badge-cell { text-align: right; white-space: nowrap; padding: 14px 18px; vertical-align: middle; }
.badge { font-family: var(--mono); font-size: 0.56rem; padding: 3px 8px; letter-spacing: 1px; border: 1px solid; border-radius: 4px; }
.badge-hot    { color: #ff4560; border-color: rgba(255,69,96,0.5); background: rgba(255,69,96,0.06); }
.badge-new    { color: var(--accent); border-color: rgba(0,170,255,0.4); background: rgba(0,170,255,0.06); }
.badge-active { color: var(--accent-green); border-color: rgba(0,229,160,0.4); background: rgba(0,229,160,0.06); }
.badge-op     { color: var(--warn); border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.06); }

.badge-op     { color: var(--warn); border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.06); }
 
/* Pinned threads */
.thread-row.pinned { background: rgba(0, 170, 255, 0.04); border-left: 2px solid var(--accent); }
.thread-row.pinned:hover { background: rgba(0, 170, 255, 0.08); }
.pinned-icon { color: var(--accent); font-size: 0.8rem; margin-right: 4px; display: inline-block; transform: rotate(45deg); }
 /* ── POST CARDS ───────────────────────────────────────────── */
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden;
  transition: border-color var(--transition);
}
.post-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(5,8,16,0.45); border-bottom: 1px solid var(--border-dim);
  flex-wrap: wrap;
}
/* avatar chip in post header */
.post-avatar-chip {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  flex-shrink: 0; border: 1.5px solid;
}
.post-callsign {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
  color: var(--accent); cursor: pointer; transition: color var(--transition);
}
.post-callsign:hover { color: #fff; }
.post-tier { font-family: var(--mono); font-size: 0.56rem; padding: 1px 6px; border: 1px solid; border-radius: 3px; }
.post-spec { font-family: var(--mono); font-size: 0.56rem; color: var(--text-dim); }
.post-time { font-family: var(--mono); font-size: 0.56rem; color: var(--text-dim); margin-left: auto; }
.post-body { padding: 1.1rem 1.3rem; color: #8dafc8; font-size: 0.88rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.post-footer { display: flex; align-items: center; gap: 1rem; padding: 7px 1.3rem; border-top: 1px solid var(--border-dim); }
.confirm-btn {
  background: none; border: 1px solid var(--border-dim); color: var(--text-dim);
  font-family: var(--mono); font-size: 0.68rem; padding: 3px 12px;
  cursor: pointer; letter-spacing: 1px; transition: all var(--transition); border-radius: 4px;
}
.confirm-btn:hover, .confirm-btn.confirmed { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.confirm-count { color: var(--accent); font-family: var(--mono); font-size: 0.7rem; }

/* Reply inputs */
.reply-box { margin-top: 1.3rem; border: 1px solid var(--border); padding: 1.1rem; background: var(--surface); border-radius: var(--radius-lg); }
.reply-textarea {
  width: 100%; background: rgba(5,8,16,0.6); border: 1px solid var(--border-dim);
  color: var(--text); font-family: var(--mono); font-size: 0.82rem;
  padding: 0.8rem; resize: vertical; min-height: 100px; outline: none;
  transition: border-color var(--transition); border-radius: 6px;
}
.reply-textarea:focus { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.back-btn {
  background: none; border: 1px solid var(--border-dim); color: var(--text-muted);
  font-family: var(--mono); font-size: 0.7rem; padding: 5px 14px;
  cursor: pointer; letter-spacing: 1px; transition: all var(--transition); border-radius: 4px;
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── MODALS ───────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.hidden { display: none; }
.modal {
  background: #060b16; border: 1px solid var(--accent);
  box-shadow: 0 0 80px rgba(0,170,255,0.15), 0 0 0 1px rgba(0,170,255,0.05);
  padding: 2rem; width: 100%; max-width: 460px;
  position: relative; max-height: 92vh; overflow-y: auto;
  border-radius: var(--radius-lg);
  animation: modalIn 0.22s ease forwards;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-title { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.28em; margin-bottom: 1.5rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; transition: color var(--transition); }
.modal-close:hover { color: var(--danger); }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.38rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: rgba(5,8,16,0.75); border: 1px solid var(--border); color: var(--text);
  font-family: var(--mono); font-size: 0.84rem; padding: 0.65rem 0.85rem; outline: none;
  transition: border-color var(--transition); border-radius: 6px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.form-select option { background: var(--surface); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--danger); font-family: var(--mono); font-size: 0.68rem; margin-bottom: 0.5rem; min-height: 1.1em; }

/* Avatar colour picker in registration */
.avatar-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.35rem; }
.avatar-swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s; flex-shrink: 0;
}
.avatar-swatch:hover { transform: scale(1.15); }
.avatar-swatch.selected { border-color: #fff; box-shadow: 0 0 10px currentColor; transform: scale(1.1); }

/* Interests tag input */
.interests-preview { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.interest-chip {
  font-family: var(--mono); font-size: 0.58rem; padding: 3px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  color: var(--text-muted); background: rgba(255,255,255,0.03);
}

/* ── PROFILE PANEL ────────────────────────────────────────── */
.profile-panel {
  position: fixed; top: var(--nav-h); right: 0; bottom: 0;
  width: 360px; background: #060b16;
  border-left: 1px solid var(--border);
  z-index: 300; overflow-y: auto;
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -16px 0 50px rgba(0,0,0,0.7);
}
.profile-panel.open { transform: translateX(0); }
.profile-panel.hidden { display: none; }
.profile-inner { padding: 2rem 1.5rem 3rem; }
.profile-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; }
.profile-close:hover { color: var(--danger); }

/* Profile header strip */
.profile-header {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-dim);
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; font-family: var(--mono);
  flex-shrink: 0; border: 2px solid;
}
.profile-header-info { flex: 1; min-width: 0; }
.profile-callsign { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 4px; word-break: break-all; }
.profile-tier-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 6px; }
.profile-spec { font-family: var(--mono); font-size: 0.62rem; color: var(--text-dim); }
.profile-joined { font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim); margin-top: 4px; }

/* Stat grid — 4 cells */
.profile-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.4rem; }
.profile-stat { background: var(--surface-2); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 0.8rem; text-align: center; }
.profile-stat-n { font-family: var(--mono); font-size: 1.3rem; color: var(--accent); font-weight: 700; line-height: 1; }
.profile-stat-l { font-family: var(--mono); font-size: 0.55rem; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }

/* Bio section */
.profile-section-title {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 0.55rem;
}
.profile-bio { font-size: 0.84rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.3rem; white-space: pre-wrap; }

/* Interests tags */
.profile-interests { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.profile-interest-tag {
  font-family: var(--mono); font-size: 0.6rem; padding: 4px 12px;
  border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted);
  background: rgba(255,255,255,0.03); transition: all var(--transition);
}
.profile-interest-tag:hover { border-color: var(--accent); color: var(--accent); }

/* Edit section */
.profile-edit-section { border-top: 1px solid var(--border-dim); padding-top: 1.3rem; margin-top: 0.5rem; }

/* ── CHANNEL HEADER TAGS ──────────────────────────────────── */
.channel-cat-tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; padding: 3px 9px; border-radius: 4px; border: 1px solid; }
.tag-cyan   { color: var(--accent);       border-color: var(--accent-dim);    background: rgba(0,170,255,0.07); }
.tag-purple { color: var(--highlight);    border-color: var(--highlight-dim); background: rgba(168,85,247,0.07); }
.tag-green  { color: var(--accent-green); border-color: #006644;              background: rgba(0,229,160,0.07); }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.footer-brand { display: flex; align-items: center; gap: 4px; }
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.82rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim); text-align: center; line-height: 1.8; }

/* ── MOBILE CATEGORY TABS ─────────────────────────────────── */
.mobile-cat-tabs {
  display: none; /* hidden on desktop */
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 400;
  background: rgba(5,8,16,0.97);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-cat-tabs::-webkit-scrollbar { display: none; }

.mobile-cat-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: none; border: none; border-bottom: 2px solid transparent;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.mobile-cat-tab .mobile-cat-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.tab-cyan .mobile-cat-dot   { background: var(--accent); }
.tab-purple .mobile-cat-dot { background: var(--highlight); }
.tab-green .mobile-cat-dot  { background: var(--accent-green); }

.mobile-cat-tab.tab-cyan.active   { color: var(--accent);       border-bottom-color: var(--accent);       background: rgba(0,170,255,0.07); }
.mobile-cat-tab.tab-purple.active { color: var(--highlight);    border-bottom-color: var(--highlight);    background: rgba(168,85,247,0.07); }
.mobile-cat-tab.tab-green.active  { color: var(--accent-green); border-bottom-color: var(--accent-green); background: rgba(0,229,160,0.07); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .mobile-cat-tabs { display: flex; }
  .board-layout {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 42px); /* extra offset for tab bar */
  }
  .sidebar { display: none; }
  .cat-grid { gap: 1rem; }
  .cat-card-left { min-width: 80px; padding: 1.5rem 1rem; }
  .stats-bar { gap: 0; }
  .stat-item { min-width: 50%; }
  .profile-panel { width: 100%; right: -100%; }
  .admin-container { grid-template-columns: 1fr; padding: 1rem; }
}

@media (max-width: 640px) {
  #topnav { padding: 0 1rem; }
  .nav-brand { gap: 2px; }
  .brand-glyph { font-size: 1.3rem; }
  .brand-name { font-size: 1.1rem; }
  .nav-right span { display: none; } /* Hide names on strict mobile to save space */
  .nav-right .btn-sm { padding: 0.35rem 0.55rem; font-size: 0.65rem; }

  .hero { height: 520px; }
  .hero-title { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .cat-card-inner { flex-direction: column; }
  .cat-card-left { flex-direction: row; justify-content: flex-start; min-width: unset; border-right: none; border-bottom: 1px solid var(--border-dim); padding: 1rem; }
  .cat-card-arrow { display: none; }
  .hft { display: none; }

  .thread-table tr { display: flex; justify-content: space-between; align-items: center; }
  .thread-title-cell { padding: 12px 10px; flex: 1; min-width: 0; }
  .thread-badge-cell { padding: 12px 10px 12px 0; }

  .post-card { padding: 1rem; }
  .post-header { flex-wrap: wrap; gap: 0.25rem; }
  
  .profile-stat-grid { grid-template-columns: 1fr 1fr !important; }
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }

  .modal { width: 95%; padding: 1.2rem; }
}
/* Utility Classes */
.pd-std { padding: 14px 16px; }
.mt-x { margin-top: 8px; }
.flex-1 { flex: 1; }
.legend-text { font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim); line-height: 2.2; }
.legend-title { color: #333; margin-bottom: 4px; }
.pt-0 { padding-top: 0; }
.text-center { text-align: center; }
.mt-2rem { margin-top: 2rem; }
.back-link { color: var(--text-dim); text-decoration: none; }
