/* 视频下载控制台(yt-dlp)· 沿用 tokens.css 暗色放映室令牌 */
.ytd { padding-bottom: 40px; }
.ytd-dim { color: var(--text-hint); font-size: 12px; }
.ytd-env { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.ytd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--text-secondary); background: var(--bg-white); border: 1px solid var(--border); }
.ytd-pill.ok i { color: var(--success); }
.ytd-pill.warn i { color: var(--accent); }
.ytd-pill.err { color: var(--danger); border-color: rgba(224, 123, 99, .35); }

.ytd-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.ytd-tab { position: relative; background: transparent; border: none; cursor: pointer; padding: 11px 2px; font-size: 14.5px; font-weight: 500; color: var(--text-hint); display: inline-flex; align-items: center; gap: 7px; }
.ytd-tab:hover { color: var(--text); }
.ytd-tab.on { color: var(--strong); font-weight: 800; }
.ytd-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.ytd-badge { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #1a1206; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

.ytd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: var(--bg-warm); color: var(--text); text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.ytd-btn:hover { border-color: rgba(255, 255, 255, .2); color: var(--strong); }
.ytd-btn.primary { background: var(--gold-grad); color: #1a1206; border-color: transparent; font-weight: 700; }
.ytd-btn.primary:hover { filter: brightness(1.08); color: #1a1206; }
.ytd-btn.ghost { background: transparent; }
.ytd-btn.danger:hover { color: var(--danger); border-color: rgba(224, 123, 99, .45); }
.ytd-btn.sm { padding: 3px 9px; font-size: 12px; margin-left: 10px; }
.ytd-btn[disabled] { opacity: .45; cursor: not-allowed; }
.ytd-lnk { color: var(--accent-deep); cursor: pointer; text-decoration: none; font-size: 12px; }
.ytd-lnk:hover { text-decoration: underline; }

.ytd-inp { background: var(--bg-warm); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 7px 10px; font-size: 13px; outline: none; min-width: 0; }
.ytd-inp:focus { border-color: rgba(232, 176, 75, .55); }
.ytd-inp.sm { width: 170px; }
.ytd-inp.xs { width: 118px; }
.ytd-inp[disabled] { opacity: .4; }

/* 新建下载 */
.ytd-inbox { background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-console); }
.ytd-inbox textarea { width: 100%; min-height: 108px; resize: vertical; background: transparent; border: none; outline: none; color: var(--strong); font-size: 14px; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; box-sizing: border-box; }
.ytd-inbox textarea::placeholder { color: var(--text-hint); font-family: inherit; }
.ytd-inact { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.ytd-inact .ytd-dim { margin-right: auto; }

.ytd-opts { margin-top: 12px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.ytd-orow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.ytd-olab { width: 64px; flex: 0 0 auto; color: var(--text-secondary); font-size: 12.5px; }
.ytd-olab.ml { width: auto; margin-left: 12px; }
.ytd-seg { display: inline-flex; background: var(--bg-warm); border: 1px solid var(--border); border-radius: 9px; padding: 2px; flex-wrap: wrap; }
.ytd-seg button { border: none; background: transparent; color: var(--text-secondary); padding: 5px 11px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.ytd-seg button:hover { color: var(--strong); }
.ytd-seg button.on { background: var(--primary-light); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(232, 176, 75, .3); font-weight: 600; }
.ytd-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text); cursor: pointer; user-select: none; }
.ytd-chk input { accent-color: var(--accent); }
.ytd-chk.dis { opacity: .5; cursor: not-allowed; }
.ytd-adv-toggle { margin-top: 4px; background: transparent; border: none; color: var(--text-hint); font-size: 12px; cursor: pointer; padding: 4px 0; }
.ytd-adv-toggle:hover { color: var(--accent); }
.ytd-adv { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 4px; }

.ytd-probes { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ytd-card { display: flex; align-items: flex-start; gap: 14px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.ytd-card.err { border-color: rgba(224, 123, 99, .3); }
.ytd-cthumb, .ytd-tthumb { position: relative; flex: 0 0 auto; width: 208px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg-warm); display: flex; align-items: center; justify-content: center; color: var(--text-hint); font-size: 26px; }
.ytd-cthumb img, .ytd-tthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ytd-cthumb.sk { animation: ytdPulse 1.2s ease-in-out infinite; }
@keyframes ytdPulse { 50% { opacity: .5; } }
.ytd-card.err .ytd-cthumb { color: var(--danger); width: 64px; aspect-ratio: 1; }
.ytd-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.ytd-cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ytd-ctitle { color: var(--strong); font-size: 15px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.ytd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ytd-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--bg-warm); border: 1px solid var(--border); color: var(--text-secondary); cursor: default; }
.ytd-tag.alt { color: #8fd3c4; border-color: rgba(77, 191, 168, .25); }
.ytd-tag.on { color: var(--accent); border-color: rgba(232, 176, 75, .35); background: var(--primary-light); }
button.ytd-tag { cursor: pointer; }
.ytd-cact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.ytd-errtxt { color: var(--danger); font-size: 12.5px; line-height: 1.5; }
.ytd-entries { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px 0; }
.ytd-entry { display: flex; gap: 10px; padding: 4px 10px; font-size: 12.5px; color: var(--text); }
.ytd-entry span { width: 26px; color: var(--text-hint); font-variant-numeric: tabular-nums; }
.ytd-entry em { flex: 1; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytd-entry i { font-style: normal; color: var(--text-hint); font-variant-numeric: tabular-nums; }
.ytd-fmts { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.ytd-fmts table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ytd-fmts th { position: sticky; top: 0; background: var(--bg-warm); color: var(--text-secondary); font-weight: 600; text-align: left; padding: 6px 8px; }
.ytd-fmts td { padding: 5px 8px; border-top: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.ytd-fmts tr { cursor: pointer; }
.ytd-fmts tbody tr:hover { background: rgba(255, 255, 255, .03); }
.ytd-fmts tr.on { background: var(--primary-light); }
.ytd-fmts tr.on i { color: var(--accent); }
.ytd-fmts code { color: var(--accent-deep); }
.ytd-bulk { display: flex; justify-content: flex-end; margin-top: 12px; }
.ytd-note { margin-top: 16px; color: var(--text-hint); font-size: 12px; line-height: 1.6; }

/* 任务列表 */
.ytd-ttool { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ytd-tright { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ytd-fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.ytd-fchip { border: 1px solid var(--border); background: var(--bg-white); color: var(--text-secondary); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ytd-fchip em { font-style: normal; color: var(--text-hint); font-size: 11px; }
.ytd-fchip.on { color: var(--accent); border-color: rgba(232, 176, 75, .4); background: var(--primary-light); }
.ytd-live { font-size: 11.5px; color: var(--text-hint); margin: 4px 0 10px; }
.ytd-live i { font-size: 7px; vertical-align: middle; color: var(--text-hint); margin-right: 3px; }
.ytd-live i.on { color: var(--success); box-shadow: 0 0 6px var(--success); border-radius: 50%; }
.ytd-tlist { display: flex; flex-direction: column; gap: 10px; }
.ytd-task { display: flex; align-items: flex-start; gap: 14px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.ytd-task.s-running, .ytd-task.s-processing { border-color: rgba(232, 176, 75, .28); }
.ytd-tthumb { width: 168px; }
.ytd-tthumb.play { cursor: pointer; }
.ytd-play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; padding-left: 3px; box-sizing: border-box; opacity: .85; transition: transform .15s, opacity .15s, background .15s; }
.ytd-tthumb.play:hover .ytd-play { opacity: 1; transform: scale(1.08); background: var(--accent, #e8b04b); color: #1a1a1a; }
.ytd-vhint { margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: #f0b86e; background: rgba(240, 184, 110, .1); border: 1px solid rgba(240, 184, 110, .3); border-radius: 8px; padding: 8px 12px; }
.ytd-otag.ok { color: #3fb68b; border-color: rgba(63, 182, 139, .35); }
.ytd-tmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ytd-ttitle { color: var(--strong); font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytd-tmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-hint); font-size: 12px; }
.ytd-st { padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--bg-warm); color: var(--text-secondary); }
.ytd-st.r { color: var(--accent); background: var(--primary-light); }
.ytd-st.ok { color: var(--success); background: rgba(77, 191, 168, .12); }
.ytd-st.err { color: var(--danger); background: rgba(224, 123, 99, .12); }
.ytd-st.q { color: #9fb4d8; background: rgba(120, 150, 210, .12); }
.ytd-site { color: #8fd3c4; }
.ytd-otag { font-size: 11px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-hint); }
.ytd-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.ytd-bar i { display: block; height: 100%; background: var(--gold-grad); border-radius: 3px; transition: width .35s ease; }
.ytd-bar.err i { background: var(--danger); }
.ytd-bar.off i { background: var(--text-hint); }
.ytd-bar.q i { background: rgba(159, 180, 216, .5); }
.ytd-tstat { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ytd-tstat b { margin: 0 7px; color: var(--text-hint); font-weight: 400; }
.ytd-files { display: flex; flex-wrap: wrap; gap: 6px; }
.ytd-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-warm); font-size: 12px; color: var(--text); }
.ytd-file > i { color: var(--text-hint); }
.ytd-file.k-video > i { color: var(--accent); }
.ytd-file.k-audio > i { color: #8fd3c4; }
.ytd-file .nm { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytd-file .sz { color: var(--text-hint); font-variant-numeric: tabular-nums; }
.ytd-file button, .ytd-file a { border: none; background: transparent; color: var(--text-secondary); cursor: pointer; padding: 2px 5px; border-radius: 5px; font-size: 12px; }
.ytd-file button:hover, .ytd-file a:hover { color: var(--accent); background: rgba(255, 255, 255, .05); }
.ytd-vodrow { display: flex; gap: 10px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.ytd-vod.ok { color: var(--success); }
.ytd-vod.up { color: var(--accent); }
.ytd-vod.err { color: var(--danger); }
.ytd-tact { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 0 auto; }
.ytd-empty { text-align: center; color: var(--text-hint); padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 13px; }
.ytd-empty > i { font-size: 30px; opacity: .6; }
.ytd-empty.err { color: var(--danger); }
.ytd-more { display: flex; justify-content: center; margin-top: 12px; }

/* 站点 */
.ytd-pop { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 12px; }
.ytd-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; font-size: 12.5px; color: var(--text); background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; max-height: 62vh; overflow: auto; }
.ytd-sgrid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytd-sgrid span.sub { color: var(--text-hint); }

/* 设置 */
.ytd-set { display: flex; flex-direction: column; gap: 14px; }
.ytd-sec { background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.ytd-sec h3 { margin: 0 0 10px; font-size: 14.5px; color: var(--strong); display: flex; align-items: center; gap: 8px; }
.ytd-kv > div { display: grid; grid-template-columns: 84px minmax(120px, 220px) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.ytd-kv > div:last-child { border-bottom: none; }
.ytd-kv span { color: var(--text-secondary); }
.ytd-kv b { color: var(--strong); font-weight: 600; }
.ytd-kv code { color: var(--text-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.ytd-kv em { font-style: normal; color: var(--text-hint); font-size: 11.5px; }
.ytd-srow { display: grid; grid-template-columns: 120px 260px 1fr; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; }
.ytd-slab { color: var(--text-secondary); }
.ytd-sin .ytd-inp { width: 100%; box-sizing: border-box; }
.ytd-sin input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.ytd-shint { color: var(--text-hint); font-size: 12px; }
.ytd-sact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ytd-cookie { margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.ytd-dom { display: flex; flex-wrap: wrap; gap: 5px; }
.ytd-cookie-in { width: 100%; min-height: 90px; box-sizing: border-box; background: var(--bg-warm); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 12px; padding: 8px 10px; resize: vertical; outline: none; }
.ytd-pre { background: #0a0c10; border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: #c9ccd4; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; max-height: 60vh; overflow: auto; margin: 0; }
.ytd-pre.sm { margin-top: 10px; max-height: 240px; }

/* 弹层 */
.ytd-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.ytd-mbg { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(3px); }
.ytd-mbox { position: relative; z-index: 1; width: min(900px, 92vw); max-height: 90vh; overflow: auto; background: var(--bg-white); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-lg); }
.ytd-modal.media .ytd-mbox { width: auto; max-width: 92vw; }
.ytd-mbox video, .ytd-mbox img { display: block; max-width: min(1100px, 88vw); max-height: 76vh; border-radius: 10px; background: #000; margin: 0 auto; }
.ytd-mtitle { color: var(--strong); font-weight: 700; margin: 0 36px 12px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytd-mx { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-warm); color: var(--text); cursor: pointer; }
.ytd-mx:hover { color: var(--strong); }
.ytd-aud { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 10px; color: var(--accent); font-size: 40px; }
.ytd-aud audio { width: 100%; max-width: 520px; }

@media (max-width: 900px) {
    .ytd-card, .ytd-task { flex-direction: column; }
    .ytd-cthumb, .ytd-tthumb { width: 100%; }
    .ytd-tact { flex-direction: row; flex-wrap: wrap; }
    .ytd-srow { grid-template-columns: 1fr; gap: 4px; }
    .ytd-kv > div { grid-template-columns: 70px 1fr; }
}

/* 操作说明(2026-10-10)*/
.ytd-guide { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 9px 12px; border-radius: 12px; background: var(--bg-warm); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.ytd-guide > i { color: var(--accent); }
.ytd-guide > span { flex: 1; }
.ytd-guide b { color: var(--accent); }
@media (max-width: 720px) { .ytd-guide { flex-wrap: wrap; } }
