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

:root {
  --accent: #7c3aed;
  --accent-bright: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --bg: #080810;
  --bg2: rgba(14, 14, 26, 0.88);
  --bg3: rgba(19, 19, 31, 0.9);
  --border: rgba(124, 58, 237, 0.22);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --radius: 12px;
  --gold: #f59e0b;
  --sidebar-w: 260px;
  --nav-bg: rgba(8,8,16,0.82);
  --input-bg: rgba(19,19,31,0.9);
}
body.light-mode {
  --bg: #f0f0fa;
  --bg2: rgba(232,232,248,0.9);
  --bg3: rgba(255,255,255,0.95);
  --border: rgba(124,58,237,0.35);
  --text: #1a1a2e;
  --text-muted: #4a5568;
  --nav-bg: rgba(240,240,250,0.92);
  --input-bg: rgba(255,255,255,0.95);
}
body.light-mode .blob { opacity: 0.12 !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── BLOBS ── */
.bg-blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0; animation: blobFadeIn 1.2s ease forwards; }
@keyframes blobFadeIn { to { opacity: 0.6; } }
.blob-1 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, #7c3aed 0%, #4f46e5 60%, transparent 100%);
  top: -120px; left: -100px;
  animation: blobFadeIn 1.2s 0.1s ease forwards;
}
.blob-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #a855f7 0%, #6366f1 60%, transparent 100%);
  bottom: 10%; right: -100px;
  animation: blobFadeIn 1.2s 0.3s ease forwards;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg); border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 2rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.logo { font-family: 'Rajdhani', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: 1px; flex-shrink: 0; }
.logo span { color: var(--accent-bright); }
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent-bright); }
.btn-ghost { border: 1px solid var(--border) !important; padding: 0.4rem 1rem !important; border-radius: 6px !important; color: var(--accent-bright) !important; transition: background 0.2s !important; }
.btn-ghost:hover { background: var(--accent-glow) !important; border-color: var(--accent-bright) !important; color: var(--text) !important; }

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 1.05rem;
  width: 34px; height: 34px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent-bright); background: var(--accent-glow); }

/* ── LANG DROPDOWN ── */
.lang-dropdown { position: relative; }
.lang-dropdown-btn { display: flex; align-items: center; gap: 0.35rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.65rem; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; white-space: nowrap; }
.lang-dropdown-btn:hover { color: var(--accent-bright); border-color: var(--accent-bright); background: rgba(124,58,237,0.1); }
.lang-dropdown-btn svg { transition: transform 0.2s; flex-shrink: 0; }
.lang-dropdown.open .lang-dropdown-btn svg { transform: rotate(180deg); }
.lang-dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #0e0e1a; border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem; min-width: 160px; z-index: 300; box-shadow: 0 8px 24px rgba(0,0,0,0.6); list-style: none; margin: 0; }
body.light-mode .lang-dropdown-menu { background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.lang-dropdown.open .lang-dropdown-menu { display: block; }
.lang-dropdown-menu li { margin: 0; }
.lang-btn { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--text-muted); font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 500; padding: 0.42rem 0.7rem; border-radius: 6px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.lang-btn:hover { background: rgba(124,58,237,0.12); color: var(--text); }
.lang-btn.active { color: var(--accent-bright); font-weight: 700; }

/* ── HAMBURGER ── */
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 36px; height: 36px; background: transparent; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; padding: 0; flex-shrink: 0; }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text-muted); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── DOCS SEARCH ── */
.docs-search-wrap {
  position: relative; margin-bottom: 1.5rem;
}
.docs-search-input {
  width: 100%;
  background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.95rem;
  padding: 0.7rem 1.1rem 0.7rem 2.75rem; border-radius: 10px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0.85rem center;
}
.docs-search-input:focus { border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.docs-search-input::placeholder { color: var(--text-muted); }


.docs-search-results {
  position: fixed; left: 0; width: var(--sidebar-w); z-index: 200;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 0 0 10px 10px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-height: 320px; overflow-y: auto;
}
.search-result {
  padding: 0.75rem 1.1rem; cursor: pointer;
  border-bottom: 1px solid rgba(124,58,237,0.08);
  transition: background 0.15s;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: rgba(124,58,237,0.1); }
.sr-title { font-size: 0.9rem; color: var(--text); font-weight: 500; }
.search-noresults { padding: 1rem 1.1rem; font-size: 0.9rem; color: var(--text-muted); }
.search-noresults strong { color: var(--accent-bright); }

/* ── COPY BUTTON ── */
.copy-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(124,58,237,0.25);
  color: var(--text-muted); font-family: 'Inter', sans-serif;
  font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.65rem;
  border-radius: 5px; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent-bright); }
.copy-btn.copied { color: #34d399; border-color: rgba(52,211,153,0.5); }

/* ── TABLE OF CONTENTS ── */
.docs-toc {
  width: 200px; flex-shrink: 0;
  position: sticky; top: 80px;
  height: calc(100vh - 80px);
  padding: 2rem 1rem;
  overflow-y: auto;
  display: none;
}
@media (min-width: 1300px) {
  .docs-toc { display: block; }
}
.toc-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.toc-link {
  display: block; font-size: 0.82rem; color: var(--text-muted);
  text-decoration: none; padding: 0.25rem 0.5rem;
  border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
  transition: color 0.15s, border-color 0.15s;
}
.toc-link:hover { color: var(--text); }
.toc-link.active { color: var(--accent-bright); border-left-color: var(--accent-bright); }

/* ── DOCS LAYOUT ── */
.docs-layout {
  position: relative; z-index: 1;
  display: flex;
  padding-top: 64px;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── SIDEBAR ── */
.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 2rem 1.25rem;
  background: rgba(8,8,16,0.6);
  backdrop-filter: blur(8px);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 1.75rem; }
.sidebar-group { display: flex; flex-direction: column; gap: 0.4rem; }
.sidebar-group-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.25rem;
}
.sidebar-group ul { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.sidebar-link {
  display: block;
  font-size: 0.88rem; color: var(--text-muted);
  text-decoration: none; padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  border-left: 2px solid transparent;
}
.sidebar-link:hover { color: var(--text); background: rgba(124,58,237,0.08); }
.sidebar-link.active { color: var(--accent-bright); border-left-color: var(--accent-bright); background: rgba(124,58,237,0.08); }

/* ── MAIN CONTENT ── */
.docs-main {
  flex: 1;
  padding: 3rem 3rem 6rem;
  min-width: 0;
}

/* ── DOCS HERO ── */
.docs-hero { margin-bottom: 4rem; }
.docs-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent-bright); background: rgba(124,58,237,0.12);
  border: 1px solid var(--border); padding: 0.3rem 1rem;
  border-radius: 999px; margin-bottom: 1.25rem;
}
.docs-hero h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700;
  line-height: 1.1; margin-bottom: 0.75rem;
}
.docs-hero h1 span { color: var(--accent-bright); }
.docs-hero p { color: var(--text-muted); font-size: 1.05rem; }

/* ── DOCS SECTION ── */
.docs-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.docs-section:last-child { border-bottom: none; }
.docs-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.75rem; font-weight: 700;
  color: var(--text); margin-bottom: 1rem;
}
.docs-section-title span { color: var(--accent-bright); }
.docs-section > p,
.docs-section-intro {
  color: var(--text-muted); font-size: 0.95rem; line-height: 1.75;
  margin-bottom: 1.5rem;
}

/* ── INSTALL WARNING ── */
.install-warning {
  display: flex; align-items: flex-start; gap: 0.85rem;
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.75rem;
}
.install-warning-icon { font-size: 1.1rem; flex-shrink: 0; }
.install-warning p { font-size: 0.88rem; color: #fbbf24; line-height: 1.65; }
.step-body a { color: var(--accent-bright); text-decoration: none; }
.step-body a:hover { text-decoration: underline; }
.step-body em { color: var(--text-muted); font-style: italic; }

/* ── STEPS ── */
.docs-steps { display: flex; flex-direction: column; gap: 1.25rem; }
.docs-step {
  display: flex; align-items: flex-start; gap: 1.25rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}
.step-body h3 { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.step-body p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ── TABLES ── */
.docs-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.docs-table { width: 100%; border-collapse: collapse; }
.docs-table th {
  background: rgba(124,58,237,0.12);
  padding: 0.75rem 1rem; text-align: left;
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent-bright);
  border-bottom: 1px solid var(--border);
}
.docs-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem; color: var(--text-muted);
  border-bottom: 1px solid rgba(124,58,237,0.1);
  vertical-align: middle;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table tr:hover td { background: rgba(124,58,237,0.04); }
.docs-table a { color: var(--accent-bright); text-decoration: none; }
.docs-table a:hover { text-decoration: underline; }

/* ── CODE BLOCKS ── */
code {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.88rem;
  background: rgba(124,58,237,0.1);
  color: var(--accent-bright);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(124,58,237,0.2);
}
.code-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(124,58,237,0.12);
  padding: 0.6rem 1rem;
  font-size: 0.82rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.code-lang {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent-bright);
}
.code-block pre {
  background: rgba(8,8,16,0.9);
  padding: 1.25rem;
  overflow-x: auto;
}
.code-block pre code {
  background: none; border: none; padding: 0;
  color: #c9d1d9; font-size: 0.87rem; line-height: 1.7;
}

/* ── FEATURE GRID ── */
.docs-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.docs-feature-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: border-color 0.2s;
}
.docs-feature-card:hover { border-color: rgba(124,58,237,0.45); }
.dfc-icon { display: block; font-size: 1.8rem; margin-bottom: 0.6rem; }
.docs-feature-card h4 { font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.docs-feature-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── DOCS FAQ ── */
.docs-faq-list { display: flex; flex-direction: column; gap: 1rem; }
.docs-faq-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.docs-faq-item h4 { font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.docs-faq-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* ── SUPPORT CARDS ── */
.docs-support-cards { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.docs-support-card {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.docs-support-card:hover { border-color: var(--accent-bright); transform: translateY(-2px); }
.dsc-icon { font-size: 2rem; flex-shrink: 0; }
.docs-support-card h4 { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.docs-support-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ── RESPONSIVE ── */
/* ── MOBILE SIDEBAR TOGGLE ── */
.docs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.1rem 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(124,58,237,0.45);
}
.docs-sidebar-toggle span {
  display: block; width: 16px; height: 2px;
  background: #fff; border-radius: 2px;
  margin: 2.5px 0;
}
.docs-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 299;
  backdrop-filter: blur(2px);
}
.docs-sidebar-overlay.open { display: block; }

/* ── ITEMS ACCORDION ── */
.docs-accordions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }
.docs-accordion { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg2); }
.docs-accordion-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; background: transparent; border: none; cursor: pointer;
  color: var(--text); font-size: 0.95rem; font-weight: 600; font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}
.docs-accordion-btn:hover { background: rgba(124,58,237,0.08); }
.docs-accordion-arrow { font-size: 1rem; color: var(--accent-bright); transition: transform 0.2s; }
.docs-accordion-body { border-top: 1px solid var(--border); }
.docs-accordion-body .code-block { margin: 0; border-radius: 0; border: none; }

@media (max-width: 900px) {
  .docs-sidebar-toggle { display: flex; }
  .docs-sidebar {
    display: flex !important;
    position: fixed;
    left: -300px;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 300;
    transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
    border-right: 1px solid var(--border);
    padding-top: 5rem;
    box-shadow: 4px 0 30px rgba(0,0,0,0.4);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }
  .docs-sidebar.open { left: 0; }
  .docs-main { padding: 2rem 1rem 6rem; }
  .docs-table-wrap { font-size: 0.8rem; }
  .docs-table th, .docs-table td { padding: 0.5rem 0.6rem; }
  pre, code { overflow-x: auto; font-size: 0.78rem; }
  .code-block { border-radius: 8px; }
  .docs-feature-grid { grid-template-columns: 1fr; }
  .docs-section { padding: 1.75rem 0; }
  .docs-section-title { font-size: 1.4rem; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-right { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(8,8,16,0.97); border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start; gap: 0; padding: 1rem 2rem 1.5rem; }
  .nav-right.open { display: flex; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav-links li { width: 100%; border-bottom: 1px solid rgba(124,58,237,0.1); }
  .nav-links a { display: block; padding: 0.85rem 0; font-size: 1rem; }
  .btn-ghost { border: none !important; padding: 0.85rem 0 !important; }
  .lang-dropdown { margin-top: 1rem; }
  .lang-dropdown-menu { right: auto; left: 0; }
  .docs-hero { padding: 1.5rem 0 1rem; }
  .docs-hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .docs-steps { gap: 0.85rem; }
  .docs-step { flex-direction: column; gap: 0.6rem; padding: 1rem; }
  .docs-faq-item { padding: 1rem; }
  .docs-support-cards { grid-template-columns: 1fr; }
  .install-warning { flex-direction: column; gap: 0.5rem; }
}
