/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --warning-color: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ========== 导航栏 ========== */
header {
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.logo:hover {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
	color:white;
}

.download-btn-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background 0.3s;
    font-weight: 600;
}

.download-btn-header:hover {
    background: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    background: var(--bg-light);
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.25rem;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ========== 页面标题 ========== */
.page-header {
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.page-header.default {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.page-header.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #991b1b 100%);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ========== 主容器 ========== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-section {
    background: var(--bg-white);
    padding: 3rem 0;
}

.content-section h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid;
    padding-bottom: 0.5rem;
}

.content-section.default h2 {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.content-section.warning h2 {
    color: var(--warning-color);
    border-bottom-color: var(--warning-color);
}

.content-section h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem 0;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.9;
}

.content-section ul,
.content-section ol {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-light);
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

/* ========== 信息框 ========== */
.info-box {
    background: #dbeafe;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.375rem;
}

.info-box strong {
    color: var(--primary-color);
}

.warning-box {
    background: #fee2e2;
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.375rem;
}

.warning-box strong {
    color: #991b1b;
}

.highlight-box {
    background: #fef3c7;
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.375rem;
}

.highlight-box strong {
    color: var(--primary-color);
}

/* ========== 目录 ========== */
.table-of-contents {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid;
}

.table-of-contents.default {
    border-left-color: var(--primary-color);
}

.table-of-contents.warning {
    border-left-color: var(--warning-color);
}

.table-of-contents h3 {
    margin-bottom: 1rem;
}

.table-of-contents.default h3 {
    color: var(--primary-color);
}

.table-of-contents.warning h3 {
    color: var(--warning-color);
}

.table-of-contents ul {
    list-style: none;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.table-of-contents a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ========== 许可证卡片 ========== */
.license-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.license-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
}

.license-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.license-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.license-card p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.license-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========== 代码块 ========== */
.code-block {
    background: var(--text-dark);
    color: #4ade80;
    padding: 1.5rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========== 表格 ========== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid var(--border-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background: var(--bg-light);
}

/* ========== 页脚 ========== */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 99;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.back-to-top.show {
    display: flex;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .content-section h2 {
        font-size: 1.4rem;
    }

    .content-section h3 {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .license-cards {
        grid-template-columns: 1fr;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .download-btn-header {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

    .content-section {
        padding: 1.5rem 0;
    }

    .content-section h2 {
        font-size: 1.25rem;
    }

    .content-section h3 {
        font-size: 1rem;
    }

    .content-section ul,
    .content-section ol {
        margin-left: 1.5rem;
    }

    .code-block {
        font-size: 0.8rem;
        padding: 1rem;
    }

    .table-of-contents {
        padding: 1rem;
    }

    .license-cards {
        gap: 1rem;
    }
}
