:root {
  --void: #0d1117;
  --abyss: #0f1a2e;
  --rift-core: #4f6ef7;
  --rift-glow: #6c8cf8;
  --rift-mid: #a8c0ff;
  --ember: #f5603a;
  --ember-glow: #ff8566;
  --gold: #c9931a;
  --gold-light: #f5c842;
  --text-main: #e6edf3;
  --text-dim: #8b9cbf;
  --border: rgba(108,140,248,.22);
  --surface: rgba(15,26,46,.92);
  --surface2: rgba(22,36,68,.65);
  --green: #3fcf8e;
  --red: #f05057;
  --purple: #a885f7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--void);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Star field */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 60%, rgba(200,200,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 40%  8%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 80%, rgba(220,220,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 55%, rgba(180,200,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 12%, rgba(255,255,255,.8) 0%, transparent 100%),
    radial-gradient(1px 1px at  5% 88%, rgba(200,220,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 33% 45%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 78%  5%, rgba(220,230,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 62% 95%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 72%, rgba(190,210,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 47% 38%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 78%, rgba(210,225,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at  3% 42%, rgba(255,255,255,.7) 0%, transparent 100%);
}

/* Rift glow */
.rift-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.rift-bg::before {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  width: 900px; height: 600px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(79,110,247,.10) 0%,
    rgba(50,80,200,.05) 30%,
    rgba(20,40,100,.02) 60%,
    transparent 80%
  );
  animation: pulse-portal 8s ease-in-out infinite;
}
@keyframes pulse-portal {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity:.5; }
  50%     { transform: translate(-50%,-50%) scale(1.08); opacity:.9; }
}

/* Grid floor */
.grid-floor {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 35vh; z-index: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 0%, rgba(79,110,247,.04) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(108,140,248,.08) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(108,140,248,.08) 60px);
  transform: perspective(600px) rotateX(50deg);
  transform-origin: bottom center;
}

a { color: var(--rift-mid); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; text-decoration: underline; }

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

/* Nav */
nav {
  background: rgba(13,17,23,.96);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
}
nav .container {
  display: flex;
  align-items: center;
  gap: 32px;
}
nav .logo {
  font-family: 'Cinzel Decorative', 'Cinzel', cursive;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  filter: drop-shadow(0 0 6px rgba(245,200,66,.3));
}
nav .logo:hover { text-decoration: none; }
nav .nav-links { display: flex; gap: 24px; }
nav .nav-links a {
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
}
nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--rift-mid);
  text-shadow: 0 0 10px rgba(108,140,248,.45);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  z-index: 10;
  padding: 56px 20px 36px;
  text-align: center;
  background: linear-gradient(180deg, rgba(13,17,23,.85) 0%, transparent 100%);
}
.hero h1 {
  font-family: 'Cinzel Decorative', 'Cinzel', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--rift-mid) 50%, var(--ember-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(108,140,248,.4));
  margin-bottom: 8px;
}
.hero .subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Divider */
.divider {
  display: flex; align-items: center; gap: 18px;
  width: min(600px, 90%);
  margin: 28px auto;
}
.divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider-gem {
  width: 8px; height: 8px;
  background: var(--gold-light);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--gold), 0 0 20px rgba(245,200,66,.3);
}

/* Content wrapper */
.content {
  position: relative;
  z-index: 10;
  padding: 32px 0 64px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(108,140,248,.10);
}
th {
  background: rgba(79,110,247,.10);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--rift-glow);
}
td { font-size: 0.9rem; color: var(--text-main); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(108,140,248,.05); }
.rank-cell {
  font-weight: 700;
  color: var(--gold-light);
  font-size: 1.1rem;
  width: 50px;
  text-align: center;
  text-shadow: 0 0 8px rgba(245,200,66,.35);
}
.model-cell a {
  font-weight: 600;
  color: var(--rift-mid);
}
.model-cell a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(108,140,248,.5);
}
.win { color: var(--green); font-weight: 600; }
.loss { color: var(--red); font-weight: 600; }

/* MPS bars */
.mps-bar-container {
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mps-bar-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 70px;
  text-align: right;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.mps-bar-track {
  flex: 1;
  height: 14px;
  background: rgba(79,110,247,.08);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(108,140,248,.12);
}
.mps-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.mps-bar-fill.outcome  { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.mps-bar-fill.economy  { background: linear-gradient(90deg, #14a064, var(--green)); }
.mps-bar-fill.military { background: linear-gradient(90deg, #c04030, var(--ember-glow)); }
.mps-bar-fill.strategic{ background: linear-gradient(90deg, #5058c0, var(--rift-glow)); }
.mps-bar-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-main);
  min-width: 35px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}
.card h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.card h3 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color .2s;
}
.stat-box:hover { border-color: rgba(108,140,248,.45); }
.stat-value {
  font-family: 'Cinzel Decorative', 'Cinzel', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--rift-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 5px rgba(108,140,248,.25));
}
.stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 6px;
}

/* TV report */
.tv-report {
  background: rgba(79,110,247,.06);
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  font-style: italic;
  line-height: 1.8;
  color: var(--text-main);
}
.tv-report p { margin-bottom: 12px; }
.tv-report p:last-child { margin-bottom: 0; }

/* About / Wiki content */
.page-content h2 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold-light);
  font-size: 1.2rem;
  margin: 32px 0 12px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(245,200,66,.2);
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--rift-mid);
  font-size: 1.05rem;
  margin: 24px 0 10px;
}
.page-content h4 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--text-main);
  font-size: 0.95rem;
  margin: 18px 0 8px;
}
.page-content p { margin-bottom: 12px; color: var(--text-main); font-size: 0.92rem; }
.page-content ul { margin: 0 0 12px 24px; }
.page-content li { margin-bottom: 6px; font-size: 0.92rem; }
.page-content code {
  background: rgba(79,110,247,.10);
  border: 1px solid rgba(108,140,248,.18);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85em;
  color: var(--rift-mid);
}
.page-content strong { color: var(--ember-glow); }
.page-content em { color: var(--rift-glow); font-style: italic; }

/* Wiki layout — sidebar + main */
.wiki-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.wiki-sidebar {
  position: sticky;
  top: 72px;
  flex-shrink: 0;
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.wiki-sidebar h3 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold-light);
  font-size: 0.85rem;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.wiki-sidebar ul { list-style: none; margin: 0; padding: 0; }
.wiki-sidebar li { margin-bottom: 10px; }
.wiki-sidebar a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--rift-mid);
  letter-spacing: 1px;
  display: block;
  padding: 4px 0;
  transition: color .2s, padding-left .2s;
}
.wiki-sidebar a:hover {
  color: #fff;
  padding-left: 6px;
  text-decoration: none;
}
.wiki-sidebar a::before {
  content: '>';
  margin-right: 8px;
  color: var(--gold);
}
.wiki-main {
  flex: 1;
  min-width: 0;
}
.wiki-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 20px;
}
.wiki-section > h2:first-child {
  margin-top: 0;
}
.wiki-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0;
}

/* Feature pills */
.pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  margin: 24px 0;
}
.pill {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--rift-mid);
  background: rgba(79,110,247,.07);
  transition: border-color .2s, background .2s;
}
.pill:hover {
  border-color: rgba(108,140,248,.45);
  background: rgba(79,110,247,.13);
}

/* Footer */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: rgba(139,156,191,.4);
  text-transform: uppercase;
}

/* Blog */
.blog-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.blog-sidebar {
  position: sticky;
  top: 72px;
  flex-shrink: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.blog-sidebar h3 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--gold-light);
  font-size: 0.85rem;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.blog-sidebar ul { list-style: none; margin: 0; padding: 0; }
.blog-sidebar li { margin-bottom: 12px; }
.blog-sidebar a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--rift-mid);
  letter-spacing: 0.5px;
  display: block;
  padding: 4px 0;
  transition: color .2s, padding-left .2s;
  line-height: 1.4;
}
.blog-sidebar a:hover {
  color: #fff;
  padding-left: 6px;
  text-decoration: none;
}
.blog-sidebar a::before {
  content: '>';
  margin-right: 8px;
  color: var(--gold);
}
.blog-sidebar a.active {
  color: #fff;
  padding-left: 6px;
}
.blog-sidebar .post-date {
  display: block;
  font-size: 0.58rem;
  color: rgba(139,156,191,.5);
  margin-top: 2px;
}
.blog-main {
  flex: 1;
  min-width: 0;
}
.blog-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 20px;
}
.blog-article h2 {
  margin-top: 0;
  color: var(--gold-light);
  font-family: 'Cinzel', Georgia, serif;
}
.blog-article .blog-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: rgba(139,156,191,.6);
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.blog-article p {
  line-height: 1.75;
  margin-bottom: 1em;
}
.blog-article blockquote {
  border-left: 3px solid var(--rift-core);
  margin: 1.5em 0;
  padding: 0.5em 1em;
  color: var(--text-dim);
  font-style: italic;
}

/* Responsive */
@media (max-width: 800px) {
  .wiki-layout { flex-direction: column; }
  .wiki-sidebar { position: static; width: 100%; }
  .blog-layout { flex-direction: column; }
  .blog-sidebar { position: static; width: 100%; }
}
@media (max-width: 600px) {
  th, td { padding: 8px 10px; font-size: 0.82rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  nav .container { gap: 16px; flex-wrap: wrap; }
  nav .logo { font-size: 1rem; }
  nav .nav-links { gap: 14px; }
  nav .nav-links a { font-size: 0.68rem; }
  .wiki-section { padding: 16px; }
}
