/* 基础样式重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-1: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #4f46e5 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--primary-light);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.github-link svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* Hero 区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-content .highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(79, 70, 229, 0.4);
}

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

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.btn svg {
    width: 20px;
    height: 20px;
}

/* 代码预览 */
.hero-visual {
    position: relative;
}

.code-preview {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.filename {
    margin-left: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.code-content {
    padding: 24px;
    margin: 0;
    overflow-x: auto;
}

.code-content code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text);
}

/* 滚动提示 */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 通用 section 样式 */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 60px;
}

/* 功能特性 */
.features {
    background: linear-gradient(180deg, var(--background) 0%, rgba(30, 41, 59, 0.5) 50%, var(--background) 100%);
}

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

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

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 快速开始 */
.quickstart {
    background: var(--surface);
}

/* 下载区域 */
.download-section {
    margin-bottom: 60px;
    padding: 40px;
    background: var(--background);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.download-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.download-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.download-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.download-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.download-arch {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.download-btn {
    width: 100%;
    justify-content: center;
}

.download-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 历史版本 */
.version-history {
    margin-bottom: 60px;
    padding: 32px;
    background: var(--background);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.version-list {
    max-width: 600px;
    margin: 0 auto;
}

.version-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.version-tag {
    background: var(--gradient-1);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.version-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.version-desc {
    flex: 1;
    color: var(--text);
    font-size: 0.95rem;
}

.version-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.version-link:hover {
    color: var(--primary);
}

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.step-content p {
    color: var(--text-muted);
}

/* 代码块 */
.code-block {
    position: relative;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

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

.code-block code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #e6edf3;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

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

.copy-btn svg {
    width: 18px;
    height: 18px;
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
}

/* 配置说明 */
.config-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.tab-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

.tab-content {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

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

.config-info {
    margin-top: 32px;
    padding: 24px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.config-info h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.config-info ul,
.config-info ol {
    padding-left: 20px;
    color: var(--text-muted);
}

.config-info li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* 目录结构 */
.structure {
    background: var(--surface);
}

.structure-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.tree-view {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #e6edf3;
    overflow-x: auto;
}

.structure-info {
    padding: 24px;
}

.structure-info h4 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.structure-info ul {
    list-style: none;
}

.structure-info li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.structure-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* 页脚 */
.footer {
    background: var(--background);
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand .logo-icon {
    width: 36px;
    height: 36px;
}

.footer-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-license {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* 代码高亮 */
code {
    font-family: 'Fira Code', 'Consolas', monospace;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-light);
}

/* 响应式设计 */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .structure-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .step {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-btn {
        width: 100%;
        max-width: 300px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.step,
.tab-content {
    animation: fadeInUp 0.6s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 语言切换器 */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary);
    background: var(--surface-light);
}

.lang-current {
    font-size: 0.9rem;
}

.lang-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.lang-switcher:hover .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.lang-dropdown.show,
.lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.lang-dropdown a:hover {
    background: var(--surface-light);
    color: var(--primary-light);
}

.lang-dropdown a.active {
    color: var(--primary-light);
    font-weight: 600;
}
