:root {
    --header-height: 64px;
    --footer-height: 28px;
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #1E293B;
    --text-secondary: #64748B;
    --success: #10B981;
    --success-hover: #089063;
    --warning: #F59E0B;
    --danger: #EF4444;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: linear-gradient(to right, #10B981 0%, #10B981 0%, #E2E8F0 0%, #E2E8F0 100%);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 15px;
    width: 15px;
    background: #10B981;
    cursor: pointer;
    border-radius: 50%;
}


/* ==================== HEADER ==================== */
.header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 120px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
}
.logo img{
    width: 120px;
}

.app-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    height: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: var(--primary-hover);
}

/* ==================== MAIN ==================== */
.main {
    flex: 1;
    display: grid;
    grid-template-columns: 70% 30%;
    overflow: hidden;
    min-height: 0;
}

/* ==================== LEFT PANEL ==================== */
.left-panel {
    flex: 55;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
}

.upload-zone {
    padding: 132px 24px 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    height: 100%;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);

}

.upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.upload-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 文件列表 */
.file-body{
    display: flex;
    height: 100%;
    flex-direction: column;
}
.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.file-count {
    font-size: 14px;
    font-weight: 600;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-clear:hover {
    background: #FEF2F2;
}

.file-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.file-item {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 25px auto 80px;
    align-items: center;
    gap: 12px;
    transition: box-shadow 0.2s;
}

.file-item:hover {
    box-shadow: var(--shadow);
}

.file-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
    display: grid;
    align-items: center;
    grid-template-columns: auto 300px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
}

.file-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.file-status.pending {
    background: #F1F5F9;
    color: var(--text-secondary);
}

.file-status.processing {
    background: #FEF3C7;
    color: #D97706;
}

.file-status.success {
    background: #D1FAE5;
    color: #059669;
}

.file-status.error {
    background: #FEE2E2;
    color: #DC2626;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: #FEE2E2;
    color: var(--danger);
}

.result-detail {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    display: none;
}

.result-detail.show {
    display: block;
}

.result-detail .compression-ratio {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
}

.btn-download {
    background: var(--success);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 6px;
}

.btn-download:hover {
    background: #059669;
}

.btn-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-primary {
    flex: 1;
    padding: 12px 24px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--success-hover);
}

.btn-primary:disabled {
    background: #CBD5E1;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 12px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #F8FAFC;
}

/* ==================== RIGHT PANEL ==================== */
.right-panel {
    flex: 45;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
}

.settings-section {
    background: var(--surface);
    margin-bottom: 25px;
}

.settings-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-title .icon {
    font-size: 18px;
}

.radio-group {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.radio-item:hover {
    border-color: var(--success);
}

.radio-item.selected {
    border-color: var(--success);
    background: #d1fae5;
}

.radio-item input {
    accent-color: var(--success);
}

.radio-label {
    font-size: 14px;
    font-weight: 500;
}

.radio-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.slider-group {
    margin-bottom: 16px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.slider {
    width: 100%;
    accent-color: var(--success);
}

.select-group {
    margin-bottom: 16px;
}

.select-label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.select-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 14px;
    background: var(--surface);
    height: 42px;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    gap: 12px;
}

.empty-state .icon {
    font-size: 48px;
    opacity: 0.5;
}

/* ==================== FOOTER ==================== */
.footer {
    height: var(--footer-height);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }
    .left-panel {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .right-panel {
        flex: none;
    }
}

/* ==================== ANIMATION ==================== */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--text); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}