/* YouTube Lessons Gallery - Frontend Styles */
.ylg-gallery {
	--ylg-bg: #ffffff;
	--ylg-border: #e5e7eb;
	--ylg-text: #111827;
	--ylg-muted: #6b7280;
	--ylg-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
	--ylg-shadow-hover: 0 12px 28px rgba(15, 23, 42, 0.13);
	--ylg-accent: #e11d48;
	--ylg-radius: 14px;

	width: 100%;
	margin: 1.5rem 0;
	box-sizing: border-box;
}

.ylg-gallery *,
.ylg-gallery *::before,
.ylg-gallery *::after {
	box-sizing: border-box;
}

.ylg-gallery.ylg-theme-dark {
	--ylg-bg: #18181b;
	--ylg-border: #27272a;
	--ylg-text: #f4f4f5;
	--ylg-muted: #a1a1aa;
	--ylg-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	--ylg-shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.55);
}

.ylg-grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ylg-cols-2 .ylg-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ylg-cols-3 .ylg-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ylg-cols-4 .ylg-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
	.ylg-cols-4 .ylg-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 780px) {
	.ylg-cols-3 .ylg-grid,
	.ylg-cols-4 .ylg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.ylg-grid,
	.ylg-cols-2 .ylg-grid,
	.ylg-cols-3 .ylg-grid,
	.ylg-cols-4 .ylg-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

.ylg-card {
	background: var(--ylg-bg);
	border: 1px solid var(--ylg-border);
	border-radius: var(--ylg-radius);
	overflow: hidden;
	box-shadow: var(--ylg-shadow);
	display: flex;
	flex-direction: column;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ylg-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ylg-shadow-hover);
}

.ylg-card-hidden,
.ylg-card[hidden] {
	display: none !important;
}

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

.ylg-card-reveal {
	animation: ylgCardFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ylg-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #09090b;
	overflow: hidden;
}

.ylg-media iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ylg-trigger {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-decoration: none;
}

.ylg-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.ylg-card:hover .ylg-thumb {
	transform: scale(1.04);
}

.ylg-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08));
	opacity: 0.7;
	transition: opacity 0.25s ease;
}

.ylg-card:hover .ylg-overlay {
	opacity: 0.95;
}

.ylg-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.95);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.22s ease, filter 0.22s ease;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.ylg-play-btn .ylg-play-bg {
	fill: rgba(24, 24, 27, 0.82);
	transition: fill 0.22s ease;
}

.ylg-card:hover .ylg-play-btn {
	transform: translate(-50%, -50%) scale(1.06);
}

.ylg-card:hover .ylg-play-btn .ylg-play-bg {
	fill: #ff0000;
}

.ylg-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.ylg-card-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.45;
	font-weight: 600;
	color: var(--ylg-text);
}

.ylg-card-title a,
.ylg-title-btn {
	color: inherit;
	text-decoration: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	width: 100%;
	transition: color 0.2s ease;
}

.ylg-card-title a:hover,
.ylg-title-btn:hover {
	color: var(--ylg-accent);
}

.ylg-card-meta {
	margin-top: auto;
	font-size: 0.82rem;
	color: var(--ylg-muted);
}

/* Grid Pagination (Prev / Page Numbers / Next) */
.ylg-pagination {
	margin-top: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	direction: rtl;
}

.ylg-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 18px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid var(--ylg-border);
	background: var(--ylg-bg);
	color: var(--ylg-text);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: var(--ylg-shadow);
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ylg-page-btn:hover:not(:disabled) {
	border-color: var(--ylg-accent);
	color: var(--ylg-accent);
	transform: translateY(-1px);
	box-shadow: var(--ylg-shadow-hover);
}

.ylg-page-btn:disabled {
	opacity: 0.38;
	cursor: not-allowed;
	box-shadow: none;
}

.ylg-page-numbers {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ylg-page-num {
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid var(--ylg-border);
	background: var(--ylg-bg);
	color: var(--ylg-text);
	font-size: 0.88rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ylg-page-num:hover:not(.is-active) {
	border-color: var(--ylg-accent);
	color: var(--ylg-accent);
	transform: translateY(-1px);
}

.ylg-page-num.is-active {
	background: var(--ylg-accent);
	border-color: var(--ylg-accent);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
	cursor: default;
}

.ylg-footer-actions {
	margin-top: 24px;
	text-align: center;
}

.ylg-channel-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: 999px;
	background: #dc2626;
	color: #ffffff !important;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ylg-channel-btn:hover {
	background: #b91c1c;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
}

.ylg-empty-notice {
	padding: 14px 18px;
	border-radius: 10px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 0.95rem;
}

/* Luxury Cinema Lightbox Modal */
.ylg-lightbox,
.ylg-lightbox *,
.ylg-lightbox *::before,
.ylg-lightbox *::after {
	box-sizing: border-box;
}

.ylg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	direction: rtl;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.ylg-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ylg-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 42%, rgba(16, 20, 34, 0.85) 0%, rgba(4, 5, 10, 0.96) 100%);
	backdrop-filter: blur(16px) saturate(140%);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* Dynamic Ambient Cinema Glow derived from active video thumbnail */
.ylg-lightbox-ambient {
	position: absolute;
	inset: 8% 12%;
	z-index: 1;
	background-size: cover;
	background-position: center;
	filter: blur(72px) saturate(175%) brightness(0.75);
	opacity: 0;
	transform: scale(1.08);
	pointer-events: none;
	transition: opacity 0.65s ease, background-image 0.5s ease;
}

.ylg-lightbox.is-open .ylg-lightbox-ambient.has-glow {
	opacity: 0.32;
}

.ylg-lightbox-shell {
	position: relative;
	z-index: 2;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
}

/* Floating Side Arrows on Wide Desktop Screens */
.ylg-float-arrow {
	display: none;
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid rgba(218, 185, 114, 0.3);
	background: rgba(15, 18, 28, 0.72);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #f3dc9e;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

@media (min-width: 1180px) {
	.ylg-float-arrow:not([hidden]) {
		display: inline-flex;
	}
}

.ylg-float-arrow:hover:not(:disabled) {
	background: rgba(218, 185, 114, 0.22);
	border-color: rgba(242, 217, 152, 0.75);
	color: #fffbeb;
	transform: scale(1.08);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 22px rgba(218, 185, 114, 0.2);
}

.ylg-float-arrow:disabled {
	opacity: 0.2;
	cursor: not-allowed;
}

.ylg-lightbox-dialog {
	position: relative;
	width: 100%;
	max-width: min(960px, max(320px, calc((92vh - 195px) * 1.777)));
	background: linear-gradient(168deg, rgba(25, 29, 41, 0.96) 0%, rgba(13, 15, 23, 0.98) 54%, rgba(8, 10, 16, 0.99) 100%);
	color: #f8fafc;
	border-radius: 22px;
	border: 1px solid rgba(218, 185, 114, 0.3);
	overflow: hidden;
	box-shadow:
		0 38px 100px rgba(0, 0, 0, 0.82),
		0 12px 34px rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(255, 255, 255, 0.05) inset,
		0 1px 0 rgba(255, 255, 255, 0.09) inset,
		0 0 48px rgba(218, 185, 114, 0.09);
	transform: translateY(18px) scale(0.955);
	transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ylg-lightbox.is-open .ylg-lightbox-dialog {
	transform: translateY(0) scale(1);
}

/* Desktop Wide / Theater Mode */
.ylg-lightbox.is-wide {
	padding: 10px;
}

.ylg-lightbox.is-wide .ylg-lightbox-dialog {
	max-width: min(1420px, max(320px, calc((95vh - 165px) * 1.777)));
}

/* Mobile Fullscreen Landscape Mode (Native Fullscreen API + Universal 90-deg Rotation Fallback) */
.ylg-landscape-floating-exit {
	display: none;
	position: absolute;
	top: max(12px, env(safe-area-inset-top));
	left: max(14px, env(safe-area-inset-left));
	z-index: 20;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 12px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(8, 10, 16, 0.62);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f8fafc;
	font-size: 12px !important;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
	transition: background 0.2s ease, opacity 0.2s ease;
}

.ylg-landscape-floating-exit:hover {
	background: rgba(220, 38, 38, 0.78);
	border-color: rgba(255, 255, 255, 0.45);
	color: #ffffff;
}

/* Native Fullscreen on Mobile Landscape */
.ylg-lightbox-dialog:fullscreen,
.ylg-lightbox-dialog:-webkit-full-screen,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-dialog {
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	max-width: none !important;
	max-height: none !important;
	border-radius: 0 !important;
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #000000 !important;
	box-shadow: none !important;
	display: flex !important;
	flex-direction: column !important;
	transform: none !important;
}

.ylg-lightbox-dialog:fullscreen .ylg-lightbox-accent-line,
.ylg-lightbox-dialog:fullscreen .ylg-lightbox-header,
.ylg-lightbox-dialog:fullscreen .ylg-lightbox-nav,
.ylg-lightbox-dialog:fullscreen .ylg-filmstrip-wrap,
.ylg-lightbox-dialog:fullscreen .ylg-lightbox-footer,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-lightbox-accent-line,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-lightbox-header,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-lightbox-nav,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-filmstrip-wrap,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-lightbox-footer,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-accent-line,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-header,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-nav,
.ylg-lightbox.is-fullscreen-landscape .ylg-filmstrip-wrap,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-footer {
	display: none !important;
}

.ylg-lightbox-dialog:fullscreen .ylg-lightbox-stage,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-lightbox-stage,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-stage {
	flex: 1 1 auto !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #000000 !important;
}

.ylg-lightbox-dialog:fullscreen .ylg-lightbox-player,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-lightbox-player,
.ylg-lightbox.is-fullscreen-landscape .ylg-lightbox-player {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: auto !important;
}

.ylg-lightbox-dialog:fullscreen .ylg-landscape-floating-exit,
.ylg-lightbox-dialog:-webkit-full-screen .ylg-landscape-floating-exit,
.ylg-lightbox.is-fullscreen-landscape .ylg-landscape-floating-exit,
.ylg-lightbox.is-landscape-rotated .ylg-landscape-floating-exit {
	display: inline-flex !important;
}

/* CSS 90-deg Landscape Fallback (iOS Safari & devices without orientation.lock) */
.ylg-lightbox.is-landscape-rotated {
	padding: 0 !important;
}

.ylg-lightbox.is-landscape-rotated .ylg-float-arrow,
.ylg-lightbox.is-landscape-rotated .ylg-lightbox-ambient {
	display: none !important;
}

.ylg-lightbox.is-landscape-rotated .ylg-lightbox-dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	width: 100vh;
	width: 100dvh;
	height: 100vw;
	height: 100dvw;
	max-width: none !important;
	max-height: none !important;
	border-radius: 0 !important;
	border: 0 !important;
	background: #000000 !important;
	box-shadow: none !important;
	display: flex !important;
	flex-direction: column !important;
	transform: translate(-50%, -50%) rotate(90deg) !important;
}

.ylg-lightbox.is-landscape-rotated .ylg-lightbox-accent-line,
.ylg-lightbox.is-landscape-rotated .ylg-lightbox-header,
.ylg-lightbox.is-landscape-rotated .ylg-lightbox-nav,
.ylg-lightbox.is-landscape-rotated .ylg-filmstrip-wrap,
.ylg-lightbox.is-landscape-rotated .ylg-lightbox-footer {
	display: none !important;
}

.ylg-lightbox.is-landscape-rotated .ylg-lightbox-stage {
	flex: 1 1 auto !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #000000 !important;
}

.ylg-lightbox.is-landscape-rotated .ylg-lightbox-player {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: auto !important;
}

/* Safeguard when phone is physically held in landscape without clicking button */
@media (max-height: 500px) and (orientation: landscape) {
	.ylg-lightbox:not(.is-landscape-rotated) {
		padding: 4px;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-dialog {
		max-height: 98vh;
		max-height: 98dvh;
		display: flex;
		flex-direction: column;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-header {
		padding: 6px 12px;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-date {
		display: none;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-title {
		-webkit-line-clamp: 1;
		font-size: 12px !important;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-stage {
		flex: 1 1 auto;
		min-height: 0;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-player {
		height: 100%;
		max-height: calc(98dvh - 110px);
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-nav {
		padding: 5px 12px;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-footer {
		padding: 5px 12px;
		gap: 3px;
	}

	.ylg-lightbox:not(.is-landscape-rotated) .ylg-lightbox-credit-row {
		margin-top: 2px;
		padding-top: 3px;
	}
}

.ylg-lightbox-accent-line {
	height: 2px;
	width: 100%;
	background: linear-gradient(90deg, transparent 4%, rgba(218, 185, 114, 0.38) 20%, rgba(247, 226, 165, 0.95) 50%, rgba(218, 185, 114, 0.38) 80%, transparent 96%);
}

.ylg-lightbox-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 22px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 100%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ylg-lightbox-heading {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ylg-lightbox-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.ylg-lightbox-badge {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	font-variant-numeric: tabular-nums;
	color: #f3dc9e;
	background: linear-gradient(180deg, rgba(218, 185, 114, 0.18) 0%, rgba(218, 185, 114, 0.08) 100%);
	border: 1px solid rgba(218, 185, 114, 0.36);
}

.ylg-lightbox-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ylg-lightbox-date {
	font-size: 0.78rem;
	color: rgba(203, 213, 225, 0.62);
}

.ylg-lightbox-header-actions {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ylg-lightbox-wide-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px 13px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid rgba(218, 185, 114, 0.32);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
	color: #f1f5f9;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ylg-lightbox-wide-btn:hover {
	background: rgba(218, 185, 114, 0.22);
	border-color: rgba(242, 217, 152, 0.68);
	color: #fffbeb;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(218, 185, 114, 0.16);
}

.ylg-lightbox-wide-btn.is-active {
	background: rgba(218, 185, 114, 0.26);
	border-color: rgba(242, 217, 152, 0.85);
	color: #fef3c7;
}

.ylg-lightbox-close {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.06);
	color: #e2e8f0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ylg-lightbox-close:hover {
	background: rgba(220, 38, 38, 0.24);
	border-color: rgba(248, 113, 113, 0.55);
	color: #ffffff;
	transform: rotate(90deg);
}

.ylg-lightbox-stage {
	position: relative;
	background: #000000;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.07),
		inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.ylg-lightbox-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 1;
}

@keyframes ylgSpin {
	to {
		transform: rotate(360deg);
	}
}

.ylg-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2.5px solid rgba(218, 185, 114, 0.18);
	border-top-color: #f3dc9e;
	animation: ylgSpin 0.85s linear infinite;
}

.ylg-lightbox-player {
	position: relative;
	z-index: 2;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: transparent;
}

.ylg-lightbox-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Prev / Filmstrip Toggle / Next Navigation Bar */
.ylg-lightbox-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 22px;
	background: rgba(255, 255, 255, 0.025);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ylg-lightbox-nav[hidden] {
	display: none;
}

.ylg-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-width: 108px;
	padding: 8px 16px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid rgba(218, 185, 114, 0.28);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
	color: #f8fafc;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ylg-nav-btn:hover:not(:disabled) {
	background: linear-gradient(180deg, rgba(218, 185, 114, 0.24) 0%, rgba(218, 185, 114, 0.11) 100%);
	border-color: rgba(242, 217, 152, 0.65);
	color: #fffbeb;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(218, 185, 114, 0.14);
}

.ylg-nav-btn:active:not(:disabled) {
	transform: translateY(0);
}

.ylg-nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	border-color: rgba(255, 255, 255, 0.1);
}

.ylg-playlist-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 6px 14px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid rgba(218, 185, 114, 0.22);
	background: rgba(218, 185, 114, 0.08);
	color: #f3dc9e;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ylg-playlist-toggle:hover,
.ylg-playlist-toggle[aria-expanded="true"] {
	background: rgba(218, 185, 114, 0.18);
	border-color: rgba(242, 217, 152, 0.55);
	color: #fffbeb;
}

.ylg-toggle-caret {
	transition: transform 0.22s ease;
}

.ylg-playlist-toggle[aria-expanded="true"] .ylg-toggle-caret {
	transform: rotate(180deg);
}

.ylg-lightbox-counter {
	font-variant-numeric: tabular-nums;
}

/* Collapsible Luxury Filmstrip Playlist Drawer */
.ylg-filmstrip-wrap {
	background: rgba(4, 6, 11, 0.72);
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	padding: 12px 18px;
}

.ylg-filmstrip-wrap[hidden] {
	display: none;
}

.ylg-filmstrip-track {
	display: flex;
	align-items: stretch;
	gap: 10px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding-bottom: 4px;
	scrollbar-width: thin;
	scrollbar-color: rgba(218, 185, 114, 0.45) rgba(255, 255, 255, 0.05);
}

.ylg-filmstrip-track::-webkit-scrollbar {
	height: 5px;
}

.ylg-filmstrip-track::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 999px;
}

.ylg-filmstrip-track::-webkit-scrollbar-thumb {
	background: rgba(218, 185, 114, 0.45);
	border-radius: 999px;
}

.ylg-film-item {
	flex: 0 0 148px;
	padding: 0;
	margin: 0;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: #e2e8f0;
	text-align: right;
	cursor: pointer;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ylg-film-item:hover {
	border-color: rgba(218, 185, 114, 0.5);
	background: rgba(255, 255, 255, 0.08);
	transform: translateY(-2px);
}

.ylg-film-item.is-active {
	border-color: #f3dc9e;
	background: rgba(218, 185, 114, 0.14);
	box-shadow: 0 0 0 1px rgba(243, 220, 158, 0.4), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.ylg-film-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000000;
	overflow: hidden;
}

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

.ylg-film-num {
	position: absolute;
	top: 4px;
	right: 4px;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #f3dc9e;
	font-size: 10px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ylg-film-item.is-active .ylg-film-num {
	background: #e2bf6b;
	color: #0b0d14;
}

.ylg-film-title {
	padding: 6px 7px;
	font-size: 11px;
	line-height: 1.3;
	color: #e2e8f0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Luxury Footer: Top Row = Share Icons (Right) + Wide & YouTube (Left), Bottom Row = Tiny Credit under Share Icons */
.ylg-lightbox-footer {
	padding: 10px 22px 11px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	background: rgba(0, 0, 0, 0.34);
}

.ylg-lightbox-footer-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.ylg-lightbox-share-group,
.ylg-lightbox-watch-group {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
}

.ylg-lightbox-credit-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.ylg-lightbox-credit {
	color: rgba(226, 214, 188, 0.48) !important;
	font-size: 9.5px !important;
	line-height: 1.25;
	font-weight: 400;
	text-decoration: none !important;
	letter-spacing: 0.01em;
	white-space: nowrap;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.ylg-lightbox-credit:hover {
	color: #f3dc9e !important;
	opacity: 1;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.ylg-action-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 11px;
	margin: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.055);
	border: 1px solid rgba(255, 255, 255, 0.13);
	color: #cbd5e1 !important;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ylg-action-pill:hover {
	transform: translateY(-1px);
	color: #ffffff !important;
}

.ylg-action-wa svg {
	color: #25d366;
}

.ylg-action-wa:hover {
	background: rgba(37, 211, 102, 0.16);
	border-color: rgba(37, 211, 102, 0.48);
}

.ylg-action-copy:hover,
.ylg-action-copy.is-copied {
	background: rgba(218, 185, 114, 0.18);
	border-color: rgba(242, 217, 152, 0.55);
	color: #fef3c7 !important;
}

.ylg-lightbox-external {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #f1f5f9 !important;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ylg-lightbox-external svg {
	color: #ef4444;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.ylg-lightbox-external:hover {
	background: rgba(220, 38, 38, 0.22);
	border-color: rgba(248, 113, 113, 0.55);
	color: #ffffff !important;
	transform: translateY(-1px);
}

.ylg-lightbox-external:hover svg {
	transform: scale(1.08);
}

@media (max-width: 600px) {
	.ylg-lightbox {
		padding: 8px;
	}

	.ylg-lightbox-dialog {
		border-radius: 16px;
		max-width: 100%;
	}

	.ylg-lightbox-header {
		padding: 10px 12px;
		gap: 8px;
	}

	.ylg-lightbox-badge {
		padding: 2px 7px;
		font-size: 9.5px !important;
	}

	.ylg-lightbox-title {
		font-size: 12.5px !important;
		line-height: 1.35;
	}

	.ylg-lightbox-date {
		font-size: 10px !important;
	}

	.ylg-lightbox-header-actions {
		gap: 6px;
	}

	.ylg-lightbox-wide-btn {
		padding: 5px 9px;
		gap: 4px;
		font-size: 10px !important;
	}

	.ylg-lightbox-wide-btn svg {
		width: 12px;
		height: 12px;
	}

	.ylg-lightbox-close {
		width: 30px;
		height: 30px;
	}

	.ylg-lightbox-nav {
		padding: 8px 10px;
		gap: 6px;
	}

	.ylg-nav-btn {
		min-width: 72px;
		padding: 6px 10px;
		gap: 4px;
		font-size: 11px !important;
	}

	.ylg-playlist-toggle {
		padding: 5px 10px;
		gap: 4px;
		font-size: 10.5px !important;
	}

	.ylg-filmstrip-wrap {
		padding: 9px 10px;
	}

	.ylg-film-item {
		flex: 0 0 122px;
	}

	.ylg-film-title {
		font-size: 10px;
	}

	.ylg-lightbox-footer {
		padding: 8px 10px 9px;
		gap: 5px;
	}

	.ylg-lightbox-footer-top {
		gap: 6px;
	}

	.ylg-lightbox-share-group,
	.ylg-lightbox-watch-group {
		gap: 5px;
	}

	.ylg-lightbox-credit-row {
		margin-top: 5px;
		padding-top: 7px;
	}

	.ylg-lightbox-credit {
		display: inline-block;
		font-size: 7px !important;
		line-height: 1.15;
		opacity: 0.68;
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
		transform: scale(0.84);
		transform-origin: right center;
	}

	.ylg-action-pill {
		padding: 5px 8px;
		font-size: 10px !important;
	}

	.ylg-action-pill .ylg-pill-text {
		display: none;
	}

	.ylg-lightbox-external {
		padding: 5px 9px;
		gap: 4px;
		font-size: 10px !important;
	}

	.ylg-lightbox-external svg {
		width: 12px;
		height: 12px;
	}

	.ylg-page-btn {
		padding: 7px 13px;
		font-size: 12.5px;
	}

	.ylg-page-num {
		width: 32px;
		height: 32px;
		font-size: 12.5px;
	}
}

body.ylg-modal-open {
	overflow: hidden;
}
