/* ===== DOCUMENTATION LAYOUT ===== */
.docs-page {
    padding-top: 80px;
}

.docs-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* ===== SIDEBAR ===== */
.docs-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-xl) var(--spacing-lg);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.docs-sidebar-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Navigation */
.docs-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.docs-chapter {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.chapter-header::after {
    content: '▼';
    position: absolute;
    right: var(--spacing-md);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    transition: transform 0.3s ease;
}

.docs-chapter.active .chapter-header::after {
    transform: rotate(180deg);
}

.docs-chapter.active .chapter-header {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.chapter-icon {
    font-size: 1.25rem;
}

.chapter-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.chapter-topics {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.docs-chapter.active .chapter-topics {
    display: flex;
    max-height: 500px;
}

.topic-item {
    margin: 0;
}

.topic-link {
    display: block;
    padding: 0.5rem var(--spacing-md);
    padding-left: 3rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

.topic-link::before {
    content: '';
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 50%;
}

.topic-link:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.topic-item.active .topic-link {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    font-weight: 600;
}

.topic-item.active .topic-link::before {
    background: var(--primary-light);
    width: 6px;
    height: 6px;
}

/* ===== CONTENT AREA ===== */
.docs-content {
    padding: var(--spacing-xl);
    max-width: 900px;
}

/* Breadcrumbs */
.docs-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-xl);
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

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

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

.docs-breadcrumbs .separator {
    color: var(--text-tertiary);
}

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

/* Article Content */
.docs-article {
    margin-bottom: var(--spacing-2xl);
}

.docs-article h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -1px;
    line-height: 1.2;
}

.docs-article h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.docs-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.docs-article p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

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

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

.docs-article code {
    background: var(--bg-tertiary);
    color: var(--accent-orange);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875em;
}

.docs-article pre {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-article pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-article ul {
    margin: var(--spacing-md) 0;
    padding-left: 0;
}

.docs-article li {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    padding-left: 1.5rem;
    position: relative;
}

.docs-article li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-weight: bold;
}

/* ===== NAVIGATION BUTTONS ===== */
.docs-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.nav-button.nav-next {
    justify-content: flex-end;
    text-align: right;
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.nav-button svg {
    color: var(--primary-light);
    flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .docs-content {
        padding: var(--spacing-lg);
    }

    .docs-article h1 {
        font-size: 2rem;
    }

    .docs-article h2 {
        font-size: 1.5rem;
    }

    .docs-navigation {
        grid-template-columns: 1fr;
    }

    .nav-button.nav-next {
        justify-content: flex-start;
        text-align: left;
    }
}