:root {
    --primary: #5aaea6;
    --primary-dark: #378d84;
    --primary-soft: #edf8f6;
    --ink: #17211f;
    --muted: #74807d;
    --bg: #f7faf8;
    --surface: #ffffff;
    --border: #e1e9e6;
    --shadow: 0 14px 35px rgba(35, 62, 58, .07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    min-height: 100vh; 
    background: var(--bg); 
    color: var(--ink); 
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; 
    -webkit-font-smoothing: antialiased; 
}

/* NAV */
nav { 
    display: flex; 
    align-items: center; 
    height: 66px; 
    padding: 0 clamp(18px, 5vw, 64px); 
    background: var(--bg); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
}
.logo { color: var(--ink); font-size: 20px; font-weight: 760; letter-spacing: -.04em; text-decoration: none; }
.nav-back { display: inline-flex; align-items: center; gap: 8px; margin-left: 28px; color: var(--muted); font-size: 13px; text-decoration: none; transition: color .18s ease; }
.nav-back:hover { color: var(--primary-dark); }

/* HERO */
.tool-hero { max-width: 860px; margin: 0 auto; padding: 66px 28px 40px; text-align: center; }
.tool-icon-big { 
    width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 20px; 
    border: 1px solid #cfe6e1; border-radius: 14px; font-size: 22px; 
}
.tool-hero h1 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 48px); font-weight: 760; letter-spacing: -.06em; }
.tool-hero p { max-width: 570px; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.65; }

/* AREA */
.tool-area { width: min(920px, 100%); margin: 0 auto; padding: 0 28px 72px; }

/* DROP ZONE */
.drop-zone { 
    padding: 68px 30px; border: 1px dashed #b9d4cf; border-radius: 18px; 
    background: var(--surface); text-align: center; cursor: pointer; 
    transition: all .18s ease; 
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--primary); background: #fbfffe; box-shadow: var(--shadow); }
.drop-zone-icon { margin-bottom: 17px; color: var(--primary-dark); font-size: 32px; }
.drop-zone h3 { margin-bottom: 8px; font-size: 19px; font-weight: 700; }
.drop-zone p { margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.btn-select { 
    padding: 11px 20px; border: 1px solid var(--primary-dark); border-radius: 9px; 
    background: var(--primary-dark); color: #fff; font-size: 13px; font-weight: 650; cursor: pointer; 
}
#fileInput { display: none; }

/* PANEL */
.files-panel { 
    display: none; padding: 24px; border: 1px solid var(--border); border-radius: 16px; 
    background: var(--surface); box-shadow: var(--shadow); margin-bottom: 20px; 
}
.files-panel.visible { display: block; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.panel-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.panel-count { font-size: 12px; color: var(--muted); }

/* OPTIONS */
.options-container { margin-bottom: 24px; }
.options-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.compression-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.level-card { 
    padding: 15px 10px; border: 1px solid var(--border); border-radius: 12px; 
    cursor: pointer; text-align: center; transition: all .18s ease; 
}
.level-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.level-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.level-icon { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--primary-dark); margin-bottom: 4px; }
.level-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.level-desc { font-size: 11px; color: var(--muted); }

/* BUTTONS */
.btn-action { 
    width: 100%; padding: 14px; border: 0; border-radius: 10px; 
    background: var(--primary-dark); color: #fff; font-size: 14px; font-weight: 700; 
    cursor: pointer; transition: opacity .18s; 
}
.btn-action:disabled { opacity: 0.6; cursor: not-allowed; }
.privacy-badge { margin-top: 15px; text-align: center; font-size: 12px; color: var(--muted); }

/* PROGRESS */
.progress-area { display: none; margin-bottom: 20px; }
.progress-area.visible { display: block; }
.progress-bar-wrap { height: 8px; background: #e8efed; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.progress-bar { height: 100%; background: var(--primary); width: 0%; transition: width .3s; }
.progress-label { text-align: center; font-size: 12px; color: var(--muted); }

/* RESULT */
.result-area { display: none; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.result-area.visible { display: block; }
.result-success { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.result-success-icon { width: 40px; height: 40px; background: #e8f5e9; color: #2e7d32; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.result-success-title { font-weight: 750; font-size: 17px; }
.result-success-sub { font-size: 13px; color: var(--muted); }

.result-stats-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; background: var(--bg); padding: 12px; border-radius: 10px; }
.stat-item { text-align: center; }
.stat-label { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.stat-value { font-size: 15px; font-weight: 750; }
.stat-value.green { color: var(--primary-dark); }

.result-actions { display: flex; gap: 12px; }
.btn-download { flex: 2; padding: 13px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }
.btn-again { flex: 1; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }

/* HOW SECTION */
.how-section { width: min(920px, 100%); margin: 0 auto; padding: 0 28px 76px; }
.how-section h2 { margin-bottom: 24px; font-size: 22px; font-weight: 750; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 20px; border-top: 2px solid #cfe6e1; text-align: center; }
.step-num { width: 28px; height: 28px; background: var(--primary-soft); color: var(--primary-dark); border-radius: 8px; display: grid; place-items: center; margin: 0 auto 12px; font-size: 12px; font-weight: 800; }
.step-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.step-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

@media (max-width: 680px) {
    .steps, .compression-levels { grid-template-columns: 1fr; }
    .result-actions { flex-direction: column; }
    .tool-hero { padding: 40px 20px; }
}
