*{box-sizing:border-box}
:root{
  --bg:#090b0e;
  --panel:#11151a;
  --panel2:#151a20;
  --line:#252c35;
  --text:#f4f7fa;
  --muted:#97a1ad;
  --accent:#a9ff5a;
  --accent2:#d8ffb4;
  --danger:#ff7272;
}
html{background:var(--bg)}
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(800px 500px at 50% -150px,rgba(169,255,90,.13),transparent 65%),
    var(--bg);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
button,input,select{font:inherit}
button,a{ -webkit-tap-highlight-color:transparent}
.shell{width:min(1120px,calc(100% - 32px));margin:auto;padding:48px 0 32px}
.hero{text-align:center;padding:28px 0 42px}
.brand{font-weight:900;letter-spacing:-.05em;font-size:28px}
.brand span{color:var(--accent)}
.privacy-pill{
  display:inline-flex;margin-top:26px;border:1px solid #34402a;background:#11180d;
  color:var(--accent2);padding:8px 11px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.08em
}
h1{font-size:clamp(38px,7vw,78px);line-height:.98;letter-spacing:-.055em;margin:22px auto 16px;max-width:960px}
h1 em{font-style:normal;color:var(--muted)}
.lead{color:var(--muted);font-size:17px}
.card,.preview-card,.settings-card,.processing,.result{
  border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,var(--panel2),var(--panel));
  box-shadow:0 22px 70px rgba(0,0,0,.28)
}
.card{padding:14px}
.dropzone{
  min-height:300px;border:1px dashed #39414c;border-radius:17px;display:flex;align-items:center;
  justify-content:center;flex-direction:column;gap:7px;cursor:pointer;transition:.2s;background:rgba(255,255,255,.012)
}
.dropzone:hover,.dropzone.drag{border-color:var(--accent);background:rgba(169,255,90,.035)}
.drop-icon{
  width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:var(--accent);
  color:#111;font-size:31px;margin-bottom:10px
}
.dropzone strong{font-size:22px}
.dropzone span,.dropzone small{color:var(--muted)}
.workspace{display:grid;grid-template-columns:1.35fr .85fr;gap:18px}
.preview-card,.settings-card,.processing,.result{padding:22px}
.section-label{font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--muted);margin-bottom:14px}
video{width:100%;display:block;background:#050607;border-radius:16px;max-height:620px}
.file-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 2px 0}
.file-row div{display:flex;flex-direction:column;gap:4px;min-width:0}
.file-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-row span{font-size:13px;color:var(--muted)}
.settings-card{display:flex;flex-direction:column;gap:22px}
.control{display:flex;flex-direction:column;gap:10px}
.control label,.toggle-row strong{font-weight:700}
.control-head{display:flex;justify-content:space-between}
output{color:var(--accent);font-weight:800}
input[type=range]{width:100%;accent-color:var(--accent)}
.scale-labels{font-size:11px;color:var(--muted);display:flex;justify-content:space-between}
select{
  color:var(--text);background:#0c1014;border:1px solid var(--line);border-radius:12px;padding:13px 12px;outline:none
}
.toggle-row{
  display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid var(--line);padding-top:18px
}
.toggle-row span{display:flex;flex-direction:column;gap:5px}
.toggle-row small{color:var(--muted);line-height:1.4}
.toggle-row input{width:22px;height:22px;accent-color:var(--accent)}
.notice{
  background:#0d1115;border:1px solid var(--line);border-radius:14px;color:var(--muted);
  font-size:13px;line-height:1.5;padding:12px 13px
}
.notice strong{color:var(--text)}
.primary,.ghost{
  border:0;border-radius:13px;padding:14px 17px;font-weight:800;cursor:pointer;text-decoration:none;text-align:center
}
.primary{background:var(--accent);color:#0b0d0f}
.primary:hover{filter:brightness(1.05)}
.ghost{color:var(--text);background:#191f26;border:1px solid #2a323c}
.ghost:hover{background:#202730}
.danger{color:var(--danger)}
.processing,.result{margin-top:18px}
.processing-head,.result-head{display:flex;align-items:center;justify-content:space-between;gap:20px}
.processing h2,.result h2{margin:0 0 10px;font-size:clamp(24px,4vw,38px);letter-spacing:-.03em}
#percent{font-size:30px;font-weight:900;color:var(--accent)}
.progress-track{height:10px;background:#090c0f;border-radius:999px;overflow:hidden;border:1px solid #20262d}
#progressBar{height:100%;width:0;background:var(--accent);transition:width .15s linear}
#statusText,.format-note{color:var(--muted);font-size:13px}
#renderCanvas{width:100%;max-height:570px;object-fit:contain;background:#050607;border-radius:15px;margin:12px 0 18px}
.result-actions{display:flex;gap:12px;margin-top:16px}
.link-button{display:inline-block}
footer{
  display:flex;justify-content:space-between;gap:16px;color:var(--muted);font-size:12px;padding:32px 4px 0
}
footer strong{color:var(--text)}
.hidden{display:none!important}
@media(max-width:820px){
  .shell{width:min(100% - 20px,1120px);padding-top:20px}
  .hero{padding-top:20px}
  .workspace{grid-template-columns:1fr}
  .dropzone{min-height:240px;text-align:center;padding:18px}
  .file-row,.result-actions,footer{align-items:stretch;flex-direction:column}
  .result-actions .primary,.result-actions .ghost{width:100%}
}
