/* ===================================================================
   KibbleCommands Official Documentation & Wiki Stylesheet
   Crafted for fast rendering, modern aesthetics & dark/light theme
   =================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-elevated: #30363d;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 170, 0, 0.12);
  
  --border-color: #30363d;
  --border-subtle: #21262d;
  --border-accent: #f59e0b;

  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-link: #58a6ff;
  --text-link-hover: #79b8ff;

  --accent-gold: #f59e0b;
  --accent-gold-rgb: 245, 158, 11;
  --accent-orange: #ea580c;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --accent-cyan: #06b6d4;

  --code-bg: #090d12;
  --code-border: #30363d;
  --code-text: #e6edf3;
  --inline-code-bg: rgba(110, 118, 129, 0.2);
  --inline-code-text: #f59e0b;

  --sidebar-width: 280px;
  --toc-width: 240px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --bg-elevated: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(217, 119, 6, 0.1);

  --border-color: #d0d7de;
  --border-subtle: #e1e4e8;
  --border-accent: #d97706;

  --text-primary: #1f2328;
  --text-secondary: #57606a;
  --text-muted: #8c959f;
  --text-link: #0969da;
  --text-link-hover: #1a7f37;

  --accent-gold: #d97706;
  --accent-gold-rgb: 217, 119, 6;
  --accent-orange: #c2410c;
  --accent-green: #059669;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-red: #dc2626;
  --accent-cyan: #0891b2;

  --code-bg: #f6f8fa;
  --code-border: #d0d7de;
  --code-text: #24292f;
  --inline-code-bg: #eff1f3;
  --inline-code-text: #b45309;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ===================================================================
   Base Reset & Layout
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ===================================================================
   Top Navigation Header
   =================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-family: var(--font-mono);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.version-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(var(--accent-gold-rgb), 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(var(--accent-gold-rgb), 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 1.5rem;
}

.search-trigger {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.search-trigger:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.search-shortcut {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.header-btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
  text-decoration: none;
}

.header-btn-modrinth:hover {
  border-color: #1bd96a;
  color: #1bd96a;
}

.header-btn-curseforge:hover {
  border-color: #f16436;
  color: #f16436;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

/* ===================================================================
   Main Layout Structure
   =================================================================== */
.docs-container {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar Navigation */
.docs-sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}

.nav-group {
  margin-bottom: 1.5rem;
}

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin: 0.15rem 0;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent-gold);
  background: var(--bg-active);
  font-weight: 600;
  border-left: 3px solid var(--accent-gold);
  padding-left: calc(0.75rem - 3px);
}

.nav-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-new { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.badge-core { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.badge-tool { background: rgba(245, 158, 11, 0.2); color: var(--accent-gold); }
.badge-dev { background: rgba(139, 92, 246, 0.2); color: var(--accent-purple); }

/* Main Article Content */
.docs-content {
  flex: 1;
  max-width: 920px;
  padding: 2.5rem 3rem 5rem 3rem;
  min-width: 0;
}

/* Right TOC / On this page */
.docs-toc {
  width: var(--toc-width);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow-y: auto;
  padding: 2.5rem 1.5rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.toc-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  border-left: 1px solid var(--border-color);
  padding-left: 0.75rem;
}

.toc-item {
  margin: 0.4rem 0;
}

.toc-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  transition: color 0.15s ease;
  line-height: 1.4;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-gold);
}

.toc-item.depth-3 {
  padding-left: 0.75rem;
}

/* ===================================================================
   Typography & Markdown Content
   =================================================================== */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.doc-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.doc-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.platform-tag.paper { border-color: #3b82f6; color: #60a5fa; }
.platform-tag.folia { border-color: #10b981; color: #34d399; }
.platform-tag.velocity { border-color: #8b5cf6; color: #a78bfa; }
.platform-tag.bungee { border-color: #f59e0b; color: #fbbf24; }
.platform-tag.sponge { border-color: #ef4444; color: #f87171; }

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem 0;
  color: var(--text-primary);
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem 0;
  color: var(--text-secondary);
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5rem 0;
}

/* ===================================================================
   Code Blocks & Syntax Formatting
   =================================================================== */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--inline-code-bg);
  color: var(--inline-code-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
}

pre code {
  background: transparent;
  color: var(--code-text);
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.code-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.code-header {
  background: var(--bg-tertiary);
  border: 1px solid var(--code-border);
  border-bottom: none;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.code-wrapper pre {
  margin-bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.copy-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.copy-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Syntax Highlighting Colors */
.tok-comment { color: #8b949e; font-style: italic; }
.tok-key { color: #7ee787; font-weight: 600; }
.tok-val-str { color: #a5d6ff; }
.tok-val-num { color: #79c0ff; }
.tok-val-bool { color: #ff7b72; font-weight: 600; }
.tok-token { color: #ffa657; font-weight: 600; }
.tok-cmd { color: #d2a8ff; }
.tok-tag { color: #ff7b72; }

/* ===================================================================
   Alerts & Callout Boxes
   =================================================================== */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  background: var(--bg-secondary);
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.callout-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.callout-body p:last-child {
  margin-bottom: 0;
}

.callout-tip {
  border-color: var(--accent-green);
  background: rgba(16, 185, 129, 0.08);
}
.callout-tip .callout-title { color: var(--accent-green); }

.callout-note {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}
.callout-note .callout-title { color: var(--accent-blue); }

.callout-important {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.08);
}
.callout-important .callout-title { color: var(--accent-purple); }

.callout-warning {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.08);
}
.callout-warning .callout-title { color: var(--accent-gold); }

.callout-danger {
  border-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.08);
}
.callout-danger .callout-title { color: var(--accent-red); }

/* ===================================================================
   Tables
   =================================================================== */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

thead {
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
}

th {
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-hover);
}

/* Minecraft Color Code Indicators */
.mc-color {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.mc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ===================================================================
   Cards & Feature Grids
   =================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-gold-rgb), 0.15);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ===================================================================
   Interactive Generator Tool
   =================================================================== */
.generator-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0 2rem 0;
  box-shadow: var(--shadow-md);
}

.generator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.form-textarea {
  font-family: var(--font-mono);
  resize: vertical;
  min-height: 80px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(var(--accent-gold-rgb), 0.2);
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-primary);
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.token-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.chip-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
}

.chip-btn:hover {
  background: var(--bg-elevated);
}

/* ===================================================================
   Chest GUI Simulator
   =================================================================== */
.gui-simulator {
  background: #2b2b2b;
  border: 3px solid #1a1a1a;
  border-radius: 8px;
  padding: 1.25rem;
  max-width: 520px;
  margin: 1.5rem auto 2rem auto;
  box-shadow: var(--shadow-lg);
  color: #ffffff;
  font-family: var(--font-mono);
}

.gui-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #3c3f41;
  margin-bottom: 1rem;
}

.gui-title {
  color: #ffaa00;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 1px 1px #000;
}

.gui-slots-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  background: #373737;
  padding: 6px;
  border: 2px solid #8b8b8b;
  border-radius: 4px;
}

.gui-slot {
  aspect-ratio: 1;
  background: #8b8b8b;
  border-top: 2px solid #373737;
  border-left: 2px solid #373737;
  border-bottom: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease;
}

.gui-slot:hover {
  background: #a0a0a0;
  transform: scale(1.05);
  z-index: 5;
}

.mc-item-icon {
  width: 32px;
  height: 32px;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  image-rendering: -webkit-crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
}

.gui-slot.empty {
  cursor: default;
}
.gui-slot.empty:hover {
  background: #8b8b8b;
  transform: none;
}

.gui-tooltip {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #100010;
  border: 2px solid #28007f;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.75rem;
  pointer-events: none;
  display: none;
  z-index: 50;
  box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.gui-slot:hover .gui-tooltip {
  display: block;
}

.gui-status-bar {
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: #1a1a1a;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #55ff55;
  min-height: 32px;
  display: flex;
  align-items: center;
}

/* ===================================================================
   Search Modal
   =================================================================== */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal {
  width: 90%;
  max-width: 600px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.search-modal-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  outline: none;
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
  margin-bottom: 0.2rem;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--bg-active);
  text-decoration: none;
}

.search-result-item:hover .result-title {
  color: var(--accent-gold);
}

.result-section {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.result-snippet {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.search-modal-footer {
  padding: 0.6rem 1.25rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===================================================================
   Next / Prev Navigation Links
   =================================================================== */
.page-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.page-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  min-width: 200px;
  transition: all 0.2s ease;
}

.page-nav-btn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  text-decoration: none;
}

.page-nav-btn.next {
  margin-left: auto;
  text-align: right;
}

.nav-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.nav-dest {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

/* ===================================================================
   Responsive Mobile Adjustments
   =================================================================== */
@media (max-width: 1100px) {
  .docs-toc {
    display: none;
  }
  .docs-content {
    max-width: 100%;
    padding: 2rem 2rem 4rem 2rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .docs-sidebar {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    z-index: 90;
    transition: left 0.25s ease-in-out;
    box-shadow: var(--shadow-lg);
  }
  .docs-sidebar.open {
    left: 0;
  }
  .docs-content {
    padding: 1.5rem 1rem 3rem 1rem;
  }
  .doc-title {
    font-size: 1.75rem;
  }
  .header-search {
    display: none;
  }
}

/* ===================================================================
   Site Footer & Legal Disclaimers
   =================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 2.5rem 2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-left: var(--sidebar-width);
}

@media (max-width: 768px) {
  .site-footer {
    margin-left: 0;
    padding: 2rem 1.25rem;
  }
}

.footer-container {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.footer-link:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.footer-separator {
  color: var(--border-color);
}

.footer-legal {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-text {
  font-size: 0.775rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0;
}

