:root {
  --bg: #f0f6ff;
  --surface: #ffffff;
  --surface2: #e8f0fe;
  --border: rgba(30,90,200,0.10);
  --border2: rgba(30,90,200,0.20);
  --text: #0d1f3c;
  --text2: #3a567a;
  --text3: #7a9cc0;
  --accent: #1a56db;
  --accent-bg: #dbeafe;
  --accent-border: #93c5fd;
  --green: #0e6b3f;
  --green-bg: #dcfce7;
  --green-border: #86efac;
  --red-bg: #fef2f2;
  --red-border: #fca5a5;
  --red-text: #991b1b;
  --radius: 12px;
  --radius-sm: 7px;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060f1e;
    --surface: #0c1929;
    --surface2: #112236;
    --border: rgba(100,160,255,0.10);
    --border2: rgba(100,160,255,0.18);
    --text: #ddeeff;
    --text2: #7aaad4;
    --text3: #3d6690;
    --accent: #4d8ef0;
    --accent-bg: #0d2347;
    --accent-border: #1e4a8a;
    --green: #4ade80;
    --green-bg: #052e16;
    --green-border: #166534;
    --red-bg: #1c0a0a;
    --red-border: #7f1d1d;
    --red-text: #fca5a5;
  }
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; min-height: 100vh; }

/* ── Layout ── */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
header {
  background: var(--accent);
  padding: 0; margin-bottom: 36px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { display: flex; align-items: baseline; gap: 9px; text-decoration: none; }
.logo-mark { font-family: var(--mono); font-size: 18px; font-weight: 500; color: #ffffff; letter-spacing: -0.02em; }
.logo-tag { font-size: 11px; color: rgba(255,255,255,0.65); letter-spacing: 0.04em; }
.header-badge { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.8); border: 0.5px solid rgba(255,255,255,0.35); border-radius: 20px; padding: 3px 11px; background: rgba(255,255,255,0.12); }

/* ── Ad slots ── */
.ad-slot {
  background: var(--surface2);
  border: 0.5px dashed var(--border2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  margin-bottom: 24px;
}
.ad-top { height: 90px; }
.ad-side { height: 250px; width: 100%; }
@media (min-width: 1100px) {
  .main-with-sidebar { display: grid; grid-template-columns: 1fr 200px; gap: 28px; align-items: start; }
  .sidebar-ads { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
}
@media (max-width: 1099px) { .sidebar-ads { display: none; } }

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 32px; }
.hero h1 {
  font-family: var(--mono); font-size: clamp(22px, 4vw, 32px); font-weight: 500;
  letter-spacing: -0.03em; margin-bottom: 10px; color: var(--accent);
}
.hero p { color: var(--text2); font-size: 15px; max-width: 480px; margin: 0 auto 16px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.hero-tools { font-size: 13px; font-family: var(--mono); color: var(--text3); margin: 0 auto; }

/* ── Tool card ── */
.tool-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(91,63,248,0.08);
}

/* ── Tool nav — vertical sidebar on desktop, horizontal scroll on mobile ── */
@media (min-width: 700px) {
  .tool-card { display: flex; }
  .tnav {
    display: flex; flex-direction: column; flex-shrink: 0;
    width: 170px; border-right: none; border-bottom: none;
    padding: 10px 0; overflow: visible;
    background: var(--text); border-radius: var(--radius) 0 0 var(--radius);
  }
  .tnav .tb {
    padding: 10px 16px; font-size: 12px; text-align: left;
    border-bottom: none; border-left: 3px solid transparent;
    margin-bottom: 0; color: rgba(255,255,255,0.55);
    border-radius: 0;
  }
  .tnav .tb:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); }
  .tnav .tb.on { color: #fff; border-left-color: var(--accent); background: rgba(255,255,255,0.08); font-weight: 500; border-bottom-color: transparent; }
  .panels { flex: 1; min-width: 0; }
}
@media (max-width: 699px) {
  .tnav { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: 0.5px solid var(--border); }
  .tnav::-webkit-scrollbar { display: none; }
  .tb { border-bottom: 2px solid transparent; margin-bottom: -0.5px; }
  .tb.on { border-bottom-color: var(--accent); }
}
.tb {
  flex-shrink: 0; padding: 13px 16px; font-size: 13px; font-family: var(--mono);
  letter-spacing: 0.03em; background: transparent; border: none; cursor: pointer;
  color: var(--text3); transition: color 0.15s, background 0.15s; white-space: nowrap;
}
.tb:hover { color: var(--text2); }
.tb.on { color: var(--accent); font-weight: 500; }
a.tb { text-decoration: none; display: inline-block; }

/* Dark mode sidebar adjustment */
@media (min-width: 700px) and (prefers-color-scheme: dark) {
  .tnav { background: #030a14; }
  .tnav .tb { color: rgba(255,255,255,0.4); }
  .tnav .tb:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.05); }
  .tnav .tb.on { color: #fff; background: rgba(255,255,255,0.07); }
}

/* ── Tab panels ── */
.panels { padding: 20px; }

/* ── Drop zone ── */
.dz {
  border: 1.5px dashed var(--border2); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; cursor: pointer;
  background: var(--surface2); position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.dz.ov { background: #ede9fe; border-color: #7c5cfc; }
.dz input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dz-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; margin: 0 auto 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--accent); background: var(--accent-bg);
  border: 1px solid var(--accent-border); letter-spacing: 0.02em;
}
.dz-t { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.dz-s { font-size: 13px; color: var(--text3); }

/* ── Settings ── */
.sets { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.sb { flex: 1; min-width: 120px; background: var(--surface2); border: 0.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.sb-l { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; font-family: var(--mono); }
.bg { display: flex; gap: 5px; flex-wrap: wrap; }
.ob { flex: 1; min-width: 40px; padding: 7px 8px; font-size: 13px; font-family: var(--mono); border: 0.5px solid var(--border2); background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; color: var(--text2); transition: all 0.12s; white-space: nowrap; }
.ob.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ob:not(.on):hover { border-color: var(--accent); color: var(--accent); }
.rr { display: flex; align-items: center; gap: 8px; }
.rr input[type=range] { flex: 1; accent-color: var(--accent); }
.rv { font-size: 13px; font-weight: 500; color: var(--text); min-width: 34px; text-align: right; font-family: var(--mono); }

/* ── File info (single) ── */
.fi-wrap { display: none; align-items: center; justify-content: space-between; margin-top: 10px; padding: 9px 13px; background: var(--accent-bg); border: 0.5px solid var(--accent-border); border-radius: var(--radius-sm); font-size: 13px; }
.fi-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); max-width: 68%; font-family: var(--mono); font-weight: 500; }
.fi-s { color: var(--text3); white-space: nowrap; font-family: var(--mono); }

/* ── File list (multi) ── */
.fl { flex-direction: column; gap: 3px; margin-top: 10px; max-height: 160px; overflow-y: auto; }
.fit { display: flex; align-items: center; gap: 5px; padding: 7px 11px; background: var(--surface2); border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.fit-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-family: var(--mono); }
.fit-s { color: var(--text3); white-space: nowrap; font-size: 12px; font-family: var(--mono); }
.fib { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 14px; padding: 0 3px; line-height: 1.3; font-family: var(--mono); }
.fib.mv:hover { color: var(--accent); }
.fib.rm:hover { color: #dc2626; }

/* ── Action button ── */
.act {
  display: none; width: 100%; margin-top: 14px; padding: 13px;
  font-size: 15px; font-family: var(--mono); font-weight: 500;
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: opacity 0.15s; letter-spacing: 0.02em;
}
.act:disabled { opacity: 0.35; cursor: not-allowed; }
.act:not(:disabled):hover { opacity: 0.85; }

/* ── Progress ── */
.pg { display: none; margin-top: 14px; }
.pg-t { font-size: 11px; color: var(--text3); margin-bottom: 7px; font-family: var(--mono); }
.pg-bg { height: 3px; background: var(--border2); border-radius: 3px; overflow: hidden; }
.pg-f { height: 100%; background: var(--accent); border-radius: 3px; width: 0%; transition: width 0.18s; }

/* ── Result ── */
.res { display: none; margin-top: 14px; }
.sts { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.st { background: var(--surface2); border: 0.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; }
.st-l { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 4px; font-family: var(--mono); }
.st-v { font-size: 20px; font-weight: 500; color: var(--text); font-family: var(--mono); }
.st-v.g { color: var(--green); }
.dlb {
  display: flex; width: 100%; padding: 13px; font-size: 15px; font-family: var(--mono); font-weight: 500;
  background: var(--green-bg); color: var(--green);
  border: 0.5px solid var(--green-border); border-radius: var(--radius-sm);
  cursor: pointer; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.1s;
}
.dlb:hover { opacity: 0.85; }
.rstb { width: 100%; margin-top: 7px; padding: 9px; font-size: 13px; font-family: var(--mono); background: transparent; border: 0.5px solid var(--border2); border-radius: var(--radius-sm); cursor: pointer; color: var(--text3); transition: color 0.1s; }
.rstb:hover { color: var(--text2); }

/* ── Error ── */
.err { display: none; margin-top: 10px; padding: 9px 12px; font-size: 12px; font-family: var(--mono); color: var(--red-text); background: var(--red-bg); border: 0.5px solid var(--red-border); border-radius: var(--radius-sm); }

/* ── ZIP name input ── */
.zi { width: 100%; padding: 7px 10px; font-size: 12px; font-family: var(--mono); background: var(--surface); border: 0.5px solid var(--border2); border-radius: var(--radius-sm); color: var(--text); }
.zi:focus { outline: none; border-color: var(--accent); }

/* ── Ad between tools ── */
.ad-inline { height: 90px; margin: 8px 0 0; }

/* ── Features strip ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 32px; }
.feat { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px; border-top: 3px solid var(--accent); }
.feat-icon { font-size: 20px; margin-bottom: 6px; }
.feat-t { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.feat-s { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── Footer ── */
footer {
  background: var(--accent);
  padding: 24px 0; margin-top: 40px; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.75); font-family: var(--mono);
}
footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
footer a:hover { color: #fff; }

/* ── Language switcher ── */
.lang-wrap { position: relative; }
.lang-btn { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.15); border: 0.5px solid rgba(255,255,255,0.3); border-radius: 20px; padding: 5px 12px; cursor: pointer; }
.lang-btn:hover { background: rgba(255,255,255,0.25); }
.lang-drop { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 0.5px solid var(--border2); border-radius: var(--radius-sm); min-width: 160px; z-index: 100; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.lang-drop.open { display: block; }
.lang-drop a { display: block; padding: 9px 14px; font-size: 13px; font-family: var(--mono); color: var(--text); text-decoration: none; transition: background 0.1s; }
.lang-drop a:hover { background: var(--surface2); }
.lang-drop a.active { color: var(--accent); font-weight: 500; }

/* ── FAQ ── */
.faq { margin-bottom: 32px; }
.faq-h { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 12px; }
.faq-item { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; overflow: hidden; }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; list-style: none; user-select: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-family: var(--mono); font-size: 18px; color: var(--accent); flex-shrink: 0; margin-left: 12px; transition: transform 0.15s; }
details[open] .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 16px 13px; font-size: 13px; color: var(--text2); line-height: 1.65; border-top: 0.5px solid var(--border); padding-top: 11px; }
.faq-a strong { color: var(--text); font-weight: 500; }
