:root{color-scheme:dark;--bg:#0b0b0e;--panel:#151519;--line:#28282e;--muted:#92929c;--text:#f1f1f3;--accent:#ff465b}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;min-height:100vh}header{max-width:1500px;padding:28px 32px;display:flex;align-items:center;justify-content:flex-end;margin:auto}.workspace{width:min(1440px,100% - 64px);margin:78px auto 80px;display:grid;grid-template-columns:400px minmax(0,1fr);gap:64px;align-items:start}.mascot{position:sticky;top:100px;padding-top:10px}.mascot img{display:block;width:100%;height:min(66vh,620px);object-fit:contain;object-position:center top}main{min-width:0}.hero{margin-bottom:36px}h1{font-size:clamp(44px,6vw,76px);line-height:1.18;letter-spacing:-.05em;margin:0 0 40px;font-weight:750}h1 span{display:block;background:linear-gradient(100deg,#ff2653,#ff7142);background-clip:text;-webkit-text-fill-color:transparent}.input-box{display:flex;gap:10px;align-items:center;border:1px solid var(--line);padding:9px;background:var(--panel);border-radius:22px;box-shadow:0 16px 48px #0002}.input-box:focus-within{border-color:#65616b;box-shadow:0 0 0 3px #ffffff05}.link-icon{font-size:24px;color:var(--muted);margin:0 8px 0 12px}input{flex:1;min-width:0;background:transparent;border:none;color:var(--text);font:inherit;font-size:15px;padding:13px 0;outline:none}input::placeholder{color:#74747f}button,a.primary{font:inherit;cursor:pointer;white-space:nowrap;text-decoration:none;font-size:14px;display:inline-flex;align-items:center;justify-content:center;gap:24px;border-radius:14px;padding:15px 23px;transition:background .15s,transform .15s}button:active,a.primary:active{transform:translateY(1px)}button:focus-visible,a:focus-visible{outline:2px solid #ff6a65;outline-offset:4px}.primary{background:#f3f3f5;border:1px solid #f3f3f5;color:#16161a;font-weight:600!important}.primary:hover{background:#dcdce3}.primary:disabled{opacity:.4;cursor:wait}.secondary:hover{background:#24242b}.secondary{background:transparent;color:var(--text);border:1px solid var(--line)}.error{color:#ff8e99;font-size:14px;padding:0 12px}.result{background:linear-gradient(120deg,#19191f,#121215);border:1px solid var(--line);border-radius:24px;overflow:hidden;margin-top:32px;display:flex}.result-info{padding:28px 30px;flex:1;min-width:0}.result-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:12px}.status{color:#c8c8d1}.status.completed{color:#59d8b7}.status.failed{color:#ff8292}h2{font-size:19px;font-weight:600;line-height:1.55;letter-spacing:-.02em;margin:15px 0 12px;overflow-wrap:anywhere}.meta{color:var(--muted);font-size:13px;display:flex;gap:16px;flex-wrap:wrap}.progress{height:4px;background:#303039;border-radius:4px;overflow:hidden;margin-top:25px}.progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#ff3158,#ff7950);transition:width .4s ease}.actions{display:flex;gap:10px;margin-top:24px}.actions:empty{display:none}.video-wrap{width:44%;background:#060608;display:flex;align-items:center;min-height:230px}video{width:100%;max-height:360px;display:block}.history{margin-top:52px}.section-head{display:flex;align-items:center;justify-content:flex-start;margin-bottom:14px}.section-head h2{font-size:15px;margin:0}.section-head>span{font-size:12px;color:var(--muted)}.history-row{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;border:none;border-bottom:1px solid #242429;border-radius:0;background:transparent;padding:18px 0;gap:18px;color:inherit}.history-row:hover{background:#ffffff03}.history-left{display:flex;align-items:center;gap:16px;min-width:0}.thumb{width:68px;height:44px;background:#1d1d24;border-radius:7px;object-fit:cover;flex-shrink:0}.file-icon{display:grid;place-items:center;color:#81818e}.history-title{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:650px}.history-meta{display:block;color:var(--muted);font-size:12px;margin-top:7px}.history-arrow{color:#81818e;font-size:20px}.history-copy{min-width:0}[hidden]{display:none!important}

.platforms{display:flex;flex-wrap:wrap;gap:7px;margin:15px 3px 0}.platform{display:inline-flex;align-items:center;gap:6px;height:28px;padding:4px 9px 4px 5px;border:1px solid #33333b;border-radius:16px;font-size:11px;white-space:nowrap;background:#151519;color:#aaaab4}.platform img,.platform b{width:18px;height:18px;object-fit:contain;flex-shrink:0}.platform b{display:grid;place-items:center;border-radius:5px;background:#2a2a32;font-size:10px;font-weight:600}.platform.active{color:#f1f1f3;border-color:#66616d;background:#252129}.platform.disabled{opacity:.45}



.network-status{display:flex;gap:22px}.network{display:inline-flex;align-items:center;gap:7px;color:#92929c;font-size:12px}.network i{width:6px;height:6px;border-radius:50%;background:#696973}.network.online i{background:#48d3b0;box-shadow:0 0 9px #48d3b033}.network.offline i{background:#ff6477}

.input-box #submit{width:72px;min-width:72px;padding:14px 0;gap:6px}.platform.disabled img{filter:grayscale(1) brightness(2.2)}

.download-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 14px;border:1px solid #e0e0e6;border-radius:10px;background:#f0f0f3;color:#202027;font-family:inherit;font-size:13px;font-weight:600;line-height:1;text-decoration:none;white-space:nowrap;cursor:pointer;box-shadow:0 2px 5px #0002;transition:background .15s,border-color .15s,transform .15s}.download-button svg{flex-shrink:0}.download-button:hover{background:#fff;border-color:#fff}.download-button:active{transform:translateY(1px);box-shadow:none}

h1{display:flex;align-items:baseline;gap:14px;white-space:nowrap;font-size:clamp(26px,4vw,60px)}h1 span{display:inline}.meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 20px;margin:22px 0 0;padding-top:18px;border-top:1px solid var(--line)}.stat{min-width:0}.stat dt{font-size:11px;color:#858590;margin-bottom:6px}.stat dd{margin:0;color:#ddddE5;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.history-row{display:block}.history-open{display:flex;align-items:center;justify-content:space-between;width:100%;padding:0;border:0;border-radius:0;background:transparent;color:inherit;text-align:left;gap:18px}.history-source{display:flex;align-items:center;justify-content:flex-start;gap:7px;max-width:calc(100% - 84px);margin:9px 0 0 84px;padding:0;border:0;border-radius:3px;background:transparent;color:#777783;font-size:11px;line-height:1.5;text-align:left}.history-source:hover{color:#d4d4dc}.source-url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.history-source svg{flex-shrink:0}.history-source.copied svg{display:none}.copy-feedback{color:#59d8b7;flex-shrink:0}.copy-feedback:empty{display:none}.copy-buffer{position:fixed;left:-9999px;top:0;opacity:0}

/* 详情留在对应记录内，切换时先收起上一条。 */
.history-details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .22s ease;visibility:hidden}.history-details-body{overflow:hidden;min-height:0}.history-row.expanded .history-details{grid-template-rows:1fr;visibility:visible}.history-row:not(.expanded) .history-details{transition:grid-template-rows .22s ease,visibility 0s .22s}.history-details .result{margin:16px 0 0;border-radius:12px;flex-direction:row}.history-details .result-info{padding:18px;min-width:0}.history-details .video-wrap{width:32%;min-height:0}.history-details video{max-height:220px}.history-details h2{display:none}.history-details .meta{gap:12px;margin-top:14px;padding-top:12px}.history-details .actions{margin-top:16px}.history-open .history-left{flex:1}.history-platform{flex-shrink:0}.history-arrow{transition:transform .22s}.expanded .history-arrow{transform:rotate(180deg)}.steps{display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:14px;font-size:11px;color:var(--muted)}.steps:empty{display:none}.step.done{color:#68baa6}.step.active{color:#e6e6eb}.spinner{display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}.download-button[aria-busy=true]{cursor:wait;opacity:.75}.primary[aria-busy=true]{opacity:.8}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.history-details{transition:none!important}}

/* 展开后阶段只放在进度区域，避免列表和详情重复。 */
.history-row.expanded .history-meta{display:none}.history-details .progress{margin-top:14px}.history-details .result-top{font-size:13px}.history-details #percent{font-variant-numeric:tabular-nums;color:var(--muted)}

#playback-error{margin:0;padding:24px 18px;color:var(--muted);font-size:12px;line-height:1.8;text-align:center;width:100%}

.steps{list-style:none;padding:0;margin:4px 0 0;gap:10px 16px}.step{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.step.pending{color:#62626e}.step .spinner{width:11px;height:11px}.step-mark{width:12px;text-align:center}.history-details .result-top{justify-content:flex-end}.history-details .progress{margin-top:12px}

.history-row-head{display:flex;align-items:center;gap:12px}.history-row-head .history-open{flex:1;min-width:0}.history-remove{flex-shrink:0;width:28px;height:28px;padding:0;border:0;border-radius:6px;background:transparent;color:#777783;font-size:22px;line-height:1}.history-remove:hover{background:#ffffff0a;color:#ff8292}

/* 右侧标签与操作图标使用同一中心线及固定点击尺寸。 */
.history-row-head{gap:8px}.history-row-head .history-open{gap:8px}.history-row-head .history-platform{margin-left:8px}.history-arrow,.history-remove{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;flex-shrink:0;padding:0;line-height:0}.history-arrow svg,.history-remove svg{display:block}.history-remove{font-size:inherit}.history-row-head .history-platform{height:28px}

/* 封面与操作围绕两行文字整体居中。 */
.history-row{padding:12px 0}.history-row-head{display:grid;grid-template-columns:68px minmax(0,1fr) auto 28px 28px;align-items:center;gap:8px}.history-row-head>.history-copy{padding-left:8px;min-width:0}.history-row-head .history-open{width:28px;min-width:28px;justify-content:center}.history-row-head .history-title{display:block;width:100%;max-width:none;margin:0;padding:0;border:0;border-radius:0;background:none;color:inherit;text-align:left;font-size:14px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-row-head .history-source{margin:5px 0 0;max-width:100%;line-height:1.5}.history-row-head .history-platform{margin-left:8px}.mascot .mascot-video{display:block;width:100%;height:auto;max-height:620px;object-fit:contain;background:rgb(11,11,14);mix-blend-mode:lighten}

/* 用固定底色承接视频编码后略暗的背景，避免矩形色差。 */
.mascot{background:rgb(11,11,14);isolation:isolate}

/* 保持左右布局，宽度不足时横向滚动，不切换为竖排。 */
header{width:min(1500px,100%);padding:clamp(16px,2.5vw,28px) clamp(16px,3vw,32px)}
.network-status{flex-wrap:wrap;justify-content:flex-end;gap:10px 20px;max-width:100%}.network{white-space:nowrap}.network i{flex-shrink:0}
.workspace{width:calc(100% - clamp(24px,5vw,64px));max-width:1440px;margin:clamp(24px,5vw,78px) auto 48px;grid-template-columns:minmax(180px,28%) minmax(0,1fr);gap:clamp(20px,4vw,64px)}
main{container-type:inline-size}.hero,.history,.input-box,.history-row,.history-details,.history-details-body{min-width:0;max-width:100%}
.mascot{top:24px;width:100%;padding:0}.mascot .mascot-video{width:100%;height:auto;max-height:min(620px,calc(100dvh - 48px));object-position:center}
.input-box input{width:0;flex:1 1 0}.input-box #submit{flex:0 0 72px}.platforms{max-width:100%}.error{overflow-wrap:anywhere}
.history-row-head{min-width:0}.history-row-head>*{min-width:0}.history-row-head .history-source{width:100%}.history-row-head .source-url{flex:0 1 auto}
.history-details .video-wrap{flex:0 0 32%;min-width:0}.history-details .result-info{flex:1 1 0;min-width:0}
.history-details .meta{grid-template-columns:repeat(auto-fit,minmax(min(100%,105px),1fr))}.stat dd{white-space:normal;overflow-wrap:anywhere}.actions{flex-wrap:wrap}.steps{max-width:100%;gap:10px 12px}.step{max-width:100%;white-space:normal;overflow-wrap:anywhere}.step .spinner,.step-mark{flex-shrink:0}







.history-row{cursor:pointer}.history-details{cursor:auto}

/* 复制按钮只包住链接与图标，空白留给整行展开。 */
.history-row-head .history-source{width:fit-content;max-width:100%}

html{overflow-x:clip}body{min-width:0;transform-origin:top left}header{min-width:1000px}.workspace{min-width:936px;grid-template-columns:minmax(240px,28%) minmax(0,1fr)}.history-details .result{flex-direction:row}.history-details .video-wrap{width:32%;flex:0 0 32%}.history-row-head{grid-template-columns:68px minmax(0,1fr) auto 28px 28px}.mascot{position:sticky;width:100%}.mascot .mascot-video{height:auto;max-height:620px}

/* 仅竖屏触摸设备切换单列，电脑缩放不会触发。 */
@media(max-width:900px) and (orientation:portrait) and (pointer:coarse){
  header{min-width:0;width:100%;padding:16px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left))}
  .network-status{gap:8px 16px}.network{font-size:11px}
  .workspace{min-width:0;width:calc(100% - 32px);max-width:600px;margin:12px auto 32px;grid-template-columns:minmax(0,1fr);gap:20px}
  .mascot{position:static;justify-self:center;width:min(190px,48vw)}
  .mascot .mascot-video{width:100%;height:240px;max-height:30svh;object-fit:contain}
  .hero{margin-bottom:24px}.input-box{gap:6px;padding:7px;border-radius:16px}.link-icon{display:none}
  .input-box input{font-size:16px;padding:12px 0 12px 8px}.input-box #submit{width:64px;min-width:64px;flex-basis:64px;padding:12px 0}
  .platforms{gap:6px;margin-top:12px}.history{margin-top:26px}
  .history-row-head{grid-template-columns:44px minmax(0,1fr) auto 28px 28px;gap:5px}
  .history-row-head>.thumb{width:44px;height:40px}.history-row-head>.history-copy{padding-left:3px}
  .history-row-head .history-platform{margin-left:0;padding:3px 6px 3px 4px;font-size:10px}
  .history-row-head .history-platform img{width:16px;height:16px}
  .history-row-head .history-title{font-size:13px}.history-row-head .history-source{font-size:10px;gap:4px}
  .history-details .result{flex-direction:column}.history-details .video-wrap{width:100%;flex-basis:auto;justify-content:center}
  .history-details video{max-height:300px}.history-details .result-info{width:100%;padding:14px}
  .history-details .meta{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px}.stat dd{font-size:12px}
  .steps{gap:8px 12px}.download-button{height:42px}
}
