/* LavaBot Docs — plain, readable theme with light/dark. No animations. */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-soft: #fbfbfc;
  --text: #1f2328;
  --text-muted: #5b636d;
  --border: #e3e6ea;
  --accent: #d94f3d;
  --accent-soft: rgba(217, 79, 61, 0.10);
  --code-bg: #f2f3f5;
  --code-text: #b1402f;
  --sidebar-w: 280px;
  --topbar-h: 56px;
}
[data-theme="dark"] {
  --bg: #15171c;
  --bg-alt: #1b1e25;
  --bg-soft: #1a1d23;
  --text: #e7e9ec;
  --text-muted: #9aa2ac;
  --border: #2a2f38;
  --accent: #ef7b5f;
  --accent-soft: rgba(239, 123, 95, 0.12);
  --code-bg: #232831;
  --code-text: #ef9b86;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.05rem;
}
.docs-brand:hover { text-decoration: none; }
.docs-brand strong { color: var(--accent); }
.docs-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}
.docs-top-actions { display: flex; align-items: center; gap: 14px; }
.docs-toplink { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.docs-toplink:hover { color: var(--text); text-decoration: none; }
.docs-theme-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.docs-theme-btn:hover { border-color: var(--accent); }

.docs-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
}

.docs-sidebar {
  border-right: 1px solid var(--border);
  padding: 22px 14px 60px;
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}
.docs-nav-toggle { display: none; }
.docs-nav-group { margin-bottom: 18px; }
.docs-nav-cat {
  margin: 0 0 6px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.docs-nav-link {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.docs-nav-link:hover { background: var(--bg-alt); color: var(--text); text-decoration: none; }
.docs-nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.docs-content {
  padding: 32px 40px 80px;
  min-width: 0;
}
.docs-content h1 {
  margin: 0 0 18px;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.docs-body { max-width: 760px; }
.docs-body h2 { margin: 32px 0 12px; font-size: 1.4rem; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.docs-body h3 { margin: 24px 0 10px; font-size: 1.15rem; }
.docs-body h4 { margin: 20px 0 8px; font-size: 1rem; }
.docs-body p { margin: 0 0 14px; }
.docs-body ul, .docs-body ol { margin: 0 0 14px; padding-left: 24px; }
.docs-body li { margin: 4px 0; }
.docs-body hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.docs-body a { font-weight: 500; }
.docs-body code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86em;
}
.docs-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 16px;
}
.docs-body pre code { background: none; color: var(--text); padding: 0; font-size: 0.85rem; }
.docs-muted { color: var(--text-muted); }

/* Editor */
.docs-editor-wrap { max-width: 1100px; margin: 0 auto; padding: 26px 24px 80px; }
.docs-editor-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
.docs-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.docs-list-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 7px; padding: 8px 10px; color: var(--text); font-size: 0.9rem;
}
.docs-list-item:hover { background: var(--bg-soft); }
.docs-list-item.active { background: var(--accent-soft); color: var(--accent); }
.docs-field { display: block; margin-bottom: 12px; }
.docs-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.docs-field input, .docs-field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 11px; font-family: inherit; font-size: 0.92rem;
}
.docs-field textarea { min-height: 360px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.86rem; line-height: 1.55; resize: vertical; }
.docs-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.docs-btn {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 8px; padding: 9px 16px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.docs-btn:hover { border-color: var(--accent); }
.docs-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.docs-btn-danger { color: #e0556a; border-color: #e0556a55; }
.docs-hint { color: var(--text-muted); font-size: 0.82rem; margin: 6px 0 0; }

@media (max-width: 860px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .docs-nav-toggle {
    display: inline-block; background: var(--bg-alt); border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; margin-bottom: 10px;
  }
  .docs-nav { display: none; }
  .docs-nav.open { display: block; }
  .docs-content { padding: 24px 18px 70px; }
  .docs-editor-grid { grid-template-columns: 1fr; }
}
