:root {
  --bg: #07101d;
  --panel: rgba(17, 27, 46, .76);
  --panel-2: #0f1b2e;
  --text: #f7f9fc;
  --muted: #9caac0;
  --line: rgba(255,255,255,.09);
  --accent: #72e2c0;
  --accent-2: #6ea8fe;
  --danger: #ff808c;
  --shadow: 0 24px 70px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(110,168,254,.13), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(114,226,192,.10), transparent 26%),
    var(--bg);
  min-height: 100vh;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: auto; }
.site-header {
  height: 78px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(7,16,29,.94), rgba(7,16,29,.55));
}
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #07101d; background: linear-gradient(135deg,var(--accent),var(--accent-2)); box-shadow: 0 10px 30px rgba(114,226,192,.2); }
.header-actions { display: flex; align-items: center; gap: 24px; }
.header-actions a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.header-actions a:hover { color: var(--text); }
.theme-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.hero { text-align: center; padding: 72px 0 46px; max-width: 850px; margin: auto; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
.hero h1 { font-size: clamp(38px, 7vw, 72px); line-height: 1.02; letter-spacing: -.055em; margin: 14px 0 18px; }
.hero p { margin: 0 auto; color: var(--muted); max-width: 690px; font-size: clamp(16px,2vw,19px); line-height: 1.7; }
.compressor-card, .results, .how { border: 1px solid var(--line); background: var(--panel); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(18px); }
.compressor-card { padding: 18px; }
.drop-zone { min-height: 390px; border: 1.5px dashed rgba(114,226,192,.38); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px; text-align: center; background: linear-gradient(180deg, rgba(114,226,192,.045), rgba(110,168,254,.025)); transition: .2s ease; outline: none; }
.drop-zone.dragover, .drop-zone:focus-visible { border-color: var(--accent); background: rgba(114,226,192,.075); transform: translateY(-1px); }
.upload-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; margin-bottom: 20px; font-size: 33px; background: linear-gradient(135deg, rgba(114,226,192,.18), rgba(110,168,254,.18)); border: 1px solid var(--line); color: var(--accent); }
.drop-zone h2 { margin: 0 0 8px; font-size: 26px; }
.drop-zone p { margin: 0 0 22px; color: var(--muted); }
.helper { margin-top: 12px; color: var(--muted); font-size: 12px; }
.primary-btn, .ghost-btn, .download-btn { border: 0; border-radius: 13px; font-weight: 800; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.primary-btn:hover, .ghost-btn:hover, .download-btn:hover { transform: translateY(-1px); }
.primary-btn { background: linear-gradient(135deg,var(--accent),#81f0d0); color: #062219; padding: 13px 18px; box-shadow: 0 12px 30px rgba(114,226,192,.18); }
.ghost-btn { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 12px 18px; }
.controls { margin-top: 18px; padding: 22px; border-radius: 20px; background: rgba(8,17,31,.6); border: 1px solid var(--line); }
.control-heading, .range-labels, .results-header, .results-footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.control-heading label, .control-row label { font-size: 13px; font-weight: 700; color: var(--muted); }
#qualityValue { color: var(--accent); font-weight: 800; }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 16px 0 6px; }
.range-labels { color: var(--muted); font-size: 11px; }
.control-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; margin-top: 18px; }
.control-row > div { display: grid; gap: 8px; }
select { width: 100%; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; outline: none; }
select:focus { border-color: rgba(114,226,192,.5); }
.compress-btn { min-height: 44px; }
.results { margin-top: 28px; padding: 24px; }
.results-header h2, .how h2 { margin: 6px 0 0; font-size: 28px; }
.summary { color: var(--muted); font-size: 13px; }
.results-list { display: grid; gap: 12px; margin: 22px 0; }
.result-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; background: rgba(7,16,29,.55); border: 1px solid var(--line); padding: 12px; border-radius: 17px; }
.thumb-wrap { width: 76px; height: 76px; overflow: hidden; border-radius: 12px; background: #08111f; }
.thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-info { min-width: 0; }
.file-name { margin: 0 0 8px; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.stats { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.new-size { color: var(--text); font-weight: 700; }
.saving { color: var(--accent); font-weight: 800; }
.progress { margin-top: 10px; height: 5px; background: rgba(255,255,255,.07); border-radius: 20px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,var(--accent-2),var(--accent)); border-radius: inherit; }
.download-btn { background: rgba(110,168,254,.12); color: #9ec5ff; border: 1px solid rgba(110,168,254,.22); padding: 10px 13px; }
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 28px 0; }
.features article { border: 1px solid var(--line); background: rgba(17,27,46,.6); border-radius: 20px; padding: 24px; }
.features article > span { font-size: 26px; }
.features h3 { margin: 16px 0 7px; font-size: 16px; }
.features p, .steps p { color: var(--muted); line-height: 1.6; margin: 0; font-size: 13px; }
.how { padding: 28px; margin-bottom: 38px; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 24px; }
.steps article { display: flex; gap: 14px; }
.steps b { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: rgba(114,226,192,.11); color: var(--accent); }
.steps h3 { margin: 2px 0 6px; font-size: 15px; }
footer { min-height: 78px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
body.light { --bg:#eef3f8; --panel:rgba(255,255,255,.82); --panel-2:#f6f8fb; --text:#101827; --muted:#657085; --line:rgba(15,24,39,.10); --shadow:0 24px 70px rgba(33,48,70,.10); }
body.light .site-header { background: linear-gradient(to bottom, rgba(238,243,248,.94), rgba(238,243,248,.60)); }
body.light .controls, body.light .result-item { background: rgba(246,248,251,.8); }

@media (max-width: 780px) {
  .app-shell { width: min(100% - 22px, 1180px); }
  .site-header { height: 68px; }
  .header-actions a { display: none; }
  .hero { padding: 46px 6px 32px; }
  .compressor-card { padding: 11px; border-radius: 22px; }
  .drop-zone { min-height: 330px; padding: 25px 16px; border-radius: 17px; }
  .controls { padding: 16px; }
  .control-row { grid-template-columns: 1fr 1fr; }
  .compress-btn { grid-column: 1 / -1; }
  .features, .steps { grid-template-columns: 1fr; }
  .results-header { align-items: flex-start; flex-direction: column; }
  .result-item { grid-template-columns: 62px 1fr; }
  .thumb-wrap { width: 62px; height: 62px; }
  .download-btn { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 15px; }
  .control-row { grid-template-columns: 1fr; }
  .compress-btn { grid-column: auto; }
  .results { padding: 16px; border-radius: 22px; }
  .results-footer, footer { flex-direction: column; align-items: stretch; text-align: center; }
  .results-footer button { width: 100%; }
  footer { justify-content: center; padding: 22px 0; }
}

/* SEO/content/ad-ready additions */
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: #062219; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ad-slot { min-height: 110px; margin: 28px 0; border: 1px dashed var(--line); border-radius: 18px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 18px; text-align: center; background: rgba(17,27,46,.32); color: var(--muted); }
.ad-slot span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.ad-slot div { font-size: 12px; }
.ad-slot-top { min-height: 96px; }
.content-section { border: 1px solid var(--line); background: rgba(17,27,46,.52); border-radius: 24px; padding: clamp(22px,4vw,36px); margin: 28px 0; }
.content-section > h2 { margin: 8px 0 14px; font-size: clamp(25px,4vw,36px); letter-spacing: -.03em; }
.content-section > p { color: var(--muted); line-height: 1.8; max-width: 900px; }
.content-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 24px; }
.content-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(7,16,29,.3); }
.content-grid h3 { margin: 0 0 8px; font-size: 16px; }
.content-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.faq details { border-top: 1px solid var(--line); padding: 17px 0; }
.faq details:first-of-type { margin-top: 20px; }
.faq summary { cursor: pointer; font-weight: 750; }
.faq details p { color: var(--muted); line-height: 1.7; margin: 10px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.legal-page main { max-width: 860px; margin: 54px auto; }
.legal-card { border: 1px solid var(--line); background: var(--panel); border-radius: 24px; padding: clamp(22px,5vw,44px); box-shadow: var(--shadow); }
.legal-card h1 { font-size: clamp(32px,6vw,52px); letter-spacing: -.04em; margin: 8px 0 18px; }
.legal-card h2 { margin-top: 30px; }
.legal-card p, .legal-card li { color: var(--muted); line-height: 1.8; }
.legal-card a { color: var(--accent); }
body.light .ad-slot, body.light .content-section { background: rgba(255,255,255,.55); }
body.light .content-grid article { background: rgba(246,248,251,.8); }

@media (max-width: 780px) {
  .content-grid { grid-template-columns: 1fr; }
  .ad-slot { min-height: 90px; }
  footer { flex-wrap: wrap; }
}
