:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --accent: #F59E0B;
    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text: #1E293B;
    --text-secondary: #64748B;
    --border: #E2E8F0;
    --success: #10B981;
    --danger: #EF4444;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-usage {
    background: #F1F5F9;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.nav-usage .num {
    color: var(--primary);
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: #D97706;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05em;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    padding: 60px 24px 80px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.15em;
    opacity: 0.92;
    margin-bottom: 28px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-badge {
    background: rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* 主工具区 */
.tool-section {
    max-width: 800px;
    margin: -40px auto 40px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.tool-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 36px;
}

.section-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .step {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
}

/* 文档类型选择网格 */
.doc-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.doc-type-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
}

.doc-type-card:hover {
    border-color: var(--primary-light);
    background: #F8F9FE;
    transform: translateY(-2px);
}

.doc-type-card.selected {
    border-color: var(--primary);
    background: #EEF2FF;
}

.doc-type-card .icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.doc-type-card .name {
    font-weight: 700;
    font-size: 1em;
    color: var(--text);
    margin-bottom: 4px;
}

.doc-type-card .desc {
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* 文本输入区 */
.input-area {
    margin-bottom: 24px;
}

.input-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    display: block;
}

.input-hint {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    line-height: 1.7;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 示例提示 */
.example-prompts {
    background: #F8FAFC;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 12px;
}

.example-prompts .label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-chip {
    background: white;
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.example-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

/* 生成按钮区 */
.generate-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.generate-bar .btn {
    flex: 1;
}

/* 结果区 */
.result-section {
    margin-top: 32px;
    display: none;
}

.result-section.show {
    display: block;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.result-content {
    background: #F8FAFC;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    min-height: 200px;
    white-space: pre-wrap;
    line-height: 1.9;
    font-size: 1em;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.show {
    display: block;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* 错误提示 */
.error-box {
    display: none;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
    padding: 14px 20px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 0.95em;
}

.error-box.show {
    display: block;
}

.error-box .upgrade-hint {
    margin-top: 8px;
    font-size: 0.9em;
}

.error-box .upgrade-hint a {
    color: var(--primary);
    font-weight: 600;
}

/* Toast提示 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.95em;
    z-index: 9999;
    transition: transform 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 特性区 */
.features {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-card .icon {
    font-size: 2.5em;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: #1E293B;
    color: #94A3B8;
    text-align: center;
    padding: 40px 24px;
    margin-top: 40px;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
}

/* 落地页专用 */
.landing-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    padding: 80px 24px 100px;
    text-align: center;
}

.landing-hero h1 {
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

.landing-hero .subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.pain-points {
    max-width: 800px;
    margin: -60px auto 40px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    position: relative;
    z-index: 10;
}

.pain-points h2 {
    text-align: center;
    color: var(--danger);
    margin-bottom: 24px;
    font-size: 1.4em;
}

.pain-list {
    list-style: none;
}

.pain-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.pain-list li:last-child {
    border-bottom: none;
}

.pain-list .icon {
    font-size: 1.4em;
}

.solution-section {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 24px;
    text-align: center;
}

.solution-section h2 {
    font-size: 1.8em;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.solution-section > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05em;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.solution-card {
    background: white;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    text-align: left;
}

.solution-card .step-num {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 14px;
}

.solution-card h3 {
    font-size: 1.05em;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.solution-card p {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* 定价页 */
.pricing-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 24px;
}

.pricing-section h2 {
    text-align: center;
    font-size: 2em;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.pricing-section .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.pricing-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--primary);
    border-width: 3px;
}

.pricing-card .popular-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
}

.pricing-card .plan-name {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2.8em;
    font-weight: 800;
    color: var(--text);
    margin: 16px 0;
}

.pricing-card .price .unit {
    font-size: 0.4em;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-card .desc {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 24px;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
}

.pricing-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95em;
    color: var(--text-secondary);
}

.pricing-card ul li::before {
    content: "✓ ";
    color: var(--success);
    font-weight: 700;
}

.pricing-card .btn {
    width: 100%;
}

/* FAQ */
.faq-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 24px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.faq-item h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-size: 1.05em;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* ============ 移动端导航汉堡菜单 ============ */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* 响应式 */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8em; }
    .landing-hero h1 { font-size: 2em; }
    .tool-card { padding: 24px 16px; }
    .generate-bar { flex-direction: column; }

    /* 汉堡菜单按钮显示 */
    .nav-toggle { display: flex; }

    /* 导航链接改为下拉菜单 */
    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 100;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        padding: 12px 16px;
        font-size: 1em;
        border-radius: 8px;
    }
    .nav-links a:hover { background: var(--bg-secondary); }
    .nav-usage { padding: 8px 16px; }

    /* navbar 内边距缩小 */
    .navbar-inner { padding: 0 16px; }

    /* 按钮触摸区域增大 */
    .btn { padding: 12px 24px; font-size: 0.95em; }
    .btn-lg { padding: 14px 32px; }

    /* 结果操作按钮换行 */
    .result-actions { flex-wrap: wrap; gap: 8px; }
    .result-actions button, .result-actions a {
        flex: 1 1 auto;
        min-width: 80px;
        text-align: center;
    }

    /* 文档类型网格单列 */
    .doc-types-grid { grid-template-columns: 1fr; }

    /* 特性网格单列 */
    .features-grid { grid-template-columns: 1fr; }

    /* 定价网格单列 */
    .pricing-grid { grid-template-columns: 1fr !important; }

    /* 落地页痛点/解决方案/FAQ 内边距缩小 */
    .pain-points, .solution-section, .faq-section { padding: 40px 16px; }
    .pain-list { gap: 16px; }
    .solution-grid { grid-template-columns: 1fr; }
    .faq-item { padding: 16px; }

    /* 知识库元信息换行 */
    .kb-article-meta { flex-wrap: wrap; gap: 8px; }

    /* 知识库文章表格滚动 */
    .kb-article-content { overflow-x: auto; }
    .kb-article-content table { display: block; overflow-x: auto; white-space: nowrap; max-width: 100%; }
    .kb-article-content pre { overflow-x: auto; font-size: 0.85em; }

    /* 面包屑换行 */
    .kb-breadcrumb { flex-wrap: wrap; gap: 4px; font-size: 0.85em; }

    /* 容器内边距 */
    .container, .navbar-inner { padding: 0 16px; }

    /* example-chip 触摸区域增大 */
    .example-chip { padding: 8px 14px; font-size: 0.85em; }
}

/* ============ 站点头部和尾部 ============ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-header .logo {
    font-size: 1.2em;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}
.site-nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95em;
}
.site-nav a:hover { color: var(--primary); }

.site-footer {
    background: #1E293B;
    color: #94A3B8;
    padding: 32px 0;
    margin-top: 60px;
}
.footer-links { margin-bottom: 16px; }
.footer-links a {
    color: #CBD5E1;
    text-decoration: none;
    margin-right: 20px;
    font-size: 0.9em;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.85em; }

/* ============ 知识库页面 ============ */
.kb-hero {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}
.kb-hero h1 { font-size: 2.2em; margin-bottom: 8px; }
.kb-hero p { opacity: 0.9; margin-bottom: 20px; }
.kb-hero .btn-primary {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.kb-main {
    display: flex;
    gap: 32px;
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.kb-sidebar {
    width: 220px;
    flex-shrink: 0;
}
.kb-sidebar h3 { font-size: 1em; margin-bottom: 12px; color: var(--text); }
.kb-categories { list-style: none; }
.kb-categories li { margin-bottom: 4px; }
.kb-categories a {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
}
.kb-categories a:hover, .kb-categories a.active {
    background: #EEF2FF;
    color: var(--primary);
}
.kb-categories .count {
    background: var(--border);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.8em;
}

.kb-content { flex: 1; }
.kb-article-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}
.kb-article-card:hover { box-shadow: var(--shadow); }
.kb-article-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.kb-category-tag {
    background: #EEF2FF;
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.85em;
}
.kb-article-card h2 { font-size: 1.15em; margin-bottom: 6px; }
.kb-article-card h2 a { color: var(--text); text-decoration: none; }
.kb-article-card h2 a:hover { color: var(--primary); }
.kb-summary { color: var(--text-secondary); font-size: 0.9em; line-height: 1.6; margin-bottom: 8px; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-tag {
    background: var(--bg);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78em;
}

.kb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}
.kb-pagination a, .kb-pagination .current-page {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
}
.kb-pagination a {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--primary);
}
.kb-pagination .current-page { color: var(--text-secondary); }
.kb-empty { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.kb-empty a { color: var(--primary); }

/* 文章详情页 */
.kb-article-detail {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 20px;
}
.kb-breadcrumb {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.kb-breadcrumb a { color: var(--primary); text-decoration: none; }
.kb-article-header { margin-bottom: 24px; }
.kb-article-header h1 { font-size: 1.8em; line-height: 1.4; margin: 12px 0 8px; }
.kb-article-info {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    color: var(--text-secondary);
}
.kb-article-content {
    font-size: 1em;
    line-height: 1.85;
    color: #334155;
}
.kb-article-content h2 {
    font-size: 1.3em;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text);
}
.kb-article-content h3 {
    font-size: 1.1em;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text);
}
.kb-article-content p { margin-bottom: 16px; }
.kb-article-content ul, .kb-article-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}
.kb-article-content li { margin-bottom: 6px; line-height: 1.8; }
.kb-article-content code {
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.kb-article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: #F8FAFC;
    color: var(--text-secondary);
    border-radius: 0 8px 8px 0;
}
.kb-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.kb-article-content th, .kb-article-content td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}
.kb-article-content th { background: #F1F5F9; font-weight: 700; }

.kb-cta-box {
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 100%);
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    margin: 40px 0;
}
.kb-cta-box h3 { font-size: 1.2em; margin-bottom: 8px; color: var(--text); }
.kb-cta-box p { color: var(--text-secondary); margin-bottom: 16px; }
.kb-cta-box .btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.kb-related { margin-top: 40px; }
.kb-related h3 { font-size: 1.1em; margin-bottom: 12px; }
.kb-related ul { list-style: none; }
.kb-related li { padding: 6px 0; }
.kb-related a { color: var(--text-secondary); text-decoration: none; }
.kb-related a:hover { color: var(--primary); }

/* 响应式补充 */
@media (max-width: 768px) {
    .kb-main { flex-direction: column; }
    .kb-sidebar { width: 100%; }
    .site-nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 100;
    }
    .site-nav.active { display: flex; }
    .site-nav a { margin-left: 0; font-size: 1em; padding: 12px 16px; border-radius: 8px; }
    .site-header .container { padding: 0 16px; }
    .footer-links a { display: block; margin-bottom: 6px; }
}

/* ============ 管理后台 ============ */
.admin-header {
    background: #1E293B;
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.admin-header h1 { font-size: 1.4em; margin-bottom: 12px; }
.admin-tabs { display: flex; gap: 4px; }
.tab-btn {
    background: transparent;
    color: #94A3B8;
    border: none;
    padding: 8px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.tab-btn.active { color: #fff; background: var(--primary); }

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* 统计卡片 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}
.stat-num {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}
.stat-card.pending .stat-num { color: #F59E0B; }
.stat-card.paid .stat-num { color: #10B981; }
.stat-card.revenue .stat-num { color: #6366F1; }
.stat-card.users .stat-num { color: #0EA5E9; }
.stat-card.premium .stat-num { color: #8B5CF6; }
.stat-label { font-size: 0.8em; color: var(--text-secondary); }

/* 工具栏 */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.toolbar-left { display: flex; gap: 12px; }
.toolbar-left select, .toolbar-left input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9em;
    background: #fff;
}
.toolbar-left input { width: 220px; }
.btn-refresh {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 0.9em;
}
.btn-refresh:hover { background: #E2E8F0; }

/* 表格 */
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }
.admin-table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    background: #F8FAFC;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9em;
}
.admin-table tr:hover { background: #F8FAFC; }
.admin-table tr:last-child td { border-bottom: none; }

.plan-tag {
    background: #EEF2FF;
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.85em;
}
.status-paid {
    color: #10B981;
    font-weight: 600;
    font-size: 0.85em;
}
.status-pending {
    color: #F59E0B;
    font-weight: 600;
    font-size: 0.85em;
}
.btn-confirm {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}
.btn-confirm:hover { background: var(--primary-dark); }

/* 反馈卡片 */
.feedback-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid var(--border);
}
.feedback-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 0.8em;
    color: var(--text-secondary);
}
.feedback-contact { color: var(--primary); }
.feedback-content {
    line-height: 1.7;
    color: var(--text);
    font-size: 0.95em;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
    .toolbar-left { flex-direction: column; }
    .toolbar-left input { width: 100%; }
    .admin-table { font-size: 0.8em; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    .admin-header-top { flex-direction: column; gap: 8px; }
    .admin-header-actions { flex-wrap: wrap; }
}

/* 管理后台头部操作栏 */
.admin-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.notify-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94A3B8;
    font-size: 0.85em;
}
.notify-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
}
.notify-dot.on { background: #10B981; }
.btn-sm {
    background: rgba(255,255,255,0.1);
    color: #E2E8F0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 0.85em;
    white-space: nowrap;
}
.btn-sm:hover { background: rgba(255,255,255,0.2); }
.btn-wechat { background: #06A77D; border-color: #06A77D; }
.btn-wechat:hover { background: #058C6A; }

/* Tab角标 */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EF4444;
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 4px;
}
