/* 全局变量 */
:root {
    /* 亮色主题 */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;

    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #868e96;

    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;

    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;

    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;

    --border-color: #404040;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    text-decoration: underline;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.nav-title {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.nav-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

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

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
    text-decoration: none;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

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

/* 英雄区域 */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.title-main {
    color: var(--primary-color);
}

.title-sub {
    color: var(--text-secondary);
    font-size: 2rem;
    margin-left: 16px;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    text-decoration: none;
    transform: translateY(-2px);
}

.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.app-screenshot {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.app-screenshot:hover {
    transform: scale(1.02);
}

/* 章节标题 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-primary);
}

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

/* 功能特性 */
.features {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

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

.feature-card {
    background-color: var(--bg-primary);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

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

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

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 4px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 快速开始 */
.quickstart {
    padding: 80px 0;
}

.quickstart-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.quickstart-steps h3,
.quickstart-code h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: left;
    padding: 0;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.code-block {
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 20px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* 联系信息 */
.contact {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2rem;
}

.contact-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
}

.contact-form {
    background-color: var(--bg-primary);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.contact-form p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

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

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.footer-info {
    text-align: right;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* 下载页面样式 */
.download-section {
    padding: 40px 0 80px;
}

.download-header {
    text-align: center;
    margin-bottom: 60px;
}

.latest-version {
    margin-bottom: 60px;
}

.latest-version h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.version-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    transition: var(--transition);
}

.version-card.latest {
    border: 2px solid var(--primary-color);
}

.version-header {
    margin-bottom: 24px;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.version-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.version-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.version-downloads h4,
.version-features h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.download-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.download-btn:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.download-icon {
    font-size: 1.5rem;
}

.download-platform {
    font-weight: 600;
    display: block;
}

.download-type {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.download-btn:hover .download-type {
    color: rgba(255, 255, 255, 0.8);
}

.version-features ul {
    list-style: none;
}

.version-features li {
    padding: 4px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.version-features li::before {
    content: "✨";
    position: absolute;
    left: 0;
}

/* 系统要求 */
.system-requirements {
    margin-bottom: 60px;
}

.system-requirements h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.requirement-card {
    background-color: var(--bg-primary);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.requirement-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.requirement-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.requirement-card ul {
    list-style: none;
    text-align: left;
}

.requirement-card li {
    padding: 4px 0;
    color: var(--text-secondary);
}

/* 版本历史 */
.version-history {
    margin-bottom: 60px;
}

.version-history h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.version-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

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

.version-timeline {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.version-timeline::-webkit-scrollbar {
    width: 6px;
}

.version-timeline::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.version-timeline::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.version-timeline::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* 安装说明 */
.installation-guide h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.guide-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-panel {
    display: none;
    background-color: var(--bg-primary);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.tab-panel h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tab-panel ol {
    margin-bottom: 16px;
    padding-left: 20px;
}

.tab-panel li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tab-panel code {
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.note {
    background-color: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--info-color);
    color: var(--text-secondary);
}

.note strong {
    color: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .title-sub {
        display: block;
        margin-left: 0;
        margin-top: 8px;
    }

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

    .quickstart-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

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

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

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

    .version-filter {
        flex-wrap: wrap;
    }

    .guide-tabs {
        flex-wrap: wrap;
    }
}