﻿
    /* =========================================
       IMAGE COMPRESSOR — PREMIUM UI
       ========================================= */
    .da-wrapper {
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        justify-content: center;
            padding: clamp(0px, 5vw, 0px) 20px;
    }

    .da-panel {
        position: relative;                
        width: 100%;
        max-width: 1280px;
        border-radius: 28px;
        padding: clamp(28px, 5vw, 56px);
        overflow: hidden;
    }

    

    /* ---------- HERO ---------- */
    .da-hero { text-align: center; max-width: 800px; margin: 0 auto; padding: clamp(10px, 4vw, 30px) 0; }

    .da-hero-badge {
        display: inline-flex; align-items: center; gap: 8px;
        font-size: 12.5px; font-weight: 800; letter-spacing: 0.3px;
        color: var(--primary-color); background: var(--primary-light);
        padding: 7px 16px; border-radius: 100px; margin-bottom: 22px;
    }

    .da-hero-title {
        font-size: clamp(30px, 4.4vw, 44px);
        font-weight: 900;
        line-height: 1.15;
        letter-spacing: -0.025em;
        color: var(--text-main);
        margin-bottom: 16px;
    }

    .da-hero-title em {
        font-style: normal;
        background: linear-gradient(120deg, #10b981, var(--primary-color));
        -webkit-background-clip: text; background-clip: text; color: transparent;
    }

    .da-hero-desc { font-size: 16.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 36px; }

    /* ---------- MAIN GRID ---------- */
    .main-grid {
        display: grid;
        grid-template-columns: 320px 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }
    @media (max-width: 1024px) { .main-grid { grid-template-columns: 1fr; } }
    
    .glass-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.02); }
    .panel-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 20px; }
    .panel-title { font-size: 16px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 8px; }

    /* --- SIDEBAR CONTROLS --- */
    .drop-zone { background: var(--bg-body); border: 2px dashed var(--border-color); border-radius: 16px; padding: 30px 20px; text-align: center; cursor: pointer; transition: all 0.3s; margin-bottom: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .drop-zone:hover, .drop-zone.drag-over { border-color: var(--primary-color); background: var(--primary-light); }
    .dz-icon { width: 48px; height: 48px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 12px; color: var(--primary-color); }
    .dz-text { font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
    .dz-sub { font-size: 11px; font-weight: 700; color: var(--text-muted); }

    .opt-group { margin-bottom: 20px; }
    .opt-label { font-size: 12px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; display: block; }
    
    /* Format Selector */
    .f-row { display: flex; gap: 4px; background: var(--bg-body); padding: 4px; border-radius: 12px; border: 1px solid var(--border-color); flex-wrap: wrap; }
    .f-btn { flex: 1; min-width: 45px; text-align: center; font-size: 11px; font-weight: 800; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text-muted); transition: all 0.2s; border: none; background: transparent; }
    .f-btn:hover { color: var(--text-main); background: rgba(0,0,0,0.02); }
    .f-btn.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

    .c-input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text-main); outline: none; transition: border-color 0.2s; }
    .c-input:focus { border-color: var(--primary-color); }

    /* Toggle Switch */
    .sw-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color 0.2s; }
    .sw-track { width: 36px; height: 20px; background: var(--border-color); border-radius: 20px; position: relative; transition: background 0.3s; pointer-events: none; }
    .sw-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
    .sw-track.on { background: #10b981; }
    .sw-track.on .sw-thumb { transform: translateX(16px); }

    /* Quality Slider */
    .quality-slider { width: 100%; accent-color: var(--primary-color); margin-bottom: 8px; }
    .q-ticks { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 16px; }
    
    .q-presets { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
    .q-preset { flex: 1; padding: 6px; font-size: 10px; font-weight: 800; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-body); color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
    .q-preset:hover { border-color: var(--primary-color); color: var(--text-main); }
    .q-preset.active { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
    
    .q-hint { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--bg-body); padding: 8px 12px; border-radius: 8px; border-left: 3px solid var(--primary-color); line-height: 1.4; }

    /* --- COMPARE SECTION --- */
    .state-box { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8fafc; border: 1px dashed var(--border-color); border-radius: 16px; padding: 60px 20px; text-align: center; height: 100%; }
    .state-title { font-size: 16px; font-weight: 900; color: var(--text-main); margin-top: 16px; margin-bottom: 8px; }
    .state-body { font-size: 13px; font-weight: 700; color: var(--text-muted); max-width: 300px; line-height: 1.6; }

    .compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
    @media (max-width: 768px) { .compare-grid { grid-template-columns: 1fr; } }
    
    .img-panel { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
    .imp-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-color); background: var(--card-bg); }
    .imp-label { font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
    .imp-label.orig { color: var(--text-main); }
    .imp-label.comp { color: var(--primary-color); }
    .imp-meta { display: flex; gap: 8px; }
    .imp-badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
    .imp-badge.orig { background: rgba(0,0,0,0.05); color: var(--text-muted); }
    .imp-badge.comp { background: var(--primary-light); color: var(--primary-color); }
    .imp-badge.saving { background: rgba(16, 185, 129, 0.1); color: #10b981; }
    
    .imp-body { flex: 1; padding: 16px; display: flex; align-items: center; justify-content: center; background-image: repeating-linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0), repeating-linear-gradient(45deg, #f0f0f0 25%, var(--bg-body) 25%, var(--bg-body) 75%, #f0f0f0 75%, #f0f0f0); background-position: 0 0, 10px 10px; background-size: 20px 20px; }
    .imp-body img { max-width: 100%; max-height: 400px; object-fit: contain; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

    /* Savings Card */
    .savings-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
    .savings-row { display: flex; align-items: center; justify-content: space-between; }
    .sav-item { display: flex; flex-direction: column; gap: 4px; text-align: center; }
    .sav-val { font-size: 18px; font-weight: 900; font-family: 'Space Mono', monospace; }
    .sav-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
    .sav-divider { width: 1px; height: 30px; background: var(--border-color); }
    
    .savings-bar-wrap { width: 100%; margin-top: 10px; }
    .sb-label { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; color: var(--text-muted); margin-bottom: 6px; }
    .sb-track { width: 100%; height: 12px; background: var(--border-color); border-radius: 6px; position: relative; overflow: hidden; }
    .sb-orig { position: absolute; top: 0; left: 0; height: 100%; width: 100%; background: #94a3b8; }
    .sb-comp { position: absolute; top: 0; left: 0; height: 100%; background: #10b981; transition: width 0.3s var(--ease-spring); }

    /* Buttons */
    .act-btn { padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; border: none; }
    .act-btn.primary { background: var(--primary-color); color: #fff; box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3); width: 100%; font-size: 14px; }
    .act-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.4); }
    .act-btn.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
    .act-btn.danger:hover { background: #ef4444; color: #fff; }
    .act-btn:not(.primary):not(.danger) { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border-color); }
    .act-btn:not(.primary):not(.danger):hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* Batch Section */
    .batch-section { margin-top: 24px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.02); }
    .batch-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
    .batch-table { width: 100%; border-collapse: separate; border-spacing: 0; }
    .batch-table th { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--border-color); text-align: left; }
    .batch-table td { padding: 12px 16px; border-bottom: 1px solid var(--bg-body); font-size: 13px; font-weight: 700; color: var(--text-main); vertical-align: middle; }
    .batch-table tr { transition: background 0.2s; }
    .batch-table tr:hover { background: var(--bg-body); }
    .batch-table tr.active-row { background: var(--primary-light); }
    .bt-dl { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-color); background: #fff; color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
    .bt-dl:hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* Stats Strip */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; margin-bottom: 40px; }
    .sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    .sc-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .sc-val { font-size: 24px; font-weight: 900; color: var(--text-main); font-family: 'Space Mono', monospace; }
    
    .sc.c-red .sc-lbl i { color: #ef4444; width: 14px; height: 14px; }
    .sc.c-blue .sc-lbl i { color: #3b82f6; width: 14px; height: 14px; }
    .sc.c-indigo .sc-lbl i { color: #6366f1; width: 14px; height: 14px; }
    .sc.c-green .sc-lbl i { color: #10b981; width: 14px; height: 14px; }

    /* Toast */
    .toast { position: fixed; bottom: 24px; right: 24px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 20px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--text-main); box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 100000; opacity: 0; pointer-events: none; transform: translateY(20px); transition: all 0.3s var(--ease-spring); }
    .toast.show { opacity: 1; transform: translateY(0); }
    /* ── Comparison Panel & Analytics ── */
    .comparison-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
        padding: 28px; margin-top: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); margin-bottom: 40px;
    }
    .cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
    .cp-title { font-size: 16px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
    .cp-badge { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
    .badge-high { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); border: 1px solid color-mix(in srgb, var(--success, #10b981) 30%, transparent); }

    .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
    .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
    .cpc-header { display: flex; justify-content: space-between; align-items: center; }
    .cpc-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); }
    .cpc-tag { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
    .cpc-tag.success { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); }

    .cpc-body { display: flex; flex-direction: column; gap: 10px; }
    .cpc-stat-row { font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between; }
    .cpc-stat-row strong { color: var(--text-main); font-weight: 700; }
    .cpc-progress-bar { width: 100%; height: 8px; background: var(--border-color); border-radius: 100px; overflow: hidden; margin-top: 4px; }
    .cpc-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
    .cpc-progress-fill.bg-gradient { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }

