/* Docs Styles */
html, body {
  height: auto;
  overflow-y: auto;
}

.docs-layout {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  padding-top: 60px;
}

/* Sidebar */
.docs-sidebar {
  width: 260px;
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  background: rgba(7, 10, 16, 0.85);
  border-right: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem 0;
  z-index: 50;
  transition: transform 0.3s;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 2px;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  padding: 0.75rem 1.25rem 0.35rem;
}

.sidebar-plugin {
  margin-bottom: 0.25rem;
}

.sidebar-plugin-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: color 0.2s;
}

.sidebar-plugin-toggle:hover {
  color: var(--accent-cyan);
}

.sidebar-plugin-toggle .chevron {
  font-size: 0.65rem;
  transition: transform 0.2s;
  color: var(--text-secondary);
}

.sidebar-plugin.open .chevron {
  transform: rotate(90deg);
}

.sidebar-links {
  display: none;
  padding: 0.15rem 0;
}

.sidebar-plugin.open .sidebar-links {
  display: block;
}

.sidebar-links a {
  display: block;
  padding: 0.3rem 1.25rem 0.3rem 2rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.sidebar-links a:hover {
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.04);
}

.sidebar-links a.active {
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.06);
}

.sidebar-sub-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.6);
  padding: 0.4rem 1.25rem 0.2rem 2rem;
}

/* Main Content */
.docs-main {
  margin-left: 260px;
  flex: 1;
  padding: 2.5rem 3rem 4rem;
  max-width: 900px;
  min-width: 0;
}

.docs-main h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
}

.docs-main h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: white;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-glass);
}

.docs-main h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.docs-main h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.docs-main p {
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.docs-main ul, .docs-main ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.docs-main li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.docs-main strong {
  color: var(--text-primary);
}

.docs-main a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.3);
  text-underline-offset: 2px;
}

.docs-main a:hover {
  text-decoration-color: var(--accent-cyan);
}

/* Code blocks */
.docs-main code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(17, 24, 39, 0.7);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.docs-main pre {
  background: rgba(7, 10, 16, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.docs-main pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Tables */
.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.docs-main th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: rgba(34, 211, 238, 0.06);
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 600;
}

.docs-main td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
}

/* Images */
.docs-main img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin: 1rem 0;
}

/* TOC */
.docs-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
}

.docs-toc > p {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.docs-toc ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.docs-toc li {
  margin-bottom: 0.2rem;
}

.docs-toc a {
  font-size: 0.85rem;
  text-decoration: none;
}

/* Hamburger */
.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.2rem;
  backdrop-filter: blur(12px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

@media (max-width: 900px) {
  .hamburger {
    display: block;
  }

  .docs-sidebar {
    transform: translateX(-100%);
    z-index: 60;
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .docs-main {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }
}

/* Docs hub cards */
.docs-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.docs-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.docs-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.1);
}

.docs-hub-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.docs-hub-card p {
  font-size: 0.9rem;
}
