.docs-layout {
    display: flex;
    max-width: 1150px;
    margin: 0 auto;
    padding-top: 50px;
    min-height: 100vh;
}

.docs-sidebar {
    position: fixed;
    top: 50px;
    width: 260px;
    height: calc(100vh - 50px);
    background: var(--bg-primary);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    z-index: 100;
}

.docs-sidebar h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.docs-sidebar-section {
    margin-bottom: 2rem;
}

.docs-sidebar-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Geist Mono', monospace;
}

.docs-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
}

.docs-sidebar-link.active {
    background: var(--theme-active);
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.docs-content {
    flex: 1;
    margin-left: 240px;
    padding: 2rem 4rem;
    max-width: 900px;
}

.docs-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.docs-content h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 0.5rem;
}

.docs-content h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.docs-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.docs-content li {
    margin-bottom: 0.5rem;
}

.docs-content a {
    color: var(--text-link);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.docs-content a:hover {
    border-bottom-color: var(--text-link);
    text-decoration: none;
}

.docs-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.docs-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* ===== TABLE OF CONTENTS (Right Side) ===== */
.docs-toc {
    position: sticky;
    top: 100px;
    width: 220px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.docs-toc h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.docs-toc-link {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Geist Mono', monospace;
}

.docs-toc-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.docs-toc-link.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== CALLOUTS ===== */
.callout {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-left: 3px solid var(--text-link);
    background: rgba(178, 170, 255, 0.05);
}

.callout.warning {
    border-left-color: #ffaa00;
    background: rgba(255, 170, 0, 0.05);
}

.callout.error {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
}

.callout.success {
    border-left-color: #00cc88;
    background: rgba(0, 204, 136, 0.05);
}

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

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--text-primary);
}

.breadcrumbs span {
    color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.docs-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-default);
}

.docs-pagination a {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border-default);
    text-decoration: none;
    transition: all 0.2s ease;
    max-width: 45%;
}

.docs-pagination a:hover {
    border-color: var(--text-link);
    background: rgba(178, 170, 255, 0.05);
}

.docs-pagination .pagination-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.docs-pagination .pagination-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .docs-toc {
        display: none;
    }

    .docs-content {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

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

    .docs-layout {
        padding-top: 50px;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 1.5rem 1rem;
    }

    .docs-content h1 {
        font-size: 1.75rem;
    }

    .docs-content h2 {
        font-size: 1.35rem;
        margin-top: 2rem;
    }

    .docs-content h3 {
        font-size: 1.15rem;
    }

    .docs-pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .docs-pagination a {
        max-width: 100%;
    }
}

/* ===== LIGHT MODE ===== */
@media (prefers-color-scheme: light) {
    .docs-sidebar {
        background: var(--bg-primary);
        border-right-color: var(--border-default);
    }

    .docs-sidebar-link:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .docs-sidebar-link.active {
        background: var(--theme-active);
    }

    .docs-content h2 {
        border-bottom-color: var(--border-default);
    }

    .callout {
        background: rgba(74, 74, 255, 0.05);
    }

    .callout.warning {
        background: rgba(255, 170, 0, 0.05);
    }

    .callout.error {
        background: rgba(255, 68, 68, 0.05);
    }

    .callout.success {
        background: rgba(0, 204, 136, 0.05);
    }

    .docs-pagination a:hover {
        background: rgba(74, 74, 255, 0.05);
    }
}
