/* 文档页面样式 */
.docs-main {
    padding-top: 80px;
    padding-bottom: 60px;
}

.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: start;
}

/* 侧边栏 */
.docs-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.docs-nav h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.docs-nav ul {
    list-style: none;
    padding-left: 0;
}

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

.docs-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.2s;
}

.docs-nav a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.docs-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

/* 文档内容 */
.docs-content {
    padding: 2rem 0;
}

.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.doc-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.doc-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.doc-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.doc-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.doc-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.doc-section code {
    background-color: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.doc-section ul,
.doc-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.doc-section li {
    margin-bottom: 0.5rem;
}

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

.doc-section a {
    color: var(--primary-color);
}

.doc-section a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 表格样式 */
.doc-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.doc-section thead {
    background-color: var(--bg-secondary);
}

.doc-section th,
.doc-section td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.doc-section th {
    font-weight: 600;
    color: var(--text-primary);
}

.doc-section tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* 代码块样式 */
.doc-section pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    line-height: 1.6;
}

.doc-section pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }

    .docs-content {
        padding: 1rem 0;
    }

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