﻿:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #f8fafc;
  background: #070909;
  --ink: #f8fafc;
  --muted: #93a0ae;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(226, 232, 240, 0.32);
  --card: #0b1010;
  --card-2: #111717;
  --panel: #080c0c;
  --primary: #ff7a1a;
  --primary-2: #ffb020;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #60a5fa;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% -10%, rgba(255, 122, 26, 0.14), transparent 26rem),
    linear-gradient(180deg, #090d0d 0%, #070909 100%);
}

.page {
  width: min(1500px, calc(100% - 16px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero > div:first-child,
.hero-panel,
.card {
  border: 1px solid var(--line);
  background: rgba(11, 16, 16, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero > div:first-child {
  min-height: 126px;
  border-radius: 18px;
  padding: 20px 22px;
}

.hero-panel {
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

h2 { margin-bottom: 0; font-size: 22px; }

.hero p:not(.eyebrow) {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.65;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  align-items: start;
}

.side-stack { display: grid; gap: 14px; }

.card { border-radius: 18px; }
.form-card, .status-card, .queue-card, .board-card, .history-card { padding: 20px; }

.card + .card { margin-top: 16px; }
.side-stack .card + .card { margin-top: 0; }

.card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head.compact { margin-bottom: 12px; }
.head-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

.badge, .chip, .metric { border-radius: 16px; font-weight: 900; }
.badge {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: rgba(255, 122, 26, 0.16);
  color: #ffb020;
  text-align: center;
}
.badge.ok { background: rgba(255, 255, 255, 0.08); color: #f8fafc; }
.badge.warn { background: rgba(255, 122, 26, 0.16); color: #ffb020; }
.badge.is-link { cursor: pointer; text-decoration: none; }
.badge.is-link:hover { filter: brightness(1.14); transform: translateY(-1px); }
.chip { padding: 8px 11px; background: rgba(255,255,255,.08); color: var(--ink); font-size: 12px; white-space: nowrap; }
.metric { padding: 12px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 3px; font-size: 22px; }

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.upload-tile {
  position: relative;
  min-height: 252px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 22, 22, 0.98), rgba(8, 12, 12, 0.98));
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  gap: 8px;
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.upload-tile:hover, .upload-tile.has-file { border-color: rgba(255, 122, 26, .72); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(255,122,26,.08); }

.upload-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 48px;
  border-radius: 15px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
}

.step {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
}

.upload-tile strong { font-size: 19px; }
.upload-tile small, .hint, .note, .upload-tile em { color: var(--muted); }
.upload-tile em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-style: normal; font-weight: 800; }
.upload-tile input[type="file"] { width: 100%; height: 42px; padding: 7px; border: 1px solid #d6e0ef; border-radius: 12px; background: #070909; color: var(--ink); font-size: 13px; }

.preview-image, .preview-video {
  width: 100%;
  height: 150px;
  min-height: 0;
  max-height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #050808;
  object-fit: contain;
}
.preview-video { background: #111827; }

.price-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 122, 26, .14);
  color: #ffb020;
  font-size: 13px;
}

.section-title { margin-top: 20px; }
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
label { display: grid; gap: 7px; color: #e5edf7; font-weight: 900; }
input, select { width: 100%; height: 42px; border: 1px solid #d6e0ef; border-radius: 12px; padding: 0 12px; background: #070909; color: var(--ink); font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(96,165,250,.16); }
.check { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.check input { width: auto; height: auto; }

.advanced, .explain { margin-top: 16px; border-radius: 16px; }
.advanced { border: 1px solid var(--line); padding: 13px 14px; background: rgba(255,255,255,.035); }
.advanced summary { cursor: pointer; font-weight: 900; }
.explain { padding: 14px; background: linear-gradient(135deg, rgba(255,122,26,.12), rgba(255,255,255,.035)); color: var(--soft); line-height: 1.65; }
.explain p { margin: 6px 0 0; }

button { border: 0; cursor: pointer; font: inherit; }
#submitBtn { width: 100%; margin-top: 18px; border-radius: 14px; padding: 14px 22px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-size: 16px; font-weight: 900; box-shadow: 0 16px 30px rgba(255,122,26,.22); }
#submitBtn:disabled { cursor: not-allowed; opacity: .58; }
.ghost { padding: 8px 11px; border: 1px solid var(--line); border-radius: 11px; background: #0b1010; color: #e2e8f0; font-weight: 900; }
.danger { width: 100%; margin-top: 14px; border-color: rgba(220,38,38,.32); color: var(--red); background: rgba(239,68,68,.1); }
.hint { margin: 10px 0 0; font-size: 12px; line-height: 1.55; }

.percent { font-size: 30px; letter-spacing: -0.05em; }
.progress { width: 100%; height: 12px; margin: 14px 0 12px; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,.18); }
.progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .35s ease; }
.status-text { min-height: 42px; margin-bottom: 14px; color: var(--soft); font-size: 14px; line-height: 1.6; }
.steps, .slots { display: grid; gap: 9px; }
.steps span, .slot { position: relative; padding: 10px 12px 10px 34px; border: 1px solid var(--line); border-radius: 12px; background: #080d0d; color: #758195; font-weight: 800; }
.steps span::before, .slot::before { content: ""; position: absolute; left: 13px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; transform: translateY(-50%); }
.steps span.done { color: #dbeafe; }
.steps span.done::before { background: var(--green); }
.steps span.active, .slot.active { border-color: rgba(255,122,26,.48); background: rgba(255,122,26,.12); color: #ffb020; }
.steps span.active::before, .slot.active::before { background: var(--primary); box-shadow: 0 0 0 5px rgba(255,122,26,.12); }
.slot b { display: block; color: var(--ink); }
.slot span { display: block; margin-top: 3px; font-size: 12px; }
.queue-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.045); color: var(--soft); }

video { width: 100%; margin-top: 10px; border-radius: 15px; background: #020617; }
a { display: inline-flex; margin-top: 12px; color: var(--primary); font-weight: 900; text-decoration: none; }
.board-card { margin-top: 16px; }
.task-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.empty-board { padding: 18px; border: 1px dashed var(--line-strong); border-radius: 16px; background: rgba(255,255,255,.03); color: var(--muted); font-weight: 800; }
.task-card { overflow: hidden; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(16,20,20,.98), rgba(9,12,12,.98)); box-shadow: 0 16px 34px rgba(0,0,0,.24); }
.task-card.running, .task-card.uploading, .task-card.starting { border-color: rgba(255,122,26,.42); }
.task-card.success { border-color: rgba(226,232,240,.22); }
.task-card.failed, .task-card.canceled { border-color: rgba(220,38,38,.3); }
.task-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.task-card h3 { margin: 0; font-size: 16px; }
.task-actions { display: flex; gap: 8px; align-items: center; }
.mini-cancel { border-color: rgba(239,68,68,.38); color: #f87171; }
.task-progress { width: 100%; height: 10px; margin: 14px 0 10px; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,.16); }
.task-progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.task-message, .slow-tip { margin: 0 0 12px; color: var(--soft); font-size: 13px; line-height: 1.55; }
.slow-tip { color: #ffb020; }
.task-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.task-meta span { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.055); color: #dbeafe; font-size: 12px; font-weight: 900; }
.task-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.media-pill { display: grid; gap: 3px; min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--soft); background: #080d0d; }
.media-pill span { font-size: 12px; color: var(--muted); }
.media-pill b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 12px; }
.media-pill small { color: var(--muted); font-weight: 800; }
.task-result, .task-empty-result { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(255,122,26,.10); }
.task-empty-result { color: var(--muted); text-align: center; font-weight: 800; background: rgba(255,255,255,.055); }
.result-toggle { color: var(--primary); background: transparent; padding: 0; font-weight: 900; }
.inline-result[hidden] { display: none; }
.inline-result video { max-height: 560px; object-fit: contain; }
.jobs { display: grid; gap: 10px; }
.job { display: flex; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); color: var(--soft); }
.job strong { color: var(--ink); }
.job p { margin-bottom: 5px; }
.job small { color: var(--muted); }
.job.success { border-color: rgba(34,197,94,.35); }
.job.failed, .job.blocked, .job.canceled { border-color: rgba(239,68,68,.32); }
.history-body.collapsed { display: none; }

@media (max-width: 1180px) {
  .hero, .layout { grid-template-columns: 1fr; }
  .hero-panel { grid-template-columns: 1fr 160px; }
  .side-stack { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .page { width: min(100% - 18px, 640px); padding-top: 12px; }
  .hero-panel, .upload-grid, .controls, .side-stack, .task-media-grid { grid-template-columns: 1fr; }
  .form-card, .status-card, .queue-card, .board-card, .history-card { padding: 16px; }
  .upload-tile { min-height: 230px; }
}
