:root {
  --bg: #080d12;
  --bg-2: #0c1219;
  --panel: #111923;
  --panel-2: #0d151e;
  --panel-3: #15202b;
  --border: rgba(255,255,255,.075);
  --border-strong: rgba(255,255,255,.14);
  --text: #f4f8fb;
  --muted: #94a2b4;
  --muted-2: #637184;
  --accent: #55d6ae;
  --accent-2: #35bc96;
  --accent-soft: rgba(85,214,174,.11);
  --accent-glow: rgba(85,214,174,.20);
  --danger: #ff7b83;
  --shadow: 0 20px 55px rgba(0,0,0,.30);
  --shadow-soft: 0 12px 30px rgba(0,0,0,.20);
  --radius: 18px;
}

:root.light {
  --bg: #f3f7fa;
  --bg-2: #edf2f6;
  --panel: #fff;
  --panel-2: #f8fafc;
  --panel-3: #eef4f7;
  --border: rgba(16,26,42,.09);
  --border-strong: rgba(16,26,42,.15);
  --text: #101824;
  --muted: #627086;
  --muted-2: #8490a0;
  --accent: #119b78;
  --accent-2: #0b8769;
  --accent-soft: rgba(17,155,120,.10);
  --accent-glow: rgba(17,155,120,.18);
  --danger: #d74e59;
  --shadow: 0 16px 44px rgba(32,51,72,.12);
  --shadow-soft: 0 10px 24px rgba(32,51,72,.08);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -8%, rgba(85,214,174,.12), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(64,126,160,.08), transparent 24%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(8,13,18,.72);
  backdrop-filter: blur(20px);
}
:root.light .topbar { background: rgba(255,255,255,.78); }
.brand { display:flex; align-items:center; gap:10px; }
.brand-mark {
  width:31px; height:31px; border-radius:10px; display:grid; place-items:center;
  color:#071d16; background:linear-gradient(145deg,#63e5bc,var(--accent));
  font-weight:850; font-size:11px; letter-spacing:-.04em;
  box-shadow:0 8px 24px var(--accent-glow);
}
.brand-name { font-size:14px; font-weight:800; letter-spacing:-.02em; }
.brand-subtitle { color:var(--muted-2); font-size:8.5px; margin-top:1px; letter-spacing:.11em; text-transform:uppercase; }
.topbar-actions { display:flex; gap:8px; align-items:center; }
.privacy-pill {
  padding:7px 10px; border:1px solid var(--border); border-radius:999px; color:var(--muted);
  font-size:10px; display:flex; align-items:center; gap:7px; background:rgba(255,255,255,.02);
}
.dot { width:6px; height:6px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.icon-btn {
  width:32px; height:32px; border-radius:9px; border:1px solid var(--border);
  background:var(--panel); color:var(--text); transition:.18s ease;
}
.icon-btn:hover { border-color:var(--border-strong); transform:translateY(-1px); }

.main { width:min(1200px, calc(100% - 34px)); margin:0 auto; flex:1; }
.hero {
  padding:26px 0 18px; display:flex; align-items:flex-end; justify-content:space-between; gap:28px;
}
.hero-copy { max-width:760px; }
.eyebrow { color:var(--accent); font-size:9px; font-weight:850; letter-spacing:.16em; display:flex; align-items:center; gap:7px; }
.eyebrow-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
h1 { margin:7px 0 8px; font-size:clamp(28px,3vw,43px); line-height:1.04; letter-spacing:-.052em; max-width:770px; }
.hero p { margin:0; max-width:690px; color:var(--muted); line-height:1.6; font-size:12.5px; }
.hero-points { display:flex; flex-direction:column; align-items:flex-end; gap:7px; padding-bottom:2px; }
.hero-points span { font-size:9px; color:var(--muted); padding:5px 8px; border:1px solid var(--border); border-radius:999px; background:rgba(255,255,255,.02); }

.workspace { padding-bottom:18px; }
.workspace-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:15px;
  margin-bottom:10px; padding:0 2px;
}
.workspace-kicker { color:var(--muted-2); font-size:8px; font-weight:800; letter-spacing:.15em; }
.workspace-title { margin-top:2px; font-size:11px; color:var(--muted); }
.workspace-hint { font-size:9px; color:var(--muted-2); display:flex; align-items:center; gap:6px; white-space:nowrap; }
.hint-icon { width:19px; height:19px; display:grid; place-items:center; border:1px solid rgba(85,214,174,.18); background:var(--accent-soft); color:var(--accent); border-radius:7px; font-size:10px; }

.layout-grid {
  display:grid;
  grid-template-columns:230px 305px minmax(0,1fr);
  gap:12px;
  align-items:stretch;
}
.card { border:1px solid var(--border); border-radius:16px; background:linear-gradient(180deg, rgba(255,255,255,.012), transparent 28%), var(--panel); box-shadow:var(--shadow-soft); }

.dropzone-card { padding:10px; display:flex; }
.dropzone {
  width:100%; aspect-ratio:1 / 1; min-height:0;
  border:1.5px dashed var(--border-strong); border-radius:13px;
  background:
    radial-gradient(circle at 50% 16%, var(--accent-soft), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 65%),
    var(--panel-2);
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  transition:.2s ease; outline:none; padding:18px;
}
.dropzone:hover, .dropzone:focus-visible { border-color:rgba(85,214,174,.55); box-shadow:inset 0 0 0 1px rgba(85,214,174,.08), 0 12px 30px rgba(0,0,0,.16); }
.dropzone.drag { border-color:var(--accent); transform:translateY(-1px) scale(1.01); box-shadow:0 18px 48px var(--accent-soft), inset 0 0 0 1px var(--accent-soft); }
.drop-icon {
  width:46px; height:46px; border-radius:13px; display:grid; place-items:center;
  border:1px solid rgba(85,214,174,.18); background:var(--accent-soft); color:var(--accent);
  margin-bottom:10px; box-shadow:0 10px 24px rgba(85,214,174,.08);
}
.drop-title { font-size:14px; font-weight:800; letter-spacing:-.02em; }
.drop-copy { font-size:10px; color:var(--muted); margin:4px 0 11px; }
.drop-hint { font-size:7.8px; color:var(--muted-2); margin-top:10px; letter-spacing:.02em; }
.drop-mini-note { margin-top:12px; color:var(--muted-2); font-size:8px; display:flex; align-items:center; gap:5px; }
.drop-mini-note span { color:var(--accent); }
.primary-btn, .convert-btn, .secondary-btn { border:0; border-radius:10px; font-weight:760; transition:.17s ease; }
.primary-btn { padding:9px 15px; background:linear-gradient(180deg,var(--accent),var(--accent-2)); color:#062017; box-shadow:0 10px 26px var(--accent-glow); font-size:11.5px; }
.primary-btn:hover, .convert-btn:hover { transform:translateY(-1px); filter:saturate(1.05); }

.control-card, .queue-card { padding:14px; min-width:0; }
.card-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:11px; }
.card-title { font-weight:790; font-size:12.5px; letter-spacing:-.01em; }
.card-subtitle { font-size:9.5px; color:var(--muted); margin-top:3px; line-height:1.4; }
.text-btn { border:0; background:transparent; color:var(--muted); font-size:9.5px; padding:3px; }
.text-btn:hover { color:var(--text); }
.text-btn.danger:hover { color:var(--danger); }
.tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; background:var(--panel-2); border:1px solid var(--border); border-radius:10px; margin:9px 0 11px; }
.tab { border:0; background:transparent; color:var(--muted); padding:7px 8px; border-radius:7px; font-weight:760; font-size:10.5px; }
.tab:hover { color:var(--text); background:var(--accent-soft); }
.tab.active { background:linear-gradient(180deg,var(--accent),var(--accent-2)); color:#062017; box-shadow:0 7px 18px var(--accent-glow); }
.tab-panel { display:block; }
.tab-panel[hidden] { display:none; }
.tool-intro { display:grid; gap:2px; margin:1px 0 9px; }
.tool-intro strong { font-size:11px; }
.tool-intro span { color:var(--muted); font-size:9.5px; line-height:1.4; }
.field-label { display:block; color:var(--muted); font-size:9px; margin-bottom:5px; font-weight:650; }
.field-group { margin-top:11px; }
.field-row-head, .range-hints, .progress-top { display:flex; align-items:center; justify-content:space-between; }
.switch-label, .check-option { font-size:9px; color:var(--muted); display:flex; align-items:center; gap:6px; }
select, .unit-input input {
  width:100%; color:var(--text); background:var(--panel-2); border:1px solid var(--border); outline:none; border-radius:9px;
}
select { height:34px; padding:0 9px; font-size:11px; }
select:focus, .unit-input input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.dimension-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:8px; }
.unit-input { position:relative; }
.unit-input input { height:34px; padding:0 29px 0 8px; font-size:11px; }
.unit-input span { position:absolute; right:8px; top:9px; font-size:8px; color:var(--muted-2); }
.quality-group { padding-top:2px; }
.range-hints { font-size:8px; color:var(--muted-2); margin-top:5px; }
input[type=range] { width:100%; accent-color:var(--accent); }
.inline-options { display:flex; justify-content:space-between; gap:6px; flex-wrap:wrap; }
input[type=checkbox] { accent-color:var(--accent); }
.action-stack { margin-top:12px; padding-top:11px; border-top:1px solid var(--border); }
.convert-btn { height:37px; width:100%; background:linear-gradient(180deg,var(--accent),var(--accent-2)); color:#062017; display:flex; align-items:center; justify-content:center; gap:8px; font-size:11px; }
.secondary-btn { margin-top:7px; height:34px; width:100%; background:var(--panel-2); color:var(--text); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; gap:7px; font-size:10.5px; }
.secondary-btn:hover { border-color:var(--border-strong); transform:translateY(-1px); }
.support-note { font-size:8px; color:var(--muted-2); line-height:1.45; margin-top:8px; }

.count-badge { display:inline-grid; min-width:17px; height:17px; padding:0 5px; place-items:center; margin-left:5px; border:1px solid var(--border); border-radius:999px; background:var(--panel-2); color:var(--muted); font-size:8px; vertical-align:1px; }
.queue-heading { margin-bottom:9px; }
.progress-wrap { padding:9px 10px; border:1px solid var(--border); border-radius:10px; background:var(--panel-2); margin-bottom:9px; }
.progress-top { font-size:9px; color:var(--muted); margin-bottom:6px; }
.progress-track { height:6px; border-radius:999px; background:rgba(128,145,165,.13); overflow:hidden; }
.progress-bar { width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transition:width .15s ease; }
.queue-list { display:flex; flex-direction:column; gap:6px; min-height:0; max-height:480px; overflow-y:auto; padding-right:2px; }
.queue-list::-webkit-scrollbar { width:6px; }
.queue-list::-webkit-scrollbar-thumb { background:rgba(128,145,165,.18); border-radius:999px; }
.empty-state {
  min-height:220px; height:100%; border:1px dashed var(--border); border-radius:12px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:24px; color:var(--muted);
  background:linear-gradient(180deg,rgba(255,255,255,.012),transparent 70%);
}
.empty-state strong { color:var(--text); font-size:12px; margin-bottom:4px; }
.empty-state span { max-width:340px; line-height:1.5; font-size:9.5px; }
.empty-visual { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); font-size:18px; margin-bottom:9px; }
.empty-cta { margin-top:12px; border:1px solid rgba(85,214,174,.22); background:var(--accent-soft); color:var(--accent); border-radius:8px; padding:7px 10px; font-weight:720; font-size:9px; }
.empty-cta:hover { background:rgba(85,214,174,.16); }
.queue-item {
  display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:9px;
  padding:7px; border:1px solid var(--border); background:var(--panel-2); border-radius:10px;
}
.thumb { width:42px; height:42px; border-radius:8px; overflow:hidden; background:#090d12; display:grid; place-items:center; color:var(--muted-2); flex:none; }
.thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.item-main { min-width:0; }
.item-name { font-weight:680; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.item-meta { font-size:8.5px; color:var(--muted); margin-top:3px; display:flex; flex-wrap:wrap; gap:4px 6px; }
.status { display:inline-flex; align-items:center; gap:5px; padding:3px 6px; border-radius:999px; border:1px solid var(--border); font-size:8px; color:var(--muted); }
.status.ready { color:var(--accent); background:var(--accent-soft); border-color:rgba(85,214,174,.2); }
.status.error { color:var(--danger); }
.item-actions { display:flex; align-items:center; gap:5px; }
.small-btn { width:27px; height:27px; border-radius:7px; border:1px solid var(--border); background:var(--panel); color:var(--text); }
.small-btn:hover { border-color:var(--border-strong); transform:translateY(-1px); }
.hidden { display:none !important; }

.footer { border-top:1px solid var(--border); padding:12px 20px; display:flex; justify-content:center; gap:8px; color:var(--muted-2); font-size:8.5px; }
.toast { position:fixed; left:50%; bottom:22px; transform:translate(-50%, 16px); padding:10px 13px; border:1px solid var(--border-strong); background:var(--panel); border-radius:10px; color:var(--text); box-shadow:var(--shadow); font-size:10px; opacity:0; pointer-events:none; transition:.2s; z-index:30; }
.toast.show { opacity:1; transform:translate(-50%, 0); }

/* Advertising placements */
.ad-space { width:min(100%,1000px); margin:12px auto; padding:8px 10px; border:1px solid var(--border); border-radius:12px; background:var(--panel); min-height:78px; display:grid; align-items:center; gap:6px; overflow:hidden; }
.ad-label { text-align:center; text-transform:uppercase; letter-spacing:.14em; font-size:7px; color:var(--muted-2); }
.ad-placeholder { min-height:55px; border:1px dashed var(--border); border-radius:9px; display:flex; align-items:center; justify-content:center; gap:5px; flex-direction:column; color:var(--muted-2); font-size:9.5px; background:var(--panel-2); }
.ad-placeholder span { font-weight:700; color:var(--muted); }
.ad-placeholder small { font-size:8px; }
.adsbygoogle { max-width:100%; overflow:hidden; }

@media (max-width: 980px) {
  .layout-grid { grid-template-columns:210px minmax(275px,1fr); }
  .dropzone-card { grid-row:span 2; }
  .queue-card { min-height:360px; }
  .hero-points { display:none; }
}

@media (max-width: 760px) {
  .topbar { padding:0 14px; }
  .privacy-pill { display:none; }
  .main { width:min(100% - 22px, 620px); }
  .hero { padding:18px 0 14px; }
  h1 { font-size:27px; }
  .workspace-toolbar { align-items:flex-start; flex-direction:column; gap:8px; }
  .layout-grid { grid-template-columns:1fr; }
  .dropzone-card { grid-row:auto; }
  .dropzone { aspect-ratio:1 / 1; max-height:330px; max-width:330px; margin:0 auto; }
  .control-card { order:2; }
  .queue-card { order:3; min-height:310px; }
  .queue-list { max-height:none; }
}

@media (max-width: 540px) {
  .main { width:calc(100% - 18px); }
  .topbar { height:55px; }
  .hero { padding-top:14px; }
  h1 { font-size:24px; }
  .hero p { font-size:11.5px; }
  .dropzone { max-width:none; width:100%; }
  .dimension-grid { grid-template-columns:1fr; }
  .queue-item { grid-template-columns:38px minmax(0,1fr); }
  .thumb { width:38px; height:38px; }
  .item-actions { grid-column:2; justify-content:flex-start; }
  .workspace-title { font-size:10px; }
  .footer { padding:11px 12px; text-align:center; }
  .ad-space { margin:9px auto; min-height:70px; padding:7px; }
  .ad-placeholder { min-height:50px; }
}
