:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #f38020;
  --accent-text: #ffffff;
  --ok: #15803d;
  --err: #b91c1c;
  --bar: #eef0f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --card: #1a1d23;
    --text: #e8eaed;
    --muted: #9aa1ab;
    --line: #2c3038;
    --accent: #f6923a;
    --accent-text: #111317;
    --ok: #4ade80;
    --err: #f87171;
    --bar: #262a31;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="password"], input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.drop {
  display: block;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 36px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop strong { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }
.drop input { display: none; }
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
button.primary, .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.progress { height: 8px; background: var(--bar); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.meta { color: var(--muted); font-size: 13px; }
.err { color: var(--err); }
.ok { color: var(--ok); }
.link { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.hidden { display: none !important; }
video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; display: block; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }
.history a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .meta { white-space: nowrap; }
