/* OFD SDK API 文档样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 左侧导航 */
.ofd-api-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background-color: #2c3e50;
    color: #fff;
    overflow-y: auto;
    z-index: 100;
}

.ofd-api-sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #F65C34 0%, #E74C3C 100%);
}

.ofd-api-sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ofd-api-sidebar-header p {
    font-size: 12px;
    opacity: 0.9;
}

.ofd-api-sidebar-nav {
    padding: 10px 0;
}

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

.ofd-api-sidebar-nav li {
    margin: 0;
    padding: 0;
}

.ofd-api-sidebar-nav li a {
    display: block;
    padding: 10px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.ofd-api-sidebar-nav li a:hover {
    background-color: #34495e;
    color: #fff;
}

.ofd-api-sidebar-nav li.active a {
    background-color: #F65C34;
    color: #fff;
}

/* 主内容区域 */
.ofd-api-main {
    margin-left: 280px;
    min-height: 100vh;
    background-color: #fff;
}

/* 顶部栏 */
.ofd-api-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 60px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 50;
}

.ofd-api-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ofd-api-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* QQ群信息 */
.ofd-api-qq-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    position: relative;
}

.ofd-api-qq-group img {
    width: 18px;
    height: 18px;
}

.ofd-api-qq-group:hover {
    background-color: #e9ecef;
}

.ofd-api-qq-qrcode {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
}

.ofd-api-qq-group:hover .ofd-api-qq-qrcode {
    display: block;
}

.ofd-api-qq-qrcode img {
    width: 120px;
    height: 120px;
}

.ofd-api-qq-qrcode p {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 内容区域 */
.ofd-api-content {
    padding: 80px 30px 30px;
    max-width: 1000px;
}

/* 章节样式 */
.ofd-api-section {
    margin-bottom: 40px;
}

.ofd-api-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F65C34;
}

.ofd-api-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* 类型定义 */
.ofd-api-typedef {
    background-color: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.ofd-api-typedef-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.ofd-api-typedef-desc {
    color: #666;
    margin-bottom: 15px;
}

/* 接口卡片 */
.ofd-api-card {
    background-color: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #F65C34;
}

.ofd-api-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.ofd-api-card-signature {
    background: #2d2d2d;
    color: #ccc;
    padding: 12px 16px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin-bottom: 15px;
    overflow-x: auto;
}

.ofd-api-card-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 表格样式 */
.ofd-api-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 13px;
}

.ofd-api-table th,
.ofd-api-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ofd-api-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.ofd-api-table tr:hover {
    background-color: #f9f9f9;
}

/* 代码块 */
.ofd-api-pre {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ofd-api-pre code {
    color: #ccc;
}

/* 代码高亮 */
.ofd-api-keyword { color: #cc7832; }
.ofd-api-string { color: #6a8759; }
.ofd-api-function { color: #ffc66d; }
.ofd-api-comment { color: #808080; }
.ofd-api-number { color: #6897bb; }

/* 提示框 */
.ofd-api-tip {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #1565c0;
}

.ofd-api-warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #e65100;
}

/* 响应式 */
@media (max-width: 768px) {
    .ofd-api-sidebar {
        width: 100%;
        position: relative;
        height: auto;
        max-height: 200px;
    }

    .ofd-api-main {
        margin-left: 0;
    }

    .ofd-api-header {
        left: 0;
        position: relative;
    }

    .ofd-api-content {
        padding: 20px;
    }
}