:root {
  --bg-page: #080a0f;
  --bg-surface: #0e121b;
  --bg-card: #141a26;
  --bg-sidebar: #0b0f17;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(244, 63, 94, 0.4);

  --accent-primary: #f43f5e;
  --accent-secondary: #fb7185;
  --accent-glow: rgba(244, 63, 94, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.7;
}

.wiki-layout {
  display: flex;
  min-height: 100vh;
}

.wiki-sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  padding: 30px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
}

.sidebar-nav-group {
  margin-bottom: 24px;
}

.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sidebar-links a:hover, .sidebar-links a.active {
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-secondary);
}

.wiki-content {
  flex-grow: 1;
  max-width: 920px;
  padding: 40px 48px 80px;
}

.wiki-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 36px;
}

.wiki-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.wiki-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--accent-secondary);
}

p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

pre {
  background: #05070a;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #e2e8f0;
  overflow-x: auto;
  margin-bottom: 20px;
}

code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-secondary);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.alert-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.alert-box h4 {
  color: var(--accent-primary);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .wiki-layout {
    flex-direction: column;
  }
  .wiki-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .wiki-content {
    padding: 24px;
  }
}
