/**
 * MyVideo Frontend Stylesheet
 * Responsive containers, background video layouts, and accessibility.
 */

.myvideo-container {
	position: relative;
	box-sizing: border-box;
	width: 100%;
}

/* Background mode (Viewport / Full-width): Covers parent section seamlessly */
.myvideo-container.myvideo-mode-background.myvideo-sizing-viewport,
.myvideo-container.myvideo-mode-background:not(.myvideo-sizing-container) {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}

.myvideo-mode-background.myvideo-sizing-viewport .myvideo-element,
.myvideo-mode-background:not(.myvideo-sizing-container) .myvideo-element {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	transform: translate(-50%, -50%);
	object-fit: cover;
	object-position: center;
	border: none;
	outline: none;
}

/* Background mode (Container / In-block): Natural flow without absolute positioning */
.myvideo-container.myvideo-mode-background.myvideo-sizing-container {
	position: relative;
	top: auto;
	left: auto;
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	overflow: hidden;
	z-index: 1;
	pointer-events: none;
}

.myvideo-mode-background.myvideo-sizing-container .myvideo-element {
	position: relative;
	top: auto;
	left: auto;
	width: 100%;
	height: auto;
	max-width: 100%;
	transform: none;
	display: block;
	object-fit: contain;
	object-position: center;
	border: none;
	outline: none;
}

/* Standard Player mode */
.myvideo-container.myvideo-mode-player {
	position: relative;
	display: block;
	max-width: 100%;
}

.myvideo-mode-player .myvideo-element {
	width: 100%;
	height: auto;
	display: block;
	border-radius: inherit;
}

.myvideo-mode-player .myvideo-element:focus-visible {
	outline: none;
}

/* ==========================================================================
   Modern Glassmorphism Player Skin (PRO)
   ========================================================================== */
.myvideo-player-wrapper {
	/* Accent color customization — overridable per-instance via inline style */
	--myvideo-accent: #6366f1;
	--myvideo-accent-dark: color-mix(in srgb, var(--myvideo-accent) 80%, #000000);
	--myvideo-accent-light: color-mix(in srgb, var(--myvideo-accent) 80%, #ffffff);

	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	container-type: inline-size;
	container-name: myvideo-player;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
}

.myvideo-player-wrapper .myvideo-element {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: inherit;
	background: #000;
	cursor: pointer;
}

/* Fullscreen Mode */
.myvideo-player-wrapper:fullscreen,
.myvideo-player-wrapper:-webkit-full-screen,
.myvideo-player-wrapper:-moz-full-screen {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	border-radius: 0 !important;
	background: #000;
}

.myvideo-player-wrapper:fullscreen .myvideo-element,
.myvideo-player-wrapper:-webkit-full-screen .myvideo-element,
.myvideo-player-wrapper:-moz-full-screen .myvideo-element {
	height: 100% !important;
	object-fit: contain;
}

/* Center Big Play Button */
.myvideo-big-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(1);
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: rgba(from var(--myvideo-accent) r g b / 0.92);
	background: color-mix(in srgb, var(--myvideo-accent) 92%, transparent);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 2px solid rgba(255, 255, 255, 0.4);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 15;
	box-shadow: 0 10px 25px color-mix(in srgb, var(--myvideo-accent) 50%, transparent);
	transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, opacity 0.22s;
}

.myvideo-big-play-btn:hover {
	transform: translate(-50%, -50%) scale(1.1);
	background: var(--myvideo-accent-dark);
}

.myvideo-big-play-btn svg {
	width: 28px;
	height: 28px;
	margin-left: 3px;
	fill: currentColor;
}

.myvideo-player-wrapper.myvideo-is-playing .myvideo-big-play-btn {
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%) scale(0.8);
}

/* Buffering Spinner */
.myvideo-buffer-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	margin-left: -24px;
	border: 4px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--myvideo-accent-light);
	border-radius: 50%;
	animation: myvideoSpin 0.75s linear infinite;
	z-index: 14;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}

.myvideo-player-wrapper.myvideo-is-waiting .myvideo-buffer-spinner {
	opacity: 1;
}

/* Modern Controls Bar (Glassmorphism) */
.myvideo-controls-bar {
	position: absolute;
	bottom: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(15, 23, 42, 0.78);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	padding: 6px 12px;
	z-index: 20;
	color: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Auto-hide controls when playing & idle */
.myvideo-player-wrapper.myvideo-is-playing.myvideo-controls-hidden .myvideo-controls-bar {
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
}

.myvideo-player-wrapper:hover .myvideo-controls-bar,
.myvideo-player-wrapper:focus-within .myvideo-controls-bar,
.myvideo-player-wrapper.myvideo-is-paused .myvideo-controls-bar {
	opacity: 1 !important;
	transform: translateY(0) !important;
	pointer-events: auto !important;
}

/* Control Buttons */
.myvideo-btn {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.88);
	width: 32px;
	height: 32px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	cursor: pointer;
	transition: color 0.15s, background-color 0.15s, transform 0.15s;
	flex-shrink: 0;
}

.myvideo-btn:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.18);
}

.myvideo-btn:active {
	transform: scale(0.94);
}

.myvideo-btn:focus-visible {
	outline: none;
}

.myvideo-btn svg {
	width: 18px;
	height: 18px;
	/* Do NOT set fill here globally — each SVG manages its own fill/stroke attributes.
	   Setting fill:currentColor here would break stroke-only icons (settings, pip, fullscreen). */
}

/* Time display */
.myvideo-time-display {
	font-size: 12px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	color: rgba(255, 255, 255, 0.85);
	white-space: nowrap;
	margin: 0 4px;
	letter-spacing: -0.2px;
}

.myvideo-time-current {
	color: #ffffff;
	font-weight: 600;
}

.myvideo-time-duration {
	color: rgba(255, 255, 255, 0.65);
}

/* Sleek Progress Bar with Buffer and Tooltip */
.myvideo-progress-wrap {
	position: relative;
	flex: 1;
	height: 20px;
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 0 4px;
	touch-action: none;
}

.myvideo-progress-rail {
	position: relative;
	width: 100%;
	height: 5px;
	background: rgba(255, 255, 255, 0.22);
	border-radius: 4px;
	overflow: visible;
	transition: height 0.15s ease;
}

.myvideo-progress-wrap:hover .myvideo-progress-rail {
	height: 8px;
}

.myvideo-progress-buffered {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	background: rgba(255, 255, 255, 0.38);
	border-radius: inherit;
	pointer-events: none;
	transition: width 0.2s ease;
}

.myvideo-progress-played {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	background: var(--myvideo-accent);
	border-radius: inherit;
	pointer-events: none;
}

.myvideo-progress-thumb {
	position: absolute;
	top: 50%;
	left: 0%;
	width: 14px;
	height: 14px;
	background: #ffffff;
	border: 2px solid var(--myvideo-accent);
	border-radius: 50%;
	transform: translate(-50%, -50%) scale(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	z-index: 5;
}

.myvideo-progress-wrap:hover .myvideo-progress-thumb,
.myvideo-progress-wrap.is-dragging .myvideo-progress-thumb {
	transform: translate(-50%, -50%) scale(1);
}

/* Time Hover Tooltip */
.myvideo-time-tooltip {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	transform: translateX(-50%);
	background: rgba(15, 23, 42, 0.95);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	padding: 4px 6px;
	font-size: 11px;
	font-family: ui-monospace, monospace;
	border-radius: 6px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
	z-index: 25;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.myvideo-thumb-preview {
	border-radius: 4px;
	background-repeat: no-repeat;
	background-color: #000000;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
	overflow: hidden;
	position: relative;
	width: 160px;
	height: 90px;
}

.myvideo-scrub-preview-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	border-radius: inherit;
}

.myvideo-tooltip-text {
	text-align: center;
	line-height: 1.25;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 1px 4px;
}

.myvideo-tooltip-time {
	font-weight: 700;
	color: #ffffff;
	font-size: 11px;
}

.myvideo-tooltip-chapter {
	display: block;
	color: var(--myvideo-accent);
	font-weight: 600;
	font-size: 10px;
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.myvideo-progress-wrap:hover .myvideo-time-tooltip {
	opacity: 1;
}

/* Progress chapter markers */
.myvideo-chapter-marker {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: rgba(0, 0, 0, 0.75);
	z-index: 4;
	pointer-events: none;
	box-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
}

.myvideo-chapter-marker.is-active-hover {
	background: var(--myvideo-accent);
	box-shadow: 0 0 8px var(--myvideo-accent);
	width: 3px;
	z-index: 6;
}

.myvideo-chapters-menu {
	min-width: 170px;
	max-height: 200px;
	overflow-y: auto;
}

.myvideo-chapters-menu .myvideo-menu-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.myvideo-chapter-time {
	color: var(--myvideo-accent);
	font-size: 11px;
	font-family: monospace;
	flex-shrink: 0;
}

.myvideo-chapter-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}


/* Volume Control & Expandable Slider */
.myvideo-volume-wrap {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	position: relative;
}

.myvideo-volume-slider-popup {
	display: inline-flex;
	align-items: center;
}

.myvideo-volume-slider {
	width: 58px;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
	cursor: pointer;
	accent-color: var(--myvideo-accent);
	outline: none;
	transition: opacity 0.15s;
}

.myvideo-volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--myvideo-accent);
	cursor: pointer;
}

.myvideo-volume-slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--myvideo-accent);
	cursor: pointer;
	border: none;
}

.myvideo-volume-slider:focus-visible {
	outline: none;
}

/* Dropdown Menus (Speed & Quality) */
.myvideo-menu-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.myvideo-menu-popup {
	position: absolute;
	bottom: calc(100% + 8px);
	right: 0;
	min-width: 115px;
	background: rgba(15, 23, 42, 0.94);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	padding: 5px;
	display: none;
	flex-direction: column;
	gap: 2px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
	z-index: 35;
}

.myvideo-menu-popup.is-open {
	display: flex;
	animation: myvideoMenuIn 0.16s ease-out;
}

.myvideo-menu-item {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.88);
	font-size: 12px;
	font-weight: 500;
	padding: 6px 10px;
	border-radius: 5px;
	text-align: left;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: background 0.12s, color 0.12s;
	width: 100%;
	box-sizing: border-box;
}

.myvideo-menu-item:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
}

.myvideo-menu-item.is-active,
.myvideo-menu-item.is-active:hover {
	background: var(--myvideo-accent);
	color: #0f172a;
	font-weight: 700;
}

.myvideo-menu-item.is-active .myvideo-btn-badge {
	color: #0f172a;
	background: rgba(0, 0, 0, 0.12);
}

.myvideo-btn-badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.2px;
	padding: 2px 5px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.14);
}

/* Smart Resume Playback Banner */
.myvideo-resume-banner {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	background: rgba(15, 23, 42, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(99, 102, 241, 0.45);
	border-radius: 10px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	z-index: 25;
	color: #ffffff;
	font-size: 13px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
	animation: myvideoSlideDown 0.28s ease-out;
}

.myvideo-resume-text {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}

.myvideo-resume-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.myvideo-resume-btn-ok {
	background: var(--myvideo-accent);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.myvideo-resume-btn-ok:hover {
	background: var(--myvideo-accent-dark);
}

.myvideo-resume-btn-restart {
	background: rgba(255, 255, 255, 0.14);
	color: #e2e8f0;
	border: none;
	border-radius: 6px;
	padding: 5px 10px;
	font-size: 12px;
	cursor: pointer;
	transition: background 0.15s;
}

.myvideo-resume-btn-restart:hover {
	background: rgba(255, 255, 255, 0.24);
	color: #ffffff;
}

.myvideo-resume-btn-dismiss {
	background: transparent;
	color: #94a3b8;
	border: none;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 4px;
	border-radius: 4px;
}

.myvideo-resume-btn-dismiss:hover {
	color: #ffffff;
}

/* Sticky PiP Mini Player — default: bottom-right */
.myvideo-player-wrapper.myvideo-sticky-active {
	position: fixed;
	bottom: 24px;
	right: 24px;
	left: auto;
	top: auto;
	width: 320px;
	max-width: 88vw;
	height: auto;
	z-index: 99999;
	border-radius: 12px;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
	animation: myvideoStickyIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* PiP corner variants */
.myvideo-player-wrapper.myvideo-sticky-active.myvideo-pip-bl {
	bottom: 24px;
	left: 24px;
	right: auto;
	top: auto;
}

.myvideo-player-wrapper.myvideo-sticky-active.myvideo-pip-tr {
	top: 24px;
	right: 24px;
	bottom: auto;
	left: auto;
}

.myvideo-player-wrapper.myvideo-sticky-active.myvideo-pip-tl {
	top: 24px;
	left: 24px;
	bottom: auto;
	right: auto;
}

.myvideo-sticky-close {
	display: none;
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	background: rgba(15, 23, 42, 0.85);
	backdrop-filter: blur(8px);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 45;
	font-size: 13px;
	font-weight: bold;
	line-height: 1;
	transition: background 0.15s, transform 0.15s;
}

.myvideo-sticky-close:hover {
	background: #ef4444;
	transform: scale(1.08);
}

.myvideo-player-wrapper.myvideo-sticky-active .myvideo-sticky-close {
	display: flex;
}

/* Sticky mini player compact controls */
.myvideo-player-wrapper.myvideo-sticky-active .myvideo-controls-bar {
	padding: 4px 8px;
	bottom: 8px;
	left: 8px;
	right: 8px;
	gap: 4px;
}

.myvideo-player-wrapper.myvideo-sticky-active .myvideo-btn-rewind,
.myvideo-player-wrapper.myvideo-sticky-active .myvideo-btn-forward,
.myvideo-player-wrapper.myvideo-sticky-active .myvideo-volume-slider-popup,
.myvideo-player-wrapper.myvideo-sticky-active .myvideo-volume-slider,
.myvideo-player-wrapper.myvideo-sticky-active .myvideo-time-display {
	display: none !important;
}

/* Keyframes */
@keyframes myvideoSpin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes myvideoStickyIn {
	from {
		opacity: 0;
		transform: translateY(24px) scale(0.92);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes myvideoSlideDown {
	from {
		opacity: 0;
		transform: translateY(-12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes myvideoMenuIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive Player Controls */
@container myvideo-player (max-width: 580px) {
	.myvideo-controls-bar {
		padding: 4px 8px;
		gap: 4px;
	}
	.myvideo-btn-rewind,
	.myvideo-btn-forward {
		display: none;
	}
	.myvideo-volume-wrap {
		position: static;
	}
	.myvideo-volume-slider-popup {
		display: none;
		position: absolute;
		bottom: 100%;
		left: 48px;
		width: 32px;
		height: 100px;
		margin-bottom: 8px;
		background: rgba(15, 23, 42, 0.94);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
		border: 1px solid rgba(255, 255, 255, 0.16);
		border-radius: 8px;
		align-items: center;
		justify-content: center;
		z-index: 50;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
	}
	.myvideo-volume-wrap.is-slider-visible .myvideo-volume-slider-popup {
		display: flex;
	}
	.myvideo-volume-slider {
		width: 80px;
		transform: rotate(-90deg);
	}
	.myvideo-time-display {
		font-size: 11px;
	}
	.myvideo-progress-bar {
		margin: 0 4px;
	}
}

@container myvideo-player (max-width: 380px) {
	.myvideo-controls-bar {
		padding: 4px;
		gap: 2px;
	}
	.myvideo-time-display,
	.myvideo-volume-container,
	.myvideo-btn-pip {
		display: none;
	}
}

/* Fallback text */
.myvideo-unsupported {
	padding: 10px;
	background: #f1f5f9;
	color: #475569;
	font-size: 13px;
	border-radius: 4px;
	text-align: center;
}

/* Reduced Motion Support (WCAG 2.1 AA Compliance) */
@media (prefers-reduced-motion: reduce) {
	.myvideo-mode-background .myvideo-element {
		animation: none !important;
	}
	.myvideo-buffer-spinner {
		animation: none !important;
	}
	.myvideo-player-wrapper.myvideo-sticky-active {
		animation: none !important;
	}
	.myvideo-resume-banner {
		animation: none !important;
	}
	.myvideo-endscreen-content {
		animation: none !important;
	}
}

/* ==========================================================================
   10. End-Screen Conversion Overlay (CTA) (PRO)
   ========================================================================== */
.myvideo-endscreen-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.88);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 35;
	text-align: center;
	color: #ffffff;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
	border-radius: inherit;
}

.myvideo-endscreen-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.myvideo-endscreen-content {
	max-width: 520px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	animation: myvideoSlideUp 0.3s ease-out;
}

.myvideo-endscreen-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 10px 0;
	color: #ffffff;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.myvideo-endscreen-text {
	font-size: 14px;
	color: #cbd5e1;
	margin: 0 0 22px 0;
	line-height: 1.55;
}

.myvideo-endscreen-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: center;
}

.myvideo-endscreen-btn-primary {
	background: var(--myvideo-accent);
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	padding: 11px 24px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.myvideo-endscreen-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
	opacity: 0.92;
}

.myvideo-endscreen-btn-primary:focus-visible {
	outline: none;
}

.myvideo-endscreen-btn-replay {
	background: rgba(255, 255, 255, 0.14);
	color: #f1f5f9;
	border: 1px solid rgba(255, 255, 255, 0.22);
	font-weight: 500;
	font-size: 14px;
	padding: 10px 20px;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: background 0.15s, color 0.15s;
}

.myvideo-endscreen-btn-replay:hover {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

.myvideo-endscreen-btn-replay:focus-visible {
	outline: none;
}

.myvideo-endscreen-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #94a3b8;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
}

.myvideo-endscreen-close:hover {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

.myvideo-endscreen-close:focus-visible {
	outline: none;
}

@keyframes myvideoSlideUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 580px) {
	.myvideo-endscreen-title {
		font-size: 18px;
		margin-bottom: 6px;
	}
	.myvideo-endscreen-text {
		font-size: 12px;
		margin-bottom: 16px;
	}
	.myvideo-endscreen-btn-primary,
	.myvideo-endscreen-btn-replay {
		padding: 8px 16px;
		font-size: 13px;
	}
}

/* ==========================================================================
   11. Content Protection & Dynamic Viewer Watermark (PRO)
   ========================================================================== */
.myvideo-player-wrapper.myvideo-is-protected {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.myvideo-player-wrapper.myvideo-is-protected video {
	pointer-events: auto;
}

@keyframes myvideo-shield-pulse {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 rgba(16, 185, 129, 0));
	}
	50% {
		transform: scale(1.18);
		filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
	}
}

.myvideo-shield-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.25s ease;
	color: #94a3b8;
	vertical-align: middle;
}

.myvideo-shield-icon.is-active {
	color: #10b981;
	animation: myvideo-shield-pulse 2.2s infinite ease-in-out;
}

/* ==========================================================================
   12. In-stream Lead Gate Overlay (PRO)
   ========================================================================== */
.myvideo-lead-gate-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.88);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	z-index: 1000 !important;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	pointer-events: none;
}

.myvideo-lead-gate-overlay.is-visible {
	display: flex !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

.myvideo-lead-gate-card {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
	max-width: 520px;
	max-height: 90%;
	overflow-y: auto;
	width: 100%;
	padding: 24px;
	box-sizing: border-box;
	animation: myvideo-gate-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	color: #1e293b;
	text-align: left;
	z-index: 1001 !important;
}

@keyframes myvideo-gate-pop {
	from { transform: scale(0.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.myvideo-lead-gate-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.2s ease, background 0.2s ease;
	z-index: 1002;
}

.myvideo-lead-gate-close:hover {
	color: #0f172a;
	background: #f1f5f9;
}

.myvideo-lead-gate-title {
	margin: 0 0 16px;
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	text-align: center;
	padding-right: 20px;
}

/* Force theme custom forms (e.g. .sidebar__form) to be visible inside modal */
.myvideo-lead-gate-body form,
.myvideo-lead-gate-body .sidebar__form,
.myvideo-lead-gate-body form[class*="form"] {
	display: block !important;
	position: static !important;
	transform: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border: none !important;
}

.myvideo-lead-gate-body * {
	box-sizing: border-box;
}

.myvideo-lead-gate-body input,
.myvideo-lead-gate-body label,
.myvideo-lead-gate-body select,
.myvideo-lead-gate-body textarea,
.myvideo-lead-gate-body button,
.myvideo-lead-gate-body ul,
.myvideo-lead-gate-body li {
	visibility: visible !important;
	opacity: 1 !important;
}

.myvideo-lead-gate-body form input[type="text"],
.myvideo-lead-gate-body form input[type="email"],
.myvideo-lead-gate-body form input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	margin-bottom: 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	color: #0f172a;
	background: #ffffff;
}

.myvideo-lead-gate-body form button[type="submit"],
.myvideo-lead-gate-body form input[type="submit"] {
	width: 100%;
	padding: 12px 18px;
	background: var(--myvideo-accent, #6366f1);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.myvideo-lead-gate-body form button[type="submit"]:hover,
.myvideo-lead-gate-body form input[type="submit"]:hover {
	opacity: 0.9;
}

/* ==========================================================================
   13. Shoppable Time-stamped Hotspots (PRO)
   ========================================================================== */
.myvideo-hotspots-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 25;
	overflow: hidden;
}

.myvideo-hotspot-item {
	position: absolute;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 12px;
	box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.1);
	width: auto;
	min-width: 220px;
	max-width: 340px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
	z-index: 26;
	overflow: visible;
}

.myvideo-hotspot-item.is-visible {
	opacity: 1 !important;
	transform: translateY(0) !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

/* 4-corner positioning */
.myvideo-hotspot-item.myvideo-pos-bottom-left,
.myvideo-hotspot-item:not([class*="myvideo-pos-"]) {
	bottom: 60px;
	left: 18px;
	top: auto;
	right: auto;
}
.myvideo-hotspot-item.myvideo-pos-bottom-right {
	bottom: 60px;
	right: 18px;
	top: auto;
	left: auto;
}
.myvideo-hotspot-item.myvideo-pos-top-left {
	top: 18px;
	left: 18px;
	bottom: auto;
	right: auto;
}
.myvideo-hotspot-item.myvideo-pos-top-right {
	top: 18px;
	right: 18px;
	bottom: auto;
	left: auto;
}

.myvideo-hotspot-close {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	border-radius: 50%;
	background: #0f172a;
	border: 2px solid #ffffff;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	z-index: 30;
	padding: 0;
	margin: 0;
	line-height: 1;
	transition: transform 0.15s ease, background 0.15s ease;
}

.myvideo-hotspot-close svg {
	width: 10px;
	height: 10px;
	display: block;
	pointer-events: none;
	margin: 0 auto;
}

.myvideo-hotspot-close:hover {
	background: #ef4444;
	transform: scale(1.1);
}

.myvideo-hotspot-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none !important;
	color: #0f172a !important;
	border-radius: 12px;
}

.myvideo-hotspot-thumb {
	width: 54px !important;
	height: 54px !important;
	min-width: 54px !important;
	max-width: 54px !important;
	min-height: 54px !important;
	max-height: 54px !important;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f1f5f9;
	display: block;
}

.myvideo-hotspot-thumb img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	border: none !important;
	border-radius: 8px !important;
}

.myvideo-hotspot-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: left;
}

.myvideo-hotspot-title {
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	line-height: 1.25 !important;
	white-space: normal !important;
	word-break: break-word !important;
	margin: 0 !important;
	padding: 0 !important;
}

.myvideo-hotspot-subtitle {
	font-size: 12px !important;
	font-weight: 500 !important;
	color: #475569 !important;
	margin-top: 3px !important;
	line-height: 1.25 !important;
	white-space: normal !important;
}

.myvideo-hotspot-arrow {
	font-size: 18px !important;
	color: var(--myvideo-accent, #6366f1) !important;
	font-weight: 700 !important;
	padding-left: 6px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.myvideo-hotspot-link:hover .myvideo-hotspot-arrow {
	transform: translateX(4px);
}



/* ==========================================================================
   14. Floating Video Bubble Widget (Stories / Shorts)
   ========================================================================== */
.myvideo-bubble-widget {
	position: fixed;
	z-index: 99990;
	pointer-events: auto;
	user-select: none;
}

.myvideo-bubble-widget.is-pos-br {
	bottom: 24px;
	right: 24px;
}

.myvideo-bubble-widget.is-pos-bl {
	bottom: 24px;
	left: 24px;
}

.myvideo-bubble-trigger {
	position: relative;
	cursor: pointer;
	outline: none;
	display: block;
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.myvideo-bubble-trigger:hover,
.myvideo-bubble-trigger:focus-visible {
	transform: scale(1.08);
}

.myvideo-bubble-widget.is-shape-circle .myvideo-bubble-preview-wrap {
	width: 88px;
	height: 88px;
	border-radius: 50%;
}

.myvideo-bubble-widget.is-shape-rect .myvideo-bubble-preview-wrap {
	width: 96px;
	height: 144px;
	border-radius: 16px;
}

.myvideo-bubble-preview-wrap {
	position: relative;
	overflow: hidden;
	border: 3px solid #ffffff;
	box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
	background: #0f172a;
}

.myvideo-bubble-preview-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.myvideo-bubble-sound-badge {
	position: absolute;
	bottom: 6px;
	right: 6px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.myvideo-bubble-dismiss-btn {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #1e293b;
	color: #ffffff;
	border: 1px solid #ffffff;
	font-size: 13px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
	transition: background 0.2s ease, transform 0.2s ease;
}

.myvideo-bubble-dismiss-btn:hover {
	background: #ef4444;
	transform: scale(1.1);
}

/* Modal 9:16 Vertical Stories Player */
.myvideo-bubble-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.myvideo-bubble-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.myvideo-bubble-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.7);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.myvideo-bubble-card {
	position: relative;
	width: 100%;
	max-width: 360px;
	height: 82vh;
	max-height: 640px;
	background: #000000;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	animation: myvideo-bubble-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
}

@keyframes myvideo-bubble-pop {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.myvideo-bubble-progress-wrap {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: rgba(255, 255, 255, 0.25);
	z-index: 15;
}

.myvideo-bubble-progress-bar {
	height: 100%;
	width: 0%;
	background: #ffffff;
	border-radius: 0 2px 2px 0;
	transition: width 0.1s linear;
}

.myvideo-bubble-top-bar {
	position: absolute;
	top: 6px;
	left: 0;
	width: 100%;
	padding: 8px 12px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 12;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
	pointer-events: none;
}

.myvideo-bubble-title {
	font-size: 13px;
	font-weight: 600;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 180px;
	pointer-events: auto;
}

.myvideo-bubble-top-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	pointer-events: auto;
}

.myvideo-bubble-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 1;
	box-sizing: border-box;
	transition: background 0.15s ease, transform 0.15s ease;
}

.myvideo-bubble-btn:hover {
	background: rgba(15, 23, 42, 0.9);
	transform: scale(1.08);
}

.myvideo-bubble-modal-close:hover {
	background: rgba(239, 68, 68, 0.9);
	transform: scale(1.08);
}

.myvideo-bubble-card-video-wrap {
	position: relative;
	flex: 1;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #000000;
}

.myvideo-bubble-main-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	cursor: pointer;
}

.myvideo-bubble-center-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 2px solid rgba(255, 255, 255, 0.35);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 8;
	padding: 0;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	transition: transform 0.2s ease, background 0.2s ease;
}

.myvideo-bubble-center-play:hover {
	background: rgba(15, 23, 42, 0.9);
	transform: translate(-50%, -50%) scale(1.1);
}

.myvideo-bubble-card-footer {
	padding: 14px 18px 18px;
	background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	box-sizing: border-box;
	z-index: 30;
	pointer-events: auto;
}

.myvideo-bubble-cta-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 18px;
	box-sizing: border-box;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
	pointer-events: auto;
}

.myvideo-bubble-cta-btn:hover {
	transform: translateY(-2px);
	opacity: 0.95;
}

/* Mini Preview CTA Pill Badge under floating bubble */
.myvideo-bubble-preview-badge {
	margin-top: 6px;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 110px;
	margin-left: auto;
	margin-right: auto;
	letter-spacing: 0.2px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.myvideo-bubble-trigger:hover .myvideo-bubble-preview-badge {
	transform: translateY(-1px) scale(1.05);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Access Gate & Password Protection (PRO)
   ========================================================================== */
.myvideo-access-gate-container {
	position: relative;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	background: #0f172a;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 360px;
	aspect-ratio: 16 / 9;
	box-sizing: border-box;
}

.myvideo-gate-backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(18px) brightness(0.35);
	transform: scale(1.08);
	pointer-events: none;
}

.myvideo-access-gate-card {
	position: relative;
	z-index: 2;
	max-width: 440px;
	width: 90%;
	padding: 32px 28px;
	background: rgba(15, 23, 42, 0.88);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
	text-align: center;
	box-sizing: border-box;
}

.myvideo-gate-pass-input:focus {
	border-color: var(--myvideo-accent-light, #818cf8) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--myvideo-accent, #6366f1) 25%, transparent);
}

.myvideo-gate-submit-btn:hover {
	background: var(--myvideo-accent-dark, #4f46e5) !important;
	transform: translateY(-1px);
}

.myvideo-gate-submit-btn:active {
	transform: translateY(0);
}

.myvideo-shake {
	animation: myvideoShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes myvideoShake {
	10%, 90% { transform: translate3d(-1px, 0, 0); }
	20%, 80% { transform: translate3d(2px, 0, 0); }
	30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
	40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ==========================================================================
   Animated WebP Poster (PRO)
   ========================================================================== */
.myvideo-animated-poster-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
	z-index: 2;
}

.myvideo-container.has-animated-poster:hover .myvideo-animated-poster-img {
	opacity: 1;
}

.myvideo-container.is-playing .myvideo-animated-poster-img {
	display: none !important;
	opacity: 0 !important;
}

/* ==========================================================================
   Playlists & Gallery (PRO)
   ========================================================================== */
.myvideo-playlist-wrapper {
	box-sizing: border-box;
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	margin: 20px 0;
}

.myvideo-playlist-wrapper *,
.myvideo-playlist-wrapper *::before,
.myvideo-playlist-wrapper *::after {
	box-sizing: border-box;
}

/* Themes */
.myvideo-playlist-theme-dark {
	background: #0f172a;
	color: #f8fafc;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.myvideo-playlist-theme-light {
	background: #ffffff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Sidebar Layout */
.myvideo-playlist-layout-sidebar {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0;
}

.myvideo-playlist-stage {
	position: relative;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.myvideo-playlist-layout-sidebar .myvideo-playlist-stage {
	flex: 1 1 60%;
	min-width: 300px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.myvideo-playlist-layout-sidebar .myvideo-playlist-tracklist {
	flex: 1 1 30%;
	min-width: 280px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(10px);
	max-height: 520px;
}

.myvideo-playlist-theme-light.myvideo-playlist-layout-sidebar .myvideo-playlist-tracklist {
	border-left: 1px solid #e2e8f0;
	background: #f8fafc;
}

/* Grid Layout */
.myvideo-playlist-layout-grid {
	display: flex;
	flex-direction: column;
}

.myvideo-playlist-layout-grid .myvideo-playlist-stage {
	width: 100%;
	padding: 16px;
}

.myvideo-playlist-layout-grid .myvideo-playlist-tracklist {
	width: 100%;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 16px;
}

.myvideo-playlist-theme-light.myvideo-playlist-layout-grid .myvideo-playlist-tracklist {
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
}

.myvideo-playlist-layout-grid .myvideo-playlist-items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

/* Tracklist Elements */
.myvideo-playlist-header {
	padding: 10px 14px;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	gap: 8px;
}

.myvideo-playlist-header-left {
	display: flex;
	align-items: center;
	min-width: 0;
}

.myvideo-playlist-header-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 12px;
}

.myvideo-playlist-theme-light .myvideo-playlist-header {
	border-bottom: 1px solid #e2e8f0;
}

/* Header actions & buttons */
.myvideo-playlist-header-actions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

/* Interactive Autoplay Toggle Switch */
.myvideo-playlist-autoplay-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 8px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
	user-select: none;
}

.myvideo-playlist-autoplay-toggle:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.myvideo-playlist-autoplay-toggle.is-active {
	background: color-mix(in srgb, var(--myvideo-accent, #6366f1) 25%, transparent);
	border-color: color-mix(in srgb, var(--myvideo-accent, #6366f1) 60%, transparent);
	color: #ffffff;
}

.myvideo-playlist-theme-light .myvideo-playlist-autoplay-toggle {
	background: #e2e8f0;
	border-color: #cbd5e1;
	color: #475569;
}

.myvideo-playlist-theme-light .myvideo-playlist-autoplay-toggle.is-active {
	background: color-mix(in srgb, var(--myvideo-accent, #6366f1) 15%, #ffffff);
	border-color: var(--myvideo-accent-light, #818cf8);
	color: #1e293b;
}

.myvideo-toggle-track {
	width: 22px;
	height: 12px;
	background: #475569;
	border-radius: 6px;
	position: relative;
	display: inline-block;
	transition: background 0.2s;
}

.myvideo-playlist-theme-light .myvideo-toggle-track {
	background: #94a3b8;
}

.myvideo-toggle-knob {
	width: 8px;
	height: 8px;
	background: #fff;
	border-radius: 50%;
	position: absolute;
	top: 2px;
	left: 2px;
	transition: transform 0.2s;
}

.myvideo-playlist-autoplay-toggle.is-active .myvideo-toggle-track {
	background: var(--myvideo-accent, #6366f1);
}

.myvideo-playlist-autoplay-toggle.is-active .myvideo-toggle-knob {
	transform: translateX(10px);
}

/* Collapse / Expand Toggle Button */
.myvideo-playlist-toggle-collapse {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 6px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #94a3b8;
	font-size: 11px;
	cursor: pointer;
	transition: all 0.2s;
}

.myvideo-playlist-toggle-collapse:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.myvideo-playlist-theme-light .myvideo-playlist-toggle-collapse {
	background: #e2e8f0;
	border-color: #cbd5e1;
	color: #475569;
}

.myvideo-playlist-theme-light .myvideo-playlist-toggle-collapse:hover {
	background: #cbd5e1;
	color: #1e293b;
}

/* Floating Expand button on the player stage */
.myvideo-playlist-expand-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 15;
	display: none;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	background: rgba(15, 23, 42, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transition: all 0.2s ease;
}

.myvideo-playlist-expand-btn:hover {
	background: var(--myvideo-accent-dark, #4f46e5);
	border-color: var(--myvideo-accent, #6366f1);
	transform: translateY(-1px);
}

.myvideo-playlist-expand-counter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 10px;
	font-weight: 700;
}

/* Collapsed states */
.myvideo-playlist-layout-sidebar {
	display: flex;
	position: relative;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.myvideo-playlist-layout-sidebar .myvideo-playlist-tracklist {
	transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, flex-basis 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.myvideo-playlist-layout-sidebar.is-collapsed .myvideo-playlist-tracklist {
	flex: 0 0 0% !important;
	max-width: 0 !important;
	width: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	overflow: hidden !important;
	border-left: none !important;
	pointer-events: none !important;
}

.myvideo-playlist-layout-sidebar.is-collapsed .myvideo-playlist-stage {
	flex: 0 0 100% !important;
	max-width: 100% !important;
	width: 100% !important;
}

.myvideo-playlist-layout-sidebar.is-collapsed .myvideo-playlist-expand-btn {
	display: inline-flex !important;
}

.myvideo-playlist-layout-grid.is-collapsed .myvideo-playlist-tracklist {
	max-height: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	opacity: 0 !important;
	overflow: hidden !important;
	border-top: none !important;
	pointer-events: none !important;
}

.myvideo-playlist-layout-grid.is-collapsed .myvideo-playlist-expand-btn {
	display: inline-flex !important;
}

.myvideo-playlist-items {
	overflow-y: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Scrollbar styling */
.myvideo-playlist-items::-webkit-scrollbar {
	width: 6px;
}
.myvideo-playlist-items::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
}

.myvideo-playlist-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: transparent;
	border: 1px solid transparent;
	color: inherit;
	cursor: pointer;
	text-align: left;
	width: 100%;
	transition: background 0.2s, transform 0.15s, border-color 0.2s;
	font-family: inherit;
}

.myvideo-playlist-item:hover {
	background: rgba(255, 255, 255, 0.06);
	transform: translateX(2px);
}

.myvideo-playlist-theme-light .myvideo-playlist-item:hover {
	background: #f1f5f9;
}

.myvideo-playlist-item.is-active {
	background: color-mix(in srgb, var(--myvideo-accent, #6366f1) 15%, transparent) !important;
	border-color: color-mix(in srgb, var(--myvideo-accent, #6366f1) 40%, transparent) !important;
}

.myvideo-playlist-item-num {
	font-size: 12px;
	font-weight: 700;
	color: #64748b;
	width: 18px;
	text-align: center;
	flex-shrink: 0;
}

.myvideo-playlist-item.is-active .myvideo-playlist-item-num {
	color: #ffffff;
}

.myvideo-playlist-item-thumb {
	position: relative;
	width: 68px;
	height: 42px;
	border-radius: 6px;
	overflow: hidden;
	background: #1e293b;
	flex-shrink: 0;
}

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

.myvideo-playlist-item-no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #64748b;
	font-size: 14px;
}

.myvideo-playlist-item-duration {
	position: absolute;
	bottom: 2px;
	right: 3px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 9px;
	padding: 1px 4px;
	border-radius: 3px;
	font-weight: 600;
}

.myvideo-playlist-item-details {
	flex: 1;
	min-width: 0;
}

.myvideo-playlist-item-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.myvideo-playlist-item-sub {
	display: block;
	font-size: 11px;
	color: #94a3b8;
	margin-top: 2px;
}

/* Playing animated waveform */
.myvideo-playlist-playing-indicator {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.7);
	display: none;
	align-items: center;
	justify-content: center;
	gap: 3px;
}

.myvideo-playlist-item.is-playing .myvideo-playlist-playing-indicator {
	display: flex;
}

.myvideo-playlist-playing-indicator span {
	display: block;
	width: 3px;
	height: 14px;
	background: #818cf8;
	border-radius: 2px;
	animation: myvideoWave 0.8s ease-in-out infinite alternate;
}
.myvideo-playlist-playing-indicator span:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.myvideo-playlist-playing-indicator span:nth-child(3) { animation-delay: 0.4s; height: 10px; }

@keyframes myvideoWave {
	0% { transform: scaleY(0.4); }
	100% { transform: scaleY(1); }
}

/* Responsive */
@media (max-width: 840px) {
	.myvideo-playlist-layout-sidebar {
		flex-direction: column;
	}
	.myvideo-playlist-layout-sidebar .myvideo-playlist-stage {
		flex: 1 1 100%;
	}
	.myvideo-playlist-layout-sidebar .myvideo-playlist-tracklist {
		flex: 1 1 100%;
		max-width: 100%;
		border-left: none;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		max-height: 320px;
	}
}




