/* ============================================================================
   私人影院 · 样式
   深色影院风格，与主站蓝紫渐变呼应
   ========================================================================== */

:root {
	--vp-bg: #07090F;
	--vp-bg-2: #0C1019;
	--vp-surface: #121723;
	--vp-surface-2: #171D2B;
	--vp-border: rgba(148, 163, 184, .16);
	--vp-border-str: rgba(148, 163, 184, .28);
	--vp-text: #E6EAF3;
	--vp-muted: #93A0B8;
	--vp-dim: #6B7896;
	--vp-brand: #6366F1;
	--vp-accent: #A855F7;
	--vp-brand-soft: rgba(99, 102, 241, .16);
	--vp-danger: #F04B5C;
	--vp-grad: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
	--vp-radius: 14px;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
}

.vp-body {
	min-height: 100vh;
	background: var(--vp-bg);
	color: var(--vp-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	background-image:
		radial-gradient(1200px 600px at 12% -10%, rgba(99, 102, 241, .13), transparent 62%),
		radial-gradient(900px 480px at 88% 6%, rgba(168, 85, 247, .10), transparent 58%);
	background-repeat: no-repeat;
}

button, input, select {
	font: inherit;
	color: inherit;
}

button { cursor: pointer; }

code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .92em;
	padding: .1em .4em;
	border-radius: 5px;
	background: rgba(148, 163, 184, .14);
	color: #C7D2FE;
}

/* ============================================================================
   登录页
   ========================================================================== */

.vp-body--auth {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.vp-auth-wrap {
	width: 100%;
	max-width: 420px;
}

.vp-auth-card {
	position: relative;
	border: 1px solid var(--vp-border);
	border-radius: 20px;
	padding: 40px 34px 30px;
	background: linear-gradient(180deg, rgba(23, 29, 43, .92) 0%, rgba(12, 16, 25, .96) 100%);
	box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
	overflow: hidden;
}

.vp-auth-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .8), rgba(168, 85, 247, .8), transparent);
}

.vp-auth-logo {
	width: 68px;
	height: 68px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 18px;
	color: #fff;
	background: var(--vp-grad);
	box-shadow: 0 14px 34px -14px rgba(99, 102, 241, .9);
}

.vp-auth-title {
	margin: 0 0 6px;
	font-size: 25px;
	font-weight: 700;
	letter-spacing: .01em;
	text-align: center;
	background: linear-gradient(100deg, #EEF2FF 0%, #A5B4FC 48%, #C084FC 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.vp-auth-sub {
	margin: 0 0 26px;
	font-size: 13.5px;
	color: var(--vp-muted);
	text-align: center;
}

.vp-auth-error {
	margin-bottom: 16px;
	padding: 11px 14px;
	border-radius: 10px;
	border: 1px solid rgba(240, 75, 92, .35);
	background: rgba(240, 75, 92, .1);
	color: #FCA5B2;
	font-size: 13.5px;
}

.vp-auth-form { display: block; }

.vp-field { display: block; margin-bottom: 18px; }

.vp-field-label {
	display: block;
	margin-bottom: 7px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--vp-muted);
}

.vp-field-input { position: relative; }

.vp-field-input input {
	width: 100%;
	padding: 13px 46px 13px 14px;
	border-radius: 11px;
	border: 1px solid var(--vp-border-str);
	background: rgba(7, 9, 15, .7);
	color: var(--vp-text);
	outline: none;
	transition: border-color .18s, box-shadow .18s;
}

.vp-field-input input::placeholder { color: var(--vp-dim); }

.vp-field-input input:focus {
	border-color: rgba(99, 102, 241, .8);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}

.vp-field-input input:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.vp-eye {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--vp-dim);
}

.vp-eye:hover { color: var(--vp-text); background: rgba(148, 163, 184, .1); }
.vp-eye.is-on { color: var(--vp-brand); }

.vp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 18px;
	border-radius: 11px;
	border: 1px solid transparent;
	font-weight: 600;
	letter-spacing: .02em;
	transition: transform .15s, box-shadow .2s, opacity .2s;
}

.vp-btn--primary {
	background: var(--vp-grad);
	color: #fff;
	box-shadow: 0 14px 30px -14px rgba(99, 102, 241, .95);
}

.vp-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 18px 38px -14px rgba(99, 102, 241, 1); }
.vp-btn--primary:active { transform: translateY(0); }
.vp-btn--primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.vp-auth-foot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 22px 0 0;
	font-size: 12px;
	color: var(--vp-dim);
}

.vp-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #34D399;
	box-shadow: 0 0 8px rgba(52, 211, 153, .9);
}

/* ============================================================================
   顶部栏
   ========================================================================== */

.vp-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--vp-border);
	background: rgba(7, 9, 15, .82);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.vp-topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.vp-brand {
	display: flex;
	align-items: center;
	gap: 9px;
	text-decoration: none;
	color: var(--vp-text);
	font-weight: 700;
	font-size: 15.5px;
	letter-spacing: .01em;
	white-space: nowrap;
}

.vp-brand svg { color: #A5B4FC; }

.vp-count {
	font-size: 12.5px;
	color: var(--vp-dim);
	white-space: nowrap;
}

.vp-topbar-right { display: flex; align-items: center; gap: 6px; }

.vp-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid transparent;
	border-radius: 9px;
	background: transparent;
	color: var(--vp-muted);
	transition: background .16s, color .16s, border-color .16s;
}

.vp-icon-btn:hover {
	color: var(--vp-text);
	background: rgba(148, 163, 184, .1);
	border-color: var(--vp-border);
}

/* ============================================================================
   布局
   ========================================================================== */

.vp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 22px;
	max-width: 1560px;
	margin: 0 auto;
	padding: 22px;
	align-items: start;
}

.vp-stage { min-width: 0; }

/* ============================================================================
   播放器
   ========================================================================== */

.vp-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--vp-radius);
	overflow: hidden;
	border: 1px solid var(--vp-border);
	box-shadow: 0 26px 60px -28px rgba(0, 0, 0, .95);
}

.vp-player:fullscreen {
	border-radius: 0;
	border: 0;
	aspect-ratio: auto;
	width: 100vw;
	height: 100vh;
}

.vp-player::-webkit-full-screen { width: 100vw; height: 100vh; }

.vp-player video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

/* 顶部渐变遮罩，让控制条文字更清晰 */
.vp-player::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 45%;
	background: linear-gradient(to top, rgba(0, 0, 0, .82), transparent);
	opacity: 0;
	transition: opacity .25s;
	pointer-events: none;
}

.vp-player.is-active::after { opacity: 1; }

/* --- 中央大播放按钮 --- */
.vp-bigplay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(.92);
	width: 78px;
	height: 78px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 50%;
	background: rgba(99, 102, 241, .88);
	color: #fff;
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .22s, transform .22s, visibility .22s;
	box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8);
	z-index: 6;
}

.vp-player.is-paused .vp-bigplay,
.vp-player.is-idle.is-paused .vp-bigplay {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -50%) scale(1);
}

.vp-bigplay:hover { background: var(--vp-brand); transform: translate(-50%, -50%) scale(1.06) !important; }
.vp-bigplay svg { margin-left: 3px; }

/* --- 遮罩与加载 --- */
.vp-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(7, 9, 15, .78);
	backdrop-filter: blur(3px);
	z-index: 8;
	padding: 24px;
	text-align: center;
}

.vp-overlay[hidden] { display: none; }

.vp-overlay-text {
	font-size: 14px;
	color: var(--vp-muted);
	max-width: 520px;
	line-height: 1.7;
	white-space: pre-wrap;
}

.vp-spinner {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 3px solid rgba(148, 163, 184, .22);
	border-top-color: var(--vp-brand);
	animation: vp-spin .8s linear infinite;
}

.vp-spinner[hidden] { display: none; }

@keyframes vp-spin { to { transform: rotate(360deg); } }

/* --- 双击快进反馈 --- */
.vp-seek-flash {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22%;
	height: 46%;
	border-radius: 16px;
	background: rgba(99, 102, 241, .16);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s;
	z-index: 7;
}

.vp-seek-flash--back { left: 4%; }
.vp-seek-flash--fwd { right: 4%; }
.vp-seek-flash.is-on { opacity: 1; }

/* --- 控制条 --- */
.vp-controls {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 9;
	padding: 0 14px 12px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .24s, transform .24s;
	pointer-events: none;
}

.vp-player.is-active .vp-controls,
.vp-player:focus-within .vp-controls {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.vp-player.is-idle .vp-controls { cursor: none; }

/* 暂停时常显控制条 */
.vp-player.is-paused .vp-controls {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* --- 进度条 --- */
.vp-progress {
	padding: 12px 0 8px;
	cursor: pointer;
	outline: none;
	touch-action: none;
}

.vp-progress:focus-visible .vp-progress-track { box-shadow: 0 0 0 3px rgba(99, 102, 241, .35); }

.vp-progress-track {
	position: relative;
	height: 5px;
	border-radius: 999px;
	background: rgba(226, 232, 240, .22);
	transition: height .15s;
}

.vp-progress:hover .vp-progress-track,
.vp-progress.is-drag .vp-progress-track { height: 8px; }

.vp-progress-buffer,
.vp-progress-played {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	border-radius: 999px;
	width: 0;
}

.vp-progress-buffer { background: rgba(226, 232, 240, .3); }

.vp-progress-played { background: var(--vp-grad); }

.vp-progress-thumb {
	position: absolute;
	top: 50%;
	left: 0;
	width: 13px;
	height: 13px;
	margin-left: -6.5px;
	border-radius: 50%;
	background: #fff;
	transform: translateY(-50%) scale(0);
	transition: transform .15s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.vp-progress:hover .vp-progress-thumb,
.vp-progress.is-drag .vp-progress-thumb { transform: translateY(-50%) scale(1); }

.vp-progress-tip {
	position: absolute;
	bottom: 20px;
	transform: translateX(-50%);
	padding: 3px 8px;
	border-radius: 6px;
	background: rgba(12, 16, 25, .96);
	border: 1px solid var(--vp-border-str);
	font-size: 11.5px;
	font-variant-numeric: tabular-nums;
	color: #E6EAF3;
	white-space: nowrap;
	pointer-events: none;
}

.vp-progress-tip[hidden] { display: none; }

/* --- 控制行 --- */
.vp-controls-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.vp-ctrl-left,
.vp-ctrl-right {
	display: flex;
	align-items: center;
	gap: 3px;
	min-width: 0;
}

/* --- 画质选择 --- */
.vp-quality-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.vp-btn-quality {
	gap: 3px;
	padding: 0 8px;
	border: 1px solid rgba(148, 163, 184, .22);
	font-size: 12px;
	letter-spacing: .01em;
	white-space: nowrap;
}

.vp-btn-quality:hover { border-color: rgba(148, 163, 184, .4); }

.vp-btn-quality[aria-expanded="true"] {
	border-color: rgba(99, 102, 241, .65);
	background: rgba(99, 102, 241, .18);
	color: #C7D2FE;
}

.vp-quality-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	z-index: 40;
	width: min(310px, calc(100vw - 32px));
	padding: 8px;
	border: 1px solid var(--vp-border);
	border-radius: 14px;
	background: rgba(12, 16, 25, .98);
	box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .95);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.vp-quality-menu[hidden] { display: none !important; }

/* 菜单被移到 <body> 后：桌面端 fixed 定位由 JS 计算，手机端当底部抽屉 */
.vp-quality-menu.is-floating {
	position: fixed;
	z-index: 99999;
}

@media (max-width: 640px) {
	.vp-quality-menu.is-floating {
		left: 10px;
		right: 10px;
		top: auto;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: none;
		max-height: 68vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

.vp-q-head {
	padding: 4px 8px 8px;
	border-bottom: 1px solid var(--vp-border);
	margin-bottom: 6px;
}

.vp-q-head strong {
	display: block;
	font-size: 12px;
	color: var(--vp-text);
	letter-spacing: .02em;
}

.vp-q-head span {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	line-height: 1.5;
	color: var(--vp-dim);
}

.vp-q-item {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	width: 100%;
	padding: 8px 9px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--vp-text);
	text-align: left;
	transition: background .14s, border-color .14s;
}

.vp-q-item:hover { background: rgba(148, 163, 184, .1); }

.vp-q-item.is-current {
	background: rgba(99, 102, 241, .16);
	border-color: rgba(99, 102, 241, .5);
}

.vp-q-item:disabled {
	opacity: .55;
	cursor: default;
}

.vp-q-radio {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin-top: 2px;
	border: 1.5px solid rgba(148, 163, 184, .55);
	border-radius: 50%;
	position: relative;
}

.vp-q-item.is-current .vp-q-radio {
	border-color: #818CF8;
}

.vp-q-item.is-current .vp-q-radio::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: #818CF8;
}

.vp-q-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vp-q-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.vp-q-label {
	font-size: 13px;
	font-weight: 700;
}

.vp-q-badge {
	padding: 0 5px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	line-height: 15px;
	background: rgba(148, 163, 184, .18);
	color: #CBD5E1;
}

.vp-q-item.is-current .vp-q-badge {
	background: rgba(129, 140, 248, .3);
	color: #C7D2FE;
}

.vp-q-meta {
	font-size: 11px;
	color: var(--vp-dim);
	font-variant-numeric: tabular-nums;
}

.vp-q-desc {
	font-size: 11px;
	line-height: 1.45;
	color: var(--vp-muted);
}

.vp-q-state {
	flex: 0 0 auto;
	align-self: center;
	font-size: 10.5px;
	color: var(--vp-dim);
	white-space: nowrap;
}

.vp-q-foot {
	padding: 7px 8px 3px;
	margin-top: 4px;
	border-top: 1px solid var(--vp-border);
	font-size: 10.5px;
	line-height: 1.5;
	color: var(--vp-dim);
}

.vp-btn-ctrl {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 7px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #E6EAF3;
	font-size: 12.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	transition: background .15s, color .15s, opacity .15s;
}

.vp-btn-ctrl:hover { background: rgba(226, 232, 240, .14); }
.vp-btn-ctrl:disabled { opacity: .3; cursor: not-allowed; }
.vp-btn-ctrl:disabled:hover { background: transparent; }

.vp-btn-ctrl--play {
	min-width: 42px;
	height: 42px;
}

/* --- 音量 --- */
.vp-vol-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
}

.vp-vol {
	width: 0;
	opacity: 0;
	transition: width .2s, opacity .2s;
	accent-color: var(--vp-brand);
	cursor: pointer;
}

.vp-vol-wrap:hover .vp-vol,
.vp-vol:focus { width: 74px; opacity: 1; }

/* --- 时间 --- */
.vp-time {
	margin-left: 8px;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	color: rgba(230, 234, 243, .82);
	white-space: nowrap;
}

/* --- 速度菜单 --- */
.vp-menu {
	position: absolute;
	right: 16px;
	bottom: 62px;
	z-index: 12;
	min-width: 132px;
	padding: 8px;
	border-radius: 12px;
	border: 1px solid var(--vp-border-str);
	background: rgba(12, 16, 25, .97);
	backdrop-filter: blur(14px);
	box-shadow: 0 22px 48px -18px rgba(0, 0, 0, .95);
}

.vp-menu[hidden] { display: none; }

.vp-menu-title {
	padding: 4px 8px 7px;
	font-size: 11.5px;
	letter-spacing: .04em;
	color: var(--vp-dim);
}

.vp-menu button {
	display: block;
	width: 100%;
	padding: 7px 10px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--vp-muted);
	font-size: 13px;
	text-align: left;
	font-variant-numeric: tabular-nums;
}

.vp-menu button:hover { background: rgba(148, 163, 184, .12); color: var(--vp-text); }
.vp-menu button.is-on { background: var(--vp-brand-soft); color: #C7D2FE; font-weight: 700; }

/* ============================================================================
   当前播放信息
   ========================================================================== */

.vp-nowplaying {
	margin-top: 16px;
	padding: 0 2px;
}

.vp-np-title {
	margin: 0 0 7px;
	font-size: 19px;
	font-weight: 650;
	line-height: 1.4;
	letter-spacing: .005em;
	word-break: break-word;
}

.vp-np-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.vp-chip {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 650;
	letter-spacing: .02em;
	border: 1px solid rgba(99, 102, 241, .42);
	background: var(--vp-brand-soft);
	color: #C7D2FE;
}

.vp-chip[hidden] { display: none; }

.vp-np-sub {
	font-size: 12.5px;
	color: var(--vp-dim);
	font-variant-numeric: tabular-nums;
}

.vp-resume { margin-top: 10px; max-width: 320px; }
.vp-resume[hidden] { display: none; }

.vp-resume-bar {
	height: 3px;
	border-radius: 999px;
	background: rgba(148, 163, 184, .2);
	overflow: hidden;
}

.vp-resume-fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: var(--vp-grad);
	transition: width .3s;
}

/* ============================================================================
   片单侧栏
   ========================================================================== */

.vp-side {
	border: 1px solid var(--vp-border);
	border-radius: var(--vp-radius);
	background: rgba(18, 23, 35, .72);
	overflow: hidden;
	position: sticky;
	top: 74px;
	max-height: calc(100vh - 96px);
	display: flex;
	flex-direction: column;
}

.vp-side-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 13px 16px;
	border-bottom: 1px solid var(--vp-border);
	font-size: 13px;
	letter-spacing: .05em;
	color: var(--vp-muted);
}

.vp-side-head strong { flex: 0 0 auto; }

.vp-side-count {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 11.5px;
	color: var(--vp-dim);
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 编号范围：解释「文件数」与「最大序号」为什么不同 */
.vp-side-range {
	margin-left: 6px;
	font-size: 10.5px;
	opacity: .7;
}

/* 侧栏筛选框 */
.vp-filter {
	position: relative;
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 10px 12px 6px;
	padding: 0 9px;
	border: 1px solid var(--vp-border);
	border-radius: 9px;
	background: rgba(7, 9, 15, .55);
	color: var(--vp-dim);
	transition: border-color .16s, box-shadow .16s;
}

.vp-filter:focus-within {
	border-color: rgba(99, 102, 241, .6);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.vp-filter svg { flex: 0 0 auto; }

.vp-filter input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 8px 0;
	border: 0;
	background: transparent;
	color: var(--vp-text);
	font-size: 12.5px;
	outline: none;
}

.vp-filter input::placeholder { color: var(--vp-dim); }

/* 去掉 search 类型的原生清除按钮（我们自己有） */
.vp-filter input::-webkit-search-cancel-button { display: none; }

.vp-filter-clear {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 0;
	border-radius: 50%;
	background: rgba(148, 163, 184, .18);
	color: var(--vp-muted);
	padding: 0;
}

.vp-filter-clear:hover { background: rgba(148, 163, 184, .3); color: var(--vp-text); }
.vp-filter-clear[hidden] { display: none; }

.vp-side-close { display: none; }

.vp-side-body {
	overflow-y: auto;
	overflow-x: hidden;
	padding: 8px;
	scrollbar-width: thin;
	scrollbar-color: rgba(148, 163, 184, .3) transparent;
}

.vp-side-body::-webkit-scrollbar { width: 8px; }
.vp-side-body::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .26); border-radius: 4px; }
.vp-side-body::-webkit-scrollbar-track { background: transparent; }

/* 分组 */
.vp-group { margin-bottom: 4px; }

.vp-group-head {
	display: flex;
	align-items: center;
	gap: 7px;
	width: 100%;
	padding: 9px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--vp-muted);
	font-size: 12.5px;
	font-weight: 650;
	letter-spacing: .03em;
	text-align: left;
}

.vp-group-head:hover { background: rgba(148, 163, 184, .08); color: var(--vp-text); }

.vp-chev {
	flex: 0 0 auto;
	transition: transform .18s;
	color: var(--vp-dim);
}

.vp-group.is-collapsed .vp-chev { transform: rotate(-90deg); }
.vp-group.is-collapsed .vp-items { display: none; }

.vp-group-name {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vp-group-n {
	flex: 0 0 auto;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(148, 163, 184, .14);
	font-size: 11px;
	font-weight: 700;
	color: var(--vp-dim);
}

.vp-items {
	list-style: none;
	margin: 0;
	padding: 0 0 0 4px;
}

/* 筛选时隐藏的条目（hidden 属性与自定义 display 会冲突，这里强制） */
.vp-items > li[hidden],
.vp-group[hidden] { display: none !important; }

/* 单条 */
.vp-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 7px 8px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--vp-text);
	font-size: 13px;
	text-align: left;
	transition: background .14s, border-color .14s;
}

.vp-item:hover {
	background: rgba(148, 163, 184, .09);
	border-color: var(--vp-border);
}

.vp-item.is-playing {
	background: var(--vp-brand-soft);
	border-color: rgba(99, 102, 241, .45);
}

/* --- 封面缩略图 --- */
.vp-thumb {
	position: relative;
	flex: 0 0 auto;
	width: 78px;
	height: 44px;
	border-radius: 7px;
	overflow: hidden;
	background: #000;
	border: 1px solid var(--vp-border);
}

.vp-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vp-thumb-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #171D2B, #0C1019);
}

/* 封面右下角集数角标 */
.vp-thumb-ep {
	position: absolute;
	right: 3px;
	bottom: 3px;
	min-width: 16px;
	padding: 0 4px;
	border-radius: 4px;
	background: rgba(7, 9, 15, .82);
	color: #E6EAF3;
	font-size: 10px;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* --- 文字区 --- */
.vp-item-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vp-item-name {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.4;
}

.vp-item.is-playing .vp-item-name { color: #C7D2FE; }

.vp-item-sub {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 11.5px;
	color: var(--vp-dim);
	line-height: 1.35;
}

.vp-item.is-playing .vp-item-sub { color: rgba(165, 180, 252, .75); }

/* 获奖 / 提名标记 */
.vp-award {
	display: inline-block;
	margin-right: 3px;
	padding: 0 3px;
	border-radius: 3px;
	font-size: 9.5px;
	font-weight: 800;
	line-height: 14px;
	vertical-align: 1px;
}

.vp-award--win {
	background: rgba(250, 204, 21, .22);
	color: #FDE047;
}

.vp-award--nom {
	background: rgba(148, 163, 184, .2);
	color: #CBD5E1;
}

/* 奖项 chip（播放信息区） */
.vp-chip--award {
	border-color: rgba(250, 204, 21, .45);
	background: rgba(250, 204, 21, .14);
	color: #FDE047;
}

/* 旧的集数标签（若存在）保留兼容 */
.vp-item-ep {
	flex: 0 0 auto;
	min-width: 48px;
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--vp-dim);
	letter-spacing: .01em;
}

.vp-item.is-playing .vp-item-ep { color: #A5B4FC; }

/* 已转码标记（之前重写 .vp-item 时被误删，导致纯文本折行） */
.vp-item-badge {
	flex: 0 0 auto;
	align-self: center;
	padding: 1px 6px;
	border-radius: 5px;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: .02em;
	white-space: nowrap;
	word-break: keep-all;
	background: rgba(245, 158, 11, .18);
	color: #FCD34D;
}

.vp-item-badge[hidden] { display: none !important; }

/* 播放中的小动画条 */
.vp-item.is-playing .vp-item-name::after {
	content: "";
	display: inline-block;
	width: 3px;
	height: 3px;
	margin-left: 7px;
	border-radius: 50%;
	background: #A5B4FC;
	vertical-align: middle;
	animation: vp-pulse 1.4s ease-in-out infinite;
}

@keyframes vp-pulse {
	0%, 100% { opacity: .3; transform: scale(.8); }
	50% { opacity: 1; transform: scale(1.25); }
}

/* ============================================================================
   空状态
   ========================================================================== */

.vp-empty {
	max-width: 560px;
	margin: 12vh auto 0;
	padding: 0 24px;
	text-align: center;
}

.vp-empty-icon {
	display: inline-flex;
	margin-bottom: 20px;
	color: #A5B4FC;
	opacity: .6;
}

.vp-empty h2 {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 650;
}

.vp-empty p {
	margin: 0 0 10px;
	color: var(--vp-muted);
	font-size: 14px;
	line-height: 1.8;
}

.vp-hint {
	font-size: 12.5px !important;
	color: var(--vp-dim) !important;
}

/* ============================================================================
   移动端片单按钮
   ========================================================================== */

.vp-fab {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 45;
	width: 52px;
	height: 52px;
	display: none;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(99, 102, 241, .5);
	border-radius: 50%;
	background: var(--vp-grad);
	color: #fff;
	box-shadow: 0 14px 32px -12px rgba(99, 102, 241, .95);
}

/* ============================================================================
   搜索
   ========================================================================== */

.vp-search {
	position: fixed;
	inset: 0;
	z-index: 60;
	padding: 10vh 20px 20px;
	background: rgba(7, 9, 15, .78);
	backdrop-filter: blur(6px);
}

.vp-search[hidden] { display: none; }

.vp-search-box {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 620px;
	margin: 0 auto;
	padding: 5px 6px 5px 16px;
	border-radius: 13px;
	border: 1px solid var(--vp-border-str);
	background: var(--vp-surface);
}

.vp-search-box input {
	flex: 1 1 auto;
	padding: 10px 0;
	border: 0;
	background: transparent;
	color: var(--vp-text);
	font-size: 15px;
	outline: none;
}

.vp-search-box input::placeholder { color: var(--vp-dim); }

.vp-search-results {
	max-width: 620px;
	margin: 12px auto 0;
	padding: 0;
	list-style: none;
	max-height: 56vh;
	overflow-y: auto;
}

.vp-search-results li { margin-bottom: 4px; }

.vp-search-results button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: rgba(18, 23, 35, .8);
	color: var(--vp-text);
	font-size: 13.5px;
	text-align: left;
}

.vp-search-results button:hover {
	background: var(--vp-surface-2);
	border-color: var(--vp-border-str);
}

/* 搜索结果里的封面 */
.vp-sr-thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 36px;
	border-radius: 6px;
	overflow: hidden;
	background: #000;
	border: 1px solid var(--vp-border);
}

.vp-sr-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vp-sr-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.vp-sr-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vp-sr-sub {
	font-size: 11.5px;
	color: var(--vp-dim);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vp-search-results .vp-sr-grp {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--vp-dim);
}

.vp-search-results .vp-sr-empty {
	padding: 18px 14px;
	color: var(--vp-dim);
	font-size: 13px;
	text-align: center;
}

/* ============================================================================
   Toast
   ========================================================================== */

.vp-toast {
	position: fixed;
	left: 50%;
	bottom: 90px;
	transform: translateX(-50%) translateY(10px);
	z-index: 70;
	padding: 10px 18px;
	border-radius: 11px;
	border: 1px solid var(--vp-border-str);
	background: rgba(12, 16, 25, .96);
	backdrop-filter: blur(10px);
	color: #E6EAF3;
	font-size: 13px;
	font-weight: 550;
	box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .95);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
	white-space: nowrap;
}

.vp-toast.is-on {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.vp-toast[hidden] { display: none; }

/* ============================================================================
   响应式
   ========================================================================== */

@media (max-width: 1180px) {
	.vp-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
}

@media (max-width: 900px) {
	.vp-layout {
		grid-template-columns: minmax(0, 1fr);
		padding: 14px;
		gap: 14px;
	}

	.vp-side {
		position: fixed;
		inset: auto 0 0 0;
		top: auto;
		z-index: 50;
		max-height: 68vh;
		border-radius: 18px 18px 0 0;
		border-bottom: 0;
		transform: translateY(101%);
		transition: transform .28s cubic-bezier(.22, .61, .36, 1);
		box-shadow: 0 -22px 60px -20px rgba(0, 0, 0, .95);

		/* 桌面端是半透明的侧栏，悬浮在视频上时会透出播放器里的文字，
		   看起来像"文字重叠"。手机上必须用不透明底色。 */
		background: #0F1524;
	}

	.vp-side.is-open { transform: translateY(0); }

	.vp-side-head { padding: 14px 18px; }
	.vp-side-close { display: inline-flex; }

	.vp-fab { display: flex; }

	.vp-topbar { padding: 10px 14px; }
	.vp-count { display: none; }

	.vp-np-title { font-size: 17px; }

	.vp-vol { display: none; }

	.vp-time { margin-left: 4px; font-size: 12px; }
}

/* ============================================================================
   手机竖屏：控制条改两行
   ----------------------------------------------------------------------------
   一行放不下 11 个控件（时间 + 画质 + 倍速 + 全屏 + 5 个播放键 + 静音），
   挤在一起会让时间和「原画」按钮直接叠字、右边的全屏被裁掉。
   这里用 display:contents 把两组的包裹层「拆掉」，让所有控件变成
   同一个 flex 容器的直接子项，再用 order + 强制换行元素排成两行。
   ========================================================================== */

/* 桌面端不需要换行元素 */
.vp-row-break { display: none; }

@media (max-width: 640px) {
	.vp-controls-row {
		flex-wrap: wrap;
		gap: 4px 2px;
		justify-content: center;
		align-items: center;
	}

	/* 拆掉包裹层，子元素直接参与外层 flex 布局 */
	.vp-ctrl-left,
	.vp-ctrl-right { display: contents; }

	/* --- 第一行：时间 | 画质 | 倍速 | 全屏 --- */
	.vp-time {
		order: 1;
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
		padding-left: 2px;
		font-size: 11.5px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.vp-quality-wrap { order: 2; flex: 0 0 auto; }
	#vpSpeedBtn    { order: 3; flex: 0 0 auto; }
	#vpPip         { order: 4; display: none; }   /* 竖屏没必要，且 iOS 不支持 */
	#vpFs          { order: 5; flex: 0 0 auto; }

	/* 强制换行 */
	.vp-row-break {
		display: block;
		order: 10;
		flex: 0 0 100%;
		height: 0;
		margin: 0;
	}

	/* --- 第二行：上一集 / 后退 / 播放 / 前进 / 下一集 / 静音 --- */
	#vpPrev      { order: 11; }
	#vpBack      { order: 12; }
	#vpPlay      { order: 13; }
	#vpFwd       { order: 14; }
	#vpNext      { order: 15; }
	.vp-vol-wrap { order: 16; }

	.vp-btn-ctrl {
		min-width: 34px;
		height: 34px;
		padding: 0 4px;
		flex: 0 0 auto;
	}

	.vp-btn-ctrl--play {
		min-width: 40px;
		height: 40px;
	}

	.vp-btn-quality {
		padding: 0 6px;
		font-size: 11px;
		gap: 2px;
	}

	.vp-btn-quality svg { width: 10px; height: 10px; }

	/* 画质菜单：贴屏幕边距，过高的地方可以滚 */
	.vp-quality-menu {
		width: min(300px, calc(100vw - 24px));
		max-height: 62vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media (max-width: 560px) {
	.vp-btn-ctrl { min-width: 32px; height: 32px; padding: 0 4px; }
	.vp-btn-ctrl--play { min-width: 38px; height: 38px; }
	.vp-controls { padding: 0 8px 8px; }
	.vp-player { border-radius: 10px; }
	.vp-np-title { font-size: 16px; }
	.vp-bigplay { width: 62px; height: 62px; }
	.vp-bigplay svg { width: 26px; height: 26px; }
	.vp-auth-card { padding: 32px 22px 24px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
