/* player.css — the VOD player overlay (ten-foot look) plus the panels shared with live fullscreen. */
.player { position: absolute; inset: 0; background: #000; z-index: 30; }
.stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage[data-aspect="stretch"] video { object-fit: fill; }
.stage[data-aspect="zoom"] video { object-fit: cover; }
.stage[data-aspect="16:9"] video { width: auto; height: 100%; aspect-ratio: 16 / 9; max-width: 100%; object-fit: fill; }
.stage[data-aspect="4:3"] video { width: auto; height: 100%; aspect-ratio: 4 / 3; max-width: 100%; object-fit: fill; }
.player .loading { position: absolute; inset: 0; background: var(--bg-root); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 2; font-size: 14px; color: var(--text-2); text-align: center; padding: 0 20px; }
.player .loading.soft { background: rgba(8,8,8,0.35); }
.player .lsub { font-size: 13px; }
.controls { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; pointer-events: none; transition: opacity 180ms; }
.controls.show { opacity: 1; pointer-events: auto; }
.controls .grad-top, .controls .grad-bottom { pointer-events: none; }
.top-bar { position: relative; display: flex; align-items: center; gap: 12px; padding: max(var(--safe-top), 24px) max(var(--safe-right), 24px) 0 calc(max(var(--safe-left), 8px) + 16px); }
.ptitle { flex: 1; min-width: 0; text-align: center; font: 600 15px var(--font-ui); color: #fff; }
.bottom { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0 max(var(--safe-right), 24px) calc(var(--safe-bottom) + 20px) calc(max(var(--safe-left), 8px) + 16px); }
.panel-host { display: flex; justify-content: flex-end; }
.seek-row { display: flex; align-items: center; gap: 12px; }
.time { font: 400 12px var(--font-player); color: rgba(255,255,255,0.8); min-width: 40px; font-variant-numeric: tabular-nums; }
.time:last-child { text-align: right; }
.seek { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 10px; border: 1px solid transparent; }
.seek .lead { color: rgba(255,255,255,0.4); }
.seek .hit { flex: 1; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek .track { position: relative; width: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.22); transition: height 120ms; }
.seek .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 2px; }
.seek .thumb { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: translate(-50%, -50%); transition: width 120ms, height 120ms; }
.seek.hot .track { height: 8px; background: rgba(255,255,255,0.38); }
.seek.hot .thumb { width: 22px; height: 22px; border: 3px solid var(--accent); background: #fff; box-shadow: 0 0 18px var(--accent); }
.actions { flex-wrap: nowrap; }
/* panels (track / aspect / epg) */
.panel { background: rgba(12,12,19,0.96); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; overflow: hidden; width: 100%; max-width: 460px; }
.panel.aspect { max-width: 520px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.panel.aspect .phead { padding: 0; border: 0; }
.panel.epg { max-width: 520px; }
.phead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.phead b { font: 700 15px var(--font-display); letter-spacing: -0.1px; color: #fff; }
.phead .cur { font: 400 12px var(--font-player); color: rgba(255,255,255,0.55); margin-top: 2px; }
.pclose { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.08); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.pclose.hot { background: rgba(255,255,255,0.22); }
.plist { max-height: 240px; padding: 4px 0; }
.prow { display: flex; align-items: center; gap: 10px; padding: 11px 14px; width: 100%; text-align: left; font: 400 14px var(--font-player); color: #fff; }
.prow .chk { width: 18px; display: inline-flex; color: var(--accent); flex: none; }
.prow .lbl { flex: 1; min-width: 0; }
.prow .pmeta { font: 400 11px var(--font-player); color: rgba(255,255,255,0.45); letter-spacing: 0.3px; flex: none; }
.prow.sel { background: rgba(var(--accent-rgb),0.12); }
.prow.dim { opacity: 0.5; }
.prow.hot { background: #fff; color: var(--player-fg); font-weight: 600; } .prow.hot .chk { color: var(--player-fg); } .prow.hot .pmeta { color: rgba(0,0,0,0.55); }
.pempty { padding: 18px 14px; font: 400 13px var(--font-player); color: rgba(255,255,255,0.5); }
.enow { padding: 12px 14px 14px; }
.onnow { background: var(--accent); padding: 3px 8px; border-radius: 5px; font: 700 10px var(--font-player); color: var(--on-solid); letter-spacing: 0.8px; }
.enow .etime { font: 400 12px var(--font-player); color: rgba(255,255,255,0.6); }
.enow-title { font: 700 17px var(--font-display); letter-spacing: -0.2px; color: #fff; }
.enow-desc { font: 400 12px var(--font-player); color: rgba(255,255,255,0.6); line-height: 18px; margin-top: 6px; }
.coming { padding: 4px 14px 6px; font: 700 10px var(--font-player); color: rgba(255,255,255,0.4); letter-spacing: 1.2px; }
.erow { display: flex; gap: 12px; padding: 8px 14px; font: 400 13px var(--font-player); color: rgba(255,255,255,0.88); }
.erow .etime { width: 46px; flex: none; font-size: 12px; color: rgba(255,255,255,0.55); }
/* next episode */
.next-ep { position: absolute; right: 16px; bottom: calc(var(--safe-bottom) + 16px); width: 300px; border-radius: 14px; border: 1px solid rgba(var(--accent-rgb),0.4); padding: 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 0 28px rgba(var(--accent-rgb),0.5); background: linear-gradient(rgba(20,20,20,0.98), rgba(8,8,8,0.98)); z-index: 6; }
.ne-label { font: 800 10px var(--font-ui); color: var(--accent); letter-spacing: 1.2px; }
.ne-title { font: 700 14px var(--font-ui); line-height: 18px; }
.ne-count { display: flex; align-items: center; gap: 4px; margin-top: 4px; font: 700 13px var(--font-ui); color: var(--accent); letter-spacing: 0.3px; }
.ne-btns { display: flex; gap: 8px; margin-top: 8px; }
.ne-btns button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 9px 12px; border-radius: 10px; font: 600 13px var(--font-ui); }
.ne-cancel { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); }
.ne-play { background: linear-gradient(90deg, #FF8C1A, #FF5500); border: 1px solid var(--accent); color: #fff; font-weight: 700; }
.ne-play.hot { box-shadow: 0 0 16px rgba(var(--accent-rgb),0.8); }
/* error */
.perror { position: absolute; inset: 0; background: var(--bg-root); z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px; text-align: center; }
.ering { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(255,59,59,0.4); background: rgba(255,59,59,0.08); display: inline-flex; align-items: center; justify-content: center; color: var(--error); }
.perror h3 { margin: 0; font: 700 20px var(--font-ui); }
.perror p { margin: 0; font: 400 13px var(--font-ui); color: var(--text-2); line-height: 18px; }
.perror .reason { max-width: 520px; }

/* tap-to-play (iOS would not start sound without a gesture) */
.tap-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%; background: var(--accent); color: var(--on-solid); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(var(--accent-rgb),0.8); z-index: 8; }
.tap-play .ico { font-size: 44px; margin-left: 6px; }
.tap-play.hot { background: #fff; }
.live-status .tap-play { position: static; transform: none; }

/* embedded subtitles (VTTCues on the inline video): readable on any picture, above the control bar */
.player video::cue { background: rgba(0,0,0,0.65); color: #fff; font: 600 20px/1.3 var(--font-ui); text-shadow: 0 1px 2px #000; }
.player video::cue(i) { font-style: italic; } .player video::cue(b) { font-weight: 800; }
/* our own subtitle rendering (TextTracks stay hidden; the player draws the active cues every 200 ms) */
.player .subs { position: absolute; left: 8%; right: 8%; bottom: 6%; z-index: 2; text-align: center; pointer-events: none; transition: bottom 180ms; line-height: 1.35; }
.player .controls.show ~ .subs, .player:has(.controls.show) .subs { bottom: 19%; }
.player .subs span { display: inline; background: rgba(0,0,0,0.66); color: #fff; font: 600 20px var(--font-ui); padding: 2px 8px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; text-shadow: 0 1px 2px #000; }
.player .subs i { font-style: italic; } .player .subs b { font-weight: 800; }
