:root {
	--vx-bg: #ffffff;
	--vx-surface: #f5f6fa;
	--vx-surface-2: #e9ebf2;
	--vx-border: #e1e3ec;
	--vx-text: #15151c;
	--vx-muted: #666a7a;
	--vx-accent: #FF244C;
	--vx-accent-2: #FF5C7A;
	--vx-radius: 12px;
	--vx-max: 640px;
	--vx-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.vnex {
	margin: 0; background: var(--vx-bg); color: var(--vx-text);
	font-family: var(--vx-font); font-size: 15px; line-height: 1.5;
	-webkit-font-smoothing: antialiased; padding-bottom: 90px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Header ---------- */

.vnex-header {
	position: sticky; top: 0; z-index: 40; height: 56px;
	display: flex; align-items: center; justify-content: space-between;
	padding: 0 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--vx-border);
}
.vnex-header__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vnex-header__right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
/* Language picker (viewer's language is auto-detected; this overrides it). */
.vnex-lang { display: inline-flex; align-items: center; gap: 4px; color: var(--vx-muted); font-size: 13px; }
.vnex-lang select {
	max-width: 118px; background: var(--vx-surface-2); color: var(--vx-text); border: 1px solid var(--vx-border);
	border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; outline: none; cursor: pointer;
}
.vnex-lang select:focus { border-color: var(--vx-accent); }
@media (max-width: 420px) { .vnex-lang select { max-width: 84px; padding: 6px 6px; } }
html[dir="rtl"] .vnex-back svg { transform: scaleX(-1); }
.vnex-back {
	display: inline-flex; align-items: center; gap: 4px; padding: 6px 4px; margin-left: -4px;
	color: var(--vx-text); font-size: 14px; font-weight: 500; background: transparent; border-radius: 8px;
	transition: color .2s ease, transform .2s ease;
}
.vnex-back svg { flex: 0 0 auto; }
.vnex-back:hover, .vnex-back:focus-visible { color: var(--vx-accent); outline: none; }
.vnex-back:hover svg { transform: translateX(-2px); transition: transform .2s ease; }
/* Without a logo next to it, the "Trang chủ" label fits on phones too. */
.vnex-back { font-size: 15px; }
.vnex-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.vnex-logo img { height: 34px; width: auto; }
.vnex-logo__mark {
	width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
	background: var(--vx-accent); color: #fff; font-size: 12px; padding-left: 2px;
}

/* ---------- Ad banner on the top edge of the player ---------- */
.vnex-player__ad {
	position: absolute; top: 8px; left: 8px; right: 8px; z-index: 3;
	display: flex; justify-content: center; pointer-events: none;
}
.vnex-player__ad-box { position: relative; display: block; width: 100%; max-width: 420px; pointer-events: auto; }
.vnex-player__ad .moviceleb-ad-container {
	margin: 0; padding: 4px; width: 100%; max-width: 100%; max-height: 120px; overflow: hidden;
	background: rgba(0, 0, 0, .45); border-radius: 10px; backdrop-filter: blur(4px);
}
.vnex-player__ad .moviceleb-ad-label { display: none; }
.vnex-player__ad .moviceleb-ad-inner { min-height: 0; display: block; }
.vnex-player__ad .moviceleb-ad-inner > * { width: 100%; min-height: 50px; }
/* Invisible until the ad network has actually drawn something; gone when it never does.
   (opacity, not visibility: MGID refuses to draw into a hidden box.) */
.vnex-player__ad.is-pending { opacity: 0; pointer-events: none; }
.vnex-player__ad.is-empty { display: none; }
.vnex-player__ad .moviceleb-ad-inner:empty + *, .vnex-player__ad .moviceleb-ad-container:has(.moviceleb-ad-inner:empty) { display: none; }
.vnex-player__ad-close {
	position: absolute; top: -8px; right: -8px; z-index: 4; width: 26px; height: 26px; border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, .8); color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.vnex-player__ad.is-closed,
.vnex-player.is-locked .vnex-player__ad,
.vnex-player.is-ended .vnex-player__ad,
.vnex-player:has(.vnex-overlay.is-visible) .vnex-player__ad { display: none; }
@media (min-width: 700px) { .vnex-player__ad { top: 12px; } .vnex-player__ad .moviceleb-ad-container { max-height: 140px; } }

/* ---------- Pre-roll ad gate ---------- */
.vnex-gate {
	position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	padding: 12px; background: rgba(0, 0, 0, .94);
}
.vnex-gate.is-pending { opacity: 0; pointer-events: none; }
.vnex-gate.is-empty, .vnex-gate.is-done { display: none; }
.vnex-gate__top { order: 2; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 420px; min-height: 40px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.vnex-gate__ad { order: 1; }
.vnex-gate__label { color: var(--vx-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.vnex-gate__count { color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vnex-gate__skip {
	margin-left: auto; padding: 9px 16px; border: 0; border-radius: 999px;
	background: var(--vx-accent); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 18px rgba(255, 36, 76, .35);
}
.vnex-gate__skip[hidden] { display: none; }
.vnex-gate__ad { width: 100%; max-width: 420px; max-height: calc(100% - 60px); overflow: auto; }
.vnex-gate__ad .moviceleb-ad-container { margin: 0; padding: 6px; width: 100%; max-width: 100%; background: rgba(255, 255, 255, .05); border-radius: 12px; }
.vnex-gate__ad .moviceleb-ad-label { display: none; }
.vnex-gate__ad .moviceleb-ad-inner { min-height: 0; display: block; }
.vnex-gate__ad .moviceleb-ad-inner > * { width: 100%; min-height: 50px; }

/* ---------- Next-episode end screen ---------- */
.vnex-next {
	position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, .85) 40%); opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.vnex-next.is-visible { opacity: 1; pointer-events: auto; }
.vnex-next[hidden] { display: none; }
.vnex-next__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 360px; }
.vnex-next__title { margin: 0; font-size: clamp(17px, 4.8vw, 24px); font-weight: 800; line-height: 1.25; }
.vnex-next__count { margin: 0; color: #fff; font-size: 14px; font-weight: 600; }
.vnex-next__count[hidden] { display: none; }
.vnex-next__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vnex-next__actions .vnex-btn { margin: 0; }
.vnex-next__app { margin-top: 6px; background: none; border: 0; color: var(--vx-muted); font-size: 13px; cursor: pointer; text-decoration: underline; }
/* Ad between two episodes (slot 9e): only where the player is tall enough (portrait dramas); the row stays
   invisible until the network has drawn, so the buttons never jump. */
.vnex-next__ad { display: none; width: 100%; max-width: 336px; margin-top: 6px; }
body.vnex-portrait .vnex-next__ad { display: block; }
.vnex-next__ad.is-pending { opacity: 0; }
.vnex-next__ad.is-empty { display: none !important; }
.vnex-next__ad .moviceleb-ad-container { margin: 0; padding: 4px; width: 100%; max-height: 300px; overflow: hidden; background: rgba(255, 255, 255, .96); border-radius: 12px; }
.vnex-next__ad .moviceleb-ad-label { display: none; }
.vnex-next__ad .moviceleb-ad-inner { min-height: 0; display: block; }
.vnex-next__inner { max-height: 100%; overflow-y: auto; }

/* ---------- Prev / next episode under the player ---------- */
.vnex-epnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px 0; }
.vnex-epnav__btn {
	display: inline-flex; align-items: center; gap: 4px; padding: 9px 14px; border-radius: 999px;
	background: var(--vx-surface); border: 1px solid var(--vx-border); color: var(--vx-text); font-size: 13px; font-weight: 700;
}
.vnex-epnav__btn:hover { border-color: var(--vx-accent); }
.vnex-epnav__btn--next { background: var(--vx-accent); border-color: var(--vx-accent); }
@media (min-width: 900px) { .vnex-epnav { padding-left: 0; padding-right: 0; } .vnex-col-media .vnex-episodes { padding-left: 0; padding-right: 0; } }

/* ---------- Pause ad (inside the player, while paused) ---------- */
.vnex-player__pausead {
	/* Lower part of the player only: the big Play button in the middle stays free, so a tap to resume never lands on the ad. */
	position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); z-index: 3;
	width: calc(100% - 24px); max-width: 420px; max-height: 42%; display: flex; justify-content: center; align-items: flex-end; pointer-events: none;
}
.vnex-player__pausead:not(.is-armed) .vnex-player__ad-box { pointer-events: none; } /* ignores taps for the first moment after it appears */
.vnex-player__pausead[hidden] { display: none; }
.vnex-player__pausead.is-pending { opacity: 0; }
.vnex-player__pausead.is-empty { display: none; }
.vnex-player__pausead .vnex-player__ad-box { pointer-events: auto; width: 100%; }
.vnex-player__pausead .moviceleb-ad-container { margin: 0; padding: 6px; width: 100%; max-height: none; overflow: hidden; background: rgba(0, 0, 0, .7); border-radius: 12px; }
.vnex-player__pausead .moviceleb-ad-label { display: none; }
.vnex-player__pausead .moviceleb-ad-inner { min-height: 0; display: block; }
.vnex-player__pausead .moviceleb-ad-inner > * { width: 100%; min-height: 50px; }
.vnex-player.is-ended .vnex-player__pausead, .vnex-player.is-locked .vnex-player__pausead { display: none; }

/* ---------- Anchor ad at the bottom of the screen ---------- */
.vnex-anchor {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: flex; justify-content: center;
	padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--vx-border); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
}
.vnex-anchor.is-pending { opacity: 0; pointer-events: none; }
.vnex-anchor.is-empty, .vnex-anchor.is-closed, body.vnex-sticky-on .vnex-anchor { display: none; }
.vnex-anchor .moviceleb-ad-container { margin: 0; padding: 0; width: 100%; max-width: 728px; max-height: 110px; overflow: hidden; background: none; }
.vnex-anchor .moviceleb-ad-label { display: none; }
.vnex-anchor .moviceleb-ad-inner { min-height: 0; display: block; }
.vnex-anchor .moviceleb-ad-inner > * { width: 100%; min-height: 50px; }
.vnex-anchor__close {
	position: absolute; top: -14px; right: 8px; width: 28px; height: 28px; border: 1px solid var(--vx-border); border-radius: 50%;
	background: #fff; color: var(--vx-text); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
body.vnex-anchor-on .vnex-main { padding-bottom: 80px; }

/* ---------- Buttons ---------- */

.vnex-btn {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--vx-surface-2); color: var(--vx-text); font-weight: 700; font-size: 15px; letter-spacing: .02em;
	transition: transform .15s ease, filter .15s ease;
}
.vnex-btn:active { transform: scale(.97); }
.vnex-btn--primary { background: linear-gradient(90deg, var(--vx-accent), var(--vx-accent-2)); box-shadow: 0 8px 24px rgba(255, 36, 76, .35); }
.vnex-btn--primary:hover { filter: brightness(1.08); }
.vnex-btn--small { padding: 8px 16px; font-size: 13px; background: var(--vx-accent); }
.vnex-btn--wide { width: 100%; max-width: 360px; }
.vnex-btn small { font-weight: 500; font-size: 12px; opacity: .85; }

/* ---------- Layout ---------- */

.vnex-main { max-width: var(--vx-max); margin: 0 auto; display: flex; flex-direction: column; }
/* Ad scripts (MGID / Aniview outstream) sometimes inject a player box as the first child of .vnex-main.
   The video and the episode list stay first; injected boxes go after both columns, full width. */
/* Single-column (phones): the injected box (MGID widget 2094437 = Aniview video card, placed by MGID "before div.vnex-col-media")
   shows BETWEEN the media column and the info column, i.e. right after the episode list / film info (24 Oct 2026). */
.vnex-main > :not(.vnex-col-media):not(.vnex-col-info) { order: 1; width: 100%; grid-column: 1 / -1; }
.vnex-col-info { order: 2; }
.vnex-main > script { display: none; }
@media (min-width: 700px) {
	.vnex-main { padding: 20px 0 0; }
	.vnex-player { border-radius: var(--vx-radius); }
}

/* ---------- Player ---------- */

.vnex-player {
	position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; overflow: hidden; outline: none;
}
.vnex-player__video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; cursor: pointer; }
/* Portrait films: 9:16 box, capped so the CTA stays within reach. */
.vnex-player.is-portrait { aspect-ratio: 9 / 16; max-height: min(78vh, calc(100vh - 230px)); min-height: 320px; width: auto; margin: 0 auto; max-width: 100%; } /* leaves room for the episode list under the video on desktop */
.vnex-player.is-portrait .vnex-player__video { object-fit: cover; }
/* Phones: the portrait player takes at most 60% of the screen height (width follows), so the ad above
   and the ad under the video stay in view instead of the video filling the whole screen. */
@media (max-width: 699px) {
	.vnex-player.is-portrait { width: auto; max-height: 60vh; max-width: 100%; margin: 0 auto; }
	.vnex-col-media { background: var(--vx-bg); }
}
.vnex-player:fullscreen { border-radius: 0; }

.vnex-player__big {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 66px; height: 66px; border: 0; border-radius: 50%; cursor: pointer; padding-left: 4px;
	background: var(--vx-accent); color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .6); transition: opacity .2s ease, transform .2s ease;
}
.vnex-player.is-playing .vnex-player__big,
.vnex-player.is-loading .vnex-player__big,
.vnex-player.is-locked .vnex-player__big,
.vnex-player.is-ended .vnex-player__big { opacity: 0; pointer-events: none; }

.vnex-player__spinner {
	position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
	border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%;
	animation: vnex-spin .8s linear infinite; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.vnex-player.is-loading .vnex-player__spinner { opacity: 1; }
@keyframes vnex-spin { to { transform: rotate(360deg); } }

.vnex-player__bar {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	display: flex; align-items: center; gap: 15px; padding: 26px 10px 8px;
	background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); transition: opacity .25s ease;
}
.vnex-player.is-idle .vnex-player__bar,
.vnex-player.is-locked .vnex-player__bar,
.vnex-player.is-ended .vnex-player__bar { opacity: 0; pointer-events: none; }
.vnex-player__btn {
	flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #fff;
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.vnex-player__btn:hover { background: rgba(255, 255, 255, .18); }
.vnex-player__btn[hidden] { display: none; }
.vnex-player__btn.is-on { color: var(--vx-accent); }
.vnex-i-pause, .vnex-i-muted { display: none; }
.vnex-player.is-playing .vnex-i-play { display: none; }
.vnex-player.is-playing .vnex-i-pause { display: block; }
.vnex-player.is-muted .vnex-i-sound { display: none; }
.vnex-player.is-muted .vnex-i-muted { display: block; }
.vnex-player__progress { flex: 1; height: 18px; position: relative; cursor: pointer; touch-action: none; }
.vnex-player__progress::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .25); }
.vnex-player__buffered, .vnex-player__played { position: absolute; left: 0; top: 7px; height: 4px; width: 0; border-radius: 999px; }
.vnex-player__buffered { background: rgba(255, 255, 255, .4); }
.vnex-player__played { background: var(--vx-accent); }
.vnex-player__time { flex: 0 0 auto; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Volume: speaker button + slider that slides open on hover (VOD style). */
.vnex-volume { display: flex; align-items: center; flex: 0 0 auto; }
.vnex-volume__slider {
	-webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; margin: 0;
	border-radius: 999px; cursor: pointer; outline: none;
	--vx-vol: 100%;
	background: linear-gradient(to right, var(--vx-accent) var(--vx-vol), rgba(255, 255, 255, .25) var(--vx-vol));
	transition: width .3s ease, opacity .3s ease, margin .3s ease;
}
.vnex-volume:hover .vnex-volume__slider,
.vnex-volume:focus-within .vnex-volume__slider { width: 84px; opacity: 1; margin-left: 4px; }
.vnex-volume__slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.vnex-volume__slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.vnex-volume__slider::-moz-range-track { background: transparent; }
/* Phones: no slider (hardware volume keys), bigger finger targets, tighter bar. */
@media (max-width: 768px), (hover: none) {
	.vnex-volume__slider { display: none; }
	.vnex-player__bar { gap: 12px; padding: 24px 8px 6px; }
	.vnex-player__btn { width: 44px; height: 44px; }
	.vnex-player__progress { height: 24px; min-width: 60px; }
	.vnex-player__progress::before, .vnex-player__buffered, .vnex-player__played { top: 10px; height: 3px; }
	.vnex-player__time { font-size: 11px; }
}

/* ---------- Overlay on the video ---------- */

.vnex-overlay {
	position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, .82) 35%, rgba(0, 0, 0, .82));
	opacity: 0; pointer-events: none; transition: opacity .3s ease; padding: 16px; text-align: center;
}
.vnex-overlay.is-visible { opacity: 1; pointer-events: auto; }
.vnex-overlay[hidden] { display: none; }
.vnex-overlay__inner { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.vnex-overlay__ep { color: var(--vx-muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.vnex-overlay__lock { font-size: 26px; line-height: 1; }
.vnex-overlay__title { margin: 2px 0 0; font-size: clamp(16px, 4.6vw, 22px); font-weight: 800; line-height: 1.25; }
.vnex-overlay__text { margin: 0 0 8px; color: var(--vx-muted); font-size: 13px; }
.vnex-overlay__note { margin: 6px 0 0; color: var(--vx-muted); font-size: 12px; }
.vnex-continue { display: flex; justify-content: center; margin: 12px 0 2px; text-decoration: none; }
@media (max-width: 400px) {
	.vnex-overlay__lock { font-size: 20px; }
	.vnex-overlay__text { margin-bottom: 4px; }
	.vnex-overlay .vnex-btn { padding: 10px 18px; font-size: 14px; }
}

/* ---------- Info ---------- */

.vnex-info { padding: 16px 16px 8px; }
.vnex-info__title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; }
.vnex-info__ep { margin-top: 4px; color: var(--vx-accent); font-weight: 700; }
.vnex-info__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; color: var(--vx-muted); font-size: 13px; }
.vnex-info__rating { color: var(--vx-text); font-weight: 700; }
.vnex-info__desc {
	margin: 10px 0 0; color: var(--vx-muted); font-size: 14px;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.vnex-inline-cta {
	display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
	margin-top: 14px; padding: 12px 16px; border: 1px solid var(--vx-accent); border-radius: var(--vx-radius);
	background: rgba(255, 36, 76, .1); color: var(--vx-accent); font-weight: 700; cursor: pointer;
}
.vnex-inline-cta[hidden] { display: none; }

/* ---------- Episodes ---------- */

.vnex-section-title { margin: 0 0 10px; font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--vx-muted); }
/* Episode list: right under the video, 30% smaller than the old chips; long lists scroll inside the box. */
.vnex-episodes { padding: 10px 16px 4px; }
.vnex-episodes .vnex-section-title { margin: 0 0 6px; font-size: 11px; }
.vnex-episodes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 196px; overflow: auto; padding-bottom: 2px; }
.vnex-ep {
	position: relative; display: flex; align-items: center; justify-content: center; height: 34px;
	border: 1px solid var(--vx-border); border-radius: 8px; background: var(--vx-surface);
	color: var(--vx-text); font-weight: 700; font-size: 12px; cursor: pointer;
}
.vnex-ep:hover { border-color: var(--vx-accent); }
.vnex-ep.is-current { background: var(--vx-accent); border-color: var(--vx-accent); color: #fff; }
.vnex-ep.is-locked { color: var(--vx-muted); }

/* ---------- Related ---------- */

.vnex-related { padding: 18px 16px 8px; }
.vnex-related__track { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
.vnex-related--quick { padding-top: 6px; }
.vnex-related--quick .vnex-related__track { grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.vnex-related--quick .vnex-card span { font-size: 11px; }
.vnex-card { min-width: 0; }
.vnex-card img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; width: 100%; }
.vnex-card span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.vnex-footer { padding: 20px 16px 10px; color: var(--vx-muted); font-size: 12px; text-align: center; }

/* ---------- Sticky bottom CTA ---------- */

.vnex-sticky {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
	border-top: 1px solid var(--vx-border); backdrop-filter: blur(10px);
	transform: translateY(100%); transition: transform .3s ease;
}
.vnex-sticky.is-visible { transform: none; }
.vnex-sticky[hidden] { display: none; }
.vnex-sticky__text { display: flex; flex-direction: column; min-width: 0; }
.vnex-sticky__text strong { font-size: 13px; }
.vnex-sticky__text span { color: var(--vx-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vnex-sticky .vnex-btn { flex: 0 0 auto; padding: 10px 18px; font-size: 13px; }
@media (min-width: 700px) {
	.vnex-sticky { left: 50%; right: auto; width: var(--vx-max); transform: translate(-50%, 100%); border-radius: 14px 14px 0 0; }
	.vnex-sticky.is-visible { transform: translate(-50%, 0); }
}

/* ---------- Bottom sheet & modal ---------- */

.vnex-sheet, .vnex-modal { position: fixed; inset: 0; z-index: 60; }
.vnex-sheet[hidden], .vnex-modal[hidden] { display: none; }
.vnex-sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
.vnex-sheet__panel {
	position: absolute; left: 0; right: 0; bottom: 0; max-height: 45vh; min-height: 35vh;
	display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
	padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--vx-surface);
	border-radius: 18px 18px 0 0; animation: vnex-up .3s ease;
}
@keyframes vnex-up { from { transform: translateY(100%); } }
@media (min-width: 700px) {
	.vnex-sheet__panel { left: 50%; right: auto; width: var(--vx-max); transform: translateX(-50%); }
}
.vnex-sheet__handle { width: 40px; height: 4px; border-radius: 999px; background: var(--vx-border); margin-bottom: 6px; }
.vnex-sheet__lock { font-size: 28px; }
.vnex-sheet__title { margin: 0; font-size: 20px; font-weight: 800; }
.vnex-sheet__text { margin: 0 0 8px; color: var(--vx-muted); font-size: 14px; }
.vnex-sheet__close { margin-top: 4px; background: none; border: 0; color: var(--vx-muted); font-size: 14px; cursor: pointer; }

.vnex-modal__panel {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(92vw, 380px);
	padding: 24px; border-radius: 16px; background: var(--vx-surface); text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.vnex-modal__panel h2 { margin: 0; font-size: 20px; }
.vnex-modal__panel p { margin: 0; color: var(--vx-muted); font-size: 14px; }
.vnex-modal__qr { background: #fff; padding: 12px; border-radius: 12px; margin: 8px 0; }
.vnex-modal__qr img, .vnex-modal__qr canvas { display: block; }
.vnex-modal__link a { color: var(--vx-accent); font-size: 12px; word-break: break-all; }

/* ---------- Layout per device ----------
   < 900px wide: one column (phones, portrait tablets).
   >= 900px (laptops, landscape tablets): video left, details right.
   Landscape phones: the same two columns squeezed to the viewport height. */

@media (min-width: 900px) {
	.vnex-main {
		display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start;
		max-width: 1240px; padding: 24px 24px 0;
	}
	body.vnex-portrait .vnex-main { grid-template-columns: auto minmax(380px, 560px); justify-content: center; }
	/* Two columns: injected boxes become a full-width row under both columns so the layout stays intact. */
	.vnex-main > :not(.vnex-col-media):not(.vnex-col-info) { order: 99; }
	.vnex-col-info { order: 0; }
	.vnex-col-media { position: sticky; top: 76px; }
	.vnex-col-media.is-static { position: static; }
	.vnex-player { border-radius: 14px; }
	.vnex-player.is-portrait { height: min(calc(100vh - 120px), 820px); }
	/* Ad moved out of the media column by fitMedia() (player.js): sits under the film info. */
	.vnex-col-info > .moviceleb-ad-container--watch-player { margin-top: 0; }
	.vnex-info { padding: 4px 0 8px; }
	.vnex-episodes, .vnex-related { padding-left: 0; padding-right: 0; }
	.vnex-related__track { grid-template-columns: repeat(4, 1fr); }
	.vnex-footer { text-align: left; padding-left: 0; }
	.vnex-sticky { left: auto; right: 24px; width: 400px; transform: translateY(100%); border-radius: 14px 14px 0 0; }
	body.vnex-portrait .vnex-sticky { right: max(24px, calc((100vw - 1100px) / 2 + 24px)); }
	.vnex-sticky.is-visible { transform: none; }
}

@media (orientation: landscape) and (max-height: 540px) and (min-width: 600px) and (max-width: 899px) {
	.vnex-header { height: 48px; }
	.vnex-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; max-width: none; padding: 12px 16px 0; }
	.vnex-main > :not(.vnex-col-media):not(.vnex-col-info) { order: 99; }
	.vnex-col-info { order: 0; }
	.vnex-col-media { position: sticky; top: 60px; }
	.vnex-player { border-radius: 12px; }
	.vnex-player.is-portrait { height: calc(100vh - 76px); max-height: none; width: auto; }
	.vnex-player:not(.is-portrait) { width: 56vw; }
	.vnex-info { padding: 0 0 8px; }
	.vnex-info__title { font-size: 18px; }
	.vnex-episodes, .vnex-related { padding-left: 0; padding-right: 0; }
	.vnex-sticky { left: auto; right: 16px; width: min(420px, 52vw); border-radius: 14px 14px 0 0; padding: 8px 14px; transform: translateY(100%); }
	.vnex-sticky.is-visible { transform: none; }
	.vnex-player__big { width: 54px; height: 54px; }
}

/* ---------- Ad blocks (template-parts/ad-block.php) ---------- */

.moviceleb-ad-container {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: 100%; max-width: 970px; margin: 28px auto 36px; padding: 10px 0 0;
	overflow: hidden; text-align: center;
}
.moviceleb-ad-label {
	display: block; align-self: flex-start; margin: 0 0 6px;
	color: var(--vx-muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.moviceleb-ad-inner { display: flex; justify-content: center; width: 100%; min-height: 90px; }
.moviceleb-ad-inner > * { max-width: 100%; }
.moviceleb-ad-inner:empty { min-height: 0; }
@media (max-width: 767px) {
	.moviceleb-ad-container { max-width: 100%; margin: 20px auto 26px; }
	.moviceleb-ad-inner { min-height: 50px; }
}

.vnex .moviceleb-ad-container { padding-left: 16px; padding-right: 16px; }
.vnex .moviceleb-ad-container--watch-top { margin: 0 auto 10px; padding-top: 6px; }
.vnex .moviceleb-ad-container--watch-player { margin: 10px auto 6px; }
.vnex .moviceleb-ad-container--watch-end { margin: 8px auto 12px; }
@media (max-width: 767px) { .vnex .moviceleb-ad--desktop { display: none !important; } }
@media (min-width: 768px) { .vnex .moviceleb-ad--mobile { display: none !important; } }
@media (min-width: 900px) {
	.vnex .moviceleb-ad-container--watch-top { margin: 0 auto 14px; }
}

/* muted autoplay: "tap for sound" */
.vnex-unmute { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center; gap: 6px;
	padding: 9px 16px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .72); color: #fff; font-weight: 800; font-size: 14px;
	cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); animation: vnex-pulse 1.8s ease-in-out infinite; }
.vnex-unmute[hidden] { display: none; }
.vnex-unmute { white-space: nowrap; }
.vnex-player:not(.is-playing) .vnex-unmute, .vnex-player.is-ended .vnex-unmute { display: none; }
@keyframes vnex-pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.06); } }

/* Direct theme ad slots above / below the standalone /watch/ video player. */
.vnex-watch-placement { width: 100%; max-width: 100%; box-sizing: border-box; margin: 14px auto; text-align: center; clear: both; overflow-wrap: anywhere; }
.vnex-watch-placement .moviceleb-ad-container { max-width: 100%; margin-left: auto; margin-right: auto; }
.vnex-watch-placement iframe, .vnex-watch-placement img { max-width: 100%; }
.vnex-watch-placement:empty { display: none; }
@media (max-width: 699px) { .vnex-watch-placement { margin: 10px auto; } }

/* /watch/ footer banner and dismissible top-right floating ad (10c/10d). */
.vnex-watch-placement--footer { margin: 24px auto 18px; width: 100%; clear: both; }
.vnex-watch-topright {
  position: fixed; top: 74px; right: 16px; z-index: 65;
  box-sizing: border-box; width: min(350px, calc(100vw - 32px));
  max-height: min(440px, calc(100dvh - 100px)); overflow: visible;
  padding: 12px; background: #fff; border: 1px solid #e7e9ed;
  border-radius: 16px; box-shadow: 0 5px 24px rgba(0,0,0,.16);
}
.vnex-watch-topright__content { max-height: min(410px, calc(100dvh - 128px)); overflow: auto; }
.vnex-watch-topright .moviceleb-ad-container { margin: 0; max-width: 100%; padding: 0; }
.vnex-watch-topright .moviceleb-ad-inner { min-height: 0; }
.vnex-watch-topright iframe, .vnex-watch-topright img { max-width: 100%; }
.vnex-watch-topright__close {
  position: absolute; top: -13px; right: -10px; width: 32px; height: 32px;
  padding: 0; display: grid; place-items: center; cursor: pointer;
  border: none; border-radius: 50%; background: #f1f2f4; color: #42464d;
  box-shadow: 0 1px 7px rgba(0,0,0,.13); font-size: 24px; line-height: 1;
}
.vnex-watch-topright__close:focus-visible { outline: 3px solid #2689d9; outline-offset: 2px; }
@media(max-width:699px) {
  .vnex-watch-topright { top: 60px; right: 12px; width: min(340px, calc(100vw - 24px)); padding: 10px; }
}

/* v1.26.16: /watch/ uses one full-width content column on every viewport.
   Remove old desktop/landscape two-column sizing and sticky media behaviour. */
.vnex-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1240px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 24px clamp(12px, 2.5vw, 28px) 28px;
    gap: 0;
}
.vnex-main > .vnex-col-media { width: 100%; min-width: 0; max-width: none; position: static; order: 0; }
.vnex-main > :not(.vnex-col-media) { width: 100%; order: 1; }
.vnex-player:not(.is-portrait) { width: 100%; max-width: 100%; }
.vnex-player.is-portrait { max-width: 100%; }
.vnex-info, .vnex-episodes, .vnex-related { box-sizing: border-box; }
.vnex-footer { text-align: center; padding-left: 0; }
@media (max-width: 699px) {
    .vnex-main { padding: 12px 12px 24px; }
}

/* v1.26.17: Only the configured Watch banner slots render. Floating video ad 10d at bottom-right. */
.vnex-watch-topright { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; z-index: 75; width: min(350px, calc(100vw - 32px)); max-height: min(440px, calc(100dvh - 46px)); }
.vnex-watch-topright__content { max-height: min(410px, calc(100dvh - 74px)); }
@media (max-width: 699px) { .vnex-watch-topright { top: auto; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: min(300px, calc(100vw - 20px)); max-height: min(45dvh, 350px); } .vnex-watch-topright__content { max-height: min(42dvh, 320px); } }

/* v1.26.18: independent corner placements. Keep external network ad disclosure intact. */
.vnex-watch-topright .moviceleb-ad-label { display: none !important; }
.vnex-watch-topright { padding: 6px; }
.vnex-watch-topright__content { overflow: auto; }
.vnex-watch-upperright {
  position: fixed; top: 112px; right: 16px; z-index: 74;
  box-sizing: border-box; width: min(350px, calc(100vw - 32px));
  max-height: min(400px, calc(100dvh - 135px));
  padding: 6px; border: 1px solid #e7e9ed; border-radius: 14px;
  background: #fff; box-shadow: 0 5px 24px rgba(0,0,0,.16);
}
.vnex-watch-upperright__close { position: absolute; top: -12px; right: -10px; z-index: 2;
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: #f1f2f4; color: #42464d;
  font-size: 23px; cursor: pointer; box-shadow: 0 1px 7px rgba(0,0,0,.13); }
.vnex-watch-upperright__close:focus-visible { outline: 3px solid #2689d9; outline-offset: 2px; }
.vnex-watch-upperright__content { max-height: min(380px, calc(100dvh - 150px)); overflow: auto; }
.vnex-watch-upperright .moviceleb-ad-container { margin: 0; max-width: 100%; padding: 0; }
.vnex-watch-upperright .moviceleb-ad-inner { min-height: 0; }
.vnex-watch-upperright iframe, .vnex-watch-upperright img { max-width: 100%; }
@media(max-width:699px) {
  .vnex-watch-upperright { top: 106px; right: 10px; width: min(300px, calc(100vw - 20px)); max-height: min(37dvh, 300px); }
  .vnex-watch-upperright__content { max-height: min(34dvh, 275px); }
}

/* v1.26.19 — compact MGID recommendation card at the TOP RIGHT, as requested.
   The ad provider supplies the image, title and disclosure itself. */
.vnex-watch-upperright {
  top: 42px;
  right: 14px;
  width: min(350px, calc(100vw - 28px));
  max-height: min(205px, calc(100dvh - 55px));
  padding: 11px 12px 10px;
  border-radius: 16px;
  overflow: visible;
  z-index: 85;
}
.vnex-watch-upperright__content {
  max-height: min(184px, calc(100dvh - 78px));
  overflow: hidden;
}
.vnex-watch-upperright .moviceleb-ad-label { display: none !important; }
.vnex-watch-upperright__close {
  top: -13px;
  right: -10px;
  width: 32px;
  height: 32px;
  font-size: 24px;
}
@media (max-width: 699px) {
  .vnex-watch-upperright {
    top: 43px;
    right: 10px;
    width: min(350px, calc(100vw - 20px));
    max-height: min(205px, calc(100dvh - 55px));
    padding: 10px 11px;
  }
  .vnex-watch-upperright__content { max-height: min(184px, calc(100dvh - 75px)); }
}

/* v1.26.21: Let the 10d/10e ad network determine the floating ad dimensions.
   Only positioning and dismiss buttons belong to the Watch layout. */
.vnex-watch-upperright,
.vnex-watch-topright {
  width: max-content;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.vnex-watch-upperright { top: 42px; right: 14px; bottom: auto; }
.vnex-watch-topright { top: auto; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
.vnex-watch-upperright__content,
.vnex-watch-topright__content {
  width: max-content;
  height: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
}
.vnex-watch-upperright .moviceleb-ad-container,
.vnex-watch-topright .moviceleb-ad-container,
.vnex-watch-upperright .moviceleb-ad-inner,
.vnex-watch-topright .moviceleb-ad-inner {
  width: auto;
  height: auto;
  min-height: 0;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: visible;
}
.vnex-watch-upperright iframe,
.vnex-watch-topright iframe,
.vnex-watch-upperright img,
.vnex-watch-topright img {
  max-width: none;
  max-height: none;
}
@media (max-width: 699px) {
  .vnex-watch-upperright { top: 43px; right: 10px; width: max-content; max-width: none; max-height: none; padding: 0; }
  .vnex-watch-topright { top: auto; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: max-content; max-width: none; max-height: none; padding: 0; }
  .vnex-watch-upperright__content,
  .vnex-watch-topright__content { max-height: none; }
}


/* v1.26.22: Responsive floating VIDEO ad (10d) only.
   Keep the native card ad (10e) untouched. Scale embedded video with viewport. */
.vnex-watch-topright {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: auto;
  max-height: min(45dvh, 330px);
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
}
.vnex-watch-topright__content,
.vnex-watch-topright .moviceleb-ad-container,
.vnex-watch-topright .moviceleb-ad-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.vnex-watch-topright iframe,
.vnex-watch-topright video {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  max-height: min(45dvh, 330px);
}
.vnex-watch-topright img {
  display: block;
  max-width: 100%;
  height: auto;
}
@media (max-width: 699px) {
  .vnex-watch-topright {
    width: min(260px, 64vw);
    max-width: calc(100vw - 20px);
    max-height: 38dvh;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }
  .vnex-watch-topright iframe,
  .vnex-watch-topright video { max-height: 38dvh; }
}
@media (max-width: 360px) {
  .vnex-watch-topright { width: min(210px, 62vw); }
}
