/* ===== 全局样式 ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-hover: #252540;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-bright: #ffffff;
    --border: #2d2d4a;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --transition: all 0.3s ease;
}

/* ===== 亮色主题 ===== */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text: #334155;
    --text-dim: #64748b;
    --text-bright: #0f172a;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .hero {
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
}

[data-theme="light"] .upload-area {
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .upload-area:hover,
[data-theme="light"] .upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .feature-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .feature-card:hover {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .how-to {
    background: rgba(99, 102, 241, 0.03);
}

[data-theme="light"] .faq-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .file-item:hover {
    background: #f8fafc;
}

[data-theme="light"] .split-mode-btn,
[data-theme="light"] .preset-btn {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .field select,
[data-theme="light"] .field input[type="number"],
[data-theme="light"] .field input[type="text"] {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

[data-theme="light"] .loading-overlay {
    background: rgba(248, 250, 252, 0.85);
}

[data-theme="light"] .large-file-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

[data-theme="light"] .loading-spinner {
    border-color: #e2e8f0;
    border-top-color: var(--primary);
}

[data-theme="light"] .progress-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .result-item,
[data-theme="light"] .result-file {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .segment-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transition: background 0.3s ease;
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-bright);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon { width: 36px; height: 36px; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--primary-light); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 图标按钮（主题/语言切换）===== */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: var(--bg-hover);
}

.btn-icon svg { width: 18px; height: 18px; }

/* 主题切换图标显隐 */
[data-theme="dark"] .icon-dark { display: block; }
[data-theme="dark"] .icon-light { display: none; }
[data-theme="light"] .icon-dark { display: none; }
[data-theme="light"] .icon-light { display: block; }

.lang-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ===== Hero 区域 ===== */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero p strong { color: var(--success); }

.engine-info {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-top: 8px;
}

/* ===== 分割模式切换 ===== */
.mode-switcher {
    padding: 0 0 32px;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.split-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 600;
}

.mode-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-icon svg { width: 28px; height: 28px; }

.mode-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mode-text strong { font-size: 0.95rem; font-weight: 600; }
.mode-text small { font-size: 0.75rem; font-weight: 400; color: var(--text-dim); }

.split-mode-btn:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.split-mode-btn.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.split-mode-btn.active small { color: var(--primary-light); }

/* ===== Section 通用样式 ===== */
.upload-section,
.settings-section,
.progress-section,
.result-section {
    padding: 0 0 32px;
}

.settings-section h2,
.progress-section h2,
.result-section h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 24px;
}

/* ===== 上传区域 ===== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-card);
    max-width: 700px;
    margin: 0 auto;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.upload-area.drag-over { transform: scale(1.02); }

.upload-icon { margin-bottom: 20px; color: var(--primary-light); }
.upload-icon svg { width: 64px; height: 64px; }

.upload-area h3 { font-size: 1.3rem; color: var(--text-bright); margin-bottom: 8px; }
.upload-area p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 4px; }

.upload-formats { margin-top: 4px; }

.upload-limit {
    margin-top: 12px !important;
    font-size: 0.95rem !important;
    color: var(--success) !important;
}

/* ===== 大文件警告 ===== */
.large-file-warning {
    max-width: 700px;
    margin: 16px auto 0;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--warning);
}

.warning-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }

.warning-content { flex: 1; text-align: left; }
.warning-content strong { display: block; margin-bottom: 4px; font-size: 0.95rem; text-align: left; }
.warning-content p { font-size: 0.85rem; line-height: 1.6; margin: 0; opacity: 0.9; text-align: left; }
.warning-estimate { margin-top: 6px !important; font-weight: 600; }

.warning-close {
    background: none;
    border: none;
    color: var(--warning);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
}

.warning-close:hover { opacity: 1; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large { padding: 16px 40px; font-size: 1.1rem; }

.btn-small {
    padding: 6px 14px;
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-small:hover { border-color: var(--primary); color: var(--primary-light); }

.btn-secondary {
    padding: 8px 18px;
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover { border-color: var(--primary); }

.btn-danger {
    padding: 8px 18px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-download {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.btn-download-all {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

/* ===== 文件列表 ===== */
.file-list {
    max-width: 700px;
    margin: 24px auto 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.file-list-header h3 { font-size: 1rem; color: var(--text-bright); }
.file-list-actions { display: flex; gap: 8px; }

.file-items { /* container for file items */ }

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--bg-hover); }

.file-item-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.15);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.file-item-icon svg { width: 20px; height: 20px; color: var(--primary-light); }

.file-item-info { flex: 1; min-width: 0; }

.file-item-name {
    font-size: 0.9rem; font-weight: 500; color: var(--text-bright);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.file-item-size { font-size: 0.8rem; color: var(--text-dim); }
.file-item-duration { font-size: 0.8rem; color: var(--primary-light); margin-left: 8px; }

.file-item-remove {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(239, 68, 68, 0.1); border: none;
    color: var(--danger); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
}

.file-item-remove:hover { background: rgba(239, 68, 68, 0.25); }

/* ===== 设置面板 ===== */
.settings-section {
    padding: 0 0 32px;
}

.settings-panel {
    max-width: 700px;
    margin: 24px auto 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    text-align: left;
}

.settings-panel h3 {
    font-size: 1.1rem; color: var(--text-bright);
    margin-bottom: 20px; text-align: center;
}

.settings-grid { display: flex; flex-direction: column; gap: 20px; }

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.setting-group > label {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: var(--text-dim); margin-bottom: 10px;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }
.field input[type="range"] { width: 100%; accent-color: var(--primary); }

.field select,
.field input[type="number"],
.field input[type="text"] {
    padding: 8px 12px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem; cursor: pointer;
}

.field select:focus,
.field input[type="number"]:focus,
.field input[type="text"]:focus { outline: none; border-color: var(--primary); }

.field input[type="number"] { width: 100%; }

.field .hint { font-size: 0.75rem; color: var(--text-dim); opacity: 0.7; }

.format-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

.format-select:focus { outline: none; border-color: var(--primary); }

[data-theme="light"] .format-select {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.settings-panel .btn-primary { display: flex; margin: 24px auto 0; }

.time-estimate {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-style: italic;
}

/* ===== 片段列表 ===== */
.segment-list {
    max-width: 700px;
    margin: 16px auto 0;
}

.segment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}

.segment-item.segment-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.segment-index {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700;
    flex-shrink: 0;
}

.segment-info { flex: 1; min-width: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.segment-time { font-size: 0.9rem; font-weight: 500; color: var(--text-bright); }
.segment-time label { display: block; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 4px; font-weight: 400; }
.segment-time input[type="text"] {
    width: 100px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem;
    font-family: 'Inter', monospace;
}
.segment-time input[type="text"]:focus { outline: none; border-color: var(--primary); }
.segment-duration { font-size: 0.8rem; color: var(--text-dim); }

.segment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.segment-error-text {
    font-size: 0.8rem;
    color: var(--danger);
    font-weight: 500;
}

.segment-remove {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(239, 68, 68, 0.1); border: none;
    color: var(--danger); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
    font-size: 0.8rem;
}

.segment-remove:hover { background: rgba(239, 68, 68, 0.25); }

.add-segment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    margin-top: 4px;
}

.add-segment-btn:hover { background: rgba(99, 102, 241, 0.15); }

.segment-format-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 6px;
    opacity: 0.8;
}

/* ===== 进度区域 ===== */
.progress-section {
    padding: 0 0 32px;
}

.progress-items { /* container for progress items */ }

.progress-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px;
}

.progress-file-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.progress-bar-container {
    height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px; transition: width 0.3s ease; width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.progress-segment-info {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 500;
}

/* ===== 结果区域 ===== */
.result-section {
    padding: 0 0 32px;
}

.result-items { /* container for result items */ }

.result-file {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.result-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.result-file-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
}

.result-file-size {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.result-segments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 12px;
}

.result-item-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}

.result-item-name { font-size: 0.95rem; font-weight: 600; color: var(--text-bright); }
.result-stats { display: flex; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.result-stat { display: flex; flex-direction: column; }
.result-stat-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; }
.result-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text-bright); }
.result-stat-value.saved { color: var(--success); }

.result-summary {
    background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius); padding: 16px 20px; text-align: center; margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.result-summary p { font-size: 0.95rem; color: var(--success); font-weight: 500; }
.result-summary span { font-size: 0.95rem; color: var(--success); }
.result-summary strong { font-weight: 700; }

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

/* ===== 功能特点 ===== */
.features { padding: 80px 0; }

.features h2 {
    text-align: center; font-size: 2rem; font-weight: 700;
    color: var(--text-bright); margin-bottom: 8px;
}

.section-desc { text-align: center; color: var(--text-dim); margin-bottom: 48px; font-size: 1.05rem; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 24px; transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px); border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-bright); margin-bottom: 8px; }
.feature-card p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }

/* ===== 使用方法 ===== */
.how-to { padding: 80px 0; background: rgba(99, 102, 241, 0.03); }

.how-to h2 {
    text-align: center; font-size: 2rem; font-weight: 700;
    color: var(--text-bright); margin-bottom: 8px;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.step { text-align: center; padding: 32px 24px; }

.step-number {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}

.step h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); margin-bottom: 10px; }
.step p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; }

/* ===== 桌面工具下载 ===== */
.download-section { padding: 80px 0; }

.download-section h2 {
    text-align: center; font-size: 2rem; font-weight: 700;
    color: var(--text-bright); margin-bottom: 8px;
}

.download-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }

.download-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px 28px;
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-4px); border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.download-card-alt { background: var(--bg-hover); }

.download-icon { font-size: 2.5rem; margin-bottom: 16px; }

.download-card h3 {
    font-size: 1.2rem; font-weight: 700; color: var(--text-bright); margin-bottom: 10px;
}

.download-card > p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 16px; }

.download-features {
    list-style: none; padding: 0; margin: 0 0 20px;
}

.download-features li {
    padding: 6px 0; font-size: 0.88rem; color: var(--text);
    padding-left: 24px; position: relative;
}

.download-features li::before {
    content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700;
}

.btn-download-exe {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.download-steps {
    margin-top: 16px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.download-step-title {
    font-weight: 600;
    color: var(--text-bright);
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.download-steps ol {
    padding-left: 20px;
    margin: 0 0 8px;
}

.download-steps li {
    margin-bottom: 4px;
}

.download-steps a {
    color: var(--primary-light);
    text-decoration: underline;
}

.download-steps code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--primary-light);
    border: 1px solid var(--border);
}

.btn-goto-web {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* ===== FAQ ===== */
.faq { padding: 80px 0; }

.faq h2 {
    text-align: center; font-size: 2rem; font-weight: 700;
    color: var(--text-bright); margin-bottom: 48px;
}

.faq-list { max-width: 700px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 12px; overflow: hidden; background: var(--bg-card);
    transition: var(--transition);
}

.faq-item summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; cursor: pointer; font-weight: 600;
    color: var(--text-bright); transition: var(--transition);
    list-style: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-size: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-item summary:hover { color: var(--primary-light); }

.faq-item p {
    padding: 0 20px 18px;
    font-size: 0.9rem; color: var(--text-dim); line-height: 1.7;
}

/* ===== 页脚 ===== */
.footer {
    padding: 40px 0; text-align: center; border-top: 1px solid var(--border);
}

.footer p { color: var(--text-dim); font-size: 0.9rem; }
.footer-note { margin-top: 8px; font-size: 0.8rem !important; opacity: 0.6; }

.footer-url { margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); }
.footer-url a { color: var(--primary-light); text-decoration: none; margin: 0 2px; }
.footer-url a:hover { text-decoration: underline; }

/* ===== Loading ===== */
.loading-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 15, 26, 0.85); backdrop-filter: blur(8px);
    z-index: 1000; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 16px;
}

.loading-spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay p { color: var(--text-dim); font-size: 0.95rem; }

.loading-overlay .loading-hint {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-dim);
    opacity: 0.85;
    max-width: 420px;
    text-align: center;
    line-height: 1.6;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }
    .mode-buttons { flex-direction: column; align-items: center; }
    .split-mode-btn { width: 100%; max-width: 300px; flex-direction: row; gap: 12px; }
    .upload-area { padding: 40px 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; gap: 16px; }
    .custom-fields { grid-template-columns: 1fr; }
    .result-stats { flex-wrap: wrap; gap: 12px; }
    .nav-links { display: none; }
    .result-summary { flex-direction: column; gap: 12px; }
    .download-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.5rem; }
    .container { padding: 0 16px; }
    .settings-panel { padding: 16px; }
    .split-mode-btn { padding: 12px 16px; }
}