/* ============================================================
   Spacewar.wiki — Retro Oscilloscope / CRT Terminal Theme
   Inspired by the 1962 PDP-1 vector display
   ============================================================ */

:root {
  /* Core palette — phosphor green on deep space black */
  --bg-deep: #050508;
  --bg-surface: #0a0e14;
  --bg-card: #0d1117;
  --bg-card-hover: #111820;
  --bg-terminal: #07090d;

  --phosphor: #39ff14;        /* classic CRT green */
  --phosphor-dim: #1a8a0a;
  --phosphor-glow: rgba(57, 255, 20, 0.4);
  --cyan: #00f0ff;             /* oscilloscope cyan accent */
  --cyan-dim: #008899;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --amber: #ffb000;            /* warning/highlight amber */
  --amber-dim: #996600;
  --amber-glow: rgba(255, 176, 0, 0.3);
  --red: #ff3355;
  --red-glow: rgba(255, 51, 85, 0.3);

  --text-primary: #d4f5d0;
  --text-secondary: #7a9a75;
  --text-muted: #4a6a45;
  --text-bright: #e8ffe0;

  --border-phosphor: rgba(57, 255, 20, 0.25);
  --border-cyan: rgba(0, 240, 255, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.06);

  --font-mono: 'Courier New', 'Lucida Console', 'Monaco', 'Consolas', monospace;
  --font-display: var(--font-mono);

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

  --shadow-glow-green: 0 0 20px rgba(57, 255, 20, 0.15), 0 0 40px rgba(57, 255, 20, 0.05);
  --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.12), 0 0 40px rgba(0, 240, 255, 0.04);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);

  --nav-height: 60px;
  --max-width: 1100px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-mono);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9998;
}

/* CRT vignette */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 9997;
}

/* Starfield background */
.starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 45% 75%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 65% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 25% 35%, rgba(57,255,20,0.3), transparent),
    radial-gradient(2px 2px at 75% 65%, rgba(0,240,255,0.2), transparent),
    var(--bg-deep);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-bright);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-shadow: 0 0 10px var(--phosphor-glow), 0 0 30px rgba(57,255,20,0.15);
  margin-bottom: 0.5em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-glow);
  margin: 2em 0 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border-phosphor);
  position: relative;
}

h2::before {
  content: '> ';
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-glow);
}

h3 {
  font-size: 1.25rem;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-glow);
  margin: 1.5em 0 0.6em;
}

h3::before {
  content: '>> ';
  color: var(--phosphor-dim);
  font-size: 0.85em;
}

h4 {
  font-size: 1.05rem;
  color: var(--amber);
  margin: 1.2em 0 0.5em;
}

p { margin-bottom: 1em; }

a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dotted var(--cyan-dim);
  transition: all 0.2s ease;
}

a:hover {
  color: var(--phosphor);
  border-bottom-color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-glow);
}

strong { color: var(--text-bright); font-weight: 700; }
em { color: var(--amber); font-style: normal; }

ul, ol { margin: 0.5em 0 1em 1.5em; }
li { margin-bottom: 0.4em; }
li::marker { color: var(--phosphor-dim); }

code {
  font-family: var(--font-mono);
  background: var(--bg-terminal);
  color: var(--phosphor);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-phosphor);
  font-size: 0.9em;
}

pre {
  background: var(--bg-terminal);
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius-md);
  padding: 1.2em;
  overflow-x: auto;
  margin: 1em 0;
  box-shadow: inset 0 0 30px rgba(57,255,20,0.03);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

blockquote {
  border-left: 3px solid var(--phosphor);
  padding: 0.8em 1.2em;
  margin: 1em 0;
  background: rgba(57,255,20,0.03);
  color: var(--text-secondary);
  font-style: italic;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2em 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92em;
}

th {
  background: var(--bg-card);
  color: var(--phosphor);
  text-align: left;
  padding: 0.7em 1em;
  border-bottom: 2px solid var(--phosphor-dim);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.05em;
}

td {
  padding: 0.6em 1em;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

tr:hover td { background: rgba(57,255,20,0.03); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

main {
  padding-top: calc(var(--nav-height) + 30px);
  padding-bottom: 60px;
  min-height: calc(100vh - var(--nav-height));
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-phosphor);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 0 30px rgba(57,255,20,0.05);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border: none;
  color: var(--phosphor);
  font-weight: 700;
  font-size: 1.15rem;
  text-shadow: 0 0 8px var(--phosphor-glow);
  letter-spacing: 0.05em;
}

.nav-brand:hover { color: var(--cyan); text-shadow: 0 0 12px var(--cyan-glow); }

.nav-brand-icon {
  width: 32px; height: 32px;
  border: 1.5px solid var(--phosphor);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor-glow), inset 0 0 8px rgba(57,255,20,0.1);
  position: relative;
}

.nav-brand-icon::after {
  content: '';
  position: absolute;
  width: 4px; height: 4px;
  background: var(--phosphor);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--phosphor);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li { margin: 0; }

.nav-links a {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--phosphor);
  background: rgba(57,255,20,0.08);
  text-shadow: 0 0 6px var(--phosphor-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-phosphor);
  color: var(--phosphor);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 100px 20px 80px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 2em;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("/images/pdp1-crt-green.jpg") center center / cover no-repeat;
  opacity: 0.6;
  z-index: -2;
  filter: saturate(1.3) contrast(1.15) brightness(0.9);
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at center, rgba(5,5,8,0.15) 0%, rgba(5,5,8,0.5) 60%, rgba(5,5,8,0.8) 100%),
    linear-gradient(180deg, rgba(5,5,8,0.4) 0%, rgba(5,5,8,0.2) 40%, rgba(5,5,8,0.5) 100%);
  z-index: -1;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5em;
  padding: 6px 16px;
  border: 1px solid var(--border-cyan);
  border-radius: 100px;
  background: rgba(0,240,255,0.04);
  text-shadow: 0 0 6px var(--cyan-glow);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin-bottom: 0.3em;
  letter-spacing: 0.05em;
}

.hero h1 .accent { color: var(--cyan); text-shadow: 0 0 15px var(--cyan-glow); }

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2em;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin: 2em 0;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--phosphor);
  text-shadow: 0 0 12px var(--phosphor-glow);
  display: block;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2em;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--phosphor);
  border-radius: var(--radius-md);
  color: var(--phosphor);
  background: rgba(57,255,20,0.05);
  cursor: pointer;
  transition: all 0.25s ease;
  text-shadow: 0 0 6px var(--phosphor-glow);
  letter-spacing: 0.03em;
}

.btn:hover {
  background: rgba(57,255,20,0.12);
  box-shadow: 0 0 20px var(--phosphor-glow), inset 0 0 15px rgba(57,255,20,0.05);
  transform: translateY(-1px);
  color: var(--text-bright);
  border-color: var(--phosphor);
}

.btn-cyan {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,240,255,0.05);
  text-shadow: 0 0 6px var(--cyan-glow);
}

.btn-cyan:hover {
  background: rgba(0,240,255,0.12);
  box-shadow: 0 0 20px var(--cyan-glow);
  color: var(--text-bright);
  border-color: var(--cyan);
}

.btn-amber {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255,176,0,0.05);
  text-shadow: 0 0 6px var(--amber-glow);
}

.btn-amber:hover {
  background: rgba(255,176,0,0.12);
  box-shadow: 0 0 20px var(--amber-glow);
  color: var(--text-bright);
  border-color: var(--amber);
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ---- Cards / Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 2em 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phosphor-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  border-color: var(--border-phosphor);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-green), var(--shadow-card);
}

.card:hover::before { opacity: 1; }

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 0 8px var(--phosphor-glow));
}

.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  border: none;
  padding: 0;
}

.card h3::before { content: ''; }

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  text-decoration: none;
}

.card-link::after { content: ' →'; transition: margin-left 0.2s; }
.card-link:hover::after { margin-left: 4px; }

/* ---- Section helpers ---- */
.section { margin: 3em 0; }

.section-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 750px;
  margin-bottom: 1.5em;
}

/* ---- Terminal box ---- */
.terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1.5em 0;
  box-shadow: var(--shadow-glow-green);
}

.terminal-header {
  background: var(--bg-card);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-phosphor);
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--phosphor-dim);
}

.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

.terminal-title {
  margin-left: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--phosphor);
  text-shadow: 0 0 4px rgba(57,255,20,0.3);
}

.terminal-body .prompt { color: var(--cyan); }
.terminal-body .output { color: var(--text-secondary); }
.terminal-body .highlight { color: var(--amber); }
.terminal-body .cursor {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--phosphor);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 30px;
  margin: 2em 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--phosphor), var(--cyan-dim));
  box-shadow: 0 0 8px var(--phosphor-glow);
}

.timeline-item {
  position: relative;
  margin-bottom: 2em;
  padding-left: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px;
  width: 12px; height: 12px;
  background: var(--bg-deep);
  border: 2px solid var(--phosphor);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--phosphor-glow);
}

.timeline-year {
  color: var(--cyan);
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 0 6px var(--cyan-glow);
  margin-bottom: 4px;
}

.timeline-title {
  color: var(--text-bright);
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ---- FAQ / Accordion ---- */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover { border-color: var(--border-phosphor); }

.faq-question {
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: none;
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.faq-question:hover { background: var(--bg-card-hover); color: var(--phosphor); }

.faq-question .faq-icon {
  color: var(--phosphor);
  font-size: 1.2rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 18px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumb a {
  color: var(--text-muted);
  border: none;
}

.breadcrumb a:hover { color: var(--phosphor); }

.breadcrumb-sep { color: var(--phosphor-dim); }

.breadcrumb-current { color: var(--text-secondary); }

/* ---- Page header ---- */
.page-header {
  margin-bottom: 2.5em;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.3em;
}

.page-header .page-lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 700px;
}

/* ---- Feature / highlight box ---- */
.highlight-box {
  background: linear-gradient(135deg, rgba(57,255,20,0.06), rgba(0,240,255,0.04));
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 2em 0;
  position: relative;
}

.highlight-box.amber {
  background: linear-gradient(135deg, rgba(255,176,0,0.06), rgba(255,51,85,0.03));
  border-color: rgba(255,176,0,0.3);
}

.highlight-box.red {
  background: linear-gradient(135deg, rgba(255,51,85,0.06), rgba(255,176,0,0.03));
  border-color: rgba(255,51,85,0.3);
}

.highlight-box h3 { margin-top: 0; }

/* ---- Two column layout ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 2em 0;
}

/* ---- Tag / badge ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 100px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green { color: var(--phosphor); border-color: var(--phosphor-dim); background: rgba(57,255,20,0.08); }
.badge-cyan { color: var(--cyan); border-color: var(--cyan-dim); background: rgba(0,240,255,0.08); }
.badge-amber { color: var(--amber); border-color: var(--amber-dim); background: rgba(255,176,0,0.08); }
.badge-red { color: var(--red); border-color: rgba(255,51,85,0.4); background: rgba(255,51,85,0.08); }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-phosphor);
  background: var(--bg-surface);
  padding: 40px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand h4 {
  color: var(--phosphor);
  margin-bottom: 10px;
  font-size: 1.1rem;
  text-shadow: 0 0 8px var(--phosphor-glow);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-col h5 {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: var(--text-muted);
  font-size: 0.88rem;
  border: none;
  text-decoration: none;
}

.footer-col a:hover { color: var(--phosphor); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 15px;
  line-height: 1.6;
  font-style: italic;
}

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-phosphor);
  border-radius: 50%;
  color: var(--phosphor);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 0 15px rgba(57,255,20,0.1);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(57,255,20,0.1);
  box-shadow: 0 0 20px var(--phosphor-glow);
  transform: translateY(-2px);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-phosphor);
    gap: 4px;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: block; }

  .hero { padding: 50px 16px 40px; }
  .hero-stats { gap: 24px; }
  .hero-stat-value { font-size: 1.5rem; }

  .card-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  main { padding-top: calc(var(--nav-height) + 20px); }

  table { font-size: 0.82rem; }
  th, td { padding: 0.5em 0.7em; }

  .back-to-top { bottom: 20px; right: 20px; width: 38px; height: 38px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .terminal-body { font-size: 0.8rem; padding: 12px; }
}

/* ---- Print ---- */
@media print {
  body::before, body::after, .starfield, .nav, .back-to-top { display: none; }
  body { background: white; color: black; }
  h1, h2, h3 { color: black; text-shadow: none; }
  .card { border: 1px solid #ccc; background: white; }
}

/* ---- Game Images & Gallery ---- */
.image-frame {
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5em 0;
  background: var(--bg-card);
  box-shadow: var(--shadow-glow-green), var(--shadow-card);
  position: relative;
}

.image-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.image-frame:hover img {
  transform: scale(1.02);
}

.image-frame .image-caption {
  padding: 12px 18px;
  background: var(--bg-terminal);
  border-top: 1px solid var(--border-phosphor);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}

.image-frame .image-caption::before {
  content: '> ';
  color: var(--phosphor-dim);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 1.5em 0;
}

.image-gallery .image-frame {
  margin: 0;
}

.image-gallery .image-frame .image-caption {
  font-size: 0.78rem;
  padding: 8px 12px;
}

.hero-image-strip {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 2em auto 0;
  max-width: 800px;
  flex-wrap: wrap;
}

.hero-image-strip .thumb {
  width: 140px;
  height: 100px;
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius-md);
  overflow: hidden;
  opacity: 0.7;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-image-strip .thumb:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 0 15px var(--phosphor-glow);
}

.hero-image-strip .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-image-strip .thumb {
    width: 100px;
    height: 75px;
  }
  .image-gallery {
    grid-template-columns: 1fr;
  }
}
