:root { color-scheme: dark; font-family: Inter, "SF Pro Display", "PingFang SC", sans-serif; background: #070a12; color: #f7f7f2; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 88% 0%, rgba(111, 83, 255, .18), transparent 34rem), radial-gradient(circle at 5% 90%, rgba(0, 222, 170, .1), transparent 28rem), #070a12; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.video-shell { width: min(1000px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 28px; }
.back { color: #aeb6c9; text-decoration: none; font-size: 13px; }
.back:hover { color: #fff; }
.video-hero { margin: 44px 0 28px; }
.video-eyebrow, .panel-kicker { color: #a797ff; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.video-hero h1 { margin: 10px 0 12px; font-size: clamp(38px, 8vw, 64px); line-height: 1.04; letter-spacing: -.045em; }
.video-hero p { max-width: 760px; margin: 0; color: #aeb6c9; line-height: 1.7; }
.download-panel { padding: 24px; border: 1px solid rgba(255,255,255,.11); border-radius: 20px; background: rgba(17, 22, 36, .82); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
h2 { margin: 7px 0 6px; font-size: 21px; }
.text-link { color: #c0a5ff; font-size: 12px; text-underline-offset: 3px; }
.text-link[hidden] { display: none; }
.engine-download-meter { display: grid; gap: 6px; margin-top: 12px; color: #aeb6c9; font-size: 12px; }
.engine-download-meter[hidden] { display: none; }
.engine-download-meter progress { width: 100%; height: 8px; accent-color: #a971ff; }
.install-help { margin-top: 14px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; color: #969fb3; font-size: 12px; }
.install-help summary { color: #d2d7e2; cursor: pointer; }
.install-help ol { margin: 10px 0 6px; padding-left: 20px; line-height: 1.75; }
.install-help p { font-size: 11px; }
.download-panel { margin-top: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin-bottom: 0; }
.mode-toggle { display: flex; gap: 3px; margin: 0; padding: 4px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; }
.mode-toggle label { cursor: pointer; }
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle span { display: block; padding: 9px 14px; border-radius: 8px; color: #aeb6c9; font-size: 13px; }
.mode-toggle input:checked + span { background: rgba(153, 103, 255, .24); color: #fff; }
.mode-toggle input:focus-visible + span { outline: 2px solid #c3a2ff; }
.url-label { display: block; margin: 22px 0 8px; color: #c2c8d5; font-size: 13px; }
textarea { display: block; width: 100%; resize: vertical; padding: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; outline: 0; background: #0a0e18; color: white; line-height: 1.65; }
textarea:focus { border-color: rgba(166, 120, 255, .72); }
textarea::placeholder { color: #667087; }
.queue-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; }
.queue-actions p { margin: 0; color: #8892a8; font-size: 12px; line-height: 1.55; }
.primary-button { flex: 0 0 auto; min-width: 132px; padding: 11px 18px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #a977ff, #8547ed); color: white; font-size: 14px; font-weight: 750; }
.primary-button:disabled { cursor: not-allowed; opacity: .42; }
.primary-button:focus-visible { outline: 2px solid #d1b5ff; outline-offset: 2px; }
.queue { display: grid; gap: 10px; }
.empty { padding: 20px 0 5px; color: #737e94; font-size: 13px; text-align: center; }
.empty[hidden] { display: none; }
.job-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.035); }
.job-details { display: grid; width: 100%; min-width: 0; gap: 6px; }
.job-details strong { overflow: hidden; color: #eef0f6; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.job-details span, .job-details small { color: #929bb0; font-size: 11px; overflow-wrap: anywhere; }
.job-details small { color: #b7a1e7; }
.progress { height: 4px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.09); }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a971ff, #64e7c0); transition: width .25s ease; }
.job-card.is-done .progress i { width: 100%; }
.job-card.is-failed { border-color: rgba(255,95,113,.25); }
.job-card.is-failed small { color: #ff8391; }
.job-action { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: rgba(255,255,255,.07); color: #e7e8ef; font-size: 12px; }
.job-action[hidden] { display: none; }
footer { display: flex; justify-content: space-between; gap: 16px; margin: 18px 2px; color: #737e94; font-size: 11px; line-height: 1.6; }
@media (max-width: 640px) {
  .video-shell { width: calc(100% - 24px); padding-top: 22px; }
  .video-hero { margin-top: 34px; }
  .download-panel { padding: 17px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .queue-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .primary-button { width: 100%; }
  footer { flex-direction: column; gap: 4px; }
}
