/* ==========================================================================
   PyPacker v2.0 — 现代化样式表
   特性: CSS 变量 · 暗色主题 · GPU 加速动画 · 响应式布局 · 终端模拟器
   遵循: 无全局transition · 无纯黑背景 · 无图标字体库 · 内联SVG
   ========================================================================== */

/* ---- CSS 变量系统 ---- */
:root {
    /* 品牌色 — 设计文档指定: #1E40AF 系列 */
    --primary-blue: #1E40AF;
    --primary-blue-light: #3B82F6;
    --primary-blue-dark: #1E3A8A;
    --secondary-blue: #60A5FA;
    --accent-blue: #93C5FD;
    --light-blue: #DBEAFE;

    /* 语义色 */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* 背景色 */
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-gradient-start: #EFF6FF;
    --bg-gradient-end: #DBEAFE;

    /* 文字色 */
    --text-primary: #1E3A8A;
    --text-secondary: #3B82F6;
    --text-muted: #64748B;

    /* 边框 */
    --border-light: rgba(59, 130, 246, 0.15);
    --border-medium: rgba(59, 130, 246, 0.3);

    /* 字体 — 设计文档要求的中文字体栈 */
    --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-mono: "Cascadia Code", "Fira Code", "Consolas", "Courier New", monospace;

    /* 字体大小 */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* 过渡速度 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* 间距 */
    --section-padding: 100px;
    --container-max: 1200px;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(30, 64, 175, 0.07), 0 2px 4px -2px rgba(30, 64, 175, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(30, 64, 175, 0.08), 0 4px 6px -4px rgba(30, 64, 175, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(30, 64, 175, 0.1), 0 8px 10px -6px rgba(30, 64, 175, 0.04);
    --shadow-glow: 0 0 40px rgba(30, 64, 175, 0.15);

    /* Glassmorphism — 设计文档指定参数 */
    --glass-blur: 20px;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(30, 64, 175, 0.1);
    --glass-shadow-hover: 0 12px 40px rgba(30, 64, 175, 0.15);

    /* Z-index 层级 */
    --z-nav: 1000;
    --z-theme-toggle: 1100;
    --z-overlay: 2000;
}

/* ---- 暗色主题 — 设计文档指定色值 ---- */
[data-theme="dark"] {
    --primary-blue: #60A5FA;
    --primary-blue-light: #93C5FD;
    --primary-blue-dark: #1E3A8A;
    --secondary-blue: #3B82F6;

    --bg-white: #0F1117;
    --bg-light: #161822;
    --bg-gradient-start: #0F1117;
    --bg-gradient-end: #161822;

    --text-primary: #E8E8ED;
    --text-secondary: #93C5FD;
    --text-muted: #8A8FA8;

    --border-light: rgba(147, 197, 253, 0.12);
    --border-medium: rgba(147, 197, 253, 0.25);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(96, 165, 250, 0.2);

    --glass-bg: rgba(22, 24, 34, 0.8);
    --glass-bg-hover: rgba(22, 24, 34, 0.9);
    --glass-border: rgba(147, 197, 253, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    color: #1E3A8A;
    background: var(--bg-white);
    background: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-transition: background-color var(--transition-base), color var(--transition-base);
    transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
    max-width: var(--container-max);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---- 主题切换按钮 ---- */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: var(--z-theme-toggle);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
    color: var(--primary-blue-light);
}
/* 默认显示月亮图标，隐藏太阳 */
.theme-toggle .theme-icon-moon { display: block; }
.theme-toggle .theme-icon-sun { display: none; }
/* 暗色模式下显示太阳图标，隐藏月亮 */
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }

/* ---- 导航栏 — 保留 glassmorphism ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--transition-base);
}
[data-theme="dark"] .navbar {
    background: rgba(15, 17, 23, 0.85);
}
.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

/* ---- Logo ---- */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-icon {
    color: var(--primary-blue);
    transition: transform var(--transition-base);
}
.logo:hover .logo-icon {
    transform: rotate(-5deg);
}
.version-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 4px;
}
[data-theme="dark"] .version-badge {
    background: rgba(59, 130, 246, 0.2);
}

/* ---- 导航链接 ---- */
.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}
.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--primary-blue);
    background: var(--light-blue);
}
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a:focus-visible {
    background: rgba(59, 130, 246, 0.12);
}

/* ---- 移动菜单按钮 ---- */
.menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.menu-btn:hover {
    background: var(--light-blue);
}

/* ---- Hero 区域 — 蓝色渐变 + 纹理 ---- */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* 降级方案：纯色兜底 + 渐变增强 */
    background: #2563EB;
    background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 25%, #3B82F6 55%, #60A5FA 100%);
    -webkit-background-size: cover;
    background-size: cover;
}
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f1117 0%, #1a1f3a 30%, #1e3a5f 60%, #1a2a4a 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    /* 确保 bg 层在内容之下 */
    pointer-events: none;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    -webkit-filter: blur(80px);
    filter: blur(80px);
    opacity: 0.35;
    -webkit-animation: float 20s ease-in-out infinite;
    animation: float 20s ease-in-out infinite;
}
.hero-orb-1 {
    width: 400px; height: 400px;
    background: rgba(147, 197, 253, 0.6);
    top: -100px; right: -100px;
    -webkit-animation-delay: 0s;
    animation-delay: 0s;
}
.hero-orb-2 {
    width: 300px; height: 300px;
    background: rgba(96, 165, 250, 0.5);
    bottom: -80px; left: -80px;
    -webkit-animation-delay: -7s;
    animation-delay: -7s;
}
.hero-orb-3 {
    width: 200px; height: 200px;
    background: rgba(191, 219, 254, 0.45);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    -webkit-animation-delay: -14s;
    animation-delay: -14s;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        -webkit-linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        -webkit-linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    -webkit-background-size: 60px 60px;
    background-size: 60px 60px;
}

@-webkit-keyframes float {
    0%, 100% { -webkit-transform: translate(0, 0) scale(1); transform: translate(0, 0) scale(1); }
    25% { -webkit-transform: translate(30px, -30px) scale(1.05); transform: translate(30px, -30px) scale(1.05); }
    50% { -webkit-transform: translate(-20px, 20px) scale(0.95); transform: translate(-20px, 20px) scale(0.95); }
    75% { -webkit-transform: translate(-30px, -10px) scale(1.02); transform: translate(-30px, -10px) scale(1.02); }
}
@keyframes float {
    0%, 100% { -webkit-transform: translate(0, 0) scale(1); transform: translate(0, 0) scale(1); }
    25% { -webkit-transform: translate(30px, -30px) scale(1.05); transform: translate(30px, -30px) scale(1.05); }
    50% { -webkit-transform: translate(-20px, 20px) scale(0.95); transform: translate(-20px, 20px) scale(0.95); }
    75% { -webkit-transform: translate(-30px, -10px) scale(1.02); transform: translate(-30px, -10px) scale(1.02); }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 60px;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    width: 100%;
    max-width: var(--container-max);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.hero-content {
    text-align: left;
    max-width: 500px;
    flex-shrink: 0;
}
@media (max-width: 900px) {
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulse-badge 2s ease-in-out infinite;
}
@-webkit-keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    line-height: 1.1;
}
.hero h2 {
    font-size: 1.6rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    margin: 0 0 40px 0;
    line-height: 1.8;
}
@media (max-width: 900px) {
    .hero p { margin: 0 auto 40px auto; }
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}
@media (max-width: 900px) {
    .hero-buttons { justify-content: center; }
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
@media (max-width: 900px) {
    .hero-stats { justify-content: center; }
}
.hero .stat {
    text-align: center;
}
.hero .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}
.hero .stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ---- 终端模拟器 ---- */
.terminal-demo {
    width: 480px;
    max-width: 100%;
    background: #1E1E2E;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    flex-shrink: 0;
}
.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.terminal-dot--red { background: #FF5F57; }
.terminal-dot--yellow { background: #FEBE2E; }
.terminal-dot--green { background: #28C840; }
.terminal-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-mono);
}
.terminal-body {
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
    color: #CDD6F4;
    min-height: 220px;
}
.terminal-body .prompt {
    color: #A6E3A1;
    font-weight: 700;
    margin-right: 8px;
}
.terminal-body .output {
    color: #BAC2DE;
    padding-left: 4px;
}
.terminal-body .success {
    color: #A6E3A1;
    font-weight: 600;
    margin-top: 8px;
}

/* ---- 按钮通用样式 ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    -webkit-transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}
.btn-primary {
    /* 硬编码白色背景 + 蓝色文字，不依赖 CSS 变量 */
    background: #FFFFFF;
    color: #1E40AF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.btn-primary:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
    -webkit-box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5) !important;
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* ---- 通用 Section ---- */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 2px;
    margin: 16px auto 0;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* ---- 功能特性 — 白色背景 + 扁平卡片 ---- */
.features {
    background: var(--bg-white);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.feature-card {
    /* 设计文档要求: 白色背景区域使用扁平风格（白底+轻阴影），移除backdrop-filter */
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.06);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    will-change: transform;
}
[data-theme="dark"] .feature-card {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue);
}
.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    transition: transform var(--transition-base);
}
.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}
.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---- 使用流程 — 深蓝背景 + glassmorphism ---- */
.how-it-works {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
}
[data-theme="dark"] .how-it-works {
    background: linear-gradient(135deg, #0f1117, #1a1f3a);
}
.how-it-works .section-title {
    color: white;
}
.how-it-works .section-title::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
}
.how-it-works .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}
.step {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    /* 深色背景区域保留 glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    will-change: transform;
}
.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-hover);
}
.step-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-blue);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.step-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--secondary-blue);
    transition: all var(--transition-base);
}
.step:hover .step-icon {
    background: var(--secondary-blue);
    color: white;
}
.step h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: white;
}
.step p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 40px;
}

/* ---- 下载 ---- */
.download {
    background: var(--bg-white);
    text-align: center;
}
[data-theme="dark"] .download {
    background: var(--bg-light);
}

/* 下载统计 */
.download-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.download-stats .stat-item {
    text-align: center;
}
.download-stats .stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.2;
}
.download-stats .stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.btn-download {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
    color: white;
    padding: 20px 40px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(30, 64, 175, 0.3);
}
.btn-download svg {
    flex-shrink: 0;
}
.btn-download div {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.btn-download small {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
}

/* 下载信息区 */
.download-info {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.system-requirements {
    text-align: left;
    padding: 24px 28px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    flex: 1;
    min-width: 260px;
}
.system-requirements h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.system-requirements ul {
    list-style: none;
    padding: 0;
}
.system-requirements li {
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.system-requirements li::before {
    content: '• ';
    color: var(--primary-blue);
    font-weight: 700;
}
.download-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    text-align: left;
    min-width: 160px;
}
.download-meta span {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.download-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* ---- 更新日志 ---- */
.changelog {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}
.changelog h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}
.changelog-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-white);
}
[data-theme="dark"] .changelog-item {
    background: var(--bg-light);
}
.changelog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}
.changelog-header:hover {
    background: var(--light-blue);
}
[data-theme="dark"] .changelog-header:hover {
    background: rgba(59, 130, 246, 0.08);
}
.changelog-header .version {
    font-weight: 700;
    color: var(--primary-blue);
    font-family: var(--font-mono);
}
.changelog-header .date {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.badge {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-major {
    background: var(--light-blue);
    color: var(--primary-blue);
}
.badge-initial {
    background: #E8F5E9;
    color: #2E7D32;
}
[data-theme="dark"] .badge-initial {
    background: rgba(46, 125, 50, 0.2);
}
.changelog-chevron {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}
.changelog-header[aria-expanded="true"] .changelog-chevron {
    transform: rotate(180deg);
}
.changelog-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), padding var(--transition-base);
}
.changelog-body.open {
    max-height: 500px;
    padding: 0 20px 20px 20px;
}
.changelog-body ul {
    list-style: none;
    padding: 0;
}
.changelog-body li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}
.changelog-body li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
    font-size: 0.8rem;
}
.changelog-body li.type-new::before { content: '✨'; }
.changelog-body li.type-fix::before { content: '🐛'; }
.changelog-body li.type-improve::before { content: '⚡'; }

/* ---- 社群 — 深蓝渐变背景 ---- */
.community {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
    text-align: center;
}
[data-theme="dark"] .community {
    background: linear-gradient(135deg, #0f1117, #1a1f3a);
}
.community .section-title,
.community .section-subtitle {
    color: white;
}
.community .section-title::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
}
.community .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* 用户评价 */
.testimonials {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.testimonial {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: left;
    transition: transform var(--transition-base), background var(--transition-base);
}
.testimonial:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-4px);
}
.testimonial p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
    font-style: italic;
}
.testimonial .author {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* 社群卡片 */
.community-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.community-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    max-width: 360px;
    flex: 1;
    min-width: 280px;
    transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}
.community-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.community-card-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}
.community-card h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 8px;
}
.community-card p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
}
.btn-community {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform var(--transition-base), background var(--transition-base);
    cursor: pointer;
}
.btn-community:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}
.btn-community-alt {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.4);
}
.btn-community-alt:hover {
    background: rgba(16, 185, 129, 0.5);
}

/* 反馈入口 */
.feedback-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.feedback-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}
.feedback-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 24px;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform var(--transition-base), background var(--transition-base);
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

/* ---- 页脚 ---- */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 60px 0 30px;
}
[data-theme="dark"] .footer {
    background: var(--bg-light);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.7;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}
.footer-logo svg {
    color: var(--primary-blue);
}
.footer-nav h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-nav a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 0;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}
.footer-nav a:hover {
    color: var(--primary-blue);
}
/* ---- 友情链接 ---- */
.footer-friend-links h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-friend-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 0;
    font-size: 0.95rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}
.footer-friend-links a:hover {
    color: var(--primary-blue);
    transform: translateX(3px);
}
.footer-friend-links a svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}
.footer-friend-links a:hover svg {
    opacity: 1;
}

.footer-copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- 动画辅助类 ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   响应式布局 — 设计文档断点: 1024px / 768px / 480px
   ========================================================================== */

/* 桌面 (>=1025px) — 完整布局 */
@media (min-width: 1025px) {
    /* 默认样式已为桌面优化 */
}

/* 平板 (769-1024px) */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .hero h2 { font-size: 1.4rem; }
    .section-title { font-size: 2rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

    .hero .container {
        flex-direction: column;
        gap: 50px;
    }
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    .hero p { margin: 0 auto 40px auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .terminal-demo { width: 100%; max-width: 480px; }
}

/* 手机 (<=768px) */
@media (max-width: 768px) {
    :root { --section-padding: 70px; }

    /* 移动端导航 */
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 12px;
        right: 12px;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--border-light);
    }
    [data-theme="dark"] .nav-links {
        background: var(--bg-light);
    }
    .nav-links.active { display: flex; }
    .menu-btn { display: block; }

    .hero { padding: 120px 0 60px; }
    .hero h1 { font-size: 2.8rem; }
    .hero h2 { font-size: 1.2rem; }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }

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

    .steps { flex-direction: column; align-items: center; }
    .step { max-width: 100%; width: 100%; }
    .step-arrow { transform: rotate(90deg); margin: 4px 0; }

    .community-cards { flex-direction: column; align-items: center; }
    .community-card { max-width: 100%; }
    .testimonials { flex-direction: column; align-items: center; }
    .testimonial { max-width: 100%; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }

    .download-info { flex-direction: column; align-items: center; }
    .system-requirements { width: 100%; }

    .theme-toggle {
        top: auto;
        bottom: 20px;
        right: 20px;
    }
}

/* 小屏手机 (<=480px) */
@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-stats { gap: 20px; }
    .hero .stat-number { font-size: 1.5rem; }
    .btn-download { padding: 16px 24px; font-size: 0.95rem; }
    .download-stats { gap: 24px; }
    .download-stats .stat-number { font-size: 1.8rem; }
    .section-title { font-size: 1.7rem; }
}

/* ==========================================================================
   Focus 可见样式 (可访问性)
   ========================================================================== */
:focus-visible {
    outline: 2px solid var(--primary-blue-light);
    outline-offset: 2px;
    border-radius: 2px;
}
