/* Thirai - dark cinema look */
:root {
  --bg: #0b0e14; --bg2: #121722; --bg3: #1a2130; --line: #263045; --text: #e8ecf4; --dim: #9aa6bd; --faint: #6b778f;
  --acc: #f5a524; --acc2: #ff6b3d; --ok: #3ecf8e; --bad: #ff5d6c; --info: #5aa9ff;
  --r: 12px; --shadow: 0 10px 40px rgba(0,0,0,.45);
  --card-w: 220px;
  font-family: "Inter", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
.hidden { display: none !important; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }

/* ---------- top bar */
header.top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 10px 28px;
  background: linear-gradient(180deg, rgba(11,14,20,.97), rgba(11,14,20,.85)); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .3px; white-space: nowrap; }
.logo .mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--acc), var(--acc2)); display: grid; place-items: center; color: #1a1205; font-size: 15px; }
.logo small { font-weight: 500; color: var(--dim); font-size: 13px; }
nav.main { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav.main a { padding: 7px 12px; border-radius: 8px; color: var(--dim); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
nav.main a:hover { color: var(--text); background: var(--bg3); }
nav.main a.on { color: var(--text); background: var(--bg3); box-shadow: inset 0 -2px 0 var(--acc); }
.grow { flex: 1; }
.search { position: relative; }
.search input { width: 260px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 8px 34px; outline: none; transition: width .2s, border-color .2s; }
.search input:focus { width: 340px; border-color: var(--acc); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: .6; }
.kbd { font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--bg3); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.off .dot { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.pill.busy .dot { background: var(--acc); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.menu-btn { background: var(--bg3); border: 0; border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; }
.dropdown { position: absolute; right: 24px; top: 58px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 220px; box-shadow: var(--shadow); z-index: 60; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; color: var(--text); font-size: 14px; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg3); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }

.banner { margin: 14px 28px 0; padding: 12px 16px; border-radius: 12px; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.banner.off { background: rgba(255,93,108,.12); border: 1px solid rgba(255,93,108,.35); }
.banner.setup { background: rgba(245,165,36,.1); border: 1px solid rgba(245,165,36,.35); }
.banner b { font-weight: 700; }

main { padding: 0 0 80px; }
.page { padding: 18px 28px; }
h1 { font-size: 28px; margin: 6px 0 16px; letter-spacing: -.3px; }
h2 { font-size: 19px; margin: 0; letter-spacing: -.2px; }
h3 { font-size: 15px; margin: 0 0 8px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: 14.5px; background: var(--bg3); color: var(--text); transition: transform .1s, background .15s; }
.btn:hover { background: #222b3e; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc); color: #1b1203; }
.btn.primary:hover { background: #ffb83d; }
.btn.ghost { background: rgba(255,255,255,.1); backdrop-filter: blur(6px); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: rgba(255,93,108,.15); color: #ff9aa4; }
.btn.on { background: rgba(245,165,36,.18); color: var(--acc); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--dim); }
.iconbtn:hover { color: var(--text); background: var(--bg3); }

/* ---------- hero */
.hero { position: relative; height: min(62vh, 560px); min-height: 380px; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transform: scale(1.04); transition: opacity .8s; filter: saturate(1.05); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,14,20,.95) 0%, rgba(11,14,20,.55) 45%, rgba(11,14,20,.1) 75%), linear-gradient(0deg, var(--bg) 0%, transparent 40%); }
.hero .info { position: absolute; z-index: 2; left: 28px; bottom: 56px; max-width: 620px; }
.hero .eyebrow { color: var(--acc); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.hero h1 { font-size: clamp(30px, 4.4vw, 54px); margin: 8px 0 10px; line-height: 1.05; text-shadow: 0 3px 20px rgba(0,0,0,.5); }
.hero .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--dim); margin-bottom: 18px; font-size: 14px; }
.hero .dots { position: absolute; z-index: 2; right: 28px; bottom: 60px; display: flex; gap: 6px; }
.hero .dots i { width: 22px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.25); cursor: pointer; }
.hero .dots i.on { background: var(--acc); }
.badge { display: inline-block; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 1px 6px; font-size: 11.5px; font-weight: 700; color: var(--text); letter-spacing: .3px; }
.badge.q4k { border-color: var(--acc); color: var(--acc); }
.badge.hd { border-color: var(--info); color: var(--info); }

/* ---------- rows */
.row { margin: 26px 0 0; }
.row-head { display: flex; align-items: baseline; gap: 12px; padding: 0 28px; margin-bottom: 10px; }
.row-head a.more { color: var(--faint); font-size: 13px; font-weight: 600; }
.row-head a.more:hover { color: var(--acc); }
.strip-wrap { position: relative; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w); gap: 14px; overflow-x: auto; padding: 4px 28px 14px; scroll-snap-type: x proximity; scrollbar-width: none; scroll-padding: 28px; }
.strip::-webkit-scrollbar { display: none; }
.strip-wrap .arrow { position: absolute; top: 0; bottom: 14px; width: 44px; border: 0; background: linear-gradient(90deg, rgba(11,14,20,.9), transparent); color: #fff; font-size: 26px; opacity: 0; transition: opacity .2s; z-index: 3; }
.strip-wrap .arrow.r { right: 0; background: linear-gradient(270deg, rgba(11,14,20,.9), transparent); }
.strip-wrap:hover .arrow { opacity: 1; }

/* ---------- cards */
.card { position: relative; scroll-snap-align: start; cursor: pointer; border-radius: var(--r); outline: none; }
.card .pic { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: var(--bg3); box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .pic, .card:focus .pic { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--acc), 0 12px 30px rgba(0,0,0,.5); }
.card:hover .pic img { transform: scale(1.05); }
.card .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.25); }
.card:hover .play { opacity: 1; }
.card .play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(245,165,36,.95); display: grid; place-items: center; color: #1b1203; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.card .corner { position: absolute; top: 7px; left: 7px; display: flex; gap: 4px; }
.card .corner .badge { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.card .len { position: absolute; right: 7px; bottom: 9px; font-size: 11.5px; font-weight: 700; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 5px; }
.card .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.18); }
.card .bar i { display: block; height: 100%; background: var(--acc); }
.card .done { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #04150d; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.card .t { margin-top: 8px; font-weight: 650; font-size: 14.2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .s { font-size: 12.5px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.show .pic::after { content: ""; position: absolute; inset: auto 8px -6px 8px; height: 6px; border-radius: 0 0 8px 8px; background: rgba(255,255,255,.1); }
.card .count { position: absolute; right: 7px; top: 7px; background: rgba(0,0,0,.7); border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr)); gap: 22px 16px; }
.grid.dense { --card-w: 180px; }

/* ---------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; position: sticky; top: 58px; z-index: 20; padding: 10px 0; background: linear-gradient(180deg, var(--bg) 80%, transparent); }
.filters select, .filters input, .field { background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 13.5px; outline: none; }
.filters select:focus, .field:focus { border-color: var(--acc); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--bg2); border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--dim); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--acc); border-color: var(--acc); color: #1b1203; }
.count-line { color: var(--faint); font-size: 13.5px; margin-left: auto; }
.empty { text-align: center; padding: 70px 20px; color: var(--dim); }
.empty big { display: block; font-size: 46px; margin-bottom: 10px; }

/* ---------- details */
.detail-hero { position: relative; min-height: 470px; display: flex; align-items: flex-end; }
.detail-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,14,20,.97) 10%, rgba(11,14,20,.6) 55%, rgba(11,14,20,.25)), linear-gradient(0deg, var(--bg), transparent 50%); }
.detail-hero .info { position: relative; z-index: 2; padding: 30px 28px 26px; max-width: 760px; }
.detail-hero h1 { font-size: clamp(28px, 4vw, 46px); margin: 6px 0 10px; line-height: 1.08; }
.detail-hero .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--dim); font-size: 14.5px; margin-bottom: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.resume-line { margin: 14px 0 0; font-size: 13.5px; color: var(--dim); display: flex; align-items: center; gap: 10px; }
.resume-line .track { width: 220px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.resume-line .track i { display: block; height: 100%; background: var(--acc); }
.tech { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 0; }
.tech div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tech b { display: block; font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px; font-weight: 700; }
.section { margin: 30px 0 0; }

.eplist { display: flex; flex-direction: column; gap: 8px; }
.ep { display: grid; grid-template-columns: 48px 200px 1fr auto; gap: 16px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.ep:hover { background: var(--bg2); border-color: var(--line); }
.ep.cur { background: rgba(245,165,36,.07); border-color: rgba(245,165,36,.35); }
.ep .n { font-size: 22px; font-weight: 800; color: var(--faint); text-align: center; }
.ep .pic { position: relative; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; background: var(--bg3); }
.ep .pic img { width: 100%; height: 100%; object-fit: cover; }
.ep .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.2); }
.ep .bar i { display: block; height: 100%; background: var(--acc); }
.ep .t { font-weight: 650; }
.ep .s { font-size: 13px; color: var(--faint); margin-top: 3px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }

/* ---------- panels (monitor, settings, stats) */
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.kpi span { color: var(--faint); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.phase { display: grid; grid-template-columns: 150px 1fr 130px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.phase:last-child { border-bottom: 0; }
.phase .name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.phase .name i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.phase.active .name i { background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: pulse 1.2s infinite; }
.phase.done .name i { background: var(--ok); }
.progress { height: 10px; background: var(--bg3); border-radius: 6px; overflow: hidden; position: relative; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 6px; transition: width .5s; }
.progress.ok i { background: var(--ok); }
.phase .num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--dim); }
.current { margin-top: 12px; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; color: var(--faint); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 8px 10px; border-bottom: 1px solid rgba(38,48,69,.6); vertical-align: middle; }
table.t tr:hover td { background: rgba(255,255,255,.02); }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.minibar { height: 6px; background: var(--bg3); border-radius: 4px; overflow: hidden; min-width: 80px; }
.minibar i { display: block; height: 100%; background: var(--acc); }
.bars .b { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13.5px; }
.bars .b .minibar { height: 10px; }
.bars .b span:last-child { text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.status-chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--bg3); }
.status-chip.done { color: var(--ok); }
.status-chip.error, .status-chip.offline { color: var(--bad); }
.status-chip.running { color: var(--acc); }

/* switches */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--bg3); border: 1px solid var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: var(--dim); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--acc); border-color: var(--acc); }
.switch input:checked + span::before { transform: translateX(18px); background: #1b1203; }
.switch.red input:checked + span { background: var(--bad); border-color: var(--bad); }
.src-row td:first-child { width: 54px; }
.src-row.off td { opacity: .55; }
.src-row.off td:first-child { opacity: 1; }
.subfolders { background: var(--bg); border-radius: 10px; padding: 8px 12px; max-height: 420px; overflow: auto; }
.subfolders .f { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.subfolders .f.hid { opacity: .5; text-decoration: line-through; }

/* forms + dialogs */
dialog { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(520px, 92vw); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
dialog label { display: block; font-size: 12.5px; color: var(--faint); font-weight: 700; margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .5px; }
dialog .field { width: 100%; }
.formrow { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.formrow > div { flex: 1; min-width: 140px; }
.formrow label { display: block; font-size: 12.5px; color: var(--faint); font-weight: 700; margin: 0 0 5px; }
.formrow .field { width: 100%; }
.msg { font-size: 13.5px; margin-top: 8px; }
.msg.ok { color: var(--ok); } .msg.bad { color: var(--bad); }

/* toast */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(30px); background: var(--bg3); border: 1px solid var(--line); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; transition: .25s; z-index: 300; pointer-events: none; box-shadow: var(--shadow); }
#toast.on { opacity: 1; transform: translateX(-50%); }

/* quick search */
.qs { position: fixed; inset: 0; z-index: 120; background: rgba(5,7,11,.7); backdrop-filter: blur(6px); display: flex; justify-content: center; padding-top: 10vh; }
.qs .box { width: min(760px, 94vw); background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.qs input { border: 0; border-bottom: 1px solid var(--line); background: none; padding: 18px 20px; font-size: 19px; outline: none; }
.qs .res { overflow: auto; padding: 8px; }
.qs .it { display: grid; grid-template-columns: 112px 1fr auto; gap: 14px; align-items: center; padding: 7px; border-radius: 10px; cursor: pointer; }
.qs .it.sel, .qs .it:hover { background: var(--bg3); }
.qs .it img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 7px; background: var(--bg3); }
.qs .it .t { font-weight: 650; }
.qs .it .s { font-size: 12.5px; color: var(--faint); }
.qs .hint { padding: 9px 16px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line); display: flex; gap: 16px; }

/* ---------- player */
.player { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; align-items: center; justify-content: center; cursor: default; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.hide-ui { cursor: none; }
.player .ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; transition: opacity .3s; pointer-events: none; }
.player.hide-ui .ui { opacity: 0; }
.player .ui > * { pointer-events: auto; }
.player .ptop { padding: 18px 24px 40px; background: linear-gradient(180deg, rgba(0,0,0,.8), transparent); display: flex; align-items: center; gap: 14px; }
.player .ptop .tt { font-weight: 750; font-size: 19px; }
.player .ptop .st { color: rgba(255,255,255,.65); font-size: 13.5px; }
.player .pbot { padding: 50px 24px 16px; background: linear-gradient(0deg, rgba(0,0,0,.9), transparent); }
.pbtn { background: none; border: 0; color: #fff; padding: 7px; border-radius: 9px; display: grid; place-items: center; opacity: .9; }
.pbtn:hover { background: rgba(255,255,255,.12); opacity: 1; }
.pbtn svg { width: 26px; height: 26px; }
.pbtn.big svg { width: 34px; height: 34px; }
.ctrls { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ctrls .time { font-variant-numeric: tabular-nums; font-size: 14px; color: rgba(255,255,255,.85); margin: 0 10px; white-space: nowrap; }
.timeline { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.timeline .rail { position: relative; width: 100%; height: 5px; background: rgba(255,255,255,.22); border-radius: 4px; transition: height .15s; }
.timeline:hover .rail { height: 8px; }
.timeline .buf { position: absolute; top: 0; bottom: 0; background: rgba(255,255,255,.32); border-radius: 4px; }
.timeline .played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--acc); border-radius: 4px; }
.timeline .knob { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px rgba(245,165,36,.25); }
.timeline .tip { position: absolute; bottom: 26px; transform: translateX(-50%); background: rgba(0,0,0,.85); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 4px; text-align: center; font-size: 12.5px; font-weight: 700; pointer-events: none; display: none; }
.timeline:hover .tip { display: block; }
.timeline .tip .frame { width: 160px; height: 90px; background-repeat: no-repeat; border-radius: 5px; margin-bottom: 3px; display: none; }
.vol { display: flex; align-items: center; gap: 2px; }
.vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--acc); }
.vol:hover input, .vol input:focus { width: 90px; opacity: 1; }
.pmenu { position: absolute; right: 24px; bottom: 86px; background: rgba(18,23,34,.96); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; min-width: 260px; max-height: 60vh; overflow: auto; padding: 8px; backdrop-filter: blur(10px); }
.pmenu h4 { margin: 8px 10px 4px; font-size: 11.5px; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); }
.pmenu button { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; background: none; border: 0; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.pmenu button:hover { background: rgba(255,255,255,.08); }
.pmenu button.on::before { content: "✓"; color: var(--acc); font-weight: 900; }
.pmenu button:not(.on)::before { content: ""; width: 10px; }
.center-msg { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.spinner { width: 58px; height: 58px; border-radius: 50%; border: 4px solid rgba(255,255,255,.15); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.osd { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.6); padding: 14px 22px; border-radius: 14px; font-size: 22px; font-weight: 800; opacity: 0; transition: opacity .25s; pointer-events: none; }
.osd.on { opacity: 1; }
.perr { background: rgba(20,10,12,.92); border: 1px solid rgba(255,93,108,.4); padding: 20px 24px; border-radius: 14px; max-width: 520px; text-align: center; pointer-events: auto; }
.upnext { position: absolute; right: 28px; bottom: 110px; width: 340px; background: rgba(18,23,34,.95); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.upnext img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.upnext .b { padding: 12px 14px; }
.upnext .ring { height: 4px; background: var(--acc); transition: width 1s linear; }
.player .modechip { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .5px; }
.player video::cue { background: rgba(0,0,0,.55); font-size: 1.05em; }
.subs-overlay { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; pointer-events: none; transition: bottom .3s; }
.player:not(.hide-ui) .subs-overlay { bottom: 18%; }
.subs-overlay span { display: inline-block; background: rgba(0,0,0,.62); padding: 4px 12px; border-radius: 6px; font-size: clamp(16px, 2.3vw, 30px); line-height: 1.35; font-weight: 600; text-shadow: 0 1px 3px #000; white-space: pre-line; }
.tapzone { position: absolute; top: 15%; bottom: 25%; width: 33%; }
.tapzone.l { left: 0; } .tapzone.r { right: 0; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at top, #1b2233, var(--bg) 60%); }
.login form { width: min(380px, 92vw); background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.login input, .login select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin: 6px 0 14px; outline: none; }
.login input:focus { border-color: var(--acc); }

@media (max-width: 860px) {
  header.top { padding: 8px 14px; gap: 10px; flex-wrap: wrap; }
  .logo small { display: none; }
  nav.main { order: 3; width: 100%; }
  .search input, .search input:focus { width: 150px; }
  .page, .row-head { padding-left: 14px; padding-right: 14px; }
  .strip { padding-left: 14px; padding-right: 14px; }
  :root { --card-w: 168px; }
  .hero .info, .detail-hero .info { left: 14px; padding-left: 14px; right: 14px; }
  .ep { grid-template-columns: 120px 1fr; }
  .ep .n, .ep > :last-child { display: none; }
  .phase { grid-template-columns: 100px 1fr; }
  .phase .num { grid-column: 2; text-align: left; }
  .banner { margin: 10px 14px 0; }
  .filters { position: static; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 14px; padding: 6px 14px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chips { flex-wrap: nowrap; }
  .filters > * { flex: none; }
  .count-line { margin-left: 4px; white-space: nowrap; }
  .search { flex: 1; } .search input, .search input:focus { width: 100%; }
  .hide-m { display: none !important; }
  .upnext { width: 260px; right: 12px; }
}
