.vsp-player-app {
	--vsp-bg: #0e0e12;
	--vsp-panel: #17171d;
	--vsp-accent: #ff3b30;
	--vsp-text: #f2f2f2;
	--vsp-muted: #9a9aa5;
	position: relative;
	max-width: 900px;
	margin: 24px 0;
	background: var(--vsp-bg);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0,0,0,0.35);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Apna "Fullscreen Mode" (CSS-based) ----
   Real browser Fullscreen API kai mobile browsers (khaaskar iOS Safari) me
   ordinary <div>/<iframe> ke liye kaam nahi karta, isliye ye hamesha-chalne-wala
   fallback hai jo poori screen cover kar deta hai. */
.vsp-player-app.vsp-app-fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	max-width: none;
	margin: 0;
	border-radius: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	background: #000;
}

.vsp-player-app.vsp-app-fullscreen .vsp-stage {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.vsp-player-app.vsp-app-fullscreen .vsp-player-holder {
	position: relative;
	flex: 1;
	min-height: 0;
}

.vsp-player-app.vsp-app-fullscreen .vsp-video-wrap {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding-top: 0;
}

.vsp-player-app.vsp-app-fullscreen .vsp-series-panel,
.vsp-player-app.vsp-app-fullscreen .vsp-now-playing {
	display: none;
}

/* Jab real orientation-lock na ho paye to CSS se hi visually landscape rotate kar dete hain */
.vsp-player-app.vsp-app-fullscreen.vsp-app-rotated {
	top: 50%;
	left: 50%;
	width: 100vh;
	height: 100vw;
	transform: translate(-50%, -50%) rotate(90deg);
	transform-origin: center center;
}

.vsp-fs-close {
	display: none;
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(0,0,0,0.6);
	border: 1px solid rgba(255,255,255,0.25);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}

.vsp-player-app.vsp-app-fullscreen .vsp-fs-close {
	display: flex;
}

.vsp-stage {
	background: #000;
}

.vsp-video-wrap {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
	background: #000;
}

.vsp-video-wrap iframe,
.vsp-video-wrap video.vsp-native-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

/* ---- Thumbnail / Poster mode (click-to-play) ---- */

.vsp-poster-mode {
	cursor: pointer;
}

.vsp-poster-shadow-frame {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.vsp-poster-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	display: block;
}

/* Jab koi thumbnail na ho to ye generic dark poster background dikhta hai */
.vsp-poster-generic {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 50% 50%, rgba(255,59,48,0.15), transparent 60%),
		linear-gradient(135deg, #1c1c22 0%, #0e0e12 100%);
}

/* Thumbnail ke edges par halka subtle inner-shadow frame (image ko dark/dull nahi karta) */
.vsp-poster-inner-shadow {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.vsp-poster-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 68px;
	height: 68px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.85);
	background: rgba(20, 20, 24, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.vsp-poster-play-btn:hover {
	background: var(--vsp-accent, #ff3b30);
	border-color: var(--vsp-accent, #ff3b30);
	transform: translate(-50%, -50%) scale(1.08);
}

.vsp-play-triangle {
	width: 0;
	height: 0;
	margin-left: 5px;
	border-top: 13px solid transparent;
	border-bottom: 13px solid transparent;
	border-left: 21px solid #fff;
}

@media (max-width: 480px) {
	.vsp-poster-play-btn {
		width: 52px;
		height: 52px;
	}
	.vsp-play-triangle {
		border-top-width: 10px;
		border-bottom-width: 10px;
		border-left-width: 16px;
	}
}

.vsp-now-playing {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: linear-gradient(180deg, #1a1a20, #131317);
	border-bottom: 1px solid #26262e;
}

.vsp-badge {
	background: var(--vsp-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	flex-shrink: 0;
}

.vsp-now-title {
	color: var(--vsp-text);
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vsp-series-panel {
	background: var(--vsp-panel);
	padding: 14px 16px 20px;
}

.vsp-season-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.vsp-season-tab {
	background: #23232b;
	color: var(--vsp-muted);
	border: 1px solid #2d2d36;
	padding: 7px 16px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}

.vsp-season-tab:hover {
	color: var(--vsp-text);
	border-color: var(--vsp-accent);
}

.vsp-season-tab.active {
	background: var(--vsp-accent);
	color: #fff;
	border-color: var(--vsp-accent);
}

.vsp-episode-list {
	display: none;
	flex-direction: column;
	gap: 8px;
	max-height: 360px;
	overflow-y: auto;
	padding-right: 4px;
}

.vsp-episode-list.active {
	display: flex;
}

.vsp-episode-item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #1d1d24;
	border: 1px solid #26262e;
	border-radius: 8px;
	padding: 10px 14px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.vsp-episode-item:hover {
	background: #23232c;
	border-color: #3a3a45;
}

.vsp-episode-item.playing {
	background: rgba(255,59,48,0.12);
	border-color: var(--vsp-accent);
}

.vsp-ep-play-icon {
	color: var(--vsp-accent);
	font-size: 11px;
	width: 16px;
	text-align: center;
	flex-shrink: 0;
}

.vsp-ep-num {
	color: var(--vsp-muted);
	font-size: 12px;
	font-weight: 700;
	width: 22px;
	flex-shrink: 0;
}

.vsp-ep-name {
	color: var(--vsp-text);
	font-size: 14px;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vsp-empty {
	color: var(--vsp-muted);
	font-size: 13px;
	padding: 10px 2px;
}

.vsp-error {
	color: #ff6b60;
	background: #1d1d24;
	padding: 14px;
	border-radius: 8px;
	font-size: 14px;
}

@media (max-width: 480px) {
	.vsp-player-app {
		border-radius: 0;
		margin: 12px -12px;
	}
	.vsp-episode-list {
		max-height: 280px;
	}
}
