/* ===== LinuxDojo BBS Theme (Neon variant) =====
   Retro CRT with your original neon palette and centered layout.
================================================= */
:root {
  /* Neon colors from your original theme */
  --accent-blue: #00f0ff;     /* electric blue */
  --accent-green: #00ff80;    /* vibrant green */

  /* Derived palette for BBS look */
  --bbs-bg: #0b0f14;          /* deep dark base (close to your #121212) */
  --bbs-fg: var(--accent-blue);
  --bbs-accent: var(--accent-green);
  --bbs-dim: rgba(0, 240, 255, 0.25);
  --bbs-link: var(--accent-blue);
  --bbs-link-hover: var(--accent-green);

  --content-max: 960px;
  --panel-pad: 18px;

  --glow: 0 0 6px var(--bbs-fg), 0 0 12px var(--bbs-fg);
}

html, body { height: 100%; }
body {
  margin: 0;
  color: var(--bbs-fg);
  background:
    radial-gradient(ellipse at center, #061018 0%, #000 70%),
    var(--bbs-bg);
  font-family: "VT323", "Share Tech Mono", monospace;
  font-size: 22px;
  line-height: 1.35;
  text-shadow: var(--glow);
}

/* CRT scanlines + vignette */
.crt::before,
.crt::after {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: 0;
  z-index: 9999;
}
.crt::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.035) 0px,
    rgba(255,255,255,0.035) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: overlay;
}
.crt::after {
  background: radial-gradient(ellipse at center, transparent 0%, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* Blink cursor */
@keyframes blink { 50% { opacity: 0; } }
.cursor { display: inline-block; width: 0.6ch; animation: blink 1s steps(1,end) infinite; }

/* Decorative lines */
.bbs-topline, .bbs-bottomline {
  text-align: center;
  color: var(--bbs-accent);
  letter-spacing: 0.5px;
}

/* Header */
.bbs-header {
  max-width: var(--content-max);
  margin: 20px auto 0 auto;
  padding: 8px 12px;
}
.bbs-title {
  text-align: center;
  margin: 8px 0 6px 0;
  font-size: 2.2rem;
  letter-spacing: 1px;
}

/* Status bar */
.bbs-statusbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  opacity: 0.95;
}
.bbs-statusbar .sep { opacity: 0.6; }

/* BBS nav — keep this on all pages for consistent look */
.bbs-nav ul {
  list-style: none;
  padding: 0;
  margin: 10px auto 8px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  max-width: var(--content-max);
}
.bbs-nav a {
  color: var(--bbs-link);
  text-decoration: none;
  border-bottom: 1px dotted var(--bbs-link);
}
.bbs-nav a:hover,
.bbs-nav a:focus {
  color: var(--bbs-link-hover);
  border-bottom-color: var(--bbs-link-hover);
  text-shadow: 0 0 8px var(--bbs-link-hover);
}

/* Main content */
.bbs-main {
  max-width: var(--content-max);
  margin: 16px auto 0 auto;
  /* ↓↓↓ tightened bottom padding to match header → first panel gap */
  padding: 0 12px 16px 12px;  /* was 60px */
}

/* Boxy panels */
.bbs-panel {
  position: relative;
  margin: 20px auto;
  padding: calc(var(--panel-pad) + 10px) var(--panel-pad) var(--panel-pad) var(--panel-pad);
  border: 2px solid var(--bbs-fg);
  box-shadow: inset 0 0 0 2px var(--bbs-dim), 0 0 18px 2px var(--bbs-dim);
  background: linear-gradient(180deg, rgba(0,32,48,0.25), rgba(0,0,0,0.55));
}
.bbs-panel::before, .bbs-panel::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 2px solid var(--bbs-fg);
}
.bbs-panel::before {
  left: -2px; top: -2px;
  border-right: none; border-bottom: none;
}
.bbs-panel::after {
  right: -2px; bottom: -2px;
  border-left: none; border-top: none;
}
.panel-title {
  position: absolute;
  top: -13px;
  left: 18px;
  padding: 0 8px;
  background: #000;
  color: var(--bbs-accent);
  text-shadow: 0 0 8px var(--bbs-accent);
}

/* Portrait */
.bbs-portrait {
  display: block;
  margin: 0 auto 10px auto;
  max-width: 300px;
  height: auto;
  border: 2px solid var(--accent-blue);
  padding: 4px;
  background: #000;
  box-shadow: 0 0 18px rgba(0,240,255,0.45);
}

/* Headings / body text */
.bbs-h2 {
  text-align: center;
  margin: 6px 0 8px 0;
  font-size: 1.9rem;
  color: var(--accent-blue);
  text-shadow: 0 0 12px var(--accent-blue), 0 0 22px var(--accent-blue);
}
.bbs-text {
  text-align: center;
  margin: 0 auto;
  max-width: 720px;
  color: #e0e6ed;
}

/* Code block / server stats — CENTERED */
.code-block {
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent-green);
    background-color: #000;

    padding: 20px;
    border-radius: 6px;
    margin: 20px auto;

    font-size: 0.8em;
    white-space: pre;
    word-break: normal;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow-x: auto;
    overflow-y: hidden;

    max-width: 90%;
    min-width: 60%;
    text-align: center;
}
.code-block.center { text-align: center; }

/* Footer — centered with logo */
.bbs-footer {
  max-width: var(--content-max);
  margin: 0 auto 30px auto;
  text-align: center;
}
.footer-badge img {
  height: 31px;
  width: 88px;
  border: 0;
  display: block;
  margin: 0 auto;
}

/* Noscript box */
.bbs-noscript {
  max-width: var(--content-max);
  margin: 10px auto;
  border: 1px dashed var(--accent-blue);
  padding: 8px 12px;
  text-align: center;
  background: #000;
  color: var(--accent-green);
}

/* Links (global) */
a { color: var(--bbs-link); text-decoration: none; }
a:hover { color: var(--bbs-link-hover); text-decoration: underline; }

/* Responsive tweaks */
@media (max-width: 720px) {
  body { font-size: 20px; }
  .bbs-portrait { max-width: 220px; }
  .bbs-nav ul { gap: 6px 12px; }
  .bbs-title { font-size: 1.9rem; }
}
@media (max-width: 480px) {
  body { font-size: 19px; }
  .bbs-portrait { max-width: 180px; }
  .bbs-statusbar { flex-wrap: wrap; gap: 6px; }
  .panel-title { left: 10px; }
}
/* Ensure box-drawing borders align cleanly */
.bbs-topline,
.bbs-bottomline,
.panel-title {
  font-family: 'Share Tech Mono', monospace;
  white-space: pre;
  letter-spacing: 0;
}

/* === News feed sizing + scroll === */
.news-feed {
  max-height: 420px;       /* about ~10 items */
  overflow-y: auto;        /* vertical scroll only */
  overflow-x: hidden;      /* absolutely no horizontal scroll */
  padding-right: 6px;
}

/* Styled vertical scrollbar only */
.news-feed::-webkit-scrollbar {
  width: 10px;
}
.news-feed::-webkit-scrollbar-track {
  background: #000;
}
.news-feed::-webkit-scrollbar-thumb {
  background-color: var(--accent-green);
  border-radius: 6px;
  border: 2px solid #000;
}

.news-list { list-style: none; margin: 6px 0 8px; padding: 0; }
.news-item { margin: 4px 0; line-height: 1.3; }

/* Wrap long headlines gracefully */
.news-item a {
  color: var(--bbs-link);
  text-decoration: none;
  border-bottom: 1px dotted var(--bbs-link);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.news-item a:hover,
.news-item a:focus {
  color: var(--bbs-link-hover);
  border-bottom-color: var(--bbs-link-hover);
  text-shadow: 0 0 8px var(--bbs-link-hover);
}

.news-meta {
  opacity: 0.8;
  font-size: 0.9em;
  margin-left: 6px;
  color: #e0e6ed;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .news-meta { display: block; margin: 2px 0 0 0; }
}

.news-updated {
  margin-top: 10px;
  font-size: 0.9em;
  opacity: 0.75;
  color: var(--accent-green);
}

/* (Optional) Keep a tiny nudge if needed */
.bbs-panel:last-of-type { margin-bottom: 8px; }
