/* 全局变量 - 浅色模式（默认） */
:root {
    --sunset-start: #ea580c;
    --sunset-end: #f59e0b;
    --text-main: #1e293b;
    --text-muted: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 深色模式 - 通过类名控制，优先级最高 */
body.dark-mode {
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --sunset-start: #fb923c;
    --sunset-end: #fcd34d;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --border-color: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* 浅色模式 - 通过类名明确控制 */
body.light-mode {
    --sunset-start: #ea580c;
    --sunset-end: #f59e0b;
    --text-main: #1e293b;
    --text-muted: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transition: all 0.3s;
}

body.light-mode .header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark-mode .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

body.light-mode .logo-text {
    color: #1e293b;
}

body.dark-mode .logo-text {
    color: #f8fafc;
}

.nav {
    display: flex;
    gap: 8px;
    flex: 1;
    margin-left: 32px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--sunset-start);
}

body.light-mode .nav-link:hover {
    background: #f1f5f9;
}

body.dark-mode .nav-link:hover {
    background: #1e293b;
}

.nav-link.active {
    background: rgba(234, 88, 12, 0.1);
    color: var(--sunset-start);
}

body.light-mode .nav-link.active {
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
}

body.dark-mode .nav-link.active {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: var(--bg-secondary);
    border-color: var(--sunset-start);
}

body.light-mode .theme-toggle {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-mode .theme-toggle:hover {
    background: #f8fafc;
    border-color: #ea580c;
}

body.dark-mode .theme-toggle {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .theme-toggle:hover {
    background: #334155;
    border-color: #fb923c;
}

.theme-icon {
    font-size: 20px;
    line-height: 1;
}

/* 主内容区 */.theme-icon {
    font-size: 20px;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-main);
    font-size: 14px;
    width: 200px;
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--sunset-start);
    width: 250px;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

body.light-mode .search-input {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .search-input:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

body.dark-mode .search-input {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode .search-input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}

/* 主内容区 */
.main {
    margin-top: 64px;
}

/* Hero 区域 */
.hero {
    padding: 120px 16px 80px;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.1);
    color: var(--sunset-start);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(234, 88, 12, 0.3);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 56px;
    line-height: 1.05;
    font-weight: 800;
    margin: 0 0 24px;
}

.gradient-text {
    background: linear-gradient(to right, var(--sunset-start), var(--sunset-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--sunset-start);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
}

/* 特性区域 */
.features {
    padding: 80px 16px;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-description {
    color: var(--text-muted);
    font-size: 15px;
}

/* 快速开始 */
.quick-start {
    padding: 80px 16px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.step {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sunset-start);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-muted);
    font-size: 14px;
}

.code-example {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.code-lang {
    font-weight: 600;
    font-size: 14px;
}

.copy-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-main);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--sunset-start);
    color: white;
    border-color: var(--sunset-start);
}

.code-block {
    padding: 20px;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
}

/* 知识库导航 */
.knowledge-nav {
    padding: 80px 16px;
    background: var(--bg-secondary);
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.knowledge-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.knowledge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--sunset-start);
}

.knowledge-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.knowledge-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.knowledge-desc {
    color: var(--text-muted);
    font-size: 14px;
}

/* 页脚 */
.footer {
    padding: 32px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-info p,
.footer-links span {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links a {
    color: var(--sunset-start);
    text-decoration: none;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .nav {
        display: none;
    }

    .search-input {
        width: 150px;
    }

    .search-input:focus {
        width: 180px;
    }

    .features-grid,
    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }
}

/* 页面头部 */
.page-header {
    padding: 120px 16px 60px;
    text-align: center;
    background: var(--bg-secondary);
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.page-description {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* 内容区域 */
.content-section {
    padding: 60px 16px;
}

/* 模型列表 */
.model-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.model-item {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.model-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--sunset-start);
}

.model-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.model-name {
    font-size: 24px;
    font-weight: 700;
}

.model-badge {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.1);
    color: var(--sunset-start);
    font-size: 12px;
    font-weight: 600;
}

.model-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.model-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.spec-value {
    font-size: 14px;
    color: var(--text-main);
}

/* 文档内容 */
.doc-content {
    max-width: 900px;
    margin: 0 auto;
}

.doc-section {
    margin-bottom: 48px;
}

.doc-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.doc-subtitle {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-main);
}

.doc-text {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.param-table thead {
    background: var(--bg-secondary);
}

.param-table th,
.param-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.param-table th {
    font-weight: 600;
    color: var(--text-main);
}

.param-table td {
    color: var(--text-muted);
}

.param-table code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--sunset-start);
}

/* 教程列表 */
.tutorial-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.tutorial-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.tutorial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tutorial-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.1);
    color: var(--sunset-start);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tutorial-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tutorial-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tutorial-steps {
    list-style: none;
    padding: 0;
}

.tutorial-steps li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
}

.tutorial-steps li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--sunset-start);
    font-weight: 700;
}

.tutorial-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--sunset-start);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.tutorial-link:hover {
    color: var(--sunset-end);
    transform: translateX(4px);
}

/* 详细教程样式 */
.tutorial-details {
    margin-top: 80px;
}

.detail-section {
    margin-bottom: 80px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-main);
}

/* 平台切换标签 */
.platform-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--sunset-start);
    border-bottom-color: var(--sunset-start);
}

body.light-mode .tab-btn.active {
    color: #ea580c;
    border-bottom-color: #ea580c;
}

body.dark-mode .tab-btn.active {
    color: #fb923c;
    border-bottom-color: #fb923c;
}

/* 平台内容 */
.platform-content {
    display: none;
}

.platform-content.active {
    display: block;
}

.platform-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-main);
}

/* 步骤详情 */
.step-detail {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step-detail h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.step-detail p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.step-detail code {
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--sunset-start);
}

.step-detail ul {
    list-style: disc;
    padding-left: 24px;
    color: var(--text-muted);
}

.step-detail ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.step-detail .code-example {
    margin-top: 16px;
}

/* FAQ 列表 */
.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--sunset-start);
}

.faq-question {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.faq-answer {
    color: var(--text-muted);
    line-height: 1.8;
}