* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #fff;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.logo span {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #3b82f6;
}

/* 布局 */
.docs-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 3rem;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
}

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

.sidebar-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: block;
    padding: 0.25rem 0;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: #3b82f6;
}

/* 主内容区 */
.main-content {
    flex: 1;
    min-width: 0;
}

/* 内容块样式 */
.content-section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: #374151;
}

/* 表格样式 */
.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
}

.param-table th,
.param-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.param-table th {
    background-color: #f3f4f6;
    font-weight: 600;
    width: 120px;
}

.param-table td {
    color: #1f2937;
}

.param-table tr:last-child td,
.param-table tr:last-child th {
    border-bottom: none;
}

/* 代码块样式 */
.code-block {
    background: #1e293b;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.code-language {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.copy-btn {
    background: #334155;
    border: none;
    color: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #475569;
}

pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    color: #e2e8f0;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

code {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-size: 0.85em;
    background: #f1f5f9;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #0f172a;
}

/* 提示框 */
.note {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.note p {
    margin-bottom: 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}