:root {
  --bg: #070815;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --muted-2: rgba(255, 255, 255, 0.46);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-soft: rgba(255, 255, 255, 0.07);
  --link: #b9d0ff;
  --accent: #f05ad1;
  --accent-2: #7c5cff;
  --accent-gold: #f3e1a2;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 14px;
  --radius-xs: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 700px at 70% 10%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(1000px 600px at 15% 0%, rgba(240, 90, 209, 0.16), transparent 58%),
    radial-gradient(1000px 700px at 55% 95%, rgba(0, 195, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 90%, rgba(243, 225, 162, 0.08), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.020) 0 2px, rgba(0, 0, 0, 0) 2px 12px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62)),
    var(--bg);
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hero {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 60% 18%, rgba(240, 90, 209, 0.22), transparent 60%),
    radial-gradient(1100px 700px at 55% 10%, rgba(124, 92, 255, 0.28), transparent 62%),
    radial-gradient(1200px 700px at 60% 45%, rgba(0, 0, 0, 0.22), transparent 65%),
    url("bg.png") center / cover no-repeat;
  opacity: 0.9;
  filter: saturate(1.05);
}

.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 18px 48px;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.card-title {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  letter-spacing: 1.1px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wiki-nav {
  overflow: hidden;
}

.wiki-section {
  padding: 12px 16px 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted-2);
  text-transform: uppercase;
}

.wiki-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 14px;
}

.wiki-item {
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.90);
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.16);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.wiki-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.wiki-item.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.28), rgba(240, 90, 209, 0.18));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.42);
}

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-header {
  padding: 16px 18px;
  background:
    radial-gradient(900px 240px at 0% 0%, rgba(124, 92, 255, 0.24), transparent 70%),
    radial-gradient(900px 240px at 60% 10%, rgba(240, 90, 209, 0.16), transparent 70%),
    rgba(255, 255, 255, 0.06);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.crumb {
  color: var(--muted);
}

.crumb:hover {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.crumb.current {
  color: rgba(255, 255, 255, 0.86);
}

.sep {
  color: rgba(255, 255, 255, 0.28);
}

.content-title {
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.content-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.markdown {
  padding: 22px;
  max-width: 1040px;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(240, 90, 209, 0.10), transparent 60%),
    radial-gradient(900px 500px at 65% 0%, rgba(124, 92, 255, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 {
  margin: 18px 0 10px;
  line-height: 1.2;
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.3px;
}

.markdown h1 {
  font-size: 34px;
  margin-top: 6px;
}

.markdown h1::after {
  content: "";
  display: block;
  margin-top: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 90, 209, 0.65), rgba(124, 92, 255, 0.55), rgba(255, 255, 255, 0.0));
}

.markdown p {
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.markdown ul {
  margin: 12px 0;
  padding-left: 22px;
}

.markdown li {
  margin: 6px 0;
  line-height: 1.55;
}

.markdown code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.markdown pre {
  margin: 14px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: auto;
}

.markdown pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.table-wrap {
  margin: 14px 0;
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

th, td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

th:last-child, td:last-child {
  border-right: 0;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  text-align: left;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.045);
}

td {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

table[data-cols="2"] th:nth-child(2),
table[data-cols="2"] td:nth-child(2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table[data-cols="5"] th:nth-child(-n + 4),
table[data-cols="5"] td:nth-child(-n + 4),
table[data-cols="6"] th:nth-child(-n + 5),
table[data-cols="6"] td:nth-child(-n + 5),
table[data-cols="4"] th:nth-child(1),
table[data-cols="4"] td:nth-child(1),
table[data-cols="4"] th:nth-child(2),
table[data-cols="4"] td:nth-child(2),
table[data-cols="4"] th:nth-child(4),
table[data-cols="4"] td:nth-child(4) {
  white-space: nowrap;
}

.table-wrap tbody tr:hover td {
  background: rgba(124, 92, 255, 0.08);
}

.markdown strong {
  color: rgba(255, 255, 255, 0.95);
}

.markdown a {
  color: var(--link);
}

.markdown a:hover {
  color: rgba(240, 90, 209, 0.92);
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 520px;
  }
}
