/* ========== 图片压缩工具专用样式 ========== */

.compress-page {
    min-height: calc(100vh - 80px);
    padding: 60px 0 80px;
}

.compress-hero {
    text-align: center;
    margin-bottom: 50px;
}

.compress-hero h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

.compress-hero p {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 20px;
}

.usage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 100px;
    font-size: 14px;
    color: #7c3aed;
    font-weight: 500;
}

.usage-badge .vip-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero-vip-link {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-vip-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

/* 上传区 */
.upload-zone {
    max-width: 720px;
    margin: 0 auto 40px;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.1);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
}

.upload-icon svg {
    color: white;
}

.upload-zone h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.upload-zone p {
    color: #64748b;
    font-size: 14px;
}

.upload-zone p small {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
}

#fileInput {
    display: none;
}

/* 压缩控制区 */
.compress-controls {
    max-width: 720px;
    margin: 0 auto 30px;
    background: white;
    border-radius: 16px;
    padding: 24px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: none;
}

.compress-controls.show {
    display: block;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.control-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    min-width: 80px;
}

.quality-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: linear-gradient(to right, #7c3aed 0%, #a78bfa 100%);
    border-radius: 100px;
    outline: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid #7c3aed;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    transition: transform 0.2s;
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.quality-value {
    min-width: 50px;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: #7c3aed;
    font-variant-numeric: tabular-nums;
}

.format-select {
    padding: 8px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.format-select:hover {
    border-color: #7c3aed;
}

/* 对比区 */
.compare-area {
    max-width: 960px;
    margin: 0 auto;
    display: none;
    gap: 24px;
}

.compare-area.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.compare-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.compare-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.compare-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compare-size {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.compare-size.original {
    color: #64748b;
}

.compare-size.compressed {
    color: #10b981;
}

.compare-size.compressed small {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    margin-left: 6px;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 100px;
}

.compare-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 操作按钮 */
.action-bar {
    max-width: 720px;
    margin: 30px auto 0;
    display: none;
    gap: 12px;
}

.action-bar.show {
    display: flex;
}

.btn-download {
    flex: 1;
    padding: 16px 32px;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
}

.btn-download:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-reset {
    padding: 16px 24px;
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

/* VIP 升级提示 */
.vip-promo {
    max-width: 720px;
    margin: 50px auto 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 36px 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.vip-promo::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

.vip-promo-content {
    position: relative;
    z-index: 1;
}

.vip-promo h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vip-promo p {
    color: #cbd5e1;
    font-size: 15px;
    margin-bottom: 24px;
}

.vip-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.vip-feature {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 12px;
}

.vip-feature-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.vip-feature-text {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
}

.btn-vip {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-vip:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45);
}

/* Toast 通知 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: #dc2626;
}

.toast.success {
    background: #10b981;
}

/* 响应式 */
@media (max-width: 768px) {
    .compress-hero h1 {
        font-size: 32px;
    }
    .compare-area.show {
        grid-template-columns: 1fr;
    }
    .vip-features {
        grid-template-columns: 1fr;
    }
}
