@charset "UTF-8"; /* 托管服务器返回的 CSS 不带字符集，声明一下，免得中文和符号被当成别的编码显示成乱码 */
/* ============================================================
   shell.css —— 页面外壳：工作台布局、左栏（拖入 / 视频卡片 / 步骤导航）、右侧内容面板、进度条、错误提示
   左栏是“玻璃侧边栏”：上面是视频，下面是检查步骤（原来的一级标签）；右侧是当前步骤的内容，顶部是大标题。
   ============================================================ */

/* ---------- 浏览器兼容提示 ---------- */
.compat {
  width: min(1280px, calc(100% - 40px)); margin: 12px auto 0; padding: 12px 14px 12px 18px; border-radius: 20px;
  display: flex; align-items: flex-start; gap: 12px; font-size: 13px;
}
.compat > * { position: relative; z-index: 1; }
.compat-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.compat-body b { color: var(--warn); }
.compat-body ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }

/* ---------- 工作台布局 ---------- */
.workspace {
  width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 16px 0 40px;
  display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 16px; align-items: start;
}
.left {
  position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 96px); overflow-y: auto; padding: 2px 2px 12px; margin: -2px; scrollbar-width: none; /* 侧边栏比屏幕高时自己滚动 */
}
.left::-webkit-scrollbar { display: none; }
.left > * { flex-shrink: 0; } /* 窗口矮时左栏自己滚动，不要把视频卡片压扁（卡片 overflow: hidden，会把文件名和参数裁掉） */
.right { min-width: 0; padding: 22px 24px 26px; }
.right > * { position: relative; z-index: 1; }
.glass > .media, .left > .glass > * { position: relative; z-index: 1; }

/* ---------- 左：拖放区 ---------- */
.drop {
  min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 28px 24px; text-align: center; cursor: pointer; transition: transform .2s;
}
.drop > * { position: relative; z-index: 1; }
.drop::after { /* 虚线框 */
  content: ""; position: absolute; inset: 10px; border-radius: 18px; border: 1.5px dashed var(--line-strong); pointer-events: none; transition: border-color .2s;
}
.drop:hover::after, .drop.over::after { border-color: var(--text); }
.drop.over { transform: scale(1.02); }

/* 拖着文件进入页面：四周亮起品牌色光边 */
.drag-glow {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity var(--dur-fast) var(--ease);
  box-shadow: inset 0 0 0 3px var(--brand), inset 0 0 70px var(--brand-glow);
}
body.dragging .drag-glow { opacity: 1; }
.drop-icon { width: 60px; height: 60px; border-radius: 20px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 22px var(--brand-glow); }
.drop-main { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }

/* ---------- 左：视频卡片 ---------- */
.media { overflow: hidden; }
.player { background: #000; position: relative; border-radius: 24px 24px 0 0; overflow: hidden; }
/* 预览左上角一行等宽读数：比例 · 分辨率 · 帧率 */
.player-tag { position: absolute; left: 14px; top: 10px; z-index: 3; pointer-events: none; color: rgba(255, 255, 255, .78); font-size: 10px; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.player-tag:empty { display: none; }
.player video { display: block; width: 100%; height: 210px; object-fit: contain; background: #000; }
/* 分析 / 处理中：品牌色扫描线在视频上来回扫，上下带一圈淡光 */
.scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--brand); box-shadow: 0 0 12px var(--brand), 0 0 34px var(--brand-glow);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base); }
.media.scanning .scan { opacity: 1; animation: scan 2.4s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(208px); } }
.player-note { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #c9ccd2; font-size: 12.5px; }
.media .seg { margin: 12px 16px 0; }
.file-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px 2px; }
.file-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 关键参数：两列小格子，比长列表更紧凑 */
.params-fold > summary { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px 8px; cursor: pointer; list-style: none; font-size: 12.5px; color: var(--muted); user-select: none; }
.params-fold > summary::-webkit-details-marker { display: none; }
.params-fold > summary::before { content: "\203A"; display: inline-block; width: 8px; font-size: 15px; transition: transform .15s; }
.params-fold[open] > summary::before { transform: rotate(90deg); }
.params-fold > summary:hover { color: var(--text); }
.pf-title { font-weight: 600; color: var(--text); flex: none; }
.pf-brief { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.params-fold[open] .pf-brief { display: none; }
.params-fold:not([open]) > summary { padding-bottom: 14px; }
.params { margin: 0; padding: 0 12px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.params .pcell { background: var(--fill); border-radius: 12px; padding: 7px 10px; min-width: 0; }
.params dt { margin: 0; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 6px; }
.params dt .mono-tag { font-size: 9.5px; line-height: 16px; }
/* 参数值用等宽数字，像仪器读数；中文部分自动用普通字体 */
.params dd { margin: 1px 0 0; font: 500 12px/1.35 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow-wrap: anywhere; }
.params .old { color: var(--subtle); text-decoration: line-through; margin-right: 4px; font-weight: 400; }
.params .new { color: var(--text); font-weight: 700; display: inline-block; }
/* 修复完成：旧值的删除线从无到有画出来 */
.params.strike-in .old { animation: strike-in var(--dur-emph) var(--ease); }
@keyframes strike-in { from { text-decoration-color: transparent; color: var(--text); } to { text-decoration-color: currentColor; } }
.params .sub { display: block; color: var(--subtle); font-size: 11px; font-weight: 400; }

/* ---------- 左：步骤导航（原来的一级标签） ---------- */
.steps { padding: 8px 8px 8px 30px; display: flex; flex-direction: column; gap: 2px; }
/* 进度线：每个步骤左边一个节点，节点之间用细线连起来。
   步骤可以随便点着切换，不要求按顺序做完，所以“完成”看的是这一步有没有出结果（.done，summary/index.js 标记）：
   完成 = 荧光绿实心 + 对勾，当前 = 荧光绿圈，没做 = 灰圈；相邻两步都完成时，中间的线也亮起来 */
.steps button::before {
  content: ""; position: absolute; left: -22px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background var(--dur-base), box-shadow var(--dur-base);
}
.steps button:not(:last-child)::after {
  content: ""; position: absolute; left: -15.5px; top: calc(50% + 10px); width: 1px; height: calc(100% + 2px - 20px);
  background: var(--line-strong); transition: background var(--dur-base);
}
.steps button.on::before { box-shadow: inset 0 0 0 2px var(--brand-ink); }
.steps button.done::before {
  box-shadow: none;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%231A2600' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.steps button.done.on::before { box-shadow: 0 0 0 2px var(--glass-strong), 0 0 0 3.5px var(--brand-ink); }
.steps button.done:has(+ button.done)::after { background: var(--brand-ink); }
.steps button {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; background: transparent; font: inherit; color: var(--text); cursor: pointer;
  padding: 9px 10px; border-radius: 16px; transition: background .2s, transform .12s;
}
.steps button:hover { background: var(--fill); }
.steps button:active { transform: scale(.985); }
.steps button.on { background: var(--glass-strong); box-shadow: 0 4px 14px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .55); }
.step-ico { position: relative; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--fill); color: var(--muted); flex: none; transition: background .2s, color .2s; }
/* 后台检查中（画面遮挡、封面在后台跑）：一段品牌色亮光沿着图标外的圆角框边缘绕行。
   做法：一圈 2px 的细边（遮罩挖空中间），背景是带拖尾的锥形渐变，只转渐变的角度，框本身不动 */
@property --ring-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.steps button.busy .step-ico::after {
  content: ""; position: absolute; inset: -4px; border-radius: 14px; padding: 2px;
  background: conic-gradient(from var(--ring-angle), transparent 0 55%, color-mix(in srgb, var(--brand-ink) 35%, transparent) 75%, var(--brand-ink) 97%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ring-run 1.2s linear infinite;
}
@keyframes ring-run { to { --ring-angle: 360deg; } }
.steps button.on .step-ico { background: var(--brand); color: var(--on-brand); }
.step-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-txt b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.step-no { margin-right: 6px; font-size: 10.5px; vertical-align: 1px; }
.steps button.on .step-no { color: var(--brand-ink); }
.step-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.count { font-size: 11px; font-weight: 600; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--fill); color: var(--muted); text-align: center; line-height: 20px; }
.count:empty:not(.dot) { display: none; }
.count.warn { background: var(--warn-bg); color: var(--warn); }
.count.fail { background: var(--fail); color: var(--on-fail); }
.count.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; background: var(--brand); }

/* ---------- 右：大标题 ---------- */
.panel-title { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.panel-no { display: block; margin-bottom: 2px; }
.panel-title h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; font-family: "SF Pro Display", var(--font); }
.panel-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: -.02em; }
.empty p { margin: 0; font-size: 13px; }

/* 进度 / 错误 */
.task { background: var(--fill); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.task-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.task-row #taskLabel { flex: 1; }
.bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .25s; box-shadow: 0 0 10px var(--brand-glow); }
/* 阶段清单：当前步骤转圈、完成打勾、出错标叉 */
.stages { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.stages:empty { display: none; }
.task.failed .task-row, .task.failed .bar { display: none; } /* 失败：只留阶段清单，看是哪一步出错 */
.task.failed .stages { margin-bottom: 0; }
.stages li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.stages li.on { color: var(--text); font-weight: 500; }
.st-ico { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; }
.st-ico svg { width: 12px; height: 12px; fill: none; stroke: var(--on-brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: none; }
.stages li.done .st-ico { background: var(--brand); }
.stages li.done .st-ico svg { display: block; }
.stages li.on .st-ico { border: 2px solid var(--line-strong); border-top-color: var(--brand-ink); animation: st-spin .8s linear infinite; }
.stages li.err .st-ico { background: var(--fail); color: var(--on-fail); }
.stages li.err .st-ico::after { content: "\00D7"; color: inherit; font-size: 13px; font-weight: 700; line-height: 1; }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .stages li.on .st-ico { animation: none; border-top-color: var(--line-strong); }
  .media.scanning .scan { display: none; }
  .steps button.busy .step-ico::after { animation: none; background: var(--brand-ink); opacity: .5; } /* 不转：整圈淡淡亮着 */
}

.error { background: var(--fail-bg); color: var(--fail); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; white-space: pre-wrap; font-size: 12.5px; max-height: 180px; overflow: auto; }

/* ---------- 窄屏：上下堆叠，步骤变成横向滚动的胶囊 ---------- */
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); width: calc(100% - 24px); padding: 12px 0 32px; gap: 12px; }
  .topbar { width: calc(100% - 24px); margin-top: 8px; }
  .adv, .compat { width: calc(100% - 24px); }
  .left { position: static; max-height: none; overflow: visible; }
  .drop { min-height: 200px; }
  .player video { height: 220px; }
  @keyframes scan { from { transform: translateY(0); } to { transform: translateY(218px); } }
  .right { padding: 16px 16px 20px; }
  .steps { flex-direction: row; overflow-x: auto; order: 1; padding: 8px; } /* 排在视频和参数下面，紧挨着下方的检查结果 */
  .steps button::before, .steps button::after { display: none; } /* 横排胶囊：不画进度线 */
  .steps button { flex: 0 0 auto; width: auto; padding: 6px 12px 6px 6px; }
  .step-txt small { display: none; }
  .brand-sub { display: none; }
  .panel-title h1 { font-size: 23px; }
}
@media (max-width: 760px) {
  /* 顶栏两行：品牌 + 工具一行，平台切换单独一行居中 */
  .app-bar { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .bar-center { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; }
  .bar-btn .bar-txt { display: none; } /* 只留图标（按钮有 aria-label / title） */
  .bar-btn { padding-left: 9px; padding-right: 9px; }
}
