/* ============================================
   UniVideo 独立页面样式
   与嵌入样式同一原则:颜色继承主题、
   背景半透明灰阶,任意主题自然融合。
   ============================================ */

/* ---------- 页面骨架 ---------- */
.uv-page-inner {
	max-width: 860px;
	margin: 0 auto;
	padding: clamp(20px, 4vw, 44px) 18px;
}
.uv-page-inner-wide { max-width: 1080px; }

.uv-page-head { margin: 1.1em 0 0.6em; }

.uv-page-title {
	font-size: clamp(1.35em, 3vw, 1.7em);
	line-height: 1.35;
	margin: 0 0 0.35em;
}

.uv-page-info {
	display: flex;
	gap: 0.5em;
	align-items: center;
	opacity: 0.6;
	font-size: 0.88em;
}
.uv-dot { opacity: 0.6; }

.uv-page-content {
	margin-top: 1.2em;
	line-height: 1.85;
}

.uv-section-title {
	font-size: 1.1em;
	margin: 0 0 0.9em;
	padding-top: 1.6em;
	border-top: 1px solid rgba(120, 120, 128, 0.18);
}
.uv-related { margin-top: 2.2em; }

/* 页面内播放器去掉默认外边距,由页面控制节奏 */
.uv-page .univideo,
.uv-imm-player .univideo { margin: 0 auto; }

/* ---------- 影院模板:通栏深色舞台 ---------- */
.uv-stage {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: #0e0f12;
	padding: clamp(18px, 4vw, 44px) 18px;
	box-sizing: border-box;
}
.uv-stage-inner { max-width: 1100px; margin: 0 auto; }
.uv-stage .univideo-frame { border-radius: 8px; box-shadow: 0 18px 50px -20px rgba(0,0,0,.7); }

/* ---------- 沉浸模板:全屏专注页 ---------- */
body.uv-immersive {
	margin: 0;
	min-height: 100vh;
	background: #0b0c0f;
	color: #eef0f3;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}
body.uv-immersive #wpadminbar { position: fixed; }

.uv-imm-wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 26px 22px 60px;
	box-sizing: border-box;
}

.uv-imm-back {
	display: inline-block;
	color: rgba(238, 240, 243, 0.65);
	text-decoration: none;
	font-size: 0.9em;
	margin-bottom: 22px;
	transition: color 0.15s;
}
.uv-imm-back:hover { color: #fff; }

.uv-imm-player .univideo-frame {
	border-radius: 10px;
	box-shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.9);
}

.uv-imm-info { max-width: 860px; margin: 26px auto 0; }
.uv-imm-title { font-size: clamp(1.3em, 2.6vw, 1.65em); line-height: 1.4; margin: 0 0 0.5em; font-weight: 600; }
.uv-imm-desc { color: rgba(238, 240, 243, 0.72); line-height: 1.9; }
.uv-imm-desc a { color: #9ec1ff; }

.uv-imm-more {
	display: inline-block;
	margin-top: 26px;
	padding: 9px 18px;
	border: 1px solid rgba(238, 240, 243, 0.28);
	border-radius: 999px;
	color: rgba(238, 240, 243, 0.85);
	text-decoration: none;
	font-size: 0.88em;
	transition: background 0.15s, border-color 0.15s;
}
.uv-imm-more:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(238, 240, 243, 0.5); color: #fff; }

/* ---------- 视频网格与卡片 ---------- */
.uv-grid {
	display: grid;
	gap: 18px;
	margin: 0.5em 0 1em;
}
.uv-grid-2 { grid-template-columns: repeat(2, 1fr); }
.uv-grid-3 { grid-template-columns: repeat(3, 1fr); }
.uv-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
	.uv-grid-3, .uv-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
	.uv-grid-2, .uv-grid-3, .uv-grid-4 { grid-template-columns: 1fr; }
}

.uv-card-item {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(120, 120, 128, 0.07);
	border: 1px solid rgba(120, 120, 128, 0.16);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.uv-card-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.35);
}

.uv-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, rgba(120,120,128,0.22), rgba(120,120,128,0.1)) center/cover no-repeat;
	background-size: cover;
	background-position: center;
}
@supports not (aspect-ratio: 16 / 9) {
	.uv-card-thumb { height: 0; padding-top: 56.25%; }
}

.uv-card-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.uv-card-play svg {
	width: 44px;
	height: 44px;
	padding: 10px;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.45);
	border-radius: 50%;
	backdrop-filter: blur(2px);
	transition: transform 0.18s ease, background 0.18s ease;
}
.uv-card-item:hover .uv-card-play svg {
	transform: scale(1.08);
	background: rgba(0, 0, 0, 0.62);
}

.uv-card-badge {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 2px 8px;
	font-size: 11px;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	border-radius: 4px;
	backdrop-filter: blur(2px);
}

.uv-card-title {
	display: block;
	padding: 10px 12px 12px;
	font-size: 0.92em;
	font-weight: 500;
	line-height: 1.45;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* ---------- 分页 ---------- */
.uv-pagination { margin-top: 1.6em; text-align: center; }
.uv-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 3px;
	border-radius: 6px;
	border: 1px solid rgba(120, 120, 128, 0.25);
	text-decoration: none;
	color: inherit;
	font-size: 0.9em;
}
.uv-pagination .page-numbers.current {
	background: rgba(120, 120, 128, 0.15);
	font-weight: 600;
}

/* ---------- 展示页版式:播放列表 ---------- */
.uv-playlist .univideo { margin: 0 0 2.2em; }
.uv-playlist .univideo:last-child { margin-bottom: 0.5em; }

/* ---------- 展示页版式:剧场模式 ---------- */
.uv-theater { margin: 1.5em 0; }
.uv-theater .univideo { margin: 0 auto; }

.uv-theater-now {
	margin: 0.7em 0.1em 0;
	font-weight: 600;
	font-size: 1.02em;
	line-height: 1.45;
}

.uv-theater-list {
	display: flex;
	gap: 12px;
	margin-top: 14px;
	padding-bottom: 8px;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.uv-theater-item {
	flex: 0 0 auto;
	width: 172px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: left;
	color: inherit;
	font: inherit;
	opacity: 0.75;
	transition: opacity 0.15s;
}
.uv-theater-item:hover { opacity: 1; }
.uv-theater-item.is-active { opacity: 1; }
.uv-theater-item:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 8px; }

.uv-theater-thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	background: linear-gradient(135deg, rgba(120,120,128,0.25), rgba(120,120,128,0.12));
	background-size: cover;
	background-position: center;
	color: #fff;
	border: 2px solid transparent;
	box-sizing: border-box;
	transition: border-color 0.15s;
}
.uv-theater-item.is-active .uv-theater-thumb {
	border-color: currentColor;
}
.uv-theater-thumb svg {
	background: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
	padding: 7px;
	box-sizing: content-box;
}
@supports not (aspect-ratio: 16 / 9) {
	.uv-theater-thumb { height: 96px; }
}

.uv-theater-item-title {
	display: block;
	margin-top: 6px;
	font-size: 0.82em;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

@media (max-width: 600px) {
	.uv-theater-item { width: 138px; }
}

/* ---------- 分类筛选标签 ---------- */
.uv-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0 0 18px;
}
.uv-tab {
	padding: 6px 16px;
	border: 1px solid rgba(120, 120, 128, 0.3);
	border-radius: 999px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.88em;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}
.uv-tab:hover { border-color: currentColor; }
.uv-tab.is-active {
	background: rgba(120, 120, 128, 0.16);
	border-color: currentColor;
	font-weight: 600;
}
.uv-hidden { display: none !important; }

/* ---------- 卡片改为按钮(弹窗播放) ---------- */
button.uv-card-item {
	width: 100%;
	padding: 0 0 0;
	font: inherit;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}
button.uv-card-item:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- 弹窗播放(灯箱) ---------- */
.uv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(8, 9, 12, 0.88);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	backdrop-filter: blur(3px);
	animation: uv-fade 0.18s ease;
}
@keyframes uv-fade { from { opacity: 0; } to { opacity: 1; } }

.uv-lightbox-inner {
	width: min(1100px, 94vw);
	max-height: 92vh;
	position: relative;
}
.uv-lightbox-vert .uv-lightbox-inner { width: min(400px, 90vw); }

.uv-lightbox-frame {
	position: relative;
	width: 100%;
	aspect-ratio: var(--uv-ratio, 16 / 9);
	max-height: 82vh;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.9);
}
.uv-lightbox-frame .univideo-media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.uv-lightbox-title {
	color: rgba(255, 255, 255, 0.9);
	margin-top: 12px;
	font-size: 0.95em;
	line-height: 1.5;
	text-align: center;
}

.uv-lightbox-close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #1d2327;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s;
}
.uv-lightbox-close:hover { transform: scale(1.08); }
@media (max-width: 600px) {
	.uv-lightbox { padding: 12px; }
	.uv-lightbox-close { top: -10px; right: 2px; }
}

/* ---------- 版式:瀑布流 ---------- */
.uv-masonry { column-gap: 18px; margin: 0.5em 0 1em; }
.uv-masonry-2 { column-count: 2; }
.uv-masonry-3 { column-count: 3; }
.uv-masonry-4 { column-count: 4; }
@media (max-width: 900px) { .uv-masonry-3, .uv-masonry-4 { column-count: 2; } }
@media (max-width: 520px) { .uv-masonry-2, .uv-masonry-3, .uv-masonry-4 { column-count: 1; } }

.uv-mas-item {
	display: block;
	width: 100%;
	margin: 0 0 18px;
	padding: 0;
	border: 1px solid rgba(120, 120, 128, 0.16);
	border-radius: 12px;
	overflow: hidden;
	background: rgba(120, 120, 128, 0.07);
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: left;
	break-inside: avoid;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	appearance: none;
	-webkit-appearance: none;
}
.uv-mas-item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.35); }
.uv-mas-item:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.uv-mas-thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--uv-ratio, 16 / 9);
	background: linear-gradient(135deg, rgba(120,120,128,0.22), rgba(120,120,128,0.1));
	background-size: cover;
	background-position: center;
	color: #fff;
}
.uv-mas-title {
	display: block;
	padding: 9px 12px 11px;
	font-size: 0.9em;
	font-weight: 500;
	line-height: 1.45;
}

/* ---------- 版式:列表模式 ---------- */
.uv-listrows { display: flex; flex-direction: column; gap: 14px; margin: 0.5em 0 1em; }

.uv-listrow {
	display: flex;
	gap: 16px;
	align-items: stretch;
	padding: 0;
	border: 1px solid rgba(120, 120, 128, 0.16);
	border-radius: 12px;
	overflow: hidden;
	background: rgba(120, 120, 128, 0.06);
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: left;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
	appearance: none;
	-webkit-appearance: none;
}
.uv-listrow:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.3); }
.uv-listrow:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.uv-listrow-thumb {
	position: relative;
	flex: 0 0 230px;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, rgba(120,120,128,0.22), rgba(120,120,128,0.1));
	background-size: cover;
	background-position: center;
	color: #fff;
}
.uv-listrow-body {
	flex: 1;
	min-width: 0;
	padding: 12px 16px 12px 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
	justify-content: center;
}
.uv-listrow-title { font-weight: 600; font-size: 1em; line-height: 1.45; }
.uv-listrow-desc {
	font-size: 0.86em;
	opacity: 0.65;
	line-height: 1.6;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.uv-listrow-meta { font-size: 0.8em; opacity: 0.5; }

@media (max-width: 600px) {
	.uv-listrow { flex-direction: column; gap: 0; }
	.uv-listrow-thumb { flex: none; width: 100%; }
	.uv-listrow-body { padding: 10px 14px 13px; }
}

/* ---------- 版式:横向滑动 ---------- */
.uv-carousel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding: 4px 2px 14px;
	margin: 0.5em 0 1em;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.uv-carousel .uv-card-item {
	flex: 0 0 272px;
	width: 272px;
	scroll-snap-align: start;
}
@media (max-width: 600px) {
	.uv-carousel .uv-card-item { flex-basis: 220px; width: 220px; }
}
