:root {
  --bg: #0d0f14;
  --panel: #161a22;
  --panel-2: #1d2230;
  --line: #2a3142;
  --fg: #eef1f7;
  --muted: #9aa3b5;
  --accent: #ef4444;
  --accent-2: #f97316;
  --green: #22c55e;
  --purple: #a855f7;
  --amber: #fbbf24;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #2a1316 0%, transparent 60%), var(--bg);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }
header.top { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
header.top a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 14px 14px;
  box-shadow: 0 0 0 3px var(--accent);
}
h1 { font-size: 22px; margin: 0; letter-spacing: .2px; }
h1 small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
h2 { font-size: 16px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; flex: none;
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
input[type=text], input[type=url], select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--fg); font: inherit; outline: none;
}
input:focus, select:focus { border-color: var(--accent-2); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > .grow { flex: 1 1 260px; min-width: 0; }
button, .btn {
  appearance: none; border: 0; border-radius: 10px; padding: 11px 16px; font: inherit; font-weight: 600;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; justify-content: center; white-space: nowrap;
}
button:hover, .btn:hover { filter: brightness(1.1); }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
button.secondary, .btn.secondary { background: var(--panel-2); color: var(--fg); border: 1px solid var(--line); }
button.small { padding: 6px 10px; font-size: 13px; font-weight: 500; }
button.big { width: 100%; padding: 15px; font-size: 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.error { color: #fca5a5; background: #3a1418; border: 1px solid #7f1d1d; border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.ok { color: var(--green); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.heat-info { margin-top: 14px; padding: 12px; background: var(--panel-2); border-radius: 10px; }
.heat-info b { display: block; }
.dropzone {
  border: 2px dashed var(--line); border-radius: 12px; padding: 26px 16px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone.drag, .dropzone:hover { border-color: var(--accent-2); background: #1f1a17; }
.dropzone strong { color: var(--fg); }
video { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; display: block; }
.player-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.player-tools .time { font-size: 18px; margin-right: auto; }
.progress { margin-top: 14px; }
.progress .bar { height: 12px; background: var(--panel-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress .fill {
  height: 100%; width: 0%; border-radius: 99px; transition: width .3s ease;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.progress.done .fill { background: var(--green); }
.progress .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; background: var(--panel-2); border: 1px solid var(--line); }
.status-pill.done { background: #0f2e1b; border-color: #166534; color: var(--green); }
.status-pill.error { background: #3a1418; border-color: #7f1d1d; color: #fca5a5; }
.status-pill.rendering, .status-pill.queued { background: #2e1f0f; border-color: #9a3412; color: var(--accent-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
td.pb { color: var(--green); font-weight: 700; }
td.rb { color: var(--purple); font-weight: 700; }
.share { display: flex; gap: 8px; margin-top: 12px; }
.share input { flex: 1; min-width: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
[hidden] { display: none !important; }
footer { color: var(--muted); font-size: 12px; text-align: center; margin-top: 28px; }
