
:root {
  --bg: #1a1a2e;
  --surface: #16213e;
  --surface2: #0f3460;
  --accent: #e94560;
  --text: #e0e0e0;
  --muted: #888;
  --link: #7ec8e3;
  --code-bg: #0d1b2a;
  --border: #2a2a4a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }
.topnav {
  background: var(--surface);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topnav span { color: var(--muted); }
main {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}
h1 { color: var(--link); margin-bottom: 1.2rem; font-size: 2rem; }
h2 { color: var(--link); margin: 1.5rem 0 0.5rem; font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
h3 { color: var(--text); margin: 1rem 0 0.3rem; }
p { margin-bottom: 0.8rem; }
pre, code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
}
pre { padding: 1rem; overflow-x: auto; margin: 0.8rem 0; }
code { padding: 0.15rem 0.4rem; }
pre code { border: none; padding: 0; background: none; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th { background: var(--surface2); color: var(--link); padding: 0.5rem 0.8rem; text-align: left; }
td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); }
tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.page-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
  margin-top: 1rem;
}
.page-list li a {
  display: block;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.page-list li a:hover {
  border-color: var(--accent);
  background: var(--surface2);
  text-decoration: none;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.category-card .icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.category-card h2 { border: none; font-size: 1.1rem; }
.category-card p { font-size: 0.85rem; color: var(--muted); margin: 0; }
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
/* Wiki content fixes */
.wiki-content .mw-parser-output { }
.wiki-content .toccolours { background: var(--surface); border: 1px solid var(--border); padding: 0.5rem; border-radius: 4px; margin-bottom: 1rem; }
.wiki-content dl dt { font-weight: bold; color: var(--link); margin-top: 0.5rem; }
.wiki-content dl dd { margin-left: 1.5rem; }
.wiki-content .mbox, .wiki-content .ambox { background: var(--surface); border-left: 4px solid var(--accent); padding: 0.5rem 1rem; margin: 1rem 0; border-radius: 0 4px 4px 0; }
#help_header, #LSLHeader { display: none !important; }
