:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #181b22;
  --line: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #4f9cf9;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 24px 16px 64px; }
header h1 { font-size: 2rem; margin: 8px 0 4px; letter-spacing: -0.02em; }
.tag { color: var(--muted); margin-top: 0; }
.drop {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 28px 18px;
  text-align: center;
  background: var(--panel);
  cursor: pointer;
  margin: 20px 0 12px;
}
.drop.drag { border-color: var(--accent); }
.drop p { margin: 6px 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; overflow: hidden; pointer-events: none;
}
.hint { color: var(--muted); font-size: 0.86rem; }
.filelist { list-style: none; padding: 0; margin: 0 0 12px; }
.filelist li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.95rem;
}
.filelist .cam { color: var(--accent); font-weight: 600; white-space: nowrap; }
.filelist .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opts {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.opts summary { cursor: pointer; font-weight: 600; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}
.grid label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--muted); gap: 4px; }
.grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
input[type="number"], select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.95rem;
  width: 100%;
}
.formats {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.formats legend { color: var(--muted); font-size: 0.85rem; padding: 0 6px; }
.formats label { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
button#go {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
button#go:disabled { opacity: 0.4; cursor: default; }
.progress {
  height: 8px;
  background: var(--panel);
  border-radius: 6px;
  margin-top: 14px;
  overflow: hidden;
}
.progress #bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.status { color: var(--muted); min-height: 1.4em; }
.results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
}
.results h2 { margin-top: 0; font-size: 1.2rem; }
.results ul { list-style: none; padding: 0; }
.results a {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
footer { margin-top: 28px; color: var(--muted); font-size: 0.85rem; }
