/* =============================================================================
 * SoulxDoll — Video page
 *
 * Loaded only on the "SoulxDoll 视频页" template (inc/enqueue.php).
 * Grid/card rules are scoped under .luxe-video-page; the lightbox lives at the
 * end of <body> so its rules are namespaced by .vlb. Everything is built on the
 * theme's :root tokens (brand, radius, shadow, motion) so it matches the site.
 * ========================================================================== */

/* ── Base pieces the video page needs in the `page-generic` context ───────────
 * A page using this custom template gets the `page-generic` body class, under
 * which styles.css provides .wrap/header/footer — but NOT the section header
 * (.sh/.sl/.st) or the pagination (.bpagi). We replicate those here, scoped to
 * .luxe-video-page (so nothing leaks), using the theme's own values so it looks
 * identical to the Journal page. Each section self-manages its width (there is
 * no .wrap on this template). */

/* Optional operator page-content */
.luxe-video-page .video-extra { max-width: 860px; margin: 0 auto; padding: 32px 40px 0; }

/* Section header (doubles as the page's H1 block now the hero is removed) */
.luxe-video-page .sh {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 32px;
}
.luxe-video-page .sl {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--brand);
	display: block;
	margin-bottom: 8px;
}
.luxe-video-page .st {
	margin: 0;
	font-size: clamp(30px, 4.2vw, 44px);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.08;
	color: var(--ink);
}

/* Pagination links */
.luxe-video-page .bpagi { flex-wrap: wrap; }
.luxe-video-page .bpagi .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px; height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid var(--line-soft);
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.luxe-video-page .bpagi a.page-numbers:hover {
	border-color: var(--ink);
	background: rgba(0, 0, 0, .04);
	transform: translateY(-1px);
}
.luxe-video-page .bpagi .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.luxe-video-page .bpagi .page-numbers.dots { border: none; background: transparent; min-width: auto; padding: 0 2px; color: var(--muted-2); }
.luxe-video-page .bpagi .page-numbers.prev,
.luxe-video-page .bpagi .page-numbers.next { font-size: 16px; }

/* ── Section rhythm ─────────────────────────────────────────────────────── */
.luxe-video-page .video-s {
	max-width: 1360px;
	margin: 0 auto;
	/* Top padding gives breathing room below the sticky site header now that
	   the hero section has been removed. */
	padding: clamp(40px, 6vw, 72px) 40px 40px;
}

/* ── Featured player ────────────────────────────────────────────────────── */
.luxe-video-page .vfeatured {
	display: grid;
	grid-template-columns: 1.55fr 1fr;
	gap: 28px;
	align-items: center;
	margin: 8px 0 40px;
}
.luxe-video-page .vfeatured-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	overflow: hidden;
	cursor: pointer;
	background: #000;
	box-shadow: var(--shadow-md);
	transition: box-shadow var(--t-sm) var(--e-silk), transform var(--t-sm) var(--e-silk);
}
.luxe-video-page .vfeatured-media:hover { box-shadow: var(--shadow-lg); }
.luxe-video-page .vfeatured-media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform var(--t-lg) var(--e-whisper);
}
.luxe-video-page .vfeatured-media:hover img { transform: scale(1.03); }

.luxe-video-page .vfeatured-body h2 {
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0 0 12px;
}
.luxe-video-page .vfeatured-body p {
	font-size: 15px;
	line-height: 1.65;
	color: var(--muted);
	margin: 0 0 20px;
}

/* Featured "Featured" ribbon */
.luxe-video-page .vfeatured-tag {
	position: absolute;
	top: 14px; left: 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--brand);
	padding: 5px 11px;
	border-radius: var(--radius-pill);
	box-shadow: 0 4px 12px rgba(255, 45, 85, 0.35);
}

/* ── Filter chips ───────────────────────────────────────────────────────── */
.luxe-video-page .video-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 26px;
}
.luxe-video-page .video-filters .vf {
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ink-2);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	padding: 8px 18px;
	cursor: pointer;
	transition: color var(--t-xs) var(--e-silk),
		background var(--t-xs) var(--e-silk),
		border-color var(--t-xs) var(--e-silk);
}
.luxe-video-page .video-filters .vf:hover {
	border-color: var(--muted-3);
	background: var(--line-soft);
}
.luxe-video-page .video-filters .vf.on {
	color: #fff;
	background: var(--ink);
	border-color: var(--ink);
}

/* ── Video grid ─────────────────────────────────────────────────────────── */
.luxe-video-page .vgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 26px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.luxe-video-page .vcard {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-sm);
	overflow: hidden;
	transition: transform var(--t-sm) var(--e-silk),
		box-shadow var(--t-sm) var(--e-silk),
		border-color var(--t-sm) var(--e-silk);
}
.luxe-video-page .vcard:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
	border-color: var(--line);
}

/* Media thumbnail = the play button (facade) */
.luxe-video-page .vcard-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 0;
	border: 0;
	margin: 0;
	cursor: pointer;
	background: #000;
	overflow: hidden;
}
.luxe-video-page .vcard-media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform var(--t-lg) var(--e-whisper),
		opacity var(--t-sm) var(--e-silk);
}
.luxe-video-page .vcard:hover .vcard-media img { transform: scale(1.05); }

/* Play button overlay */
.luxe-video-page .vplay {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%) scale(1);
	width: 56px; height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ink);
	box-shadow: var(--shadow-md);
	transition: transform var(--t-sm) var(--e-heartbeat),
		background var(--t-xs) var(--e-silk),
		color var(--t-xs) var(--e-silk);
}
.luxe-video-page .vplay svg { width: 22px; height: 22px; margin-left: 3px; }
.luxe-video-page .vplay-lg { width: 76px; height: 76px; }
.luxe-video-page .vplay-lg svg { width: 30px; height: 30px; }
.luxe-video-page .vcard-media:hover .vplay,
.luxe-video-page .vfeatured-media:hover .vplay {
	transform: translate(-50%, -50%) scale(1.08);
	background: var(--brand);
	color: #fff;
}

/* Duration badge */
.luxe-video-page .vdur {
	position: absolute;
	bottom: 10px; right: 10px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: rgba(0, 0, 0, 0.72);
	padding: 3px 8px;
	border-radius: 8px;
	backdrop-filter: blur(4px);
}
.luxe-video-page .vdur svg { opacity: 0.85; }

/* Card body */
.luxe-video-page .vcard-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 18px;
}
.luxe-video-page .vtitle {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0;
}
.luxe-video-page .vexc {
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--muted-2);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Shop-this-doll buttons */
.luxe-video-page .vshop-link,
.luxe-video-page .vshop-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	transition: color var(--t-xs) var(--e-silk),
		background var(--t-xs) var(--e-silk),
		transform var(--t-xxs) var(--e-silk);
}
.luxe-video-page .vshop-link {
	align-self: flex-start;
	color: var(--brand);
	margin-top: 2px;
}
.luxe-video-page .vshop-link:hover { color: var(--brand-hover); transform: translateX(2px); }
.luxe-video-page .vshop-btn {
	align-self: flex-start;
	color: #fff;
	background: var(--brand);
	padding: 11px 22px;
	border-radius: var(--radius-pill);
	box-shadow: 0 6px 16px rgba(255, 45, 85, 0.28);
}
.luxe-video-page .vshop-btn:hover { background: var(--brand-hover); transform: translateY(-1px); }

/* Empty state */
.luxe-video-page .vempty {
	text-align: center;
	padding: 80px 24px;
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-md);
}
.luxe-video-page .vempty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px; height: 68px;
	border-radius: 50%;
	background: var(--brand-soft);
	color: var(--brand);
	margin: 0 0 16px;
}
.luxe-video-page .vempty h2 { font-size: 22px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.luxe-video-page .vempty p { font-size: 14px; color: var(--muted-2); margin: 0; }

/* =============================================================================
 * Lightbox (namespaced .vlb — rendered at end of <body>)
 * ========================================================================== */
/* ─────────────────────────────────────────────────────────────────────────
 * v5.9.13 — 修复「弹窗一打开页面抖一下」
 *
 * 原因:锁滚动用的是 html{overflow:hidden},这会让纵向滚动条整条消失,
 * 视口可用宽度瞬间 +15px 左右,于是整页(包括 sticky 顶栏)向右跳一下,
 * 关闭时又跳回来 —— 看上去就是"抖动"。
 *
 * 方案 A(现代浏览器):scrollbar-gutter:stable 永久预留滚动条槽位,
 *   overflow 切换时布局宽度纹丝不动。
 * 方案 B(Safari < 18.2 等不支持的):用 JS 量出滚动条宽度写进 --vlb-sbw,
 *   锁滚动时给 body 补等宽的 padding-right,并把固定定位的弹窗一起右移。
 * ───────────────────────────────────────────────────────────────────────── */
html { scrollbar-gutter: stable; }
html.vlb-lock { overflow: hidden; }

@supports not (scrollbar-gutter: stable) {
	html.vlb-lock body { padding-right: var(--vlb-sbw, 0px); }
	html.vlb-lock .vlb { right: var(--vlb-sbw, 0px); }
}

/* 弹窗淡入淡出期间禁用指针事件,避免半透明状态下误点到卡片 */
.vlb:not(.is-open) { pointer-events: none; }
.vlb.is-open { pointer-events: auto; }

.vlb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity var(--t-md) var(--e-silk);
}
.vlb.is-open { opacity: 1; }
.vlb[hidden] { display: none; }

.vlb-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 12, 0.82);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.vlb-dialog {
	position: relative;
	max-width: 100%;
	transform: scale(0.97);
	transition: transform var(--t-md) var(--e-velvet);
}
.vlb.is-open .vlb-dialog { transform: scale(1); }

.vlb-stage {
	position: relative;
	/* Always fit the viewport while keeping 16:9 — take the smallest of a
	   comfortable max width, the available width, and the width that keeps the
	   height within the viewport. Prevents the modal (and its close button)
	   from spilling past the top/bottom edges on short screens. */
	width: min(1040px, calc(100vw - 48px), calc((100vh - 48px) * 16 / 9));
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}
.vlb-stage .vlb-iframe,
.vlb-stage .vlb-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.vlb-stage .vlb-video { object-fit: contain; background: #000; }

.vlb-close {
	position: absolute;
	top: 12px; right: 12px;
	z-index: 3;
	width: 40px; height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(18, 18, 20, 0.55);
	color: #fff;
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
	transition: transform var(--t-xs) var(--e-silk), background var(--t-xs) var(--e-silk);
}
.vlb-close:hover { transform: rotate(90deg); background: var(--brand); color: #fff; }

/* =============================================================================
 * Responsive
 * ========================================================================== */
@media (max-width: 900px) {
	.luxe-video-page .vfeatured {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}
@media (max-width: 680px) {
	.luxe-video-page .video-s { padding: 32px 20px 24px; }
	.luxe-video-page .video-extra { padding: 24px 20px 0; }
	.luxe-video-page .vgrid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.luxe-video-page .vplay { width: 50px; height: 50px; }
	.luxe-video-page .vplay svg { width: 20px; height: 20px; }
	.vlb { padding: 14px; }
	.vlb-close { top: 8px; right: 8px; width: 36px; height: 36px; }
}
