/* ============================================
   米洛SDK开发者文档页面样式
   ============================================ */

/* === 文档页面基础 === */
.docs-page {
    background: #f8fafc;
}

.docs-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.docs-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.docs-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.docs-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #1e3a5f;
    cursor: pointer;
    padding: 8px;
}

/* === 文档布局 === */
.docs-wrapper {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* === 左侧导航栏 === */
.docs-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 80px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 24px 0;
    transition: transform 0.3s ease;
    z-index: 999;
}

.docs-sidebar-header {
    padding: 0 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.docs-sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.docs-nav {
    padding: 0 16px;
}

.docs-nav-section {
    margin-bottom: 24px;
}

.docs-nav-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 0 8px;
}

.docs-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #475569;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 2px;
}

.docs-nav li a i {
    width: 16px;
    font-size: 14px;
    color: #64748b;
}

.docs-nav li a:hover {
    background: #f1f5f9;
    color: #1e3a5f;
}

.docs-nav li a:hover i {
    color: #00d4aa;
}

.docs-nav li a.active {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.08), rgba(0, 212, 170, 0.08));
    color: #1e3a5f;
    font-weight: 600;
}

.docs-nav li a.active i {
    color: #00d4aa;
}

/* === 主内容区 === */
.docs-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px 60px 60px;
    max-width: calc(100vw - 280px);
}

.docs-section {
    margin-bottom: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-section:last-child {
    border-bottom: none;
}

.docs-title {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.3;
}

.docs-lead {
    font-size: 18px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 32px;
}

.docs-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 212, 170, 0.2);
}

.docs-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 32px;
    margin-bottom: 12px;
}

.docs-content p {
    font-size: 16px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 16px;
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.docs-content li {
    font-size: 16px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 8px;
}

.docs-content strong {
    color: #1e293b;
    font-weight: 600;
}

/* === 高亮提示框 === */
.docs-highlight-box {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.04), rgba(0, 212, 170, 0.04));
    border-left: 4px solid #00d4aa;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.docs-highlight-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-highlight-box h3 i {
    color: #f59e0b;
}

.docs-highlight-box ul {
    margin: 0;
    padding-left: 20px;
}

.docs-highlight-box li {
    margin-bottom: 8px;
}

/* === 卡片网格 === */
.docs-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.docs-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.docs-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: center;
}

.docs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.docs-card i {
    font-size: 48px;
    color: #00d4aa;
    margin-bottom: 16px;
}

.docs-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 8px;
}

.docs-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.docs-contact-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
}

.docs-contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.docs-contact-card i {
    font-size: 36px;
    color: #00d4aa;
    margin-bottom: 12px;
}

.docs-contact-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 8px;
}

.docs-contact-card p {
    font-size: 15px;
    color: #1e3a5f;
    font-weight: 600;
    margin-bottom: 4px;
}

.docs-small {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* === 代码块 === */
.docs-code-box {
    background: #0f1f33;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.docs-code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-code-header span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-code-header i {
    color: #00d4aa;
}

.docs-code-box pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.docs-code-box code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: #e2e8f0;
}

/* === 步骤指示器 === */
.docs-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: 32px 0;
}

.docs-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.docs-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.docs-step h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 8px;
}

.docs-step p {
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* === FAQ 手风琴 === */
.docs-faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.docs-faq-item {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.docs-faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.docs-faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    transition: all 0.2s ease;
}

.docs-faq-question::-webkit-details-marker {
    display: none;
}

.docs-faq-question i {
    color: #00d4aa;
    font-size: 18px;
    flex-shrink: 0;
}

.docs-faq-question:hover {
    background: rgba(0, 212, 170, 0.04);
}

.docs-faq-item[open] .docs-faq-question {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.04), rgba(0, 212, 170, 0.04));
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-faq-answer {
    padding: 20px 24px;
    font-size: 15px;
    color: #475569;
    line-height: 1.8;
}

.docs-faq-answer ul,
.docs-faq-answer ol {
    margin: 12px 0;
    padding-left: 24px;
}

.docs-faq-answer li {
    margin-bottom: 8px;
}

.docs-faq-answer code {
    background: rgba(30, 58, 95, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: #1e3a5f;
}

/* === 更新日志 === */
.docs-changelog {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
}

.docs-changelog-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-changelog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.docs-version {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
}

.docs-date {
    font-size: 14px;
    color: #94a3b8;
}

.docs-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.docs-badge.latest {
    background: linear-gradient(135deg, #00d4aa, #10b981);
    color: #ffffff;
}

.docs-changelog-item ul {
    margin: 0;
    padding-left: 20px;
}

.docs-changelog-item li {
    margin-bottom: 8px;
}

/* === 底部导航 === */
.docs-footer-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    margin-top: 60px;
    border-top: 2px solid rgba(0, 212, 170, 0.2);
}

.docs-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1e3a5f;
    transition: all 0.3s ease;
}

.docs-footer-link:hover {
    background: #1e3a5f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.docs-footer-link i {
    font-size: 14px;
}

/* === 响应式设计 === */
@media (max-width: 1200px) {
    .docs-content {
        padding: 32px 40px 48px;
    }
    
    .docs-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .docs-sidebar {
        transform: translateX(-100%);
    }
    
    .docs-sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }
    
    .docs-content {
        margin-left: 0;
        max-width: 100vw;
        padding: 32px 24px 48px;
    }
    
    .docs-menu-toggle {
        display: block;
    }
    
    .docs-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .docs-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .docs-wrapper {
        margin-top: 70px;
    }
    
    .docs-navbar {
        padding: 12px 0;
    }
    
    .docs-content {
        padding: 24px 20px 40px;
    }
    
    .docs-title {
        font-size: 28px;
    }
    
    .docs-content h2 {
        font-size: 20px;
    }
    
    .docs-content h3 {
        font-size: 18px;
    }
    
    .docs-step {
        flex-direction: column;
        gap: 12px;
    }
    
    .docs-footer-nav {
        flex-direction: column;
        gap: 12px;
    }
    
    .docs-footer-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 20px 16px 32px;
    }
    
    .docs-title {
        font-size: 24px;
    }
    
    .docs-lead {
        font-size: 16px;
    }
    
    .docs-code-box code {
        font-size: 12px;
    }
    
    .docs-faq-question {
        padding: 16px;
        font-size: 15px;
    }
    
    .docs-faq-answer {
        padding: 16px;
    }
}

/* === 表格 === */
.docs-table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.docs-table thead {
    background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
    color: #ffffff;
}

.docs-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}

.docs-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease;
}

.docs-table tbody tr:hover {
    background: rgba(0, 212, 170, 0.04);
}

.docs-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #475569;
}

.docs-table code {
    background: rgba(30, 58, 95, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: #1e3a5f;
}
