/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 顶部导航栏 */
header {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #2196f3;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #2196f3;
}

/* 主内容区 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    margin-right: 40px;
}

.sidebar-nav {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
}

.sidebar-nav h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #555;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background-color: #f0f7ff;
    color: #2196f3;
}

.sidebar-nav a.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

/* 内容区 */
.content {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 40px;
}

.content h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: #1a1a1a;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaeaea;
}

.content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #1a1a1a;
}

.content p {
    margin-bottom: 16px;
    color: #555;
}

.content ul, .content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.content li {
    margin-bottom: 8px;
    color: #555;
}

/* 代码块 */
.code-block {
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
}

.code-block pre {
    white-space: pre-wrap;
}

/* API端点卡片 */
.api-card {
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.api-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.api-method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.method-post {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #1a1a1a;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #2196f3;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1976d2;
}

/* 提示框 */
.alert {
    padding: 16px;
    border-radius: 4px;
    margin: 16px 0;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* 响应式设计 */
@media (max-width: 960px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .content {
        padding: 20px;
    }
}

/* 页脚 */
footer {
    background-color: #fff;
    border-top: 1px solid #eaeaea;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 14px;
    color: #757575;
}
