/*
Theme Name: Newsmag-nghienphim_space - Nghiện Phim
Template: Newsmag
Version: 4.0.0
Description: Giao diện xem phim trực tuyến phong cách PhimĐêm v4 tối giản nền đen tuyền (#000000), tối ưu toàn diện Desktop, Tablet và Mobile cho CuongPhimHD.com
*/

:root {
	--pd4-bg: #000000;
	--pd4-band: #101010;
	--pd4-surface: #141414;
	--pd4-hover: #0b0b0b;
	--pd4-hover-2: #222222;
	--pd4-line: #2a2a2a;
	--pd4-line-soft: #1c1c1c;
	--pd4-border-btn: #3a3a3a;
	--pd4-text: #ffffff;
	--pd4-text-2: #e6e6e6;
	--pd4-muted: #bdbdbd;
	--pd4-dim: #8c8c8c;
	--pd4-font: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--pd4-pad-x: clamp(16px, 4vw, 56px);
	--pd4-sec-gap: clamp(52px, 6.5vw, 92px);
}

/* Reset & Global Isolation from Newsmag Parent */
*, *::before, *::after {
	box-sizing: border-box;
}

html, body {
	margin: 0 !important;
	padding: 0 !important;
	background: #000000 !important;
	color: #ffffff !important;
	font-family: var(--pd4-font) !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden !important;
	max-width: 100vw !important;
}

body.tp-site,
body.pd4-site {
	background: #000000 !important;
	color: #ffffff !important;
}

/* Hide legacy Newsmag parent wrappers if any leak */
.td-header-wrap,
.td-footer-wrapper,
.td-sub-footer-container,
.td-scroll-up {
	display: none !important;
}

a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: var(--pd4-muted);
}

button, input, select, textarea {
	font-family: var(--pd4-font) !important;
}

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

/* ==========================================================================
   1. HEADER & NAVIGATION (72px Sticky, Transparent Over Hero -> #000 Scrolled)
   ========================================================================== */
.pd4-header {
	position: sticky;
	top: 0;
	z-index: 60;
	height: 72px;
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.6vw, 40px);
	padding: 0 var(--pd4-pad-x);
	background: #000000;
	border-bottom: 1px solid var(--pd4-line-soft);
	transition: background 0.25s ease, border-color 0.25s ease;
	width: 100%;
}

.pd4-header.is-over-hero:not(.is-scrolled) {
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 65%, rgba(0, 0, 0, 0) 100%);
	border-bottom-color: transparent;
}

.pd4-header.is-scrolled {
	background: #000000 !important;
	border-bottom-color: var(--pd4-line-soft) !important;
}

.pd4-brand {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none !important;
}

.pd4-logo-img {
	display: block !important;
	height: 50px !important;
	width: auto !important;
	max-width: 160px !important;
	object-fit: contain !important;
	filter: drop-shadow(0 2px 10px rgba(255, 77, 0, 0.32));
	transition: transform 0.2s ease;
}

.pd4-brand:hover .pd4-logo-img {
	transform: scale(1.03);
}

/* Desktop Navigation (>= 1024px) */
.pd4-nav {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2.2vw, 30px);
}

.pd4-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	color: #ffffff !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-bottom: 2px solid transparent;
	text-decoration: none !important;
	white-space: nowrap;
	background: none;
	border-top: 0;
	border-left: 0;
	border-right: 0;
	cursor: pointer;
}

.pd4-nav-link:hover {
	color: var(--pd4-muted) !important;
}

.pd4-nav-link.is-active {
	border-bottom-color: #ffffff;
}

/* Dropdown (Thể loại & Quốc gia) */
.pd4-dropdown {
	position: relative;
}

.pd4-dropdown-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: -16px;
	width: 280px;
	background: var(--pd4-surface);
	border: 1px solid var(--pd4-line);
	padding: 10px;
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
	z-index: 80;
}

.pd4-dropdown.is-open .pd4-dropdown-menu,
.pd4-dropdown:hover .pd4-dropdown-menu {
	display: grid;
}

.pd4-dropdown::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -12px;
	height: 12px;
}

.pd4-dropdown-item {
	display: block;
	padding: 9px 10px;
	color: var(--pd4-text-2) !important;
	font-size: 13.5px;
	font-weight: 500;
	text-decoration: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pd4-dropdown-item:hover {
	background: var(--pd4-hover-2);
	color: #ffffff !important;
}

/* Header Right Actions */
.pd4-header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: clamp(10px, 1.5vw, 18px);
}

.pd4-icon-btn {
	width: 40px;
	height: 40px;
	background: none;
	border: 0;
	color: #ffffff;
	display: grid;
	place-items: center;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.pd4-icon-btn:hover {
	color: var(--pd4-muted);
}

.pd4-btn-cta-sm {
	height: 40px;
	padding: 0 18px;
	border: 0;
	background: #ffffff;
	color: #000000 !important;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
	flex-shrink: 0;
}

.pd4-btn-cta-sm:hover {
	background: #d9d9d9;
	color: #000000 !important;
}

.pd4-menu-btn {
	display: none;
}

/* ==========================================================================
   2. HERO BILLBOARD (Full-Bleed 16:9 Key Art, Bottom-Left Typography)
   ========================================================================== */
.pd4-main-over-hero {
	margin-top: -72px;
}

.pd4-hero {
	position: relative;
	min-height: clamp(520px, 86vh, 840px);
	display: flex;
	align-items: flex-end;
	background: #000000;
	overflow: hidden;
}

.pd4-hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0.6s ease;
	display: flex;
	align-items: flex-end;
}

.pd4-hero-slide.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	width: 100%;
	min-height: clamp(520px, 86vh, 840px);
}

.pd4-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 20%;
	background-repeat: no-repeat;
	transform: scale(1.01);
	transition: transform 6s ease;
}

.pd4-hero-slide.is-active .pd4-hero-bg {
	transform: scale(1);
}

.pd4-hero-mark {
	position: absolute;
	right: var(--pd4-pad-x);
	top: 48%;
	transform: translateY(-55%);
	font-weight: 800;
	font-size: clamp(100px, 18vw, 280px);
	line-height: 0.85;
	letter-spacing: -0.04em;
	color: rgba(255, 255, 255, 0.04);
	text-align: right;
	max-width: 70%;
	pointer-events: none;
	user-select: none;
	text-transform: uppercase;
}

.pd4-hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.68) 38%, rgba(0, 0, 0, 0.18) 72%, rgba(0, 0, 0, 0.45) 100%),
		linear-gradient(to right, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}

.pd4-hero-content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 96px var(--pd4-pad-x) clamp(36px, 5.5vw, 72px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.pd4-hero-kicker {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--pd4-text-2);
}

/* Vietnamese-safe Hero H1: generous line-height so stacked accents never clip */
.pd4-hero-title {
	margin: 0 !important;
	max-width: 920px;
	font-weight: 800 !important;
	font-size: clamp(28px, 4.8vw, 68px) !important;
	line-height: 1.18 !important;
	letter-spacing: -0.02em !important;
	text-transform: uppercase;
	color: #ffffff !important;
	padding-top: 4px;
}

.pd4-hero-title a {
	color: #ffffff !important;
	text-decoration: none !important;
}

.pd4-hero-title a:hover {
	color: var(--pd4-text-2) !important;
}

.pd4-hero-desc {
	margin: 0 !important;
	max-width: 540px;
	font-size: clamp(14.5px, 1.3vw, 17px) !important;
	line-height: 1.55 !important;
	color: var(--pd4-text-2) !important;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pd4-btn-primary {
	margin-top: 4px;
	height: 52px;
	padding: 0 30px;
	border: 0;
	background: #ffffff;
	color: #000000 !important;
	font-size: 13.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	text-decoration: none !important;
}

.pd4-btn-primary:hover {
	background: #d9d9d9;
	color: #000000 !important;
}

.pd4-btn-outline {
	height: 48px;
	padding: 0 24px;
	border: 1px solid #ffffff;
	background: transparent;
	color: #ffffff !important;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	text-decoration: none !important;
}

.pd4-btn-outline:hover {
	background: #ffffff;
	color: #000000 !important;
}

.pd4-hero-dots {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.pd4-hero-dot {
	width: 44px;
	height: 3px;
	border: 0;
	padding: 0;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.3);
	transition: background 0.25s ease;
}

.pd4-hero-dot.is-active {
	background: #ffffff;
}

/* ==========================================================================
   3. SECTIONS, POSTER CARDS & GRIDS (0px Border Radius, Minimalist Overlays)
   ========================================================================== */
.pd4-section {
	padding: var(--pd4-sec-gap) var(--pd4-pad-x) 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.pd4-section-bleed {
	padding: var(--pd4-sec-gap) 0 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.pd4-sec-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px 16px;
}

.pd4-sec-head-pad {
	padding: 0 var(--pd4-pad-x);
}

.pd4-sec-title {
	margin: 0 !important;
	font-weight: 800 !important;
	font-size: clamp(22px, 2.6vw, 34px) !important;
	line-height: 1.2 !important;
	letter-spacing: -0.01em !important;
	color: #ffffff !important;
}

.pd4-sec-sub {
	margin: 6px 0 0 !important;
	font-size: 15px !important;
	color: var(--pd4-muted) !important;
}

.pd4-sec-more {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #ffffff !important;
	text-decoration: none !important;
	white-space: nowrap;
}

.pd4-sec-more:hover {
	color: var(--pd4-muted) !important;
}

.pd4-row-arrows {
	display: flex;
	gap: 8px;
}

.pd4-arrow-btn {
	width: 40px;
	height: 40px;
	border: 1px solid var(--pd4-border-btn);
	background: none;
	color: #ffffff;
	cursor: pointer;
	font-size: 16px;
	display: grid;
	place-items: center;
	padding: 0;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pd4-arrow-btn:hover {
	border-color: #ffffff;
	background: #ffffff;
	color: #000000;
}

/* 4-Column Grid ("Mới thêm" & "Có thể bạn thích") -> 4 cols Desktop/Tablet, 2 cols Mobile */
.pd4-grid-4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(10px, 1.4vw, 20px);
}

/* Poster Card with Inner Overlay (Used in Mới thêm, Có thể bạn thích, Top 10, Catalog) */
.pd4-poster-overlay-card {
	position: relative;
	aspect-ratio: 2 / 3;
	background: var(--pd4-surface);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: clamp(12px, 1.4vw, 18px);
	text-decoration: none !important;
	color: #ffffff !important;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.pd4-poster-overlay-card:hover {
	transform: scale(1.02);
	color: #ffffff !important;
}

.pd4-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.pd4-card-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0.22) 100%);
	z-index: 1;
	pointer-events: none;
}

.pd4-age-badge {
	position: relative;
	z-index: 2;
	align-self: flex-start;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.12em;
	padding: 3px 7px;
	border: 1px solid rgba(255, 255, 255, 0.78);
	background: rgba(0, 0, 0, 0.45);
	color: #ffffff;
	text-transform: uppercase;
	line-height: 1.2;
}

.pd4-poster-overlay-title {
	position: relative;
	z-index: 2;
	font-weight: 800;
	font-size: clamp(15px, 1.6vw, 22px);
	line-height: 1.18;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: #ffffff;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Standard Poster Card with Below-Poster Caption (Shelf, Movie Grid, Catalog) */
.pd4-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-decoration: none !important;
	color: #ffffff !important;
	min-width: 0;
	transition: opacity 0.25s ease;
}

.pd4-card:hover {
	opacity: 0.86;
	color: #ffffff !important;
}

.pd4-card-box {
	position: relative;
	aspect-ratio: 2 / 3;
	background: var(--pd4-surface);
	padding: 12px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
}

.pd4-card-box .pd4-poster-overlay-title {
	font-size: clamp(14px, 1.3vw, 18px);
}

.pd4-card-caption {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.pd4-card-name {
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pd4-card-meta {
	font-size: 13px;
	color: var(--pd4-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ==========================================================================
   4. DẢI "TỐI NAY" (#101010 Full-Bleed Band)
   ========================================================================== */
.pd4-tonight-band {
	margin-top: var(--pd4-sec-gap);
	background: var(--pd4-band);
	padding: clamp(36px, 5.5vw, 76px) var(--pd4-pad-x);
}

.pd4-tonight-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: center;
}

.pd4-collage {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	grid-template-rows: 1fr 1fr;
	gap: 10px;
	aspect-ratio: 4 / 3;
}

.pd4-collage-item {
	position: relative;
	background: var(--pd4-surface);
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	padding: 14px;
	text-decoration: none !important;
	color: #ffffff !important;
}

.pd4-collage-item.is-tall {
	grid-row: 1 / 3;
}

.pd4-collage-title {
	position: relative;
	z-index: 2;
	font-weight: 800;
	font-size: 13.5px;
	line-height: 1.22;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
}

.pd4-tonight-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
}

.pd4-tonight-kicker {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--pd4-muted);
}

.pd4-tonight-heading {
	margin: 0 !important;
	font-weight: 800 !important;
	font-size: clamp(26px, 3.6vw, 48px) !important;
	line-height: 1.12 !important;
	letter-spacing: -0.02em !important;
	color: #ffffff !important;
}

.pd4-tonight-list {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 540px;
	border-top: 1px solid var(--pd4-line);
}

.pd4-tonight-row {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 14px;
	padding: 15px 0;
	border-bottom: 1px solid var(--pd4-line);
	color: #ffffff !important;
	text-decoration: none !important;
}

.pd4-tonight-row:hover {
	color: var(--pd4-muted) !important;
}

.pd4-tonight-time {
	font-weight: 800;
	font-size: 19px;
	font-variant-numeric: tabular-nums;
}

.pd4-tonight-name {
	font-weight: 700;
	font-size: 15.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pd4-tonight-ep {
	font-size: 13px;
	color: var(--pd4-muted);
	white-space: nowrap;
}

/* ==========================================================================
   5. TUYỂN TẬP 16:9, PHIM BỘ ĐANG PHÁT, TOP 10 & DANH MỤC SHELF
   ========================================================================== */
.pd4-collection-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: clamp(14px, 1.6vw, 24px);
}

.pd4-wide-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-decoration: none !important;
	color: #ffffff !important;
	transition: opacity 0.25s ease;
}

.pd4-wide-card:hover {
	opacity: 0.85;
	color: #ffffff !important;
}

.pd4-wide-box {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--pd4-surface);
	display: flex;
	align-items: flex-end;
	padding: 16px;
	overflow: hidden;
}

.pd4-wide-overlay-title {
	position: relative;
	z-index: 2;
	font-weight: 800;
	font-size: clamp(17px, 1.8vw, 23px);
	line-height: 1.18;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: #ffffff;
}

.pd4-wide-desc {
	font-size: 14px;
	line-height: 1.55;
	color: var(--pd4-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Horizontal Scroller */
.pd4-scroller {
	display: flex;
	gap: clamp(12px, 1.4vw, 20px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var(--pd4-pad-x);
	padding: 0 var(--pd4-pad-x);
	scrollbar-width: none;
}

.pd4-scroller::-webkit-scrollbar {
	display: none;
}

.pd4-airing-card {
	flex: none;
	width: clamp(250px, 30vw, 380px);
	scroll-snap-align: start;
}

/* Top 10 Hollow Rank Row */
.pd4-top10-item {
	flex: none;
	display: flex;
	align-items: flex-end;
	scroll-snap-align: start;
	text-decoration: none !important;
	color: #ffffff !important;
	transition: opacity 0.25s ease;
}

.pd4-top10-item:hover {
	opacity: 0.86;
}

.pd4-top10-rank {
	font-weight: 800;
	font-size: clamp(92px, 11.5vw, 164px);
	line-height: 0.78;
	letter-spacing: -0.06em;
	color: #000000;
	-webkit-text-stroke: 2px #5a5a5a;
	margin-right: -8px;
	position: relative;
	z-index: 1;
	user-select: none;
}

.pd4-top10-poster {
	position: relative;
	width: clamp(118px, 13vw, 168px);
	aspect-ratio: 2 / 3;
	background: var(--pd4-surface);
	padding: 10px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	z-index: 2;
}

/* Category Shelf Chips & Panels */
.pd4-chips-row {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 0 var(--pd4-pad-x);
}

.pd4-chips-row::-webkit-scrollbar {
	display: none;
}

.pd4-chip {
	flex: none;
	height: 38px;
	padding: 0 16px;
	border: 1px solid var(--pd4-border-btn);
	background: transparent;
	color: #ffffff !important;
	font-size: 13px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pd4-chip:hover {
	border-color: #ffffff;
}

.pd4-chip.is-active {
	background: #ffffff !important;
	color: #000000 !important;
	border-color: #ffffff !important;
}

.pd4-shelf-card {
	flex: none;
	width: clamp(142px, 15vw, 200px);
	scroll-snap-align: start;
}

/* 12-Movie Poster Grid */
.pd4-movie-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 14vw, 190px), 1fr));
	gap: clamp(20px, 2.4vw, 32px) clamp(10px, 1.4vw, 20px);
}

/* Genre List Grid ("Khám phá theo thể loại") */
.pd4-genre-list-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
	border-top: 1px solid var(--pd4-line);
}

.pd4-genre-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 18px 16px 18px 0;
	border-bottom: 1px solid var(--pd4-line);
	color: #ffffff !important;
	text-decoration: none !important;
}

.pd4-genre-row:hover {
	color: var(--pd4-muted) !important;
}

.pd4-genre-name {
	font-weight: 700;
	font-size: clamp(16px, 1.5vw, 19px);
}

.pd4-genre-count {
	font-size: 13px;
	color: var(--pd4-dim);
}

/* CTA Banner Box */
.pd4-cta-box {
	margin: var(--pd4-sec-gap) var(--pd4-pad-x) 0;
	padding: clamp(36px, 5.5vw, 68px) 24px;
	border: 1px solid var(--pd4-line);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
}

/* ==========================================================================
   6. CATALOG / ARCHIVE / SEARCH PAGES
   ========================================================================== */
.pd4-catalog-main {
	padding: clamp(24px, 4vw, 48px) var(--pd4-pad-x) 0;
	display: flex;
	flex-direction: column;
	gap: clamp(24px, 3.5vw, 40px);
}

.pd4-catalog-head {
	display: flex;
	flex-direction: column;
	gap: 18px;
	border-bottom: 1px solid var(--pd4-line);
}

.pd4-catalog-title-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px 20px;
}

.pd4-catalog-h1 {
	margin: 0 !important;
	font-weight: 800 !important;
	font-size: clamp(32px, 5.2vw, 68px) !important;
	line-height: 1.15 !important;
	letter-spacing: -0.025em !important;
	color: #ffffff !important;
}

.pd4-catalog-tabs {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.8vw, 34px);
	overflow-x: auto;
	scrollbar-width: none;
}

.pd4-catalog-tabs::-webkit-scrollbar {
	display: none;
}

.pd4-cat-tab {
	flex: none;
	background: none;
	border: 0;
	padding: 12px 0;
	cursor: pointer;
	color: var(--pd4-dim) !important;
	font-size: 13.5px;
	font-weight: 700;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	text-decoration: none !important;
	white-space: nowrap;
}

.pd4-cat-tab.is-active,
.pd4-cat-tab:hover {
	color: #ffffff !important;
}

.pd4-cat-tab.is-active {
	border-bottom-color: #ffffff;
}

.pd4-filter-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pd4-filter-line {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 2px;
}

.pd4-filter-line::-webkit-scrollbar {
	display: none;
}

.pd4-filter-tag {
	flex: none;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pd4-dim);
	margin-right: 6px;
}

/* A-Z Directory View */
.pd4-az-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 12px clamp(24px, 4vw, 56px);
}

.pd4-az-group {
	display: flex;
	flex-direction: column;
	padding-bottom: 20px;
}

.pd4-az-letter {
	font-weight: 800;
	font-size: 30px;
	padding: 8px 0;
	border-bottom: 1px solid var(--pd4-line);
	color: #ffffff;
}

.pd4-az-item {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--pd4-line-soft);
	color: #ffffff !important;
	font-size: 15px;
	text-decoration: none !important;
}

.pd4-az-item:hover {
	color: var(--pd4-muted) !important;
}

/* Pagination */
.navigation.pagination .nav-links,
.pd4-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.navigation.pagination .page-numbers {
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--pd4-border-btn);
	background: transparent;
	color: #ffffff !important;
	font-size: 13px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
	background: #ffffff;
	color: #000000 !important;
	border-color: #ffffff;
}

/* ==========================================================================
   7. SINGLE MOVIE DETAIL & PLAYER ROOM
   ========================================================================== */
.pd4-detail-hero {
	position: relative;
	min-height: clamp(460px, 74vh, 760px);
	display: flex;
	align-items: flex-end;
	background: #000000;
	overflow: hidden;
}

.pd4-detail-back {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pd4-text-2) !important;
	text-decoration: none !important;
}

.pd4-detail-back:hover {
	color: #ffffff !important;
}

.pd4-detail-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	font-size: 14px;
	color: var(--pd4-text-2);
}

.pd4-detail-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
}

.pd4-btn-square {
	width: 52px;
	height: 52px;
	border: 1px solid rgba(255, 255, 255, 0.65);
	background: transparent;
	color: #ffffff;
	display: grid;
	place-items: center;
	cursor: pointer;
	font-size: 22px;
	font-weight: 400;
	padding: 0;
}

.pd4-btn-square.is-saved,
.pd4-btn-square:hover {
	background: #ffffff;
	color: #000000;
	border-color: #ffffff;
}

/* Sticky Sub-Tab Bar under Header */
.pd4-sticky-tabs {
	position: sticky;
	top: 72px;
	z-index: 40;
	background: #000000;
	padding: 0 var(--pd4-pad-x);
	border-bottom: 1px solid var(--pd4-line);
}

.pd4-sticky-tabs-inner {
	display: flex;
	gap: clamp(20px, 3vw, 40px);
	overflow-x: auto;
	scrollbar-width: none;
}

.pd4-sticky-tabs-inner::-webkit-scrollbar {
	display: none;
}

.pd4-tab-btn {
	flex: none;
	background: none;
	border: 0;
	padding: 18px 0;
	cursor: pointer;
	color: var(--pd4-dim);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.pd4-tab-btn.is-active,
.pd4-tab-btn:hover {
	color: #ffffff;
}

.pd4-tab-btn.is-active {
	border-bottom-color: #ffffff;
}

.pd4-detail-body {
	padding: clamp(28px, 4vw, 52px) var(--pd4-pad-x) 0;
	display: flex;
	flex-direction: column;
	gap: clamp(44px, 5.5vw, 76px);
}

/* Cinema Player Box */
.pd4-player-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pd4-player-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.pd4-player-viewport {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #080808;
	border: 1px solid var(--pd4-line);
	overflow: hidden;
}

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

/* Episode Cards Grid (PhimĐêm v4 16:9 Cards) */
.pd4-ep-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: clamp(18px, 2.2vw, 28px) clamp(12px, 1.5vw, 20px);
}

.pd4-ep-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	cursor: pointer;
	text-decoration: none !important;
	color: #ffffff !important;
	transition: opacity 0.2s ease;
}

.pd4-ep-card:hover {
	opacity: 0.82;
}

.pd4-ep-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--pd4-surface);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding: 12px;
	overflow: hidden;
	border: 1px solid var(--pd4-line-soft);
}

.pd4-ep-card.is-active .pd4-ep-thumb {
	border-color: #ffffff;
}

.pd4-ep-thumb::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.35) 100%);
}

.pd4-ep-num {
	position: relative;
	z-index: 2;
	font-weight: 800;
	font-size: 36px;
	line-height: 0.82;
	color: rgba(255, 255, 255, 0.9);
	font-variant-numeric: tabular-nums;
}

.pd4-ep-play-circle {
	position: relative;
	z-index: 2;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.75);
	background: rgba(0, 0, 0, 0.45);
	display: grid;
	place-items: center;
	font-size: 13px;
	color: #ffffff;
}

.pd4-ep-card.is-active .pd4-ep-play-circle {
	background: #ffffff;
	color: #000000;
	border-color: #ffffff;
}

.pd4-ep-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	background: #ffffff;
	z-index: 3;
}

/* About / Specs 2-Column Layout */
.pd4-about-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
}

.pd4-facts-list {
	margin: 0;
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--pd4-line);
}

.pd4-fact-row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--pd4-line-soft);
	font-size: 15px;
}

.pd4-fact-label {
	color: var(--pd4-dim);
}

.pd4-fact-val {
	margin: 0;
	font-weight: 600;
	color: #ffffff;
}

/* ==========================================================================
   8. FOOTER, FULLSCREEN MENU & SEARCH OVERLAY
   ========================================================================== */
.pd4-footer {
	margin-top: clamp(64px, 8vw, 112px);
	padding: 40px var(--pd4-pad-x) 88px;
	border-top: 1px solid var(--pd4-line-soft);
	display: flex;
	flex-direction: column;
	gap: 22px;
	background: #000000;
}

.pd4-footer-logo-img {
	height: 64px !important;
	width: auto !important;
	max-width: 190px !important;
	object-fit: contain !important;
	filter: drop-shadow(0 2px 10px rgba(255, 77, 0, 0.28));
}

.pd4-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.pd4-footer-links a {
	color: #ffffff !important;
	text-decoration: none !important;
}

.pd4-footer-links a:hover {
	color: var(--pd4-muted) !important;
}

.pd4-footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	font-size: 12px;
	color: var(--pd4-dim);
}

.pd4-footer-legal a {
	color: var(--pd4-dim) !important;
}

/* Fullscreen Overlay Menu & Search */
.pd4-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: #000000;
	overflow-y: auto;
	padding: 0 var(--pd4-pad-x) 48px;
	display: none;
	flex-direction: column;
}

.pd4-overlay.is-open {
	display: flex;
}

.pd4-overlay-head {
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.pd4-search-input-lg {
	width: 100%;
	height: 76px;
	background: none;
	border: 0;
	border-bottom: 2px solid #ffffff;
	outline: none;
	color: #ffffff !important;
	font-size: clamp(22px, 4vw, 42px);
	font-weight: 800;
	padding: 0;
}

.pd4-search-input-lg::placeholder {
	color: var(--pd4-dim);
}

/* Mobile Bottom Bar (5 Tabs on 1 Row) */
.pd4-mobile-bar {
	display: none;
}

/* Toast Notification */
.pd4-toast {
	position: fixed;
	left: 50%;
	bottom: 72px;
	transform: translateX(-50%);
	z-index: 100;
	max-width: calc(100% - 32px);
	padding: 13px 20px;
	background: #ffffff;
	color: #000000;
	font-size: 13.5px;
	font-weight: 700;
	display: none;
	white-space: nowrap;
}

.pd4-toast.is-visible {
	display: block;
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS (Tablet 640-1023px & Mobile <640px)
   ========================================================================== */
@media (max-width: 1023px) {
	.pd4-nav {
		display: none !important;
	}
	.pd4-menu-btn {
		display: grid !important;
	}
	.pd4-tonight-grid,
	.pd4-about-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

@media (max-width: 767px) {
	.pd4-logo-img {
		height: 40px !important;
		max-width: 130px !important;
	}
	.pd4-btn-cta-sm {
		height: 34px;
		padding: 0 12px;
		font-size: 11px;
	}
	.pd4-mobile-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		height: 58px;
		background: rgba(0, 0, 0, 0.96);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--pd4-line);
		display: grid !important;
		grid-template-columns: repeat(5, 1fr) !important;
		z-index: 75;
	}
	.pd4-mob-tab {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		color: var(--pd4-dim) !important;
		font-size: 10.5px;
		font-weight: 700;
		text-decoration: none !important;
		background: none;
		border: 0;
		padding: 4px 2px;
		white-space: nowrap;
	}
	.pd4-mob-tab.is-active {
		color: #ffffff !important;
	}
}

@media (max-width: 639px) {
	.pd4-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
	.pd4-row-arrows {
		display: none !important;
	}
	.pd4-hero-title {
		font-size: clamp(24px, 6.5vw, 34px) !important;
		line-height: 1.22 !important;
	}
	.pd4-hero,
	.pd4-hero-slide.is-active {
		min-height: 480px;
	}
	.pd4-tonight-row {
		grid-template-columns: 58px minmax(0, 1fr) auto;
		gap: 10px;
	}
	.pd4-tonight-time {
		font-size: 16px;
	}
	.pd4-ep-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* === VIETNAMESE FONT ENFORCEMENT (NO BROKEN DIACRITICS OR CLIPPED ACCENTS) === */
:root {
	--pd4-font: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

html, body,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.entry-title, .td-page-title, .block-title,
.pd4-hero-title, .pd4-hero-mark, .pd4-hero-kicker, .pd4-hero-desc,
.pd4-sec-title, .pd4-sec-sub, .pd4-tonight-heading, .pd4-tonight-name,
.pd4-poster-overlay-title, .pd4-wide-overlay-title, .pd4-collage-title,
.pd4-card-name, .pd4-card-meta, .pd4-genre-name, .pd4-top10-rank,
.pd4-catalog-title, .pd4-detail-title, .pd4-watch-title,
[class*="pd4-"], [class*="title"], [class*="heading"], [class*="name"],
button, input, select, textarea {
	font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-synthesis: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Prevent uppercase Vietnamese stacked diacritics (Ắ, Ầ, Ẩ, Ẫ, Ế, Ố, Ớ, Ứ) from clipping at top/between lines */
.pd4-poster-overlay-title,
.pd4-card-box .pd4-poster-overlay-title,
.pd4-wide-overlay-title,
.pd4-collage-title {
	line-height: 1.36 !important;
	padding-top: 0.16em !important;
	padding-bottom: 0.06em !important;
}

.pd4-hero-title,
.pd4-catalog-title,
.pd4-detail-title {
	line-height: 1.28 !important;
	padding-top: 0.12em !important;
}

.pd4-hero-mark {
	line-height: 1.15 !important;
	padding-top: 0.12em !important;
}

.pd4-sec-title,
.pd4-tonight-heading {
	line-height: 1.28 !important;
	padding-top: 0.08em !important;
}

.pd4-card-name,
.pd4-tonight-name {
	line-height: 1.45 !important;
	padding-top: 2px !important;
	padding-bottom: 2px !important;
}


/* === CUSTOM BRAND PALETTE FOR Nghiện Phim (nghienphim.space) === */
:root {
    --mfm-accent: #F43F5E !important;
    --mfm-accent-hover: #FB7185 !important;
    --rn-accent: #F43F5E !important;
    --kp-accent: #F43F5E !important;
    --vieon-green: #F43F5E !important;
    --tp-accent: #F43F5E !important;
    --pd-accent: #F43F5E !important;
    --pf-accent: #F43F5E !important;
    --pm-accent: #F43F5E !important;
    --rp-accent: #F43F5E !important;
    --mn-accent: #F43F5E !important;
}
