/* ===================== */
/* === WIKI HEADER    === */
/* ===================== */

.wiki-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #0d0d0d;
  border-bottom: 1px solid #1a1a1a;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px 0 0;
  gap: 0;
}

.wiki-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: 252px;
  min-width: 252px;
  padding: 0 16px 0 20px;
  box-sizing: border-box;
  border-right: 1px solid #1e1e1e;
  flex-shrink: 0;
}

.wiki-header-logo {
  height: 30px;
  width: auto;
}

.wiki-header-site-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wiki-header-site-name sup {
  font-size: 0.65em;
  font-weight: 700;
  vertical-align: super;
  letter-spacing: 0.03em;
  color: #fff;
}

html[data-wiki-theme="light"] .wiki-header-site-name { color: #111; }
html[data-wiki-theme="light"] .wiki-header-site-name sup { color: #111; }

/* Outlined badge wie OPSUCHT */
.wiki-header-badge {
  border: 1px solid rgba(100, 149, 255, 0.45);
  color: #6699ff;
  background: rgba(100, 149, 255, 0.07);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.wiki-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.wiki-header-nav a {
  color: #666;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.wiki-header-nav a:hover {
  color: #ccc;
  background: rgba(255,255,255,0.04);
}

.wiki-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wiki-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #141414;
  border: 1px solid #242424;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.18s;
  min-width: 160px;
}

.wiki-header-search:hover { border-color: #2e2e2e; }
.wiki-header-search i { color: #3a3a3a; font-size: 0.75rem; }
.wiki-header-search span { color: #3a3a3a; font-size: 0.82rem; flex: 1; }
.wiki-header-search kbd {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.7rem;
  color: #444;
  font-family: inherit;
}

/* Theme-Toggle-Button */
.wiki-theme-toggle {
  background: #141414;
  border: 1px solid #242424;
  border-radius: 8px;
  color: #555;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.wiki-theme-toggle:hover { color: #ccc; border-color: #333; }

/* ===================== */
/* === WIKI LAYOUT    === */
/* ===================== */

.wiki-shell {
  display: flex;
}

.wiki-sidebar {
  width: 252px;
  min-width: 252px;
  flex-shrink: 0;
  background: #0d0d0d;
  border-right: 1px solid #1a1a1a;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, border-color 0.2s;
}

.wiki-nav { padding: 10px 0 24px; flex: 1; }

.wiki-nav-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
  padding: 10px 18px 6px;
  transition: color 0.2s;
}

.wiki-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.wiki-nav-item i {
  width: 14px;
  text-align: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  opacity: 0.6;
}

.wiki-nav-item:hover {
  color: #aaa;
  background: rgba(255,255,255,0.02);
  text-decoration: none;
}

.wiki-nav-item.active {
  color: #eee;
  border-left-color: #d32f2f;
  background: rgba(211, 47, 47, 0.06);
  font-weight: 500;
}

.wiki-nav-item.active i { opacity: 1; }

.wiki-nav-divider {
  height: 1px;
  background: #1e1e1e;
  margin: 8px 10px;
}
html[data-wiki-theme="light"] .wiki-nav-divider { background: #e8e8e8; }

.wiki-nav-sup {
  font-size: 0.58em;
  font-weight: 700;
  vertical-align: super;
  letter-spacing: 0.02em;
}

.wiki-nav-badge-alpha {
  font-size: 0.6rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wiki-nav-sub {
  margin: 2px 0 6px 14px;
  padding-left: 12px;
  border-left: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wiki-nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: #555;
  text-decoration: none;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}

.wiki-nav-sub-item i {
  width: 12px;
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.7;
}

.wiki-nav-sub-item:hover {
  color: #bbb;
  background: rgba(255,255,255,0.03);
}

html[data-wiki-theme="light"] .wiki-nav-sub { border-left-color: #ddd; }
html[data-wiki-theme="light"] .wiki-nav-sub-item { color: #aaa; }
html[data-wiki-theme="light"] .wiki-nav-sub-item:hover { color: #333; background: rgba(0,0,0,0.04); }

.wiki-main { flex: 1; min-width: 0; display: flex; }

.wiki-content {
  flex: 1;
  min-width: 0;
  padding: 44px 52px 90px;
  transition: background 0.2s;
}

.wiki-page-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e1e1e;
  line-height: 1.2;
  transition: color 0.2s, border-color 0.2s;
}

/* Prose */
.wiki-prose h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
  transition: color 0.2s, border-color 0.2s;
}

.wiki-prose h3 { font-size: 1rem; font-weight: 600; color: #ddd; margin: 22px 0 8px; transition: color 0.2s; }
.wiki-prose p { color: #888; line-height: 1.75; margin: 0 0 14px; font-size: 0.92rem; transition: color 0.2s; }
.wiki-prose a { color: #d32f2f; }
.wiki-prose a:hover { text-decoration: underline; }
.wiki-prose ul, .wiki-prose ol { color: #888; font-size: 0.92rem; line-height: 1.75; padding-left: 22px; margin: 0 0 14px; transition: color 0.2s; }
.wiki-prose li { margin-bottom: 5px; }
.wiki-prose strong { color: #bbb; font-weight: 600; transition: color 0.2s; }

.wiki-info-box {
  background: rgba(255,255,255,0.04);
  border-left: 3px solid #888;
  border-radius: 0 8px 8px 0;
  padding: 13px 16px;
  margin-bottom: 22px;
  color: #999;
  font-size: 0.88rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: color 0.2s, background 0.2s;
}

.wiki-info-box i { color: #aaa; flex-shrink: 0; margin-top: 2px; }
.wiki-info-box a { color: #bbb; }

/* Farbige Info-Box Varianten */
.wiki-info-discord {
  border-color: #7c3aed !important;
  background: rgba(60,20,120,0.45) !important;
}
.wiki-info-discord i  { color: #b57bff !important; }
.wiki-info-discord a  { color: #c4a0ff !important; }

.wiki-info-warning {
  border-color: #d32f2f !important;
  background: rgba(211,47,47,0.12) !important;
}
.wiki-info-warning i  { color: #ef4444 !important; }


/* === Such-Modal (Header) === */
.wiki-search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.wiki-search-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.wiki-search-modal {
  background: #191919;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(-8px);
  transition: transform 0.18s;
}
.wiki-search-modal-overlay.open .wiki-search-modal { transform: translateY(0); }
.wiki-search-modal-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #222;
}
.wiki-search-modal-top i { color: #555; font-size: 0.9rem; flex-shrink: 0; }
.wiki-search-modal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 0.97rem;
  color: #eee;
  font-family: inherit;
}
.wiki-search-modal-input::placeholder { color: #3a3a3a; }
.wiki-search-modal-esc {
  font-size: 0.68rem;
  color: #3a3a3a;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 2px 6px;
  background: #111;
  flex-shrink: 0;
  cursor: pointer;
}
.wiki-search-modal-results { max-height: 380px; overflow-y: auto; }
.wiki-search-modal-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 0.88rem;
  color: #888;
  text-decoration: none;
  border-bottom: 1px solid #1c1c1c;
  transition: background 0.1s, color 0.1s;
}
.wiki-search-modal-result:last-child { border-bottom: none; }
.wiki-search-modal-result:hover {
  background: rgba(255,255,255,0.04);
  color: #eee;
}
.wiki-search-modal-result i { width: 16px; text-align: center; font-size: 0.8rem; color: #444; flex-shrink: 0; }
.wiki-search-modal-result:hover i { color: #d32f2f; }
.wiki-search-modal-result-title { flex: 1; }
.wiki-search-modal-result-hint { font-size: 0.72rem; color: #3a3a3a; }
.wiki-search-modal-empty { padding: 24px 20px; text-align: center; color: #3a3a3a; font-size: 0.85rem; }
.wiki-search-modal-hint {
  padding: 10px 20px;
  border-top: 1px solid #1e1e1e;
  font-size: 0.72rem;
  color: #555;
  display: flex;
  gap: 14px;
}
.wiki-search-modal-hint kbd {
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 2px 6px;
  background: #1a1a1a;
  color: #555;
  font-size: 0.67rem;
  font-family: inherit;
  margin-right: 3px;
  line-height: 1.4;
}

/* Light mode modal */
html[data-wiki-theme="light"] .wiki-search-modal-overlay { background: rgba(0,0,0,0.4); }
html[data-wiki-theme="light"] .wiki-search-modal { background: #fff; border-color: #e5e5e5; box-shadow: 0 24px 64px rgba(0,0,0,0.15); }
html[data-wiki-theme="light"] .wiki-search-modal-top { border-bottom-color: #eee; }
html[data-wiki-theme="light"] .wiki-search-modal-top i { color: #bbb; }
html[data-wiki-theme="light"] .wiki-search-modal-input { color: #111; }
html[data-wiki-theme="light"] .wiki-search-modal-input::placeholder { color: #ccc; }
html[data-wiki-theme="light"] .wiki-search-modal-esc { background: #f5f5f5; border-color: #e0e0e0; color: #bbb; }
html[data-wiki-theme="light"] .wiki-search-modal-result { color: #666; border-bottom-color: #f0f0f0; }
html[data-wiki-theme="light"] .wiki-search-modal-result:hover { background: rgba(0,0,0,0.03); color: #111; }
html[data-wiki-theme="light"] .wiki-search-modal-result i { color: #ccc; }
html[data-wiki-theme="light"] .wiki-search-modal-result:hover i { color: #d32f2f; }
html[data-wiki-theme="light"] .wiki-search-modal-result-hint { color: #bbb; }
html[data-wiki-theme="light"] .wiki-search-modal-empty { color: #bbb; }
html[data-wiki-theme="light"] .wiki-search-modal-hint { border-top-color: #eee; color: #bbb; }
html[data-wiki-theme="light"] .wiki-search-modal-hint { color: #aaa; }
html[data-wiki-theme="light"] .wiki-search-modal-hint kbd { background: #f4f4f4; border-color: #ddd; color: #aaa; }

/* Header search cursor */
.wiki-header-search { cursor: pointer; }

/* Versions-Badge neben Überschriften */
.wiki-version {
  font-size: 0.63rem;
  font-weight: 700;
  color: #e879f9;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(232,121,249,0.4);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 0.03em;
}

html[data-wiki-theme="light"] .wiki-version {
  color: #a21caf;
  background: rgba(168,85,247,0.1);
  border-color: rgba(168,85,247,0.35);
}

.wiki-badge-popular {
  font-size: 0.63rem;
  font-weight: 700;
  color: #f5c518;
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.45);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 0.03em;
}

.wiki-badge-new {
  font-size: 0.63rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.45);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
  margin-left: 6px;
  letter-spacing: 0.03em;
}

.wiki-content .ranks-page { max-width: none; margin: 0; padding: 0; }
.wiki-content .ranks-page-header { display: none; }

/* TOC */
.wiki-toc-wrap {
  width: 196px;
  min-width: 196px;
  flex-shrink: 0;
  padding: 44px 20px 40px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.wiki-toc-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.wiki-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.wiki-toc-list a {
  display: block;
  padding: 5px 12px;
  color: #444;
  text-decoration: none;
  font-size: 0.79rem;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.18s, border-color 0.18s;
  line-height: 1.4;
}

.wiki-toc-list a:hover { color: #888; }
.wiki-toc-list a.toc-active { color: #ddd; border-left-color: #d32f2f; }

/* ===================== */
/* === LIGHT MODE     === */
/* ===================== */

html[data-wiki-theme="light"] body {
  background: #f6f7f9;
}

html[data-wiki-theme="light"] .wiki-header {
  background: #ffffff;
  border-bottom-color: #e8e8e8;
}

html[data-wiki-theme="light"] .wiki-header-brand { border-right-color: #e8e8e8; }

html[data-wiki-theme="light"] .wiki-header-nav a { color: #555; }
html[data-wiki-theme="light"] .wiki-header-nav a:hover { color: #111; background: rgba(0,0,0,0.04); }

html[data-wiki-theme="light"] .wiki-header-search {
  background: #f3f4f6;
  border-color: #e0e0e0;
}
html[data-wiki-theme="light"] .wiki-header-search i { color: #aaa; }
html[data-wiki-theme="light"] .wiki-header-search span { color: #aaa; }
html[data-wiki-theme="light"] .wiki-header-search kbd { background: #e8e8e8; border-color: #d5d5d5; color: #aaa; }

html[data-wiki-theme="light"] .wiki-theme-toggle {
  background: #f3f4f6;
  border-color: #e0e0e0;
  color: #666;
}
html[data-wiki-theme="light"] .wiki-theme-toggle:hover { color: #222; border-color: #ccc; }

html[data-wiki-theme="light"] .wiki-sidebar {
  background: #f0f1f3;
  border-right-color: #e2e2e4;
}

html[data-wiki-theme="light"] .wiki-nav-label { color: #bbb; }
html[data-wiki-theme="light"] .wiki-nav-item { color: #666; }
html[data-wiki-theme="light"] .wiki-nav-item:hover { color: #111; background: rgba(0,0,0,0.04); }
html[data-wiki-theme="light"] .wiki-nav-item.active { color: #111; background: rgba(211,47,47,0.07); }

html[data-wiki-theme="light"] .wiki-page-title { color: #111; border-bottom-color: #e5e5e5; }

html[data-wiki-theme="light"] .wiki-prose h2 { color: #111; border-bottom-color: #e8e8e8; }
html[data-wiki-theme="light"] .wiki-prose h3 { color: #333; }
html[data-wiki-theme="light"] .wiki-prose p { color: #555; }
html[data-wiki-theme="light"] .wiki-prose ul,
html[data-wiki-theme="light"] .wiki-prose ol { color: #555; }
html[data-wiki-theme="light"] .wiki-prose strong { color: #222; }
html[data-wiki-theme="light"] .wiki-info-box { background: rgba(0,0,0,0.03); border-color: #bbb; color: #666; }
html[data-wiki-theme="light"] .wiki-info-box i { color: #888; }
html[data-wiki-theme="light"] .wiki-info-box a { color: #555; }
html[data-wiki-theme="light"] .wiki-info-box strong { color: #333; }
html[data-wiki-theme="light"] .wiki-info-discord { background: rgba(124,58,237,0.07) !important; border-color: rgba(124,58,237,0.35) !important; }
html[data-wiki-theme="light"] .wiki-info-discord i { color: #7c3aed !important; }
html[data-wiki-theme="light"] .wiki-info-discord a { color: #6d28d9 !important; }
html[data-wiki-theme="light"] .wiki-info-warning { background: rgba(211,47,47,0.06) !important; }
html[data-wiki-theme="light"] .wiki-toc-label { color: #bbb; }
html[data-wiki-theme="light"] .wiki-toc-list { border-left-color: #e5e5e5; }
html[data-wiki-theme="light"] .wiki-toc-list a { color: #bbb; }
html[data-wiki-theme="light"] .wiki-toc-list a:hover { color: #555; }
html[data-wiki-theme="light"] .wiki-toc-list a.toc-active { color: #222; }

/* === Responsive === */
@media (max-width: 1100px) {
  .wiki-toc-wrap { display: none; }
}

@media (max-width: 800px) {
  .wiki-sidebar { display: none; }
  .wiki-header-nav { display: none; }
  .wiki-content { padding: 28px 22px 60px; }
}
