/**
 * PlayFlix — Design System
 * Dark cinematic UI. All original styles, no frameworks.
 *
 * Table of contents:
 *  1. Tokens (CSS variables)
 *  2. Base / reset
 *  3. Typography
 *  4. Layout utilities
 *  5. Buttons & badges
 *  6. Header / navigation
 *  7. Search overlay & mobile nav
 *  8. Billboard hero
 *  9. Title cards
 * 10. Carousel rows
 * 11. Single title page
 * 12. Player placeholder
 * 13. Archive / search / 404
 * 14. Sidebar & widgets
 * 15. Footer
 * 16. Skeleton loader
 * 17. Forms
 * 18. Responsive
 * 19. Motion preferences & accessibility
 */

/* ============ 1. TOKENS ============ */
:root {
	--pf-muted: #9a9aa8;
	/* Palette — deep-space dark cinematic */
	--pf-bg: #0a0a10;
	--pf-bg-soft: #101018;
	--pf-surface: #16161f;
	--pf-surface-2: #1d1d28;
	--pf-surface-hover: #242433;

	/* Signature accent — crimson rose (overridable in Customizer) */
	--pf-accent: #d10e35;
	--pf-accent-deep: #b30d30;
	--pf-accent-glow: rgba(243, 18, 63, 0.35);
	--pf-accent-gradient: linear-gradient(135deg, #f3123f 0%, #ff5a3c 100%);

	/* Text */
	--pf-text: #f4f4f7;
	--pf-text-dim: #b9b9c6;
	--pf-text-faint: #71717f;

	/* Lines & overlays */
	--pf-border: rgba(255, 255, 255, 0.09);
	--pf-overlay: linear-gradient(180deg, rgba(10, 10, 16, 0) 0%, rgba(10, 10, 16, 0.55) 55%, rgba(10, 10, 16, 0.96) 100%);

	/* Ratings / meta */
	--pf-gold: #ffb020;

	/* Shape */
	--pf-radius-sm: 6px;
	--pf-radius: 10px;
	--pf-radius-lg: 16px;
	--pf-radius-pill: 999px;

	/* Type scale */
	--pf-fs-display: clamp(2.25rem, 5vw, 3.75rem);
	--pf-fs-h1: clamp(1.75rem, 3.5vw, 2.5rem);
	--pf-fs-h2: clamp(1.25rem, 2.4vw, 1.625rem);
	--pf-fs-h3: 1.125rem;
	--pf-fs-body: 1rem;
	--pf-fs-small: 0.875rem;
	--pf-fs-tiny: 0.75rem;

	/* Motion */
	--pf-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--pf-speed: 240ms;

	/* Layout */
	--pf-container: 1280px;
	--pf-gutter: clamp(1rem, 4vw, 2.5rem);
	--pf-header-h: 72px;
}

/* ============ 2. BASE ============ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--pf-bg);
	color: var(--pf-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: var(--pf-fs-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--pf-accent);
}

::selection {
	background: var(--pf-accent);
	color: #fff;
}

.pf-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--pf-accent);
	color: #fff;
	padding: 0.75rem 1.25rem;
	z-index: 2000;
	border-radius: 0 0 var(--pf-radius-sm) 0;
}

.pf-skip-link:focus {
	left: 0;
}

/* ============ 3. TYPOGRAPHY ============ */
h1, h2, h3, h4 {
	margin: 0 0 0.6em;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.pf-display { font-size: var(--pf-fs-display); }
h1, .pf-h1 { font-size: var(--pf-fs-h1); }
h2, .pf-h2 { font-size: var(--pf-fs-h2); }
h3, .pf-h3 { font-size: var(--pf-fs-h3); }

.pf-lead {
	font-size: 1.125rem;
	color: var(--pf-text-dim);
	max-width: 46rem;
}

.pf-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--pf-fs-tiny);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pf-accent);
	margin-bottom: 0.75rem;
}

.pf-eyebrow::before {
	content: "";
	width: 22px;
	height: 2px;
	background: var(--pf-accent-gradient);
	border-radius: 2px;
}

/* ============ 4. LAYOUT ============ */
.pf-container {
	width: 100%;
	max-width: var(--pf-container);
	margin-inline: auto;
	padding-inline: var(--pf-gutter);
}

.pf-section {
	padding-block: clamp(2rem, 5vw, 3.5rem);
}

/* Full-bleed section: no side or vertical gaps (detail page "You May Also Like"). */
.pf-section-bleed {
	padding-block: 0.5rem 1rem;
}

.pf-main {
	min-height: 60vh;
	padding-top: var(--pf-header-h);
}

/* ============ 5. BUTTONS & BADGES ============ */
.pf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	padding: 0.8rem 1.9rem;
	border: 0;
	border-radius: var(--pf-radius-pill);
	font-size: var(--pf-fs-body);
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--pf-speed) var(--pf-ease), box-shadow var(--pf-speed) var(--pf-ease), background var(--pf-speed);
	white-space: nowrap;
}

.pf-btn-primary {
	background: var(--pf-accent-gradient);
	color: #fff;
	box-shadow: 0 8px 28px var(--pf-accent-glow);
}

.pf-btn-primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 34px var(--pf-accent-glow);
}

.pf-btn-ghost {
	background: rgba(255, 255, 255, 0.1);
	color: var(--pf-text);
	backdrop-filter: blur(8px);
	border: 1px solid var(--pf-border);
}

.pf-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.pf-btn-sm {
	padding: 0.5rem 1.1rem;
	font-size: var(--pf-fs-small);
}

.pf-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--pf-border);
	background: rgba(255, 255, 255, 0.06);
	color: var(--pf-text);
	cursor: pointer;
	transition: background var(--pf-speed), transform var(--pf-speed) var(--pf-ease);
}

.pf-icon-btn:hover {
	background: rgba(255, 255, 255, 0.14);
	transform: scale(1.06);
}

.pf-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.22rem 0.6rem;
	border-radius: var(--pf-radius-sm);
	font-size: var(--pf-fs-tiny);
	font-weight: 700;
	letter-spacing: 0.04em;
}

.pf-badge-rating {
	background: rgba(0, 0, 0, 0.65);
	color: var(--pf-gold);
	backdrop-filter: blur(4px);
}

.pf-badge-quality {
	background: var(--pf-accent);
	color: #fff;
	text-transform: uppercase;
}

.pf-badge-type {
	background: rgba(255, 255, 255, 0.12);
	color: var(--pf-text-dim);
	border: 1px solid var(--pf-border);
	text-transform: uppercase;
}

/* ============ 6. HEADER ============ */
.pf-header {
	position: fixed;
	inset-inline: 0;
	top: 0;
	height: var(--pf-header-h);
	z-index: 1000;
	display: flex;
	align-items: center;
	background: linear-gradient(180deg, rgba(10, 10, 16, 0.85), rgba(10, 10, 16, 0));
	transition: background var(--pf-speed), box-shadow var(--pf-speed), backdrop-filter var(--pf-speed);
}

.pf-header.is-scrolled {
	background: rgba(10, 10, 16, 0.88);
	backdrop-filter: blur(14px);
	box-shadow: 0 1px 0 var(--pf-border);
}

.pf-header-inner {
	display: flex;
	align-items: center;
	gap: 2rem;
	width: 100%;
}

.pf-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.pf-logo-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--pf-radius-sm);
	background: var(--pf-accent-gradient);
	box-shadow: 0 4px 16px var(--pf-accent-glow);
	font-size: 1.1rem;
}

.pf-logo:hover {
	color: var(--pf-text);
}

.pf-nav {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pf-nav a {
	display: block;
	padding: 0.6rem 0.9rem;
	font-size: var(--pf-fs-small);
	font-weight: 600;
	color: var(--pf-text-dim);
	border-radius: var(--pf-radius-sm);
	transition: color var(--pf-speed), background var(--pf-speed);
}

.pf-nav a:hover,
.pf-nav .current-menu-item a {
	color: var(--pf-text);
	background: rgba(255, 255, 255, 0.07);
}

.pf-header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.pf-nav-toggle {
	display: none;
}

/* ============ 7. SEARCH OVERLAY & MOBILE NAV ============ */
.pf-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 1500;
	/* Translucent: the page stays visible (blurred) behind the search. */
	background: rgba(8, 8, 14, 0.55);
	backdrop-filter: blur(8px) saturate(1.25);
	-webkit-backdrop-filter: blur(8px) saturate(1.25);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 18vh var(--pf-gutter) 2rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--pf-speed), visibility var(--pf-speed);
}

.pf-search-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.pf-search-box {
	width: 100%;
	max-width: 640px;
	transform: translateY(-12px);
	transition: transform var(--pf-speed) var(--pf-ease);
}

.pf-search-overlay.is-open .pf-search-box {
	transform: translateY(0);
}

.pf-search-close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
}

.pf-gpt-search-sentinel {
	min-height: 1px;
}

.pf-gpt-search-status {
	text-align: center;
	color: var(--pf-text-dim, #b9b9c4);
	font-size: 0.9rem;
	padding: 1.5rem 0;
}

.pf-gpt-search-status[hidden] {
	display: none;
}

/* GPT: Coming Soon templates. */
.pf-gpt-coming-wrap {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.pf-gpt-coming-poster img {
	width: 100%;
	border-radius: 0.9rem;
	display: block;
}

.pf-gpt-coming-body {
	min-width: 0;
}

.pf-gpt-facts {
	display: grid;
	gap: 0.6rem;
	margin: 1.25rem 0;
}

.pf-gpt-facts > div {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 0.75rem;
}

.pf-gpt-facts dt {
	color: var(--pf-text-dim, #b9b9c4);
	font-size: 0.85rem;
	font-weight: 700;
}

.pf-gpt-facts dd {
	margin: 0;
	font-size: 0.9rem;
}

.pf-gpt-facts dd a {
	color: var(--pf-text, #f4f4f7);
}

/* GPT: page content (page.php). */
.pf-page-content {
	max-width: 1100px;
}

.pf-page-content > *:first-child {
	margin-top: 0;
}

@media (max-width: 640px) {
	.pf-gpt-coming-wrap {
		grid-template-columns: 1fr;
	}

	.pf-gpt-coming-poster {
		max-width: 220px;
	}

	/* Watch page: facts in 2 columns so nothing gets cut off. */
	.pf-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Watch page: wrap the cast instead of a hidden horizontal scroll. */
	.pf-cast-row {
		flex-wrap: wrap;
		overflow-x: visible;
	}
}

/* GPT: section builder headings. */
.pf-gpt-section {
	margin-bottom: 0.5rem;
}

.pf-gpt-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

/* GPT: Continue Watching + history remove buttons. */
.pf-gpt-cw-card,
.pf-gpt-history .pf-card {
	position: relative;
}

.pf-gpt-cw-remove,
.pf-gpt-history-remove {
	position: absolute;
	top: 0.4rem;
	right: 0.4rem;
	z-index: 3;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pf-gpt-cw-remove:hover,
.pf-gpt-history-remove:hover {
	background: var(--pf-accent, #f3123f);
}

/* GPT: advanced filters. */
.pf-gpt-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1.5rem;
}

.pf-gpt-filter-bar select {
	padding: 0.55rem 0.8rem;
	border-radius: 0.55rem;
	border: 1px solid var(--pf-border, #26262f);
	background: var(--pf-surface, #16161f);
	color: var(--pf-text, #f4f4f7);
	font-size: 0.85rem;
	max-width: 100%;
}

.pf-badge-new {
	background: #22c55e;
	color: #06130a;
}

.pf-badge-rank {
	background: #f59e0b;
	color: #1a1005;
	font-weight: 800;
	font-size: 15px;
	min-width: 26px;
	text-align: center;
}

.pf-badge-newep {
	background: #8b5cf6;
	color: #fff;
}

.pf-badge-gpt {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	backdrop-filter: blur(4px);
}

/* GPT: hero slider. */
.pf-gpt-hero {
	position: relative;
	overflow: hidden;
	margin-bottom: 1.5rem;
	border-radius: 1rem;
	background: var(--pf-bg-soft, #101018);
}

.pf-gpt-hero-track {
	position: relative;
}

.pf-gpt-hero-slide {
	display: none;
	position: relative;
	min-height: 420px;
}

.pf-gpt-hero-slide.is-active {
	display: block;
}

.pf-gpt-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

.pf-gpt-hero-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(8, 8, 12, 0.92) 0%, rgba(8, 8, 12, 0.55) 45%, rgba(8, 8, 12, 0.15) 100%),
		linear-gradient(0deg, rgba(8, 8, 12, 0.85) 0%, transparent 45%);
}

.pf-gpt-hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 1.5rem;
	align-items: center;
	min-height: 420px;
	padding-top: 2.5rem;
	padding-bottom: 3.5rem;
}

.pf-gpt-hero-poster {
	width: 150px;
	border-radius: 0.7rem;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.pf-gpt-hero-meta {
	max-width: 640px;
}

.pf-gpt-hero-title {
	margin: 0 0 0.5rem;
	font-size: 2rem;
	line-height: 1.15;
}

.pf-gpt-hero-sub {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	color: var(--pf-text-dim, #b9b9c4);
	font-size: 0.9rem;
	margin: 0 0 0.75rem;
}

.pf-gpt-hero-desc {
	color: var(--pf-text-dim, #b9b9c4);
	font-size: 0.95rem;
	margin: 0 0 1.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pf-gpt-hero-actions {
	display: flex;
	gap: 0.75rem;
	margin: 0;
	flex-wrap: wrap;
}

.pf-gpt-hero-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(10, 10, 16, 0.55);
	color: #fff;
	font-size: 1.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pf-gpt-hero-arrow.prev {
	left: 1rem;
}

.pf-gpt-hero-arrow.next {
	right: 1rem;
}

.pf-gpt-hero-dots {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: flex;
	gap: 0.5rem;
}

.pf-gpt-hero-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	padding: 0;
}

.pf-gpt-hero-dot.is-active {
	background: var(--pf-accent, #f3123f);
}

@media (max-width: 640px) {
	.pf-gpt-hero-slide,
	.pf-gpt-hero-content {
		min-height: 340px;
	}

	.pf-gpt-hero-poster {
		display: none;
	}

	.pf-gpt-hero-title {
		font-size: 1.5rem;
	}
}

/* GPT: instant search suggestions. */
.pf-search-box {
	position: relative;
}

.pf-gpt-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 60;
	max-height: 60vh;
	overflow-y: auto;
	padding: 0.4rem;
	border-radius: 0.75rem;
	border: 1px solid var(--pf-border, #26262f);
	background: var(--pf-surface-2, #1d1d28);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.pf-gpt-suggest[hidden] {
	display: none;
}

.pf-gpt-suggest-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.6rem;
	border-radius: 0.5rem;
	text-decoration: none;
	color: var(--pf-text, #f4f4f7);
}

.pf-gpt-suggest-item:hover {
	background: rgba(255, 255, 255, 0.06);
}

.pf-gpt-suggest-thumb {
	flex: none;
	width: 40px;
	height: 56px;
	object-fit: cover;
	border-radius: 0.35rem;
	background: rgba(255, 255, 255, 0.06);
}

.pf-gpt-suggest-meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.pf-gpt-suggest-title {
	font-weight: 700;
	font-size: 0.9rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-gpt-suggest-sub {
	font-size: 0.78rem;
	color: var(--pf-text-dim, #b9b9c4);
}

.pf-mobile-nav {
	position: fixed;
	inset: 0 auto 0 0;
	width: min(320px, 84vw);
	z-index: 1500;
	background: var(--pf-bg-soft);
	border-right: 1px solid var(--pf-border);
	padding: 1.5rem;
	transform: translateX(-105%);
	transition: transform calc(var(--pf-speed) * 1.4) var(--pf-ease);
	overflow-y: auto;
}

.pf-mobile-nav.is-open {
	transform: translateX(0);
}

.pf-mobile-nav ul {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.pf-mobile-nav a {
	display: block;
	padding: 0.8rem 0.4rem;
	font-weight: 600;
	border-bottom: 1px solid var(--pf-border);
}

/* ============ 8. BILLBOARD HERO ============ */
.pf-billboard {
	position: relative;
	min-height: 88vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	isolation: isolate;
	margin-top: calc(var(--pf-header-h) * -1);
}

.pf-billboard-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(120% 90% at 70% 10%, rgba(243, 18, 63, 0.22), transparent 55%),
		radial-gradient(100% 80% at 15% 85%, rgba(64, 48, 180, 0.28), transparent 60%),
		linear-gradient(160deg, #1b1030 0%, #0c0c18 55%, #0a0a10 100%);
}

.pf-billboard-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--pf-overlay);
}

.pf-billboard-content {
	position: relative;
	padding-bottom: clamp(3rem, 8vh, 5.5rem);
	max-width: 640px;
}

.pf-billboard-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--pf-fs-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pf-text-dim);
	margin-bottom: 1rem;
}

.pf-billboard-kicker .pf-badge-quality {
	letter-spacing: 0.08em;
}

.pf-billboard-title {
	font-size: var(--pf-fs-display);
	margin-bottom: 0.75rem;
	text-wrap: balance;
}

.pf-billboard-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem;
	margin-bottom: 1.1rem;
	font-size: var(--pf-fs-small);
	color: var(--pf-text-dim);
	font-weight: 600;
}

.pf-billboard-meta .pf-stars {
	color: var(--pf-gold);
	letter-spacing: 0.1em;
}

.pf-billboard-desc {
	color: var(--pf-text-dim);
	margin-bottom: 1.75rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pf-billboard-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
}

/* ============ 8B. YOUTUBE-STYLE HOME ============ */
.pf-home {
	padding-top: 1.5rem;
}

.pf-chips {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-bottom: 1.4rem;
	position: sticky;
	top: var(--pf-header-h, 72px);
	z-index: 20;
	padding-block: 0.8rem;
	background: linear-gradient(180deg, var(--pf-bg, #0a0a10) 70%, transparent);
}

.pf-chip {
	padding: 0.5rem 1.1rem;
	border-radius: 0.6rem;
	border: 1px solid var(--pf-border);
	background: var(--pf-surface);
	color: var(--pf-text-dim);
	font-size: var(--pf-fs-small);
	font-weight: 700;
	cursor: pointer;
	transition: all var(--pf-speed);
}

.pf-chip:hover {
	border-color: var(--pf-text-faint);
	color: var(--pf-text);
}

.pf-chip.is-active {
	background: #f4f4f7;
	border-color: #f4f4f7;
	color: #0a0a10;
}

.pf-yt-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1.6rem 1.1rem;
}

@media (max-width: 1400px) {
	.pf-yt-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1100px) {
	.pf-yt-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 820px) {
	.pf-yt-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem 0.8rem; }
}

@media (max-width: 520px) {
	.pf-yt-grid { grid-template-columns: repeat(2, 1fr); }
}

.pf-grid-status {
	display: flex;
	justify-content: center;
	padding: 2.5rem 0 3rem;
}

.pf-grid-loader {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	color: var(--pf-text-dim);
	font-weight: 600;
}

.pf-spinner {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 3px solid var(--pf-border);
	border-top-color: var(--pf-accent);
	animation: pf-spin 0.8s linear infinite;
}

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

.pf-grid-end {
	color: var(--pf-text-faint);
	font-size: var(--pf-fs-small);
	margin: 0;
}

/* ============ 9. TITLE CARDS ============ */
.pf-card {
	position: relative;
	border-radius: var(--pf-radius);
	overflow: hidden;
	background: var(--pf-surface);
	transition: transform var(--pf-speed) var(--pf-ease), box-shadow var(--pf-speed);
}

.pf-card:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--pf-border);
	z-index: 2;
}

.pf-card-poster {
	position: relative;
	aspect-ratio: 2 / 3;
	overflow: hidden;
}

.pf-card-poster .pf-poster-art {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Sample poster tones — replaced by real posters in Phase 3 */
.pf-tone-1 { background: linear-gradient(150deg, #3b1d5e, #120e2a); }
.pf-tone-2 { background: linear-gradient(150deg, #5e1d2c, #2a0e14); }
.pf-tone-3 { background: linear-gradient(150deg, #1d4d5e, #0e1e2a); }
.pf-tone-4 { background: linear-gradient(150deg, #5e4a1d, #2a200e); }
.pf-tone-5 { background: linear-gradient(150deg, #1d5e3a, #0e2a18); }
.pf-tone-6 { background: linear-gradient(150deg, #4a1d5e, #1c0e2a); }

.pf-card-badges {
	position: absolute;
	top: 0.55rem;
	left: 0.55rem;
	right: 0.55rem;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.pf-card-info {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 2.2rem 0.8rem 0.8rem;
	background: linear-gradient(180deg, transparent, rgba(5, 5, 10, 0.92));
}

.pf-card-title {
	margin: 0 0 0.2rem;
	font-size: var(--pf-fs-small);
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-card-sub {
	margin: 0;
	font-size: var(--pf-fs-tiny);
	color: var(--pf-text-dim);
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.pf-card-sub .pf-dot {
	opacity: 0.5;
}

.pf-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1.1rem;
}

/* ============ 10. CAROUSEL ROWS ============ */
.pf-row {
	position: relative;
	margin-bottom: 0.5rem;
}

.pf-row-empty {
	border: 1px dashed var(--pf-border, #2a2a35);
	border-radius: 0.75rem;
	padding: 1.5rem;
	color: var(--pf-text-dim, #b9b9c4);
	font-size: 0.9rem;
	width: 100%;
}

.pf-row-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.pf-row-title {
	margin: 0;
	font-size: var(--pf-fs-h2);
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.pf-row-title::before {
	content: "";
	width: 4px;
	height: 1.1em;
	border-radius: 4px;
	background: var(--pf-accent-gradient);
}

.pf-row-link {
	font-size: var(--pf-fs-small);
	font-weight: 700;
	color: var(--pf-text-dim);
	white-space: nowrap;
}

.pf-row-link:hover {
	color: var(--pf-accent);
}

.pf-row-viewport {
	position: relative;
}

.pf-row-track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 0.5rem 0.1rem 1rem;
	scrollbar-width: none;
}

.pf-row-track::-webkit-scrollbar {
	display: none;
}

.pf-row-track .pf-card {
	flex: 0 0 clamp(140px, 16vw, 190px);
	scroll-snap-align: start;
}

.pf-row-btn {
	position: absolute;
	top: 38%;
	z-index: 5;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--pf-border);
	background: rgba(10, 10, 16, 0.78);
	backdrop-filter: blur(8px);
	color: var(--pf-text);
	font-size: 1.2rem;
	cursor: pointer;
	opacity: 0;
	transition: opacity var(--pf-speed), transform var(--pf-speed) var(--pf-ease), background var(--pf-speed);
}
.pf-row-btn:focus-visible { opacity: 1; }

.pf-row-viewport:hover .pf-row-btn {
	opacity: 1;
}

.pf-row-btn:hover {
	background: var(--pf-accent);
	border-color: var(--pf-accent);
	transform: scale(1.08);
}

.pf-row-btn.prev { left: -0.6rem; }
.pf-row-btn.next { right: -0.6rem; }

/* ============ 11. SINGLE TITLE PAGE ============ */

/* Watch-first layout: player on top, details below. Flat like YouTube — no floating card. */
.pf-watch {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	margin-top: calc(var(--pf-header-h) * -1);
	padding-top: calc(var(--pf-header-h) + 0.25rem);
	padding-bottom: 2.5rem;
	background: var(--pf-bg);
}

.pf-watch-bg {
	display: none;
}

.pf-watch > .pf-container {
	position: relative;
	z-index: 1;
}

/* MovieBox-style watch layout: big player left, info sidebar right. */
.pf-watch .pf-container {
	max-width: 110rem;
}

.pf-watch .pf-player-wrap {
	max-width: none;
	margin-inline: 0;
	margin-top: 0;
}

/* Compact title bar above the player: red accent (section-header style) + single line. */
.pf-watch-titlebar {
	margin-bottom: 0.75rem;
}

.pf-watch-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.3;
	color: var(--pf-text, #f4f4f7);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-watch-title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 1em;
	border-radius: 4px;
	background: var(--pf-accent-gradient);
	margin-right: 0.6rem;
	vertical-align: -0.12em;
}

.pf-watch-title .pf-tb-meta {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pf-text-dim);
	white-space: nowrap;
}

.pf-watch-layout.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 1.75rem;
	align-items: start;
}

.pf-watch-side {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
}

@media (max-width: 1024px) {
	.pf-watch-layout.has-sidebar {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}
	/*
	 * Mobile watch order: player (+ servers) → episodes → details →
	 * cast → comments → More Like This. Flatten both columns so every
	 * block becomes an orderable flex item (no DOM/JS changes needed).
	 */
	.pf-watch-layout.has-sidebar > .pf-watch-main,
	.pf-watch-layout.has-sidebar > .pf-watch-side {
		display: contents;
	}
	.pf-watch-layout.has-sidebar .pf-player-wrap { order: 1; min-width: 0; }
	.pf-watch-layout.has-sidebar .pf-watch-titlebar { order: 0; min-width: 0; }
	.pf-watch-layout.has-sidebar .pf-ep-side { order: 2; min-width: 0; }
	.pf-watch-layout.has-sidebar .pf-title-details { order: 3; min-width: 0; }
	.pf-watch-layout.has-sidebar .pf-cast-section { order: 4; min-width: 0; }
	.pf-watch-layout.has-sidebar .pf-more-like { order: 5; min-width: 0; }
	/* The flex gap now handles vertical rhythm; drop the desktop offsets. */
	.pf-watch-layout.has-sidebar .pf-title-details { padding-top: 0; }
}

/* "More Like This" suggestions in the watch sidebar. */
.pf-more-like-title {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--pf-text, #f4f4f7);
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.pf-more-like-title::before {
	content: "";
	width: 4px;
	height: 1.1em;
	border-radius: 2px;
	background: var(--pf-accent, #f3123f);
}

.pf-more-like-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.pf-watch .pf-player {
	box-shadow: none;
	border: 0;
	border-radius: 12px;
}

.pf-title-details {
	padding-top: 2.5rem;
}

.pf-title-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	margin-top: calc(var(--pf-header-h) * -1);
	padding-top: calc(var(--pf-header-h) + 3rem);
	padding-bottom: 3rem;
}

.pf-title-hero-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(110% 80% at 75% 0%, rgba(243, 18, 63, 0.16), transparent 55%),
		linear-gradient(165deg, #221433 0%, #0d0d17 60%, #0a0a10 100%);
}

.pf-title-hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 10, 16, 0.25), rgba(10, 10, 16, 0.9) 85%);
}

.pf-title-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 2.5rem;
	align-items: start;
}

.pf-title-poster {
	border-radius: var(--pf-radius-lg);
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
	border: 1px solid var(--pf-border);
}

.pf-title-poster .pf-poster-art {
	aspect-ratio: 2 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 4rem;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.85);
}

/* Mobile-only landscape art: hidden on desktop; on small screens it
 * replaces the portrait poster so the artwork matches the player width. */
.pf-title-art-mobile {
	display: none;
	border-radius: var(--pf-radius-lg);
	overflow: hidden;
	border: 1px solid var(--pf-border);
}

.pf-title-art-mobile img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

@media (max-width: 900px) {
	.pf-title-art-mobile {
		display: block;
	}
	.pf-title-layout.has-mobile-art .pf-title-poster {
		display: none;
	}
}

.pf-title-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.8rem 1.1rem;
	margin: 1rem 0 1.25rem;
	font-size: var(--pf-fs-small);
	color: var(--pf-text-dim);
	font-weight: 600;
}

.pf-title-overview {
	max-width: 52rem;
	color: var(--pf-text-dim);
}

.pf-title-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 1.6rem;
	align-items: center;
}

/* External database links (IMDb / TMDb). */
.pf-ext-links {
	display: flex;
	gap: 0.5rem;
}

.pf-ext-link {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	border-radius: 0.35rem;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-decoration: none;
}

.pf-ext-imdb {
	background: #f5c518;
	color: #111;
}

.pf-ext-tmdb {
	background: #0d253f;
	color: #90cea1;
	border: 1px solid #1b3a5c;
}

/* Social share buttons. */
.pf-share {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-left: auto;
}

.pf-share-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pf-text-dim);
	margin-right: 0.2rem;
}

.pf-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--pf-border);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease;
	padding: 0;
}

.pf-share-btn:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.pf-share-fb:hover { background: #1877f2; border-color: #1877f2; }
.pf-share-x:hover { background: #000; border-color: #444; }
.pf-share-wa:hover { background: #25d366; border-color: #25d366; }
.pf-share-tg:hover { background: #229ed9; border-color: #229ed9; }
.pf-share-copy.is-copied { background: #2ecc71; border-color: #2ecc71; }

.pf-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1px;
	background: var(--pf-border);
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius);
	overflow: hidden;
	margin-top: 2rem;
}

.pf-fact {
	background: var(--pf-bg-soft);
	padding: 1rem 1.2rem;
}

.pf-fact dt {
	font-size: var(--pf-fs-tiny);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--pf-text-faint);
	margin-bottom: 0.25rem;
}

.pf-fact dd {
	margin: 0;
	font-weight: 700;
}

.pf-cast-row {
	display: flex;
	gap: 1.25rem;
	overflow-x: auto;
	padding-bottom: 0.75rem;
	scrollbar-width: thin;
	justify-content: center;
	justify-content: safe center;
}

/* "Top Cast" heading centered to match the centered cast row. */
.pf-cast-section .pf-h2 {
	text-align: center;
}

/* Tighter gap between the cast section and the full-bleed "You May Also Like" below it. */
.pf-cast-section {
	padding-bottom: 1rem;
}

.pf-cast {
	flex: 0 0 96px;
	text-align: center;
}

.pf-cast-avatar {
	width: 84px;
	height: 84px;
	margin: 0 auto 0.5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.4rem;
	color: #fff;
	background: linear-gradient(150deg, #2b2b3d, #17171f);
	border: 2px solid var(--pf-border);
	overflow: hidden;
}

.pf-cast-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pf-cast-name {
	margin: 0;
	font-size: var(--pf-fs-tiny);
	font-weight: 700;
}

.pf-cast-role {
	margin: 0;
	font-size: var(--pf-fs-tiny);
	color: var(--pf-text-faint);
}

/* ============ 12. PLAYER PLACEHOLDER ============ */
.pf-player-wrap {
	margin-block: 2rem;
}

.pf-player {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #050508;
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius-lg);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 1rem;
	color: var(--pf-text-faint);
}

.pf-player-note {
	font-size: var(--pf-fs-small);
	max-width: 34rem;
	text-align: center;
	padding-inline: 1.5rem;
}

.pf-server-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.pf-server-tab {
	padding: 0.55rem 1.2rem;
	border-radius: var(--pf-radius-pill);
	border: 1px solid var(--pf-border);
	background: var(--pf-surface);
	color: var(--pf-text-dim);
	font-size: var(--pf-fs-small);
	font-weight: 700;
	cursor: pointer;
	transition: all var(--pf-speed);
}

.pf-server-tab.is-active,
.pf-server-tab:hover {
	background: var(--pf-accent);
	border-color: var(--pf-accent);
	color: #fff;
}

/* ============ 13. ARCHIVE / SEARCH / 404 ============ */
.pf-page-head {
	padding-block: 2.5rem 1.5rem;
	border-bottom: 1px solid var(--pf-border);
	margin-bottom: 2rem;
}

.pf-page-head p {
	color: var(--pf-text-dim);
	margin: 0.5rem 0 0;
}

/* Archive: full-width cinematic catalog. */
.pf-archive-crumb {
	padding: 1.25rem var(--pf-gutter) 0;
}

.pf-archive {
	padding: 0 var(--pf-gutter) 4rem;
}

.pf-archive-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	padding: 1.5rem 0 1.25rem;
	margin-bottom: 1.75rem;
	border-bottom: 1px solid var(--pf-border);
}

.pf-archive-head h1 {
	margin: 0;
	font-size: clamp(1.9rem, 3.5vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.pf-archive-desc {
	margin: 0.5rem 0 0;
	color: var(--pf-text-dim);
	font-size: 0.95rem;
	max-width: 60ch;
}


.pf-archive-grid {
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 1.4rem;
}

@media (max-width: 640px) {
	.pf-archive-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 0.9rem;
	}
}

.pf-empty {
	text-align: center;
	padding: 4rem 1rem;
	color: var(--pf-text-dim);
}

.pf-404 {
	text-align: center;
	padding: 5rem 1rem;
}

.pf-404-code {
	font-size: clamp(5rem, 18vw, 11rem);
	font-weight: 800;
	line-height: 1;
	background: var(--pf-accent-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin: 0;
}

/* ============ 14. SIDEBAR & WIDGETS ============ */
.pf-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2.5rem;
	align-items: start;
}

.pf-widget {
	background: var(--pf-surface);
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius);
	padding: 1.4rem;
	margin-bottom: 1.4rem;
}

.pf-widget-title {
	font-size: var(--pf-fs-h3);
	margin-bottom: 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--pf-border);
}

/* ============ 15. FOOTER ============ */
.pf-footer {
	border-top: 1px solid var(--pf-border);
	background: var(--pf-bg-soft);
	margin-top: 2rem;
}

.pf-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 1.5rem;
	padding-block: 1.75rem 1.25rem;
}

.pf-footer-brand p {
	color: var(--pf-text-dim);
	font-size: var(--pf-fs-small);
	max-width: 24rem;
	margin-block: 0.5rem 0;
}

.pf-footer h3 {
	font-size: var(--pf-fs-small);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--pf-text-faint);
	margin-block: 0 0.4rem;
}

.pf-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pf-footer ul a {
	display: inline-block;
	padding: 0.2rem 0;
	font-size: var(--pf-fs-small);
	color: var(--pf-text-dim);
}

.pf-footer-bottom {
	border-top: 1px solid var(--pf-border);
	padding-block: 0.85rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	font-size: var(--pf-fs-tiny);
	color: var(--pf-text-faint);
}

.pf-footer-disclaimer {
	font-size: var(--pf-fs-tiny);
	color: var(--pf-text-faint);
	line-height: 1.6;
	margin: 0;
	padding-bottom: 1rem;
	max-width: 72rem;
}

/* ============ 16. SKELETON LOADER ============ */
.pf-skeleton {
	position: relative;
	overflow: hidden;
	background: var(--pf-surface);
	border-radius: var(--pf-radius-sm);
	min-height: 1em;
}

.pf-skeleton::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
	animation: pf-shimmer 1.4s infinite;
}

@keyframes pf-shimmer {
	from { transform: translateX(-100%); }
	to { transform: translateX(100%); }
}

/* ============ 17. FORMS ============ */
.pf-field {
	width: 100%;
	padding: 0.9rem 1.2rem;
	border-radius: var(--pf-radius-pill);
	border: 1px solid var(--pf-border);
	background: var(--pf-surface);
	color: var(--pf-text);
	font-size: var(--pf-fs-body);
}

.pf-field:focus {
	outline: 2px solid var(--pf-accent);
	outline-offset: 2px;
	border-color: var(--pf-accent);
}

.pf-search-form {
	display: flex;
	gap: 0.6rem;
}

.pf-search-form .pf-field {
	flex: 1;
}

/* ============ 18. RESPONSIVE ============ */
@media (max-width: 1100px) {
	.pf-title-layout {
		grid-template-columns: 200px 1fr;
		gap: 1.75rem;
	}
}

@media (max-width: 900px) {
	.pf-nav { display: none; }
	.pf-nav-toggle { display: inline-flex; }

	.pf-layout { grid-template-columns: 1fr; }

	.pf-footer-grid { grid-template-columns: 1fr 1fr; }

	.pf-title-layout { grid-template-columns: 1fr; }
	.pf-title-poster { max-width: 220px; }

	/* Mobile movies: description → artwork → facts (artwork no longer
	 * duplicates the player backdrop at the top of details). */
	.pf-title-layout.pf-is-movie { display: flex; flex-direction: column; }
	.pf-title-layout.pf-is-movie > div:last-child { display: contents; }
	.pf-title-layout.pf-is-movie .pf-eyebrow,
	.pf-title-layout.pf-is-movie h1,
	.pf-title-layout.pf-is-movie .pf-title-meta-row { order: 0; }
	.pf-title-layout.pf-is-movie .pf-title-overview,
	.pf-title-layout.pf-is-movie .pf-title-actions { order: 1; }
	.pf-title-layout.pf-is-movie .pf-title-art-mobile { order: 2; margin-block: 0.5rem; }
	.pf-title-layout.pf-is-movie .pf-facts { order: 3; }
}

@media (max-width: 640px) {
	:root { --pf-header-h: 64px; }

	.pf-billboard { min-height: 78vh; }
	.pf-billboard-desc { -webkit-line-clamp: 2; }

	.pf-card-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.8rem; }
	.pf-row-track .pf-card { flex-basis: 132px; }

	.pf-footer-grid { grid-template-columns: 1fr; }

	/* Touch devices: always show row buttons */
	.pf-row-btn { opacity: 1; width: 40px; height: 40px; }
	.pf-row-btn.prev { left: 0.1rem; }
	.pf-row-btn.next { right: 0.1rem; }
}

/* ============ 19. MOTION & ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

:focus-visible {
	outline: 2px solid var(--pf-accent);
	outline-offset: 3px;
}

/* ============================================================
   WordPress core classes (Theme Check requirements)
   ============================================================ */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: var(--pf-surface);
	border-radius: 4px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: var(--pf-text);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}
.sticky { display: block; }
.bypostauthor { display: block; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; }
.wp-caption {
	background: var(--pf-surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	margin-bottom: 1.5em;
	max-width: 100%;
	padding: 8px;
}
.wp-caption img { border-radius: 4px; max-width: 100%; height: auto; }
.wp-caption-text, .gallery-caption {
	color: var(--pf-muted);
	font-size: 0.8rem;
	margin: 0.5em 0 0.25em;
	text-align: center;
}

/* Comments */
.pf-comments { margin-top: 3rem; }
.pf-comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.pf-comment { margin-bottom: 1.5rem; }
.pf-comment-body { display: flex; gap: 1rem; background: var(--pf-surface); border-radius: 12px; padding: 1.25rem; }
.pf-comment-avatar img { border-radius: 50%; }
.pf-comment-main { flex: 1; min-width: 0; }
.pf-comment-meta { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--pf-muted); }
.pf-comment-author { color: var(--pf-text); font-weight: 700; }
.pf-comment-text p { margin: 0 0 0.75em; }
.pf-comment .children { list-style: none; margin: 1.25rem 0 0 1rem; padding: 0 0 0 1rem; border-left: 2px solid rgba(255, 255, 255, 0.08); }
.pf-page-links { margin-top: 1rem; font-size: 0.9rem; }
.pf-page-links > * { margin-right: 0.5rem; }

/* Real poster thumbnails in cards */
.pf-card-poster .pf-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Seasons & episodes (TV shows) */
.pf-seasons { margin-top: 0; }
.pf-season { background: var(--pf-surface); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; margin-bottom: 0.75rem; overflow: hidden; }
.pf-season-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; cursor: pointer; font-weight: 700; font-size: 1rem; list-style: none; }
.pf-season-head::-webkit-details-marker { display: none; }
.pf-season-head::after { content: "+"; font-size: 1.25rem; color: var(--pf-accent); }
.pf-season[open] .pf-season-head::after { content: "–"; }
.pf-season-count { font-size: 0.8rem; color: var(--pf-muted); font-weight: 400; margin-left: auto; margin-right: 1rem; }
.pf-episode-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.pf-episode a { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.25rem; color: var(--pf-text); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.pf-episode:last-child a { border-bottom: none; }
.pf-episode a:hover { background: rgba(255, 255, 255, 0.04); }
.pf-episode-num { display: flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; border-radius: 8px; background: rgba(255, 255, 255, 0.07); font-weight: 700; }
.pf-episode-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.pf-episode-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-episode-runtime { font-size: 0.78rem; color: var(--pf-muted); }
.pf-episode-play { color: var(--pf-accent); font-size: 1.1rem; }

/* Backdrop image in the title hero */
.pf-title-hero-bg.has-backdrop {
	background-size: cover;
	background-position: center 20%;
}

/* GPT #21: Large Featured Cards layout. */
.pf-gpt-featured-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.pf-gpt-featured-card {
	position: relative;
	display: block;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--pf-surface-2, #1a1a22);
}

.pf-gpt-featured-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pf-gpt-featured-info {
	position: absolute;
	inset: auto 0 0 0;
	padding: 32px 14px 12px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.pf-gpt-featured-title {
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}

/* GPT #21: Compact List layout. */
.pf-gpt-compact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.pf-gpt-compact-row a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px 8px 8px;
	background: rgba(255, 255, 255, 0.04);
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
}

.pf-gpt-compact-row a:hover {
	background: rgba(255, 255, 255, 0.08);
}

.pf-gpt-compact-rank {
	min-width: 28px;
	text-align: center;
	font-weight: 700;
	font-size: 18px;
	color: var(--pf-accent, #e50914);
}

.pf-gpt-compact-row img {
	width: 40px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
}

.pf-gpt-compact-title {
	flex: 1;
	font-weight: 500;
}

.pf-gpt-compact-year {
	opacity: 0.6;
	font-size: 13px;
}

/* GPT #18: type + language badges. */
.pf-badge-type,
.pf-badge-lang {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

/* GPT #26: breadcrumbs. */
.pf-breadcrumbs {
	padding: 14px 0 0;
	font-size: 13px;
	opacity: 0.75;
}

.pf-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.pf-breadcrumbs a:hover {
	opacity: 1;
	text-decoration: underline;
}

.pf-crumb-sep {
	margin: 0 6px;
	opacity: 0.5;
}

/* Hide the document scrollbar (ugly on dark) — page still scrolls. */
html {
	scrollbar-width: none;
	-ms-overflow-style: none;
}

html::-webkit-scrollbar {
	display: none;
}

/* TMDB attribution (required by TMDB API terms). */
.pf-tmdb-attr {
	font-size: 11px;
	color: var(--pf-text-faint, #8a8a99);
	text-align: center;
	margin: 8px 0 0;
}

/* Archive filter bar. */
.pf-archive-filters {
	align-items: center;
	margin-bottom: 1.75rem;
	padding: 1rem;
	background: var(--pf-surface, #16161f);
	border: 1px solid var(--pf-border, #26262f);
	border-radius: 0.75rem;
}

.pf-archive-filters button[type="submit"] {
	padding: 0.55rem 1.2rem;
	border-radius: 0.55rem;
	border: none;
	background: var(--pf-accent, #f3123f);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.pf-archive-filters button[type="submit"]:hover {
	background: #d10e35;
}

.pf-archive-filters .button-link {
	color: var(--pf-text-dim, #9a9aa8);
	font-size: 0.85rem;
	text-decoration: none;
}

.pf-archive-filters .button-link:hover {
	color: var(--pf-text, #f4f4f7);
	text-decoration: underline;
}

/* ============ COLOR SCHEMES ============ */

/* Light scheme */
body.pf-scheme-light {
	--pf-bg: #f5f5f7;
	--pf-bg-soft: #ffffff;
	--pf-surface: #ffffff;
	--pf-surface-2: #f0f0f3;
	--pf-surface-hover: #e8e8ec;
	--pf-text: #1a1a22;
	--pf-text-dim: #4a4a58;
	--pf-text-faint: #8a8a99;
	--pf-border: rgba(0, 0, 0, 0.1);
	--pf-overlay: linear-gradient(180deg, rgba(245,245,247,0) 0%, rgba(245,245,247,0.55) 55%, rgba(245,245,247,0.96) 100%);
}
body.pf-scheme-light .pf-header {
	background: rgba(255, 255, 255, 0.92);
}

/* Neon scheme */
body.pf-scheme-neon {
	--pf-bg: #050508;
	--pf-bg-soft: #0a0a12;
	--pf-surface: #0d0d16;
	--pf-surface-2: #12121e;
	--pf-surface-hover: #1a1a2a;
	--pf-accent: #00ff88;
	--pf-accent-deep: #00cc6a;
	--pf-accent-glow: rgba(0, 255, 136, 0.35);
	--pf-accent-gradient: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
	--pf-text: #f0fff5;
	--pf-border: rgba(0, 255, 136, 0.12);
}

/* Midnight Blue scheme */
body.pf-scheme-midnight {
	--pf-bg: #070b16;
	--pf-bg-soft: #0a1020;
	--pf-surface: #0d1428;
	--pf-surface-2: #111a32;
	--pf-surface-hover: #162040;
	--pf-accent: #3b82f6;
	--pf-accent-deep: #2563eb;
	--pf-accent-glow: rgba(59, 130, 246, 0.35);
	--pf-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
	--pf-text: #eef2ff;
	--pf-border: rgba(59, 130, 246, 0.14);
}

/* ============ AD SLOTS ============ */
.pf-ad-slot {
	margin: 16px auto;
	text-align: center;
	max-width: 100%;
	overflow: hidden;
}
.pf-ad-slot:empty { display: none; }

/* Sticky bottom banner */
.pf-sticky-ad {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1400;
	background: var(--pf-surface, #16161f);
	border-top: 1px solid var(--pf-border);
	padding: 8px;
	text-align: center;
}
.pf-sticky-close {
	position: absolute;
	top: -12px;
	right: 8px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #333;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}

body.pf-scheme-light .pf-skeleton::after { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent); }

/* ============ MOVIE REQUEST FORM ============ */
.pf-request-box {
	background: var(--pf-surface);
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius-lg);
	padding: 1.5rem;
	max-width: 560px;
	margin: 2rem auto;
	text-align: center;
}
.pf-request-form {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 1rem;
}
.pf-request-form input,
.pf-request-form select {
	background: var(--pf-surface-2);
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius);
	color: var(--pf-text);
	padding: 0.6rem 0.9rem;
	font-size: 0.95rem;
}
.pf-request-form input[type="text"] { flex: 2 1 200px; }
.pf-request-msg { margin-top: 0.8rem; font-weight: 600; }

/* ============ SIDEBAR REQUEST BLOCK ============ */
.pf-rail-request {
	text-align: center;
	padding: 1.2rem 1rem;
	background: linear-gradient(135deg, var(--pf-surface-2), var(--pf-surface));
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius-lg);
}
.pf-rail-request-text {
	font-size: 0.9rem;
	color: var(--pf-text-muted);
	margin: 0.5rem 0 1rem;
}
.pf-rail-request-btn {
	display: inline-block;
	text-decoration: none;
}

/* ============ REQUEST PAGE (blurry backdrop) ============ */
.pf-request-page {
	position: relative;
	min-height: 80vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 2rem 1rem 4rem;
	overflow: hidden;
}
.pf-request-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--pf-request-bg, linear-gradient(135deg, #0a0a0f 0%, #1a0a1a 50%, #0a0a0f 100%));
	background-size: cover;
	background-position: center;
	filter: blur(24px) brightness(0.5);
	transform: scale(1.1);
	z-index: 0;
}
.pf-request-hero {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	margin-top: 1rem;
}
.pf-request-hero .pf-request-box {
	margin: 0 auto;
	background: rgba(20, 20, 28, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* ---------- Person pages (pf_person) ---------- */
.pf-person-head {
	display: flex;
	gap: 28px;
	align-items: center;
	flex-wrap: wrap;
}
.pf-person-photo {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.pf-person-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pf-person-initials {
	font-size: 48px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.6);
}
.pf-person-meta h1 {
	margin: 0 0 8px;
}
.pf-person-count {
	color: rgba(255, 255, 255, 0.65);
	margin: 0;
}
.pf-person-bio {
	max-width: 760px;
	margin-bottom: 32px;
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.7;
}
.pf-cast-name a {
	color: inherit;
	text-decoration: none;
}
.pf-cast-name a:hover {
	color: var(--pf-accent, #f3123f);
	text-decoration: underline;
}

/* ---------- Age certification badge (2C) ---------- */
.pf-badge-cert {
	background: rgba(0, 0, 0, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.55);
	color: #fff;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.pf-cert-inline {
	display: inline-block;
	padding: 2px 8px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	vertical-align: middle;
}

/* ---------- Where-to-watch row (2D) ---------- */
.pf-watch-providers {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 16px 0;
}
.pf-watch-providers-label {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.6);
}
.pf-watch-provider {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 6px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	font-size: 13px;
	color: #fff;
}
.pf-watch-provider img {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	object-fit: cover;
}

/* ---------- Below-player info: providers + languages (2D/2H) ---------- */
.pf-below-player-info {
	margin: 4px 0 8px;
}
.pf-spoken-langs {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin: 12px 0 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
}

/* ---------- Collections (2E) ---------- */
.pf-collection-desc {
	max-width: 720px;
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.7;
}
.pf-collections-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}
.pf-collection-card {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.pf-collection-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.25);
}
.pf-collection-card-art {
	aspect-ratio: 16 / 9;
	background: rgba(255, 255, 255, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.35);
}
.pf-collection-card-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pf-collection-card-info {
	padding: 14px 16px;
}
.pf-collection-card-info h3 {
	margin: 0 0 4px;
	font-size: 16px;
}
.pf-collection-card-info p {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
}

/* ---------- My Lists / shared lists (2F) ---------- */
.pf-mylists-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 24px;
	margin-top: 8px;
}
@media (max-width: 720px) {
	.pf-mylists-layout {
		grid-template-columns: 1fr;
	}
}
.pf-mylists-nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}
.pf-mylist-tab {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
	cursor: pointer;
	font-size: 14px;
	text-align: left;
}
.pf-mylist-tab.is-active {
	border-color: var(--pf-accent, #f3123f);
	background: rgba(255, 255, 255, 0.08);
}
.pf-mylist-tab em {
	font-style: normal;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	padding: 1px 8px;
}
.pf-mylist-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.pf-mylist-head h2 {
	margin: 0;
}
.pf-mylist-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.pf-mylist-share {
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 1px dashed rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	font-size: 14px;
	word-break: break-all;
}
.pf-mylist-share a {
	color: var(--pf-accent, #f3123f);
}
.pf-mylist-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
}
.pf-mylist-grid li {
	position: relative;
}
.pf-mylist-grid a {
	display: block;
	text-decoration: none;
	color: inherit;
}
.pf-mylist-grid img {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 8px;
}
.pf-mylist-noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 2 / 3;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.07);
	font-size: 32px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.4);
}
.pf-mylist-grid span {
	display: block;
	margin-top: 6px;
	font-size: 13px;
}
.pf-mylist-grid [data-remove] {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

/* ---------- Trailer hover-preview (2G, desktop) ---------- */
.pf-card-trailer {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
	z-index: 3;
}
.pf-card-trailer.is-on {
	opacity: 1;
}
.pf-card-trailer iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Episode pages: series name as main title, episode as subtitle. */
.pf-watch-subtitle {
	margin: 0.15rem 0 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--pf-text-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pf-watch-title[data-pf-watch-series] a {
	color: inherit;
	text-decoration: none;
}
.pf-watch-title[data-pf-watch-series] a:hover {
	text-decoration: underline;
}
