/* MoozLab — one stylesheet for the whole site (public + admin base). */
:root {
  --accent-h: 230;
  --bg: #0b0d12;
  --bg-2: #10131a;
  --panel: #141821;
  --panel-2: #1a1f2a;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #e8ebf2;
  --muted: #9aa3b5;
  --dim: #6b7486;
  --accent: hsl(var(--accent-h) 92% 68%);
  --accent-2: hsl(calc(var(--accent-h) + 40) 85% 70%);
  --accent-soft: hsl(var(--accent-h) 90% 65% / .14);
  --good: #46d39a;
  --warn: #ffb547;
  --bad: #ff6b6b;
  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .65);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
p a, .lede a, .note a { color: var(--accent); }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: hsl(var(--accent-h) 90% 60% / .35); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
.small { font-size: 13px; }
.pad { padding: 16px 18px; margin: 0; }
[hidden] { display: none !important; }
kbd { font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel-2); color: var(--text); }
mark { background: hsl(var(--accent-h) 90% 60% / .3); color: #fff; border-radius: 3px; padding: 0 1px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11, 13, 18, .78); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1480px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; font-size: 17px; }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.logo-mark { width: 28px; height: 28px; }
.top-search { margin-left: auto; position: relative; display: flex; align-items: center; width: min(420px, 45vw); }
.top-search svg { position: absolute; left: 12px; color: var(--dim); }
.top-search input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 0 40px 0 36px; font: inherit; font-size: 14px; transition: border-color .15s, background .15s; }
.top-search input:focus { outline: none; border-color: hsl(var(--accent-h) 80% 60% / .6); background: var(--panel-2); }
.top-search kbd { position: absolute; right: 10px; }
.page-home .top-search { visibility: hidden; }

/* ---------- buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; }
.btn svg { font-size: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b0d12; box-shadow: 0 8px 24px -10px hsl(var(--accent-h) 90% 60% / .7); }
.btn-primary:hover { color: #0b0d12; filter: brightness(1.06); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-danger { background: transparent; border-color: rgba(255, 107, 107, .45); color: var(--bad); }
.btn-danger:hover { background: rgba(255, 107, 107, .1); color: var(--bad); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pill-accent { background: var(--accent-soft); border-color: hsl(var(--accent-h) 90% 65% / .35); color: var(--accent); }
.pill-dim { opacity: .6; }

/* ---------- layout helpers ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 12px; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 750; }
.lede { font-size: 17px; color: var(--muted); max-width: 760px; margin: 0 0 22px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 8px 0 16px; font-weight: 700; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.crumbs a:hover { color: var(--text); }
.crumbs span:not(:last-child) { color: var(--dim); }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 380px at 15% -10%, hsl(230 90% 60% / .22), transparent 60%),
  radial-gradient(700px 320px at 90% 0%, hsl(285 85% 62% / .18), transparent 60%), var(--bg); }
.hero-in { max-width: 960px; margin: 0 auto; padding: 72px 24px 56px; text-align: center; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero-search { position: relative; max-width: 680px; margin: 30px auto 0; display: flex; align-items: center; }
.hero-search svg { position: absolute; left: 20px; font-size: 20px; color: var(--muted); }
.hero-search input { width: 100%; height: 58px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(20, 24, 33, .85); color: var(--text); font: inherit; font-size: 17px; padding: 0 20px 0 54px; box-shadow: var(--shadow); }
.hero-search input:focus { outline: none; border-color: hsl(var(--accent-h) 80% 65% / .7); box-shadow: 0 0 0 4px hsl(var(--accent-h) 90% 60% / .15), var(--shadow); }
.results { max-width: 680px; margin: 12px auto 0; text-align: left; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; max-height: 60vh; overflow: auto; box-shadow: var(--shadow); }
.res { border-bottom: 1px solid var(--line); padding: 6px; }
.res:last-child { border-bottom: 0; }
.res a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; }
.res a:hover, .res a.kb { background: rgba(255, 255, 255, .05); }
.res-main b { font-weight: 650; }
.res-ch { color: var(--muted); font-size: 14px; padding-left: 26px !important; }
.res-ch .mono { color: var(--accent); min-width: 58px; }
.continue-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cont { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.cont:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cont .pill { align-self: flex-start; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cgrid-featured { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.ccard { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s; }
.ccard:hover { transform: translateY(-3px); border-color: hsl(var(--accent-h) 80% 65% / .45); box-shadow: 0 24px 50px -24px hsl(var(--accent-h) 80% 50% / .5); }
.ccard-art { position: relative; aspect-ratio: 16 / 7; display: flex; align-items: flex-end; padding: 16px 18px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, hsl(var(--accent-h) 85% 58% / .95), transparent 60%), radial-gradient(120% 140% at 100% 100%, hsl(calc(var(--accent-h) + 28) 70% 45% / .85), transparent 55%), hsl(var(--accent-h) 35% 16%); }
.featured .ccard-art { aspect-ratio: 16 / 6; }
.ccard-art::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 14px); mix-blend-mode: overlay; }
.ccard-code { position: relative; z-index: 1; font-weight: 800; font-size: 26px; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .3); }
.ccard-glyph { position: absolute; right: 16px; top: 14px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); color: #fff; font-size: 18px; transition: transform .2s; }
.ccard:hover .ccard-glyph { transform: scale(1.1); }
.ccard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.ccard-body .pill { align-self: flex-start; margin-bottom: 4px; }
.ccard-body h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.ccard-body p { margin: 0; font-size: 13px; }

/* ---------- collection ---------- */
.chero { border-bottom: 1px solid var(--line); margin-bottom: 28px; background:
  radial-gradient(800px 300px at 0% 0%, hsl(var(--accent-h) 85% 58% / .22), transparent 65%),
  radial-gradient(600px 260px at 100% 0%, hsl(calc(var(--accent-h) + 50) 80% 60% / .14), transparent 60%); }
.chero-in { max-width: 1240px; margin: 0 auto; padding: 44px 24px 36px; }
.chero-stats { display: flex; flex-wrap: wrap; gap: 22px; color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.chero-stats b { color: var(--text); font-size: 18px; margin-right: 4px; }
.chero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lrows { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, background .15s, transform .15s; }
.lrow:hover { border-color: hsl(var(--accent-h) 80% 65% / .4); background: var(--panel-2); }
.lrow-num { font: 700 15px var(--mono); color: var(--dim); width: 28px; }
.lrow.finished .lrow-num { color: var(--good); }
.lrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lrow-title { font-weight: 650; font-size: 16px; }
.lrow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.lrow-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.lrow-progress { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.lrow:not(.started) .lrow-progress { visibility: hidden; }
.lrow-progress i, .cont .lrow-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; transform: scaleX(0); }
.lrow-play { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 17px; transition: background .15s, color .15s; }
.lrow:hover .lrow-play { background: var(--accent); color: #0b0d12; }

/* ---------- watch page ---------- */
.watch { max-width: 1680px; margin: 0 auto; padding: 22px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.theater .watch { grid-template-columns: minmax(0, 1fr); max-width: none; padding: 0 0 40px; }
.theater .player { border-radius: 0; max-height: calc(100vh - 60px); }
.theater .winfo, .theater .side { max-width: 1240px; margin: 0 auto; width: 100%; padding: 0 24px; }
.theater .side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.winfo { padding-top: 18px; }
.winfo h1 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 8px; }
.winfo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.winfo-row p { margin: 0; }
.winfo-actions { display: flex; gap: 8px; }
.note { margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm); background: hsl(40 100% 60% / .08); border: 1px solid hsl(40 100% 60% / .25); color: #ffd99a; font-size: 14px; }
.desc { margin-top: 16px; padding: 14px 18px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); }
.desc summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.desc p { margin: 10px 0 0; color: var(--muted); }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pn-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s; font-weight: 600; }
.pn-card:hover { border-color: var(--line-2); }
.pn-card small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.pn-card svg { font-size: 22px; color: var(--muted); }
.pn-next { justify-content: flex-end; text-align: right; }

.side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 82px; max-height: calc(100vh - 100px); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.side .panel:first-child { flex: 1 1 auto; }
.side .panel:nth-child(2) { flex: 0 1 auto; max-height: 34vh; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 18px 10px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-search { position: relative; margin: 0 12px 8px; display: flex; align-items: center; }
.panel-search svg { position: absolute; left: 10px; color: var(--dim); }
.panel-search input { width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); padding: 0 10px 0 32px; font: inherit; font-size: 13px; }
.panel-search input:focus { outline: none; border-color: hsl(var(--accent-h) 80% 60% / .55); }
.chs, .sibs { list-style: none; margin: 0; padding: 0 8px 8px; overflow: auto; overscroll-behavior: contain; }
.ch { position: relative; width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 10px 10px 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; transition: background .12s; }
.ch:hover { background: rgba(255, 255, 255, .045); }
.ch.on { background: var(--accent-soft); }
.ch-idx { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--mono); background: rgba(255, 255, 255, .06); color: var(--muted); }
.ch.on .ch-idx { background: var(--accent); color: #0b0d12; }
.ch.done:not(.on) .ch-idx { background: hsl(155 60% 50% / .18); color: var(--good); }
.ch-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.ch.on .ch-title { color: #fff; }
.ch-time { font: 12px var(--mono); color: var(--muted); }
.ch-bar { position: absolute; left: 48px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px; overflow: hidden; background: transparent; }
.ch.on .ch-bar { background: rgba(255, 255, 255, .08); }
.ch-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.ch:not(.on) .ch-bar i { opacity: 0; }
.chs li { position: relative; }
.ch-link { display: inline-flex; align-items: center; gap: 4px; margin: -6px 0 6px 48px; font-size: 12px; font-weight: 600; color: var(--accent); padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); }
.ch-link:hover { color: #fff; }
.ch-link svg { font-size: 11px; }
.sibs a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.sibs a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.sibs a.on { color: #fff; background: rgba(255, 255, 255, .06); font-weight: 600; }
.sib-n { font: 600 12px var(--mono); color: var(--dim); min-width: 20px; padding-top: 2px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #fff; color: #0b0d12; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; z-index: 100; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
dialog.keys { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 18px; padding: 26px 28px; max-width: 520px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog.keys::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
dialog.keys h2 { margin: 0 0 16px; font-size: 18px; }
dialog.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0 0 20px; font-size: 14px; }
dialog.keys dt { white-space: nowrap; }
dialog.keys dd { margin: 0; color: var(--muted); }

/* ---------- player ---------- */
.player { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; outline: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player.fs { border-radius: 0; aspect-ratio: auto; }
.player.idle { cursor: none; }
.p-shade { position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .35) 55%, transparent); pointer-events: none; transition: opacity .25s; }
.p-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 14px 8px; transition: opacity .25s, transform .25s; }
.player.idle .p-ui, .player.idle .p-shade { opacity: 0; transform: translateY(6px); pointer-events: none; }
.player.idle .p-shade { transform: none; }
.p-big { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(8, 10, 16, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); display: grid; place-items: center; cursor: pointer; font-size: 38px; transition: transform .2s, background .2s, opacity .2s; }
.p-big svg { margin-left: 5px; }
.p-big:hover { transform: scale(1.06); background: hsl(var(--accent-h) 90% 65% / .85); }
.player.playing .p-big, .player.scrubbing .p-big { opacity: 0; pointer-events: none; transform: scale(.9); }
.p-spinner { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .8s linear infinite; opacity: 0; pointer-events: none; transition: opacity .2s; }
.player.loading.playing .p-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.p-flash { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); background: rgba(0, 0, 0, .65); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-flash.on { animation: flash 1s ease forwards; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, 6px); } 15%, 70% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.p-resume { position: absolute; left: 16px; top: 16px; display: flex; align-items: center; gap: 12px; background: rgba(10, 12, 18, .82); backdrop-filter: blur(10px); border: 1px solid var(--line-2); padding: 8px 8px 8px 14px; border-radius: 999px; font-size: 13px; animation: rise .3s ease; }
.p-resume button { border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 12px; font-weight: 600; }
.p-resume button:hover { background: rgba(255, 255, 255, .2); }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }
.p-upnext { position: absolute; right: 20px; bottom: 90px; width: min(340px, calc(100% - 40px)); background: rgba(10, 12, 18, .9); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; animation: rise .3s ease; }
.p-upnext small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; }
.p-upnext-a { display: flex; gap: 8px; margin-top: 8px; }
.p-upnext-n { color: var(--muted); font-size: 12px; }

.p-track { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.p-segs { display: flex; gap: 3px; width: 100%; height: 4px; transition: height .12s; }
.p-track:hover .p-segs, .player.scrubbing .p-segs { height: 6px; }
.p-seg { position: relative; height: 100%; background: rgba(255, 255, 255, .22); border-radius: 2px; overflow: hidden; transition: transform .12s; min-width: 2px; }
.p-seg.hot { transform: scaleY(1.5); }
.p-seg i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); }
.p-seg .buf { background: rgba(255, 255, 255, .28); }
.p-seg .fill { background: var(--accent); }
.p-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px hsl(var(--accent-h) 90% 65% / .25); transform: scale(0); transition: transform .12s; pointer-events: none; }
.p-track:hover .p-knob, .player.scrubbing .p-knob, .p-track:focus-visible .p-knob { transform: scale(1); }
.p-hover { position: absolute; bottom: 26px; transform: translateX(-50%); background: rgba(10, 12, 18, .92); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 10px; text-align: center; pointer-events: none; opacity: 0; transition: opacity .12s; max-width: 280px; white-space: nowrap; }
.p-track.hovering .p-hover { opacity: 1; }
.p-hover-t { font: 700 13px var(--mono); }
.p-hover-c { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.p-hover-c:empty { display: none; }
.p-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.p-left, .p-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.p-left { flex: 1; }
.pc { position: relative; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 22px; transition: background .12s; flex: none; }
.pc:hover { background: rgba(255, 255, 255, .12); }
.pc.on { color: var(--accent); }
.pc[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%); background: rgba(10, 12, 18, .92); border: 1px solid var(--line-2); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.p-right .pc[data-tip]:last-child:hover::after { left: auto; right: 0; transform: none; }
.p-play { font-size: 26px; }
.p-vol { display: flex; align-items: center; }
.p-volr { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: #fff; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255, 255, 255, .25) var(--p, 100%)); cursor: pointer; }
.p-volr::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.p-volr::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.p-vol:hover .p-volr, .p-volr:focus { width: 80px; opacity: 1; margin: 0 8px 0 2px; }
.p-time { font: 600 13px var(--mono); color: #fff; padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-chname { min-width: 0; border: 0; background: transparent; color: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; padding: 4px 8px; border-radius: 6px; max-width: 360px; }
.p-chname::before { content: "•"; margin-right: 8px; color: var(--dim); }
.p-chname:hover { background: rgba(255, 255, 255, .1); }
.p-speed { width: auto; min-width: 44px; padding: 0 8px; font-size: 13px; }
.p-speed-wrap { position: relative; }
.p-menu { position: absolute; bottom: 48px; right: 0; background: rgba(14, 17, 24, .96); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 150px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.p-menu-h { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 6px 10px; font-weight: 700; }
.p-menu button { border: 0; background: transparent; color: #fff; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.p-menu button:hover { background: rgba(255, 255, 255, .08); }
.p-menu button.on { color: var(--accent); font-weight: 700; }
.p-menu button.on::after { content: "✓"; float: right; }
.player.errored .p-big { display: none; }
.noscript { position: absolute; inset: auto 0 0; padding: 12px; background: rgba(0, 0, 0, .7); margin: 0; }
video::cue { background: rgba(0, 0, 0, .7); font-family: var(--font); }

/* ---------- empty / footer ---------- */
.empty { text-align: center; padding-top: 90px; }
.empty .lede { margin: 0 auto 24px; }
.foot { border-top: 1px solid var(--line); margin-top: 30px; }
.foot-in { max-width: 1480px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 13px; }
.foot-in > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.foot-in .logo-mark { width: 18px; height: 18px; }
.foot-links { display: flex; gap: 18px; }
.foot-links a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; }
  .side .panel:first-child .chs { max-height: 60vh; }
  .theater .side { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-in { padding: 0 14px; gap: 12px; }
  .top-search kbd { display: none; }
  .watch { padding: 0 0 30px; gap: 12px; }
  .player { border-radius: 0; }
  .winfo, .side { padding: 0 14px; }
  .winfo-actions .btn span { display: none; }
  .wrap, .chero-in { padding-left: 14px; padding-right: 14px; }
  .hero-in { padding: 48px 16px 36px; }
  .p-back, .p-fwd, .p-pip, .p-theater, .p-vol, .p-chname { display: none !important; }
  .pc { width: 36px; height: 36px; font-size: 20px; }
  .p-time { font-size: 12px; padding: 0 4px; }
  .pn { grid-template-columns: 1fr; }
  .lrow { gap: 12px; padding: 12px 14px; }
  .lrow-play { display: none; }
  .cgrid-featured { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
