/* ==========================================================================
   Simple Slide System — Documentation
   Plain CSS, no dependencies. Dark theme, responsive.
   ========================================================================== */

:root {
  --bg: #0e1014;
  --bg-elev: #151820;
  --bg-elev-2: #1b1f29;
  --border: #262b37;
  --border-strong: #343a49;

  --text: #e4e7ee;
  --text-muted: #9aa3b5;
  --text-faint: #6b7385;

  --accent: #3d9bff;
  --accent-strong: #66b2ff;
  --accent-soft: rgba(61, 155, 255, 0.12);

  --note: #3d9bff;
  --tip: #34c38f;
  --warning: #f0a33a;
  --danger: #ef5b5b;

  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 280px;
  --content-max: 860px;

  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

/* ---------- Reset / base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 24px 18px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3d9bff 0%, #1f5fbf 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(61, 155, 255, 0.25);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 12px; color: var(--text-muted); }

/* Search */

.search { position: relative; }

.search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.search::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid var(--text-faint);
  border-radius: 50%;
  transform: translateY(-62%);
  pointer-events: none;
}
.search::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 55%;
  width: 6px;
  height: 2px;
  background: var(--text-faint);
  transform: rotate(45deg);
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  max-height: 60vh;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
}
.search-results[hidden] { display: none; }

.search-results li a {
  display: block;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}
.search-results li a:hover,
.search-results li a.active { background: var(--accent-soft); text-decoration: none; }
.search-results .result-page { display: block; font-size: 12px; color: var(--text-muted); }
.search-results .no-results { padding: 8px 10px; color: var(--text-muted); font-size: 14px; }

/* Nav */

.nav-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-faint);
  font-weight: 700;
  margin: 0 0 6px 10px;
}

.nav ul { list-style: none; margin: 0 0 18px; padding: 0; }

.nav a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14.5px;
  border-left: 2px solid transparent;
}
.nav a:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-left-color: var(--accent);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ---------- Main content ---------- */

.content {
  padding: 48px 56px 80px;
  min-width: 0;
}

.content-inner { max-width: var(--content-max); margin: 0 auto; }

.breadcrumb {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--text-muted); }

h1, h2, h3, h4 { line-height: 1.25; color: #fff; font-weight: 700; }

h1 { font-size: 2.3rem; margin: 0 0 12px; letter-spacing: -0.5px; }
h2 {
  font-size: 1.55rem;
  margin: 56px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
h3 { font-size: 1.2rem; margin: 36px 0 10px; }
h4 { font-size: 1.02rem; margin: 24px 0 8px; color: var(--text); }

h2:first-of-type { margin-top: 40px; }

.lead { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 28px; }

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 24px; }
li { margin-bottom: 6px; }
li > ul, li > ol { margin-top: 6px; margin-bottom: 6px; }

strong { color: #fff; font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

code {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: #cfe3ff;
  white-space: nowrap;
}

kbd {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  padding: 1px 6px;
  border-radius: 4px;
}

pre {
  background: #0a0c10;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 20px;
}
pre code { background: none; border: 0; padding: 0; white-space: pre; color: #d7dbe4; }

/* Unreal-style setting path, e.g. Details > Slide > Movement */
.ui-path {
  font-family: var(--font-sans);
  font-size: 0.92em;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ---------- Callouts ---------- */

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--note);
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 22px;
}
.callout > :last-child { margin-bottom: 0; }

.callout-title {
  display: block;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 4px;
  color: var(--note);
}

.callout.tip { border-left-color: var(--tip); }
.callout.tip .callout-title { color: var(--tip); }

.callout.warning { border-left-color: var(--warning); }
.callout.warning .callout-title { color: var(--warning); }

.callout.danger { border-left-color: var(--danger); }
.callout.danger .callout-title { color: var(--danger); }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 40px;
  margin-bottom: 36px;
  background:
    radial-gradient(1200px 400px at 100% 0%, rgba(61, 155, 255, 0.18), transparent 60%),
    radial-gradient(800px 300px at 0% 100%, rgba(31, 95, 191, 0.18), transparent 60%),
    var(--bg-elev);
  overflow: hidden;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(61, 155, 255, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 { font-size: 2.6rem; }
.hero .lead { max-width: 640px; color: #c6cddb; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--bg-elev-2);
}
.button:hover { text-decoration: none; border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* ---------- Cards / grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}

.card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }

.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; }

.card .card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 15px;
}

/* Feature checklist */

.feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 24px; }
.feature-list li { position: relative; padding-left: 28px; margin: 0; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--tip);
  border-bottom: 2px solid var(--tip);
  transform: rotate(-45deg);
}

/* ---------- Steps (quick start) ---------- */

.steps { list-style: none; padding: 0; counter-reset: step; margin: 0 0 28px; }

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 4px 0 28px 60px;
  margin: 0;
  border-left: 2px solid var(--border);
  margin-left: 18px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -19px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 5px var(--bg);
}

.steps > li h3 { margin: 4px 0 8px; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-elev-2); color: var(--text); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* ---------- Setting reference blocks ---------- */

.setting {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 16px;
}
.setting h3 { margin: 0 0 4px; font-size: 1.12rem; }
.setting > p:last-child { margin-bottom: 0; }

.setting-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev-2);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.badge strong { color: var(--text); font-weight: 600; }
.badge.mono { font-family: var(--font-mono); font-size: 12px; }
.badge.blue { border-color: rgba(61, 155, 255, 0.4); color: var(--accent-strong); background: var(--accent-soft); }
.badge.green { border-color: rgba(52, 195, 143, 0.4); color: var(--tip); background: rgba(52, 195, 143, 0.1); }

.setting .typical { font-size: 14px; color: var(--text-muted); }

/* ---------- API blocks ---------- */

.api {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 0 0 28px;
}
.api h2 { margin-top: 0; border-top: 0; padding-top: 0; }
.api h4:first-of-type { margin-top: 16px; }

.signature {
  font-family: var(--font-mono);
  font-size: 14px;
  background: #0a0c10;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 16px;
  color: #cfe3ff;
  overflow-x: auto;
  white-space: nowrap;
}

/* ---------- Attraction blocks (example map) ---------- */

.attraction {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 22px;
}
.attraction h2 { margin: 0 0 4px; border-top: 0; padding-top: 0; font-size: 1.35rem; }
.attraction .tagline { color: var(--accent-strong); font-weight: 600; margin: 0 0 14px; font-size: 14.5px; }
.attraction > :last-child { margin-bottom: 0; }

/* Image placeholder frame. Replace with <img> when screenshots are ready. */
.media-placeholder {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.015) 12px 24px),
    #0b0d11;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
  padding: 48px 16px;
  margin: 0 0 20px;
}

figure { margin: 0 0 22px; }
figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* ---------- Troubleshooting / FAQ ---------- */

.issue {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  margin: 0 0 14px;
  overflow: hidden;
}

.issue > summary,
.faq > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  color: #fff;
  position: relative;
}
.issue > summary::-webkit-details-marker,
.faq > summary::-webkit-details-marker { display: none; }

.issue > summary::after,
.faq > summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.issue[open] > summary::after,
.faq[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }

.issue > summary:hover,
.faq > summary:hover { background: var(--bg-elev-2); }

.issue-body,
.faq-body { padding: 4px 20px 18px; border-top: 1px solid var(--border); }
.issue-body > :first-child,
.faq-body > :first-child { margin-top: 14px; }
.issue-body > :last-child,
.faq-body > :last-child { margin-bottom: 0; }

.faq {
  border-bottom: 1px solid var(--border);
}
.faq:first-of-type { border-top: 1px solid var(--border); }
.faq-body { border-top: 0; padding-top: 0; }

.label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-faint);
  margin: 14px 0 4px;
}

/* ---------- Page footer nav ---------- */

.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-nav a {
  flex: 1;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  background: var(--bg-elev);
}
.page-nav a:hover { border-color: var(--accent); text-decoration: none; }
.page-nav .dir { display: block; font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }
.page-nav .next { text-align: right; }

.site-footer {
  margin-top: 40px;
  font-size: 13px;
  color: var(--text-faint);
}

/* On-this-page mini TOC */
.toc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 32px;
  font-size: 14.5px;
}
.toc strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 6px; }
.toc ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .content { padding: 40px 32px 72px; }
}

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

  /* Sidebar becomes a sticky top bar */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(21, 24, 32, 0.97);
    backdrop-filter: blur(8px);
  }

  .brand-mark { width: 32px; height: 32px; font-size: 13px; }
  .brand-sub { display: none; }

  .search { flex: 1 1 180px; }

  .nav {
    flex: 1 0 100%;
    display: flex;
    overflow-x: auto;
    gap: 2px;
    margin: 0 -16px;
    padding: 0 12px 8px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group-title { display: none; }
  .nav ul { display: flex; margin: 0; gap: 2px; flex-shrink: 0; }
  .nav li { margin: 0; flex-shrink: 0; }
  .nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; padding: 8px 10px; font-size: 14px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--accent); background: transparent; }

  .sidebar-footer { display: none; }

  html { scroll-padding-top: 130px; }

  .content { padding: 28px 18px 64px; }
  h1 { font-size: 1.9rem; }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 2rem; }
  h2 { font-size: 1.35rem; margin-top: 44px; padding-top: 26px; }
  .toc ul { columns: 1; }
  .page-nav { flex-direction: column; }
  .page-nav .next { text-align: left; }
  .api, .attraction, .setting { padding: 18px; }
  code { white-space: normal; word-break: break-word; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .sidebar, .page-nav, .skip-link { display: none; }
  .layout { display: block; }
  body { background: #fff; color: #000; }
  h1, h2, h3, h4, strong { color: #000; }
  .callout, .setting, .api, .attraction, .issue { background: #fff; border-color: #bbb; }
  details { display: block; }
  details > :not(summary) { display: block !important; }
}
