/* 技术文档样式 */

.docs-main {
    padding: 100px 0 60px;
    min-height: calc(100vh - 300px);
}

.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* 侧边栏 */
.docs-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.docs-nav {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.docs-nav h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.docs-nav ul {
    list-style: none;
}

.docs-nav li {
    margin-bottom: 8px;
}

.docs-nav a {
    display: block;
    padding: 10px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.docs-nav a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.docs-nav a.active {
    background-color: #3498db;
    color: #fff;
}

/* 文档内容 */
.docs-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.docs-section {
    margin-bottom: 60px;
}

.docs-section h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.docs-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0 20px 0;
    color: #333;
}

.docs-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #333;
}

.docs-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.docs-section ul {
    margin: 15px 0 25px 30px;
    color: #666;
    line-height: 1.8;
}

.docs-section li {
    margin-bottom: 8px;
}

.docs-section strong {
    color: #333;
    font-weight: 600;
}

/* 架构图 */
.architecture-diagram {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.layer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.layer h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.layer p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: #fff;
}

/* 技术表格 */
.tech-table,
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.tech-table thead,
.config-table thead {
    background-color: #3498db;
    color: #fff;
}

.tech-table th,
.config-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.tech-table tbody tr:nth-child(even),
.config-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.tech-table td,
.config-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.tech-table tbody tr:last-child td,
.config-table tbody tr:last-child td {
    border-bottom: none;
}

/* 代码块 */
.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.code-block code {
    color: inherit;
    background: none;
    padding: 0;
}

/* 安装步骤 */
.installation-steps {
    margin: 30px 0;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.step-content .code-block {
    margin-top: 15px;
}

/* FAQ */
.faq-item {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.faq-item p {
    margin: 0;
    color: #666;
}

/* 导航栏激活状态 */
.nav-links a.active {
    color: #3498db;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 30px;
    }
    
    .architecture-diagram {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .docs-main {
        padding: 100px 0 40px;
    }
    
    .docs-content {
        padding: 25px;
    }
    
    .docs-section h1 {
        font-size: 28px;
    }
    
    .docs-section h2 {
        font-size: 20px;
    }
    
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .tech-table,
    .config-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }
    
    .tech-table th,
    .tech-table td,
    .config-table th,
    .config-table td {
        padding: 8px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .docs-main {
        padding: 100px 0 30px;
    }
    
    .docs-content {
        padding: 20px;
    }
    
    .docs-section h1 {
        font-size: 24px;
    }
    
    .docs-section h2 {
        font-size: 18px;
    }
    
    .code-block {
        font-size: 12px;
        padding: 15px;
    }
}

/* 滚动条样式 */
.docs-sidebar::-webkit-scrollbar {
    width: 8px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 链接样式 */
.docs-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.docs-content a:hover {
    color: #2980b9;
    text-decoration: underline;
}