/* ============================================================
   Kompres Foto — PREMIUM dark-purple SaaS design (Visuo/Mufi)
   "WAO on open": gradient orbs, glassmorphism, 3D tilt on the
   tool card (desktop fine-pointers only), micro-interactions.
   Zero frameworks, zero remote assets. Mobile-first.
   Font: Plus Jakarta Sans (OFL), self-hosted in assets/fonts/.
   Class names are byte-identical to the emerald build — app.js
   and lib.js depend on them. DO NOT rename.
   ============================================================ */

/* ---------- self-hosted font ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg-950: #12101d;
  --bg-900: #181527;
  --bg-800: #1f1b33;
  --violet-500: #8b5cf6;
  --violet-400: #a78bfa;
  --violet-700: #6d28d9;
  --orange-400: #fb923c;
  --orange-500: #f97316;

  --ink: #f4f2fb;
  --muted: #a9a3c7;
  --faint: #7c76a0;
  --line: rgba(139, 92, 246, 0.22);
  --card: rgba(31, 27, 51, 0.72);
  --card-solid: #1f1b33;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.10);

  --radius: 16px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.45);
  --shadow-lift: 0 18px 50px -12px rgba(139, 92, 246, 0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background:
    radial-gradient(1100px 480px at 85% -80px, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(900px 420px at -10% 20px, rgba(249, 115, 22, 0.10), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(109, 40, 217, 0.12), transparent 60%),
    var(--bg-950);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* ---------- a11y helpers ---------- */
.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 100;
  background: var(--violet-500); color: #fff;
  padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700;
  transition: top 0.18s var(--ease-out);
}
.skip-link:focus { top: 8px; color: #fff; }
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 16, 29, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 12px; padding-bottom: 12px;
}
.brand {
  font-size: 1.35rem; font-weight: 800; margin: 0; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--violet-400), var(--orange-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 0; color: var(--muted); font-size: 0.85rem; }
.header-badge {
  margin-left: auto; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.4px;
  color: var(--orange-400); border: 1px solid rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.1);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 44px 0 12px; position: relative; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: -1; }
.hero-orb-a {
  width: 340px; height: 340px; left: -90px; top: -40px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
  animation: orb-drift 14s ease-in-out infinite alternate;
}
.hero-orb-b {
  width: 280px; height: 280px; right: -70px; top: 30px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 70%);
  animation: orb-drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes orb-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(36px, 28px) scale(1.12); } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--violet-400);
  background: rgba(31, 27, 51, 0.6);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: float-in 0.7s var(--ease-out) both;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.06); }
}
.hero h1 {
  margin: 16px 0 12px; font-size: clamp(2rem, 6vw, 2.7rem); line-height: 1.12;
  font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--ink) 20%, var(--violet-400) 60%, var(--orange-400) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: float-in 0.7s var(--ease-out) 0.08s both;
}
.lede {
  margin: 0 auto 16px; max-width: 38rem; font-size: 1.05rem; color: var(--muted);
  animation: float-in 0.7s var(--ease-out) 0.16s both;
}
.lede strong { color: var(--ink); }
.privacy-hero {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(31, 27, 51, 0.6); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 18px; font-size: 0.9rem; color: var(--muted);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: float-in 0.7s var(--ease-out) 0.24s both;
}
.privacy-hero strong { color: var(--ink); }
.privacy-hero .lock { font-size: 1.05rem; }
@keyframes float-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- tool card (glassmorphism + 3D tilt) ---------- */
.tool-card {
  position: relative;
  background: linear-gradient(140deg, rgba(255,255,255,0.06), transparent 32%), var(--card);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; margin: 24px 0 30px;
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: card-in 0.8s var(--ease-out) 0.3s both;
  transform-style: preserve-3d;
  will-change: transform;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* 3D tilt — JS adds .tilt only on desktop fine-pointers without
 * prefers-reduced-motion. Fill-mode "backwards" (instead of "both")
 * lets the inline tilt transform win after the entrance completes. */
@media (hover: hover) and (pointer: fine) {
  .tool-card.tilt { animation-fill-mode: backwards; transition: transform 0.12s ease-out; }
}

/* ---------- dropzone ---------- */
.dropzone {
  position: relative;
  border: 2px dashed rgba(139, 92, 246, 0.45); border-radius: var(--radius);
  background: rgba(139, 92, 246, 0.06); text-align: center;
  padding: 36px 16px; cursor: pointer; min-height: 48px; overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s var(--ease-out), box-shadow 0.18s ease;
}
.dropzone:hover { border-color: var(--violet-400); background: rgba(139, 92, 246, 0.12); transform: translateY(-2px); }
.dropzone:focus { outline: none; box-shadow: var(--focus-ring); border-color: var(--violet-400); }
.dropzone:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dropzone.dragover {
  border-color: var(--orange-400); border-style: solid;
  background: rgba(249, 115, 22, 0.10);
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.14);
  transform: scale(1.01);
}
.dropzone.dragover .dropzone-icon { animation: bounce-icon 0.7s var(--ease-spring) infinite; }
.dropzone-inner { position: relative; }
.dropzone-icon {
  color: var(--violet-400); margin-bottom: 10px;
  filter: drop-shadow(0 6px 14px rgba(139, 92, 246, 0.4));
  animation: bounce-icon 2.6s ease-in-out infinite;
  transition: transform 0.25s var(--ease-spring);
}
.dropzone:hover .dropzone-icon { transform: translateY(-4px) scale(1.06); }
@keyframes bounce-icon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.dropzone-title { margin: 0 0 4px; font-size: 1.12rem; font-weight: 700; }
.dropzone-sub { margin: 0 0 8px; color: var(--muted); }
.dropzone-cta {
  color: var(--orange-400); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px;
}
.dropzone-limits {
  margin: 0; font-size: 0.78rem; color: var(--faint); letter-spacing: 0.4px;
  text-transform: uppercase; font-weight: 600;
}

/* ---------- notices ---------- */
.notice-list { display: grid; gap: 8px; margin-top: 14px; }
.notice-list:empty { display: none; }
.notice {
  border-radius: 10px; padding: 10px 14px; font-size: 0.92rem; margin-top: 12px;
  border: 1px solid transparent;
  animation: slide-in 0.3s var(--ease-out);
}
.notice-error { background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.notice[hidden] { display: none; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ---------- settings ---------- */
.settings { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.settings h3 { margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; letter-spacing: 0.2px; }

.mode-switch {
  display: flex; gap: 8px; margin-bottom: 16px;
  background: rgba(18, 16, 29, 0.55); border: 1px solid var(--line);
  border-radius: 14px; padding: 5px;
}
.mode-option {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 10px 6px; cursor: pointer;
  font-weight: 700; font-size: 0.93rem; color: var(--muted);
  transition: all 0.22s var(--ease-out); margin: 0; text-align: center; line-height: 1.3;
  min-height: 52px;
}
@media (max-width: 420px) { .mode-option { font-size: 0.85rem; } }
.mode-option input { accent-color: var(--violet-500); width: 17px; height: 17px; margin: 0; }
.mode-option:has(input:checked) {
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700));
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(139, 92, 246, 0.6);
}
.mode-option:has(input:focus-visible) { outline: none; box-shadow: var(--focus-ring); }

.preset-label { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .presets { grid-template-columns: repeat(5, 1fr); } }
.preset {
  position: relative; border: 1.5px solid var(--line);
  background: rgba(24, 21, 39, 0.7);
  border-radius: 14px; padding: 12px 6px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  font: inherit; color: var(--ink); overflow: hidden;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out), background 0.25s var(--ease-out);
  animation: preset-in 0.5s var(--ease-out) both;
}
.preset:nth-child(1) { animation-delay: 0.35s; } .preset:nth-child(2) { animation-delay: 0.41s; }
.preset:nth-child(3) { animation-delay: 0.47s; } .preset:nth-child(4) { animation-delay: 0.53s; }
.preset:nth-child(5) { animation-delay: 0.59s; }
@keyframes preset-in { from { opacity: 0; transform: translateY(14px) scale(0.94); } to { opacity: 1; transform: none; } }
.preset:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(139, 92, 246, 0.5); }
.preset:active { transform: translateY(0) scale(0.97); }
.preset strong { font-size: 0.92rem; font-weight: 800; }
.preset span {
  font-size: 0.76rem; font-weight: 700; color: var(--muted);
  background: rgba(139, 92, 246, 0.14); border-radius: 999px; padding: 2px 10px;
}
.preset.is-active {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700) 60%, #7c3aed);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255,255,255,0.28);
  transform: translateY(-2px);
}
.preset.is-active strong { color: #fff; }
.preset.is-active span { color: #2b1a5e; background: rgba(255,255,255,0.92); }
.preset:focus { outline: none; }
.preset:focus-visible { box-shadow: var(--focus-ring); }
.preset-note { margin: 10px 0 0; font-size: 0.85rem; color: var(--muted); min-height: 1.4em; }

/* ---------- quality slider ---------- */
.slider-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 800; margin-bottom: 4px;
}
.slider-label output {
  font-size: 1.5rem; font-weight: 800; color: var(--violet-400);
  font-variant-numeric: tabular-nums;
  background: rgba(139, 92, 246, 0.14); border: 1px solid var(--line);
  border-radius: 10px; padding: 2px 12px;
  transition: transform 0.15s var(--ease-spring);
}
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, var(--violet-500), var(--orange-400));
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 3px solid var(--violet-500);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.5);
  transition: transform 0.16s var(--ease-spring);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.14); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.22); cursor: grabbing; }
input[type="range"]::-moz-range-track {
  height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, var(--violet-500), var(--orange-400));
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--violet-500);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.5);
}
input[type="range"]:focus { outline: none; }
input[type="range"]:focus-visible { box-shadow: var(--focus-ring); border-radius: 8px; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }

.format-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.format-row label { font-weight: 700; font-size: 0.93rem; }
.format-row select {
  font: inherit; font-weight: 600; color: var(--ink);
  padding: 9px 12px; border-radius: 10px; min-height: 48px;
  border: 1.5px solid var(--line); background: var(--bg-900);
  max-width: 100%; cursor: pointer;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.format-row select:hover { border-color: var(--violet-400); }
.format-row select:focus { outline: none; border-color: var(--violet-400); box-shadow: var(--focus-ring); }

/* ---------- queue ---------- */
.queue-section { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.queue-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-header h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.queue-count { color: var(--muted); font-weight: 600; }
.empty-state {
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  padding: 26px 16px; text-align: center; color: var(--muted); font-size: 0.94rem; margin-top: 12px;
  background: rgba(139, 92, 246, 0.05);
}
.empty-state p { margin: 0; }
.queue-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.queue-item {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  background: rgba(24, 21, 39, 0.7);
  animation: card-slide-in 0.42s var(--ease-out) both;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.queue-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
@keyframes card-slide-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.queue-item.has-error { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.06); }
.queue-thumb {
  width: 66px; height: 66px; object-fit: cover; border-radius: 10px; flex: none;
  background: var(--bg-900); border: 1px solid var(--line);
  transition: transform 0.25s var(--ease-spring);
}
.queue-item:hover .queue-thumb { transform: scale(1.07) rotate(-1.5deg); }
.queue-info { flex: 1; min-width: 0; }
.queue-name { font-weight: 700; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue-error-msg { font-size: 0.85rem; color: var(--danger); margin-top: 2px; }

/* result line + animated size bar */
.queue-result {
  font-size: 0.86rem; color: var(--success); font-weight: 700; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.size-bar { height: 7px; border-radius: 4px; background: rgba(139, 92, 246, 0.16); margin-top: 6px; overflow: hidden; }
.size-bar > i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--violet-500), var(--orange-400));
  width: 0; transition: width 0.9s var(--ease-out);
}
.queue-dl { margin-top: 8px; }
.queue-dl a { color: var(--violet-400); font-weight: 700; font-size: 0.88rem; }
.queue-actions { display: flex; gap: 4px; flex: none; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 800; border-radius: 13px; padding: 11px 18px;
  cursor: pointer; border: 1.5px solid transparent; position: relative; overflow: hidden;
  letter-spacing: 0.2px; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn:focus { outline: none; }
.btn:focus-visible { box-shadow: var(--focus-ring); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700));
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 30px -8px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary::after { /* shine sweep */
  content: ""; position: absolute; top: 0; bottom: 0; width: 46px; left: -70px;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-18deg); transition: left 0.55s var(--ease-out);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 38px -8px rgba(139, 92, 246, 0.65); }
.btn-primary:hover:not(:disabled)::after { left: 115%; }
.btn-primary:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn-secondary { background: var(--bg-800); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--faint); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; padding: 9px 12px; min-height: 40px; }
.btn-ghost:hover:not(:disabled) { color: var(--danger); background: var(--danger-bg); }
.btn-large { width: 100%; padding: 15px; font-size: 1.06rem; }
.btn-small { padding: 7px 13px; font-size: 0.84rem; border-radius: 9px; min-height: 40px; }
.icon-btn {
  font: inherit; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-800); color: var(--muted);
  cursor: pointer; line-height: 1; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.18s var(--ease-out);
}
.icon-btn:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); transform: scale(1.08); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn:focus { outline: none; }
.icon-btn:focus-visible { box-shadow: var(--focus-ring); }
.icon-btn.danger { color: var(--danger); }

.compress-controls { margin-top: 18px; display: grid; gap: 8px; }

/* ---------- progress ---------- */
.progress { margin-top: 16px; }
.progress-text { margin: 0 0 8px; font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.progress-track {
  height: 12px; background: var(--bg-950); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--violet-500), var(--orange-400));
  background-size: 200% 100%;
  animation: progress-shimmer 1.6s linear infinite;
  transition: width 0.25s var(--ease-out);
}
@keyframes progress-shimmer { to { background-position: -200% 0; } }

/* ---------- result ---------- */
.result {
  margin-top: 18px; border-radius: var(--radius); padding: 18px;
  background: linear-gradient(150deg, rgba(52, 211, 153, 0.12), rgba(31, 27, 51, 0.6));
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 10px 30px -12px rgba(52, 211, 153, 0.25);
  animation: result-pop 0.5s var(--ease-spring) both;
}
@keyframes result-pop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.result h3 {
  margin: 0 0 6px; color: var(--success); font-size: 1.12rem;
  display: flex; align-items: center; gap: 9px;
}
.result h3::before {
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--success), #6ee7b7); color: #06281c; font-size: 1rem;
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.45);
  animation: check-pop 0.55s var(--ease-spring) 0.1s both;
}
@keyframes check-pop { from { transform: scale(0); } to { transform: scale(1); } }
.result-summary { margin: 0 0 14px; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.result-summary strong { color: var(--ink); }
.result-actions { display: grid; gap: 8px; }
.result .hint { margin-top: 12px; }

/* ---------- content sections ---------- */
.content-section { margin: 30px 0; }
.content-section h2 {
  font-size: 1.32rem; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
}
.content-section h2::before {
  content: ""; width: 26px; height: 5px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, var(--violet-500), var(--orange-400));
}
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  background: rgba(31, 27, 51, 0.5); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 14px 13px 58px;
  color: var(--muted);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s;
}
.steps li:hover { transform: translateX(4px); box-shadow: var(--shadow-lift); border-color: rgba(139, 92, 246, 0.5); }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700)); color: #fff;
  font-weight: 800; font-size: 0.95rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}
.steps strong { color: var(--ink); }

.preset-guide { margin: 0; display: grid; gap: 10px; }
@media (min-width: 560px) { .preset-guide { grid-template-columns: 1fr 1fr; } }
.preset-guide > div {
  background: rgba(31, 27, 51, 0.5); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s;
}
.preset-guide > div:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(139, 92, 246, 0.5); }
.preset-guide > div:first-child {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(31, 27, 51, 0.5));
}
.preset-guide dt { font-weight: 800; color: var(--ink); }
.preset-guide dd { margin: 3px 0 0; color: var(--muted); font-size: 0.9rem; }

.content-section details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 9px;
  background: rgba(31, 27, 51, 0.5); overflow: hidden;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.content-section details[open] { border-color: rgba(139, 92, 246, 0.45); box-shadow: var(--shadow-lift); }
.content-section summary {
  padding: 13px 15px; cursor: pointer; font-weight: 700; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 52px;
}
.content-section summary::-webkit-details-marker { display: none; }
.content-section summary::after {
  content: "+"; font-size: 1.25rem; color: var(--violet-400); font-weight: 800; flex: none;
  transition: transform 0.25s var(--ease-spring);
}
.content-section details[open] summary::after { transform: rotate(45deg); }
.content-section summary:focus { outline: none; }
.content-section summary:focus-visible { box-shadow: var(--focus-ring); border-radius: 8px; }
.content-section details p { padding: 0 15px 14px; margin: 0; color: var(--muted); font-size: 0.95rem; }

.privacy-note {
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.14), rgba(139, 92, 246, 0.04));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 30px 0;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.privacy-note h2 { margin: 0 0 8px; font-size: 1.16rem; font-weight: 800; color: var(--violet-400); }
.privacy-note p { margin: 0; color: var(--muted); }
.privacy-note strong { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 36px; padding: 22px 0 36px;
  color: var(--faint); font-size: 0.88rem;
}
.site-footer p { margin: 4px 0; }
.footer-tech { font-size: 0.8rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--violet-400); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .hero h1 { font-size: 2.6rem; }
  .tool-card { padding: 30px; }
  .btn-large { width: auto; min-width: 280px; }
  .compress-controls { grid-template-columns: auto auto; justify-content: center; }
  .result-actions { grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ===== 3D premium enhancements ===== */
.tilt-3d { transform-style: preserve-3d; will-change: transform; transition: transform 0.18s ease-out; }
.hero { perspective: 1200px; }
.orb { transform: translateZ(0); }
.hub-card { transform-style: preserve-3d; transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s; }
.hub-card:hover { transform: translateY(-4px) translateZ(12px); }
.hub-card:active { transform: translateY(-1px) translateZ(4px) scale(0.99); }
.tool-card { box-shadow: 0 24px 70px -18px rgba(0,0,0,0.65), 0 0 0 1px rgba(139,92,246,0.12), 0 0 44px -12px rgba(139,92,246,0.28); }
a.brand,a.brand:visited{text-decoration:none;color:inherit;cursor:pointer}
body{overflow-x:hidden}
html,body{overflow-x:clip}
.tool-card{animation-fill-mode:backwards !important}
