/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主题色 - 程序员风格（深灰色系） */
    --primary-color: #1e293b;
    --primary-dark: #0f172a;
    --primary-light: #334155;
    --primary-lighter: #475569;
    
    /* 功能色 */
    --success-color: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --info-color: #64748b;
    
    /* 背景色 */
    --background: #f8fafc;
    --background-secondary: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --surface-elevated: #ffffff;
    
    /* 文字色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-disabled: #cbd5e1;
    
    /* 边框色 */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #1e293b;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-colored: 0 10px 30px -5px rgba(30, 41, 59, 0.3);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* 过渡动画 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* 添加细微的背景纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.02);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==================== 头部 ==================== */
.header {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    border: 1px solid var(--border-color);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.logo-icon-wrapper {
    flex-shrink: 0;
}

.logo-icon-new {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 4px 16px rgba(251, 191, 36, 0.35));
    transition: transform var(--transition-base);
}

.logo:hover .logo-icon-new {
    transform: translateY(-2px) scale(1.05);
}

.logo-text {
    text-align: left;
}

.logo-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Inter', 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0.25rem 0 0 0;
    letter-spacing: 0.02em;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.25rem;
}

/* ==================== 隐私声明 ==================== */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.privacy-icon {
    width: 20px;
    height: 20px;
    color: var(--success-color);
    flex-shrink: 0;
}

.privacy-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.privacy-text strong {
    color: var(--success-color);
    font-weight: 600;
}

/* ==================== 主内容 ==================== */
.main-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    border: 1px solid var(--border-color);
    position: relative;
}

/* ==================== 上传区域 ==================== */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.upload-box {
    text-align: center;
    padding: 2.25rem 2rem 2rem;
    border-radius: var(--radius-2xl);
    background: var(--surface);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    cursor: pointer;
    max-width: 720px;
    width: 100%;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.upload-box::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: var(--radius-2xl);
    background: rgba(15, 23, 42, 0.06);
    pointer-events: none;
    opacity: 0.8;
}

.upload-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 180px at 50% 0%, rgba(30, 41, 59, 0.10), transparent 60%),
        radial-gradient(500px 160px at 20% 30%, rgba(16, 185, 129, 0.08), transparent 65%),
        radial-gradient(500px 160px at 80% 40%, rgba(245, 158, 11, 0.08), transparent 65%);
    pointer-events: none;
    opacity: 0.9;
}

.upload-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.upload-box.drag-over {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.10), var(--shadow-xl);
}

.upload-hero {
    position: relative;
    z-index: 1;
}

.upload-icon-wrap {
    width: 84px;
    height: 84px;
    margin: 0 auto 1.25rem;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.10), rgba(30, 41, 59, 0.04));
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.10);
}

.upload-icon {
    width: 38px;
    height: 38px;
    color: var(--primary-color);
    animation: float 3.2s ease-in-out infinite;
    filter: drop-shadow(0 8px 18px rgba(30, 41, 59, 0.22));
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-10px);
    }
}

.upload-box h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.upload-desc {
    color: var(--text-secondary);
    margin: 0 auto 1.1rem;
    font-size: 0.98rem;
    max-width: 44ch;
}

.upload-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.upload-chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(30, 41, 59, 0.85);
    background: rgba(148, 163, 184, 0.10);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 999px;
    user-select: none;
}

.upload-cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin: 0.25rem 0 1.25rem;
    flex-wrap: wrap;
}

.upload-cta-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.upload-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0.75rem 0 0;
}

.upload-steps li {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.65);
}

.upload-step-num {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
    background: var(--primary-color);
    flex-shrink: 0;
}

.upload-step-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.35;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .upload-icon { animation: none; }
    .upload-box:hover { transform: none; }
    .upload-box.drag-over { transform: none; }
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
    white-space: nowrap;
    position: relative;
}


.btn-icon {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-dark);
    box-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: var(--success-color);
    color: white;
    border: 1px solid var(--success-dark);
    box-shadow: none;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    background: var(--success-dark);
}

.btn-success:active {
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(239, 68, 68, 0.05);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-outline:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* ==================== 结果区域 ==================== */
.result-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 信息横幅 ==================== */
.info-banner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.75rem;
    margin-bottom: 2rem;
    background: rgba(16, 185, 129, 0.12);
    border-left: 5px solid var(--success-color);
    border-radius: var(--radius-xl);
    animation: slideInLeft 0.5s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-icon {
    width: 24px;
    height: 24px;
    color: var(--success-color);
    flex-shrink: 0;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-text strong {
    color: var(--success-color);
    font-size: 1rem;
    font-weight: 600;
}

.info-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-text span strong {
    color: var(--success-dark);
    font-weight: 700;
}

.info-text .info-warning {
    color: var(--warning-dark);
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.info-text .info-warning strong {
    color: var(--danger-color);
    text-decoration: underline;
}

/* ==================== 控制面板 ==================== */
.control-panel {
    margin-bottom: 2rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--surface);
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
    position: relative;
    border: 1px solid var(--border-color);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.stat-value {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    color: var(--primary-color);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-base);
    background: white;
}

.filter-input:hover {
    border-color: var(--border-hover);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

.button-group,
.export-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==================== 树形结构 ==================== */
.tree-container {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.tree-container::-webkit-scrollbar {
    width: 10px;
}

.tree-container::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: var(--radius-md);
}

.tree-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.tree-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.tree-view {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.tree-item:hover {
    background: var(--surface);
}

.tree-item.hidden {
    display: none;
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.tree-toggle.expanded {
    transform: rotate(90deg);
}

.tree-toggle:hover {
    color: var(--primary-color);
}

.tree-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;

    height: 20px;
    min-width: 44px;
    padding: 0 8px;
    margin-right: 0.5rem;

    font-size: 0.75rem;
    line-height: 1;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(30, 41, 59, 0.04);
}

.tree-icon.folder {
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.10);
}

.tree-icon.file {
    color: var(--text-muted);
}

.tree-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.tree-name.folder {
    font-weight: 600;
    color: var(--primary-color);
}

.tree-size {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-left: 1rem;
}

.tree-children {
    margin-left: 1.5rem;
    border-left: 2px solid var(--border-color);
    padding-left: 0.5rem;
}

/* ==================== 正文内容（说明/FAQ/推荐） ==================== */
.content-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.content-grid.content-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.content-card-wide {
    margin-top: 0.5rem;
}

.content-card h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.75;
}

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

.content-note {
    margin-top: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-md);
    background: var(--background);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.content-list {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
    color: var(--text-secondary);
}

.content-list li {
    margin: 0.5rem 0;
}

.content-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content-steps {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.content-steps li {
    margin: 0.6rem 0;
}

.faq details {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: 0.75rem 0.875rem;
    margin: 0.6rem 0;
}

.faq summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--text-primary);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '＋';
    float: right;
    color: var(--text-muted);
    font-weight: 700;
}

.faq details[open] summary::after {
    content: '－';
}

.faq p {
    margin: 0.75rem 0 0;
    color: var(--text-secondary);
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.related-link {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.related-link:hover {
    background: var(--background);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ==================== 底部 ==================== */
.footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

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

.footer-sep {
    color: var(--text-disabled);
}

/* ==================== Toast通知 ==================== */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--surface);
    color: var(--text-primary);
    padding: 1.125rem 1.75rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    display: none;
    align-items: center;
    gap: 0.875rem;
    z-index: 10001;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 450px;
    min-width: 280px;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.toast.show {
    display: flex;
}

.toast.success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-light);
}

.toast.error {
    background: var(--danger-color);
    color: white;
    border-color: #fca5a5;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast span {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        flex-direction: column;
        gap: 0.75rem;
    }

    .logo-text {
        text-align: center;
    }

    .logo-icon-new {
        width: 64px;
        height: 64px;
    }

    .logo-title {
        font-size: 1.5rem;
    }

    .logo-subtitle {
        font-size: 0.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .privacy-notice {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .privacy-text {
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .upload-box {
        padding: 1.75rem 1.25rem 1.5rem;
        max-width: 100%;
    }

    .upload-icon {
        width: 34px;
        height: 34px;
    }

    .upload-box h2 {
        font-size: 1.25rem;
    }

    .upload-icon-wrap {
        width: 76px;
        height: 76px;
        margin-bottom: 1rem;
        border-radius: 20px;
    }

    .upload-desc {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .upload-steps {
        grid-template-columns: 1fr;
        padding-top: 0.5rem;
    }

    .info-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .info-text strong {
        font-size: 0.95rem;
    }

    .info-text span {
        font-size: 0.85rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group,
    .button-group,
    .export-group {
        width: 100%;
        flex-direction: column;
    }

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

    .tree-container {
        max-height: 400px;
        padding: 1rem;
    }

    .tree-view {
        font-size: 0.85rem;
    }

    .toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        padding: 1rem 1.25rem;
    }

    .toast span {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .logo-icon-new {
        width: 56px;
        height: 56px;
    }

    .logo-title {
        font-size: 1.35rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
    }

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

    .stat-value {
        font-size: 1.5rem;
    }
    
    .upload-box {
        padding: 1.5rem 1rem;
    }
    
    .upload-icon {
        width: 32px;
        height: 32px;
    }
}

/* ==================== 加载遮罩层 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    min-width: 300px;
    max-width: 500px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== 浏览器警告 ==================== */
.browser-warning,
.shortcuts-help {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1rem;
}

.warning-content,
.shortcuts-content {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.warning-content h3,
.shortcuts-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.warning-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.warning-content ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.warning-content li {
    padding: 0.75rem 1rem;
    background: var(--background);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.warning-content li:before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ==================== 快捷键帮助 ==================== */
.shortcut-list {
    margin: 1.5rem 0;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--background);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.shortcut-item kbd {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    font-family: monospace;
    box-shadow: 0 2px 0 var(--border-color);
}

.shortcut-item span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== 帮助按钮 ==================== */
.help-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 1px solid var(--primary-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 1000;
}

.help-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: var(--primary-dark);
}

.help-button:active {
    transform: scale(1.05) rotate(90deg);
}

.help-button svg {
    width: 30px;
    height: 30px;
    color: white;
    transition: transform var(--transition-base);
}

.help-button:hover svg {
    transform: rotate(-90deg);
}

/* ==================== 打印样式 ==================== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .header,
    .control-panel,
    .footer,
    .help-button,
    .loading-overlay,
    .browser-warning,
    .shortcuts-help {
        display: none !important;
    }

    .tree-container {
        max-height: none;
        box-shadow: none;
    }
}

/* ==================== 内容区域响应式 ==================== */
@media (max-width: 1024px) {
    .content-grid.content-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .content-grid,
    .content-grid.content-grid-3 {
        grid-template-columns: 1fr;
    }
    .content-card {
        padding: 1rem;
    }
}


/* Lucide Icons 样式 */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
}
.privacy-icon, .upload-icon, .btn-icon, .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.help-button [data-lucide], .help-button svg {
    width: 30px;
    height: 30px;
    color: white;
}
