/* Jen's Video Gallery — @JensTube directory, JensNotes purple look */
.jvg {
	--jvg-plum: #3D2145;
	--jvg-purple: #784884;
	--jvg-ink: #453047;
	--jvg-muted: rgba(61, 33, 69, 0.62);
	--jvg-hairline: rgba(120, 72, 132, 0.18);
	--jvg-tint: rgba(120, 72, 132, 0.06);
	--jvg-red: #c4302b;
	--jvg-paper: #faf9f6;
	color: var(--jvg-ink);
}
.jvg a { text-decoration: none; }
.jvg *, .jvg *::before, .jvg *::after { box-sizing: border-box; }

/* ------------------------------------------------ toolbar: search + sort */
.jvg-bar {
	position: sticky;
	top: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
	padding: 11px 0 12px;
	margin-bottom: 14px;
	/* Translucent so it reads correctly whatever the page sits on. */
	background: rgba(255, 255, 255, 0.88);
	-webkit-backdrop-filter: saturate(150%) blur(10px);
	backdrop-filter: saturate(150%) blur(10px);
	border-bottom: 1px solid var(--jvg-hairline);
	box-shadow: 0 6px 14px -12px rgba(61, 33, 69, 0.5);
}

.jvg-search {
	position: relative;
	flex: 1 1 220px;
	min-width: 190px;
	display: flex;
	align-items: center;
}
.jvg-search-ico {
	position: absolute;
	left: 13px;
	font-size: 1.15rem;
	line-height: 1;
	color: var(--jvg-purple);
	pointer-events: none;
}
.jvg-q {
	width: 100%;
	font: inherit;
	font-size: 0.92rem;
	color: var(--jvg-ink);
	background: #fff;
	border: 1px solid var(--jvg-hairline);
	border-radius: 999px;
	padding: 9px 38px 9px 34px;
	box-shadow: 0 1px 3px rgba(61, 33, 69, 0.06);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.jvg-q::placeholder { color: var(--jvg-muted); }
.jvg-q:focus {
	outline: 0;
	border-color: var(--jvg-purple);
	box-shadow: 0 0 0 3px rgba(120, 72, 132, 0.14);
}
.jvg-q::-webkit-search-cancel-button { display: none; }
.jvg-clear {
	position: absolute;
	right: 6px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: var(--jvg-tint);
	color: var(--jvg-plum);
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
}
.jvg-clear:hover { background: var(--jvg-purple); color: #fff; }

.jvg-sorts {
	display: flex;
	flex: 0 1 auto;
	min-width: 0;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	gap: 5px;
	padding: 4px;
	background: var(--jvg-tint);
	border: 1px solid var(--jvg-hairline);
	border-radius: 999px;
}
.jvg-sort {
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--jvg-purple);
	background: transparent;
	border: 0;
	border-radius: 999px;
	padding: 6px 13px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.18s ease, color 0.18s ease;
}
.jvg-sorts::-webkit-scrollbar { display: none; }
.jvg-sort:hover { background: rgba(120, 72, 132, 0.14); }
.jvg-sort.is-on {
	background: var(--jvg-plum);
	color: #fff;
	box-shadow: 0 2px 8px rgba(61, 33, 69, 0.22);
}
.jvg-sort:focus-visible, .jvg-clear:focus-visible, .jvg-card:focus-visible, .jvg-more:focus-visible {
	outline: 2px solid var(--jvg-purple);
	outline-offset: 2px;
}

.jvg-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-bottom: 18px;
}
.jvg-channel {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	font-size: 0.82rem;
	font-weight: 700;
	color: #fff;
	background: var(--jvg-red);
	padding: 9px 18px;
	border-radius: 999px;
	box-shadow: 0 6px 16px rgba(196, 48, 43, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.jvg-channel:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(196, 48, 43, 0.38); color: #fff; }
.jvg-yt { font-size: 0.85em; }

/* Extra specificity: themes like to put block margins on content paragraphs. */
.jvg .jvg-status {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--jvg-muted);
}

/* ------------------------------------------------------------------ grid */
.jvg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 24px 18px;
}
.jvg-card {
	display: flex;
	flex-direction: column;
	text-align: left;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	color: inherit;
}
.jvg-card[hidden] { display: none; }
.jvg-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: #1a0f1d;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 3px 10px rgba(61, 33, 69, 0.16);
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.jvg-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease, opacity 0.25s ease;
}
.jvg-card:hover .jvg-thumb, .jvg-card:focus-visible .jvg-thumb {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(61, 33, 69, 0.26);
}
.jvg-card:hover .jvg-thumb img { transform: scale(1.06); }
.jvg-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 54px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(196, 48, 43, 0.9);
	color: #fff;
	border-radius: 50%;
	font-size: 1.1rem;
	padding-left: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
	opacity: 0;
	transform: scale(0.82);
	transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease;
}
.jvg-card:hover .jvg-play, .jvg-card:focus-visible .jvg-play { opacity: 1; transform: scale(1); }
.jvg-dur {
	position: absolute;
	right: 7px;
	bottom: 7px;
	font-size: 0.72rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	color: #fff;
	background: rgba(14, 6, 17, 0.86);
	padding: 4px 6px;
	border-radius: 4px;
}
.jvg-vtitle {
	padding: 11px 2px 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.38;
	color: var(--jvg-plum);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.jvg-card:hover .jvg-vtitle { color: var(--jvg-purple); }
.jvg-meta {
	padding: 4px 2px 0;
	font-size: 0.78rem;
	color: var(--jvg-muted);
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------- empty / more / footer */
.jvg-empty, .jvg-none { color: var(--jvg-muted); }
.jvg .jvg-none {
	margin: 0;
	padding: 44px 0;
	text-align: center;
	font-size: 0.95rem;
}
.jvg .jvg-none[hidden] { display: none; }
.jvg-reset {
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--jvg-purple);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
}
.jvg-foot { display: flex; justify-content: center; }
.jvg-more {
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--jvg-plum);
	background: var(--jvg-tint);
	border: 1px solid var(--jvg-hairline);
	border-radius: 999px;
	padding: 12px 34px;
	margin-top: 34px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.jvg-more:hover { background: var(--jvg-plum); color: #fff; transform: translateY(-2px); }
.jvg-more[hidden] { display: none; }

/* ---------------------------------------------------------- sidebar mini */
.jvg-mini { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.jvg-mini-item {
	position: relative;
	border: 0;
	padding: 0;
	cursor: pointer;
	aspect-ratio: 16 / 9;
	border-radius: 5px;
	overflow: hidden;
	background: #000;
}
.jvg-mini-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jvg-mini-item .jvg-play { width: 26px; height: 26px; font-size: 0.7rem; opacity: 1; transform: none; }
.jvg-mini-item .jvg-dur { right: 3px; bottom: 3px; font-size: 0.6rem; padding: 2px 3px; }

/* -------------------------------------------------------------- lightbox */
.jvg-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(16, 7, 20, 0.96);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.jvg-lb-stage { width: min(94vw, 1120px); }
.jvg-lb-frame {
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}
.jvg-lb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.jvg-lb-cap {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 14px;
	color: rgba(250, 249, 246, 0.92);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.4;
}
.jvg-lb-yt {
	flex: none;
	font-size: 0.8rem;
	font-weight: 700;
	color: rgba(250, 249, 246, 0.6);
	border-bottom: 1px solid rgba(250, 249, 246, 0.3);
}
.jvg-lb-yt:hover { color: #fff; }
.jvg-lb-close, .jvg-lb-nav {
	position: absolute;
	border: 0;
	border-radius: 50%;
	background: rgba(250, 249, 246, 0.13);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	transition: background 0.2s ease, transform 0.2s ease;
}
.jvg-lb-close:hover, .jvg-lb-nav:hover { background: rgba(250, 249, 246, 0.3); }
.jvg-lb-close {
	top: 16px;
	right: 18px;
	width: 44px;
	height: 44px;
	font-size: 1.5rem;
}
.jvg-lb-nav {
	top: 50%;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	font-size: 1.5rem;
	padding-bottom: 3px;
}
.jvg-lb-prev { left: 14px; }
.jvg-lb-next { right: 14px; }
.jvg-lb-nav:hover { transform: scale(1.08); }
.jvg-lb-nav[hidden] { display: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 782px) {
	/* Phones: search on its own line, sort pills swipeable underneath.
	   Kept compact — the bar is sticky and screen space is scarce. */
	.jvg-bar { gap: 7px; padding: 8px 0 9px; margin-bottom: 10px; }
	.jvg-search { flex: 1 1 100%; }
	.jvg-q { font-size: 0.86rem; padding: 8px 34px 8px 32px; }
	.jvg-sorts { flex: 1 1 100%; padding: 3px; -webkit-overflow-scrolling: touch; }
	.jvg-sort { font-size: 0.76rem; padding: 5px 11px; }
	.jvg-meta-row { margin-bottom: 14px; }
}
@media (max-width: 600px) {
	.jvg-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
	.jvg-vtitle { font-size: 0.82rem; }
	.jvg-meta { font-size: 0.72rem; }
	.jvg-play { width: 40px; height: 40px; font-size: 0.85rem; opacity: 1; transform: scale(1); background: rgba(196, 48, 43, 0.82); }
	.jvg-lb { padding: 12px; }
	.jvg-lb-nav { width: 40px; height: 40px; margin-top: -20px; font-size: 1.2rem; }
	.jvg-lb-prev { left: 4px; }
	.jvg-lb-next { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.jvg *, .jvg-lb * { transition: none !important; }
}
