/*
Theme Name: BM-V2
Author: BM
Description: Modern, dark, Netflix-style theme for the Bunny Movie catalogue. Served to admin users only.
Version: 1.0.0
Tags: dark, modern, streaming, movie
*/

/* ============================================================
   BM-V2 — Modern dark / Netflix-style theme
   ============================================================ */

:root {
	--bg: #0b0b0f;
	--bg-2: #141419;
	--bg-3: #1c1c24;
	--surface: #1a1a22;
	--surface-2: #23232e;
	--border: rgba(255, 255, 255, 0.08);
	--text: #f5f5f7;
	--text-dim: #b9b9c3;
	--text-mute: #7c7c88;
	--accent: #e50914;
	--accent-2: #ff3d47;
	--accent-soft: rgba(229, 9, 20, 0.15);
	--radius: 10px;
	--radius-lg: 16px;
	--shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	--header-h: 68px;
	--maxw: 1400px;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	background-color: var(--bg);
	color: var(--text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a,
a:hover {
	color: var(--text);
	text-decoration: none;
}

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

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

.container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	padding: 5px 22px;
	border-radius: var(--radius);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.2s ease;
	text-transform: none;
	letter-spacing: 0.2px;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

.btn-primary:hover {
	background: var(--accent-2);
	color: #fff;
	transform: translateY(-1px);
}

.btn-ghost {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text);
	backdrop-filter: blur(6px);
}

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

/* ---------- Header ---------- */
.bm2-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	height: var(--header-h);
	display: flex;
	align-items: center;
	padding: 0 24px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 100%);
	transition: background 0.3s ease;
}

.bm2-header.scrolled {
	background: rgba(11, 11, 15, 0.95);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

.bm2-header__inner {
	max-width: var(--maxw);
	margin: 0 auto;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 28px;
}

.bm2-logo {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 1px;
	color: var(--accent);
	text-transform: uppercase;
	white-space: nowrap;
}

.bm2-logo span {
	color: var(--text);
}

.bm2-nav {
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1;
	/* Stretch to the full header height so the custom scrollbar (bottom: 0)
	   sits on the header's bottom edge. The list stays centered by the
	   align-items: center above. */
	align-self: stretch;
	/* Allow the nav to shrink below its content width so the inner
	   overflow-x:auto engages instead of pushing the search/logout off-screen. */
	min-width: 0;
}

.bm2-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: nowrap;
	overflow-x: auto;
	/* Constrain the list to the nav's width so it scrolls rather than overflows. */
	min-width: 0;
	max-width: 100%;
	/* Hide the scrollbar so it takes no layout space. The list box then
	   equals the text height, so align-items: center (on .bm2-nav) centers
	   the text perfectly against the logo and search box. The list still
	   scrolls via mouse wheel, trackpad, or drag (see cursor: grabbing). */
	scrollbar-width: none;
}

/* Hide the horizontal scrollbar (WebKit/Chrome). */
.bm2-nav ul::-webkit-scrollbar {
	display: none;
}

.bm2-nav ul:active {
	cursor: grabbing;
}

/* Custom (JS-driven) scrollbar. Absolutely positioned so it overlays the
   content and takes no layout space — the text stays centered by flex. */
.bm2-nav__scrollbar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 6px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.bm2-nav__scrollbar.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.bm2-nav__scrollbar-track {
	position: absolute;
	inset: 0;
}

.bm2-nav__scrollbar-thumb {
	position: absolute;
	top: 0;
	height: 100%;
	min-width: 24px;
	background: var(--surface-2);
	border-radius: 6px;
	cursor: grab;
}

.bm2-nav__scrollbar-thumb:hover {
	background: #34343f;
}

.bm2-nav__scrollbar-thumb.is-dragging {
	background: #34343f;
	cursor: grabbing;
}

.bm2-nav a {
	display: inline-block;
	padding: 8px 14px;
	font-size: 15px;
	font-weight: 500;
	color: var(--text-dim);
	border-radius: var(--radius);
	transition: all 0.2s ease;
	/* Keep each label on a single line (e.g. "Sci-Fi") even when the nav
	   is squeezed. */
	white-space: nowrap;
}

.bm2-nav a:hover {
	color: var(--text);
	background: rgba(255, 255, 255, 0.06);
}

.bm2-nav .current-menu-item > a,
.bm2-nav .current_page_item > a {
	color: var(--text);
	font-weight: 700;
}

.bm2-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* ---------- Search (icon button + modal) ---------- */
.bm2-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.bm2-search-toggle:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.bm2-search-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 12vh 20px 20px;
}

.bm2-search-modal[hidden] {
	display: none;
}

.bm2-search-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	animation: bm2-fade-in 0.2s ease;
}

.bm2-search-modal__panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	padding: 20px;
	animation: bm2-modal-in 0.25s ease;
}

.bm2-search {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px 16px;
	transition: all 0.2s ease;
}

.bm2-search:focus-within {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.2);
}

.bm2-search input {
	background: transparent;
	border: none;
	outline: none;
	color: var(--text);
	font-size: 16px;
	width: 100%;
}

.bm2-search input::placeholder {
	color: var(--text-mute);
}

.bm2-search i {
	color: var(--text-mute);
}

.bm2-search__cta {
	flex-shrink: 0;
	background: var(--accent);
	border: none;
	border-radius: calc(var(--radius) - 2px);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 18px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.bm2-search__cta:hover {
	background: var(--accent-2);
}

/* Lock page scroll while the search modal is open. */
body.bm2-modal-open {
	overflow: hidden;
}

@keyframes bm2-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes bm2-modal-in {
	from { opacity: 0; transform: translateY(-12px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.bm2-menu-toggle {
	display: none;
	background: transparent;
	border: none;
	color: var(--text);
	font-size: 22px;
	cursor: pointer;
}

/* ---------- Hero ---------- */
.bm2-hero {
	position: relative;
	width: 100%;
	height: 78vh;
	min-height: 520px;
	margin-top: 0;
	overflow: hidden;
}

.bm2-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1s ease;
	background-size: cover;
	background-position: center top;
}

.bm2-hero__slide.active {
	opacity: 1;
}

.bm2-hero__slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 11, 15, 0.2) 0%, rgba(11, 11, 15, 0.5) 55%, var(--bg) 100%);
}

.bm2-hero__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12%;
	z-index: 2;
}

.bm2-hero__content .container {
	max-width: var(--maxw);
}

.bm2-hero__title {
	font-size: clamp(34px, 6vw, 68px);
	font-weight: 800;
	line-height: 1.05;
	max-width: 720px;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
	margin-bottom: 14px;
}

.bm2-hero__meta {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	color: var(--text-dim);
	font-size: 16px;
	font-weight: 500;
}

.bm2-hero__meta .dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--text-mute);
}

.bm2-hero__overview {
	max-width: 620px;
	font-size: 17px;
	color: var(--text-dim);
	margin-bottom: 24px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bm2-hero__actions {
	display: flex;
	gap: 14px;
}

.bm2-hero__dots {
	position: absolute;
	bottom: 28px;
	right: 24px;
	z-index: 3;
	display: flex;
	gap: 8px;
}

.bm2-hero__dots button {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	transition: all 0.2s ease;
}

.bm2-hero__dots button.active {
	background: var(--accent);
	width: 26px;
	border-radius: 6px;
}

/* ---------- Rows / Sections ---------- */
.bm2-main {
	padding: 40px 0;
	margin-top: -60px;
	position: relative;
	z-index: 2;
}

/* No hero (e.g. homepage page 2+): don't pull up under the fixed header */
.bm2-main--nohero {
	margin-top: 0;
	padding-top: calc(var(--header-h) + 24px);
}

/* Breadcrumbs already offset for the fixed header — avoid doubling up */
.bm2-main--nohero .bm2-breadcrumbs {
	padding-top: 0;
}

body.admin-bar .bm2-main--nohero {
	padding-top: 0;
}

.bm2-row {
	margin-bottom: 44px;
}

.bm2-row__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 18px;
}

.bm2-row__title {
	font-size: 22px;
	font-weight: 700;
}

.bm2-row__link {
	font-size: 14px;
	color: var(--text-mute);
	font-weight: 500;
}

.bm2-row__link:hover {
	color: var(--accent-2);
}

.bm2-row__track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding-bottom: 8px;
	scrollbar-width: thin;
	scrollbar-color: var(--surface-2) transparent;
}

.bm2-row__track::-webkit-scrollbar {
	height: 8px;
}

.bm2-row__track::-webkit-scrollbar-thumb {
	background: var(--surface-2);
	border-radius: 8px;
}

/* ---------- Movie card ---------- */
.bm2-card {
	flex: 0 0 auto;
	width: 200px;
	cursor: pointer;
	transition: transform 0.25s ease;
}

.bm2-card:hover {
	transform: scale(1.05);
	z-index: 5;
}

.bm2-card__poster {
	position: relative;
	width: 200px;
	height: 290px;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
	background-size: cover;
	background-position: center;
	box-shadow: var(--shadow);
}

.bm2-card__poster::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.bm2-card:hover .bm2-card__poster::after {
	opacity: 1;
}

.bm2-card__play {
	position: absolute;
	bottom: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 14px;
	opacity: 0;
	transform: translateY(8px);
	transition: all 0.25s ease;
	z-index: 2;
}

.bm2-card:hover .bm2-card__play {
	opacity: 1;
	transform: translateY(0);
}

.bm2-card__title {
	margin-top: 10px;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bm2-card__cats {
	margin-top: 4px;
	font-size: 13px;
	color: var(--text-mute);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Grid (search / category / archive) ---------- */
.bm2-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
}

.bm2-grid .bm2-card {
	width: auto;
}

.bm2-grid .bm2-card__poster {
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
}

/* ---------- Breadcrumbs ---------- */
.bm2-breadcrumbs {
	padding: calc(var(--header-h) + 24px) 0 24px;
	font-size: 14px;
	color: var(--text-mute);
}

.bm2-breadcrumbs a {
	color: var(--text-mute);
}

.bm2-breadcrumbs a:hover {
	color: var(--text-dim);
}

.bm2-breadcrumbs .sep {
	margin: 0 8px;
	color: var(--text-mute);
}

/* ---------- Single movie ---------- */
.bm2-single-hero {
	position: relative;
	width: 100%;
	min-height: 340px;
	background-size: cover;
	background-position: center top;
	display: flex;
	align-items: flex-end;
}

.bm2-single-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 11, 15, 0.3) 0%, rgba(11, 11, 15, 0.6) 60%, var(--bg) 100%);
}

.bm2-single-hero__content {
	position: relative;
	z-index: 2;
	padding: 48px 0 32px;
	width: 100%;
}

.bm2-single-hero__title {
	font-size: clamp(30px, 5vw, 56px);
	font-weight: 800;
	margin-bottom: 14px;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.bm2-single-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	color: var(--text-dim);
	font-size: 16px;
	font-weight: 500;
}

.bm2-single-hero__meta .dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--text-mute);
}

.bm2-single-hero__genres {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bm2-chip {
	display: inline-block;
	padding: 5px 14px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-dim);
}

.bm2-chip:hover {
	background: var(--accent-soft);
	color: var(--text);
}

.bm2-single-body {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 40px;
	padding: 40px 0 0;
}

.bm2-single-poster {
	position: relative;
}

.bm2-single-poster img {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	width: 100%;
}

.bm2-single-info h2 {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

.bm2-single-info .overview {
	color: var(--text-dim);
	font-size: 16px;
	margin-bottom: 28px;
}

.bm2-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 24px;
	margin-bottom: 28px;
}

.bm2-facts .fact {
	font-size: 14px;
}

.bm2-facts .fact .label {
	color: var(--text-mute);
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}

.bm2-facts .fact .value {
	color: var(--text);
	font-weight: 500;
}

.bm2-people {
	margin-bottom: 24px;
}

.bm2-people .label {
	color: var(--text-mute);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.bm2-people .names {
	color: var(--text);
	font-size: 14px;
	line-height: 1.7;
}

.bm2-people .names a {
	color: var(--text);
}

.bm2-play-cta {
	margin: 28px 0;
}

.bm2-play-cta .filesize {
	margin-top: 10px;
	color: var(--text-mute);
	font-size: 14px;
}

/* ---------- Trailer ---------- */
.bm2-trailer {
	margin: 32px 0;
}

.bm2-trailer iframe {
	width: 100%;
	border-radius: var(--radius-lg);
	border: none;
	box-shadow: var(--shadow);
}

/* ---------- Reviews ---------- */
.bm2-reviews {
	margin: 32px 0;
}

.bm2-review {
	display: flex;
	gap: 18px;
	padding: 18px 0;
	border-bottom: 1px solid var(--border);
}

.bm2-review:last-child {
	border-bottom: none;
}

.bm2-review__score {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 800;
}

.bm2-review__score.favorable {
	background: rgba(46, 204, 113, 0.15);
	color: #2ecc71;
}

.bm2-review__score.mixed {
	background: rgba(241, 196, 15, 0.15);
	color: #f1c40f;
}

.bm2-review__score.unfavorable {
	background: rgba(231, 76, 60, 0.15);
	color: #e74c3c;
}

.bm2-review__body .source {
	font-weight: 700;
	margin-bottom: 4px;
}

.bm2-review__body .author {
	color: var(--text-mute);
	font-size: 14px;
	margin-bottom: 8px;
}

.bm2-review__body .summary {
	color: var(--text-dim);
	font-size: 15px;
}

/* ---------- Page ---------- */
.bm2-page {
	padding: calc(var(--header-h) + 40px) 0 80px;
}

.bm2-page h1 {
	font-size: 34px;
	font-weight: 800;
	margin-bottom: 24px;
}

.bm2-page .entry-content {
	color: var(--text-dim);
	font-size: 16px;
	max-width: 100%;
}

.bm2-page .entry-content p {
	margin-bottom: 16px;
}

.bm2-page .entry-content h2,
.bm2-page .entry-content h3 {
	color: var(--text);
	margin: 28px 0 14px;
}

/* ---------- 404 ---------- */
.bm2-404 {
	padding: calc(var(--header-h) + 60px) 0 100px;
	text-align: center;
}

.bm2-404__num {
	font-size: clamp(80px, 18vw, 180px);
	font-weight: 800;
	color: var(--accent);
	line-height: 1;
}

.bm2-404__title {
	font-size: 28px;
	font-weight: 700;
	margin: 16px 0 12px;
}

.bm2-404__text {
	color: var(--text-dim);
	max-width: 520px;
	margin: 0 auto 28px;
}

/* ---------- Pagination ---------- */
.bm2-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 20px 0 40px;
	flex-wrap: wrap;
}

.bm2-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text-dim);
	font-weight: 600;
	transition: all 0.2s ease;
}

.bm2-pagination .page-numbers.current {
	background: var(--accent);
	color: #fff;
}

.bm2-pagination .page-numbers:hover {
	background: var(--surface-2);
	color: var(--text);
}

/* ---------- Footer ---------- */
.bm2-footer {
	border-top: 1px solid var(--border);
	padding: 40px 0;
	text-align: center;
	color: var(--text-mute);
	font-size: 14px;
}

.bm2-footer a {
	color: var(--text-dim);
	margin: 0 10px;
}

.bm2-footer a:hover {
	color: var(--accent-2);
}

.bm2-footer .copy {
	margin-top: 12px;
}

/* ---------- Back to top ---------- */
.bm2-back-top {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	z-index: 900;
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s ease;
	box-shadow: var(--shadow);
}

.bm2-back-top.show {
	opacity: 1;
	pointer-events: auto;
}

.bm2-back-top:hover {
	background: var(--accent-2);
}

/* ---------- Admin bar offset ----------
   BM-V2 is only served to admins, so the WP admin bar (32px) is always
   present. Shift the fixed header and top-of-page content below it. */
body.admin-bar .bm2-header {
	top: 32px;
}

/* WordPress already adds margin-top: 32px to <html> when the admin bar is
   shown, which pushes all in-flow content (including the hero) down by the
   admin bar height. Do NOT add another 32px here, or the hero starts 32px
   too low and a black band shows at the top of the fixed header. */

body.admin-bar .bm2-breadcrumbs {
	padding-top: calc(var(--header-h) + 32px + 24px);
}

body.admin-bar .bm2-page {
	padding-top: calc(var(--header-h) + 32px + 40px);
}

body.admin-bar .bm2-404 {
	padding-top: calc(var(--header-h) + 32px + 60px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.bm2-nav {
		position: fixed;
		top: var(--header-h);
		left: 0;
		right: 0;
		background: rgba(11, 11, 15, 0.98);
		backdrop-filter: blur(10px);
		padding: 16px 24px;
		transform: translateY(-140%);
		transition: transform 0.3s ease;
		border-bottom: 1px solid var(--border);
		/* The base rule is `display:flex; align-items:center`. With a tall
		   menu the centered <ul> overflows equally top and bottom, clipping
		   the first items above the viewport. Top-align so the first genre
		   is visible and the nav's overflow-y:auto scrolls the rest. */
		align-items: flex-start;
		/* Cap the dropdown at the viewport height and scroll it, so a long
		   menu (e.g. all genre links) stays reachable on mobile. */
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	/* The mobile nav is position: fixed, so offset it below the admin bar. */
	body.admin-bar .bm2-nav {
		top: calc(var(--header-h) + 32px);
		max-height: calc(100vh - var(--header-h) - 32px);
	}

	.bm2-nav.open {
		transform: translateY(0);
	}

	/* The nav is out of flow (position: fixed) on mobile, so push the
	   actions (search / login / toggle) to the right edge of the header. */
	.bm2-header__actions {
		margin-left: auto;
	}

	/* The nav is a vertical dropdown on mobile — no horizontal scrollbar. */
	.bm2-nav__scrollbar {
		display: none;
	}

	.bm2-nav ul {
		display: grid;
		/* The <ul> is a flex item that otherwise sizes to its content, which
		   would make auto-fill's available width circular. Stretch it to the
		   nav's full width so the column count can grow with the screen. */
		width: 100%;
		/* Fit as many columns as the width allows (min 130px each), so the
		   column count grows on wider screens (2 on phones → 5+ on tablets). */
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 4px 12px;
	}

	.bm2-nav a {
		display: block;
		padding: 12px 14px;
	}

	.bm2-menu-toggle {
		display: inline-flex;
	}
}

@media (max-width: 900px) {
	.bm2-single-body {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.bm2-single-poster {
		max-width: 280px;
		margin: 0 auto;
	}

	.bm2-hero {
		height: 62vh;
		min-height: 420px;
	}
}

@media (max-width: 560px) {
	/* Tighten the header so logo + search + login + toggle fit on small phones. */
	.bm2-header {
		padding: 0 14px;
	}

	.bm2-header__inner {
		gap: 12px;
	}

	.bm2-logo {
		font-size: 20px;
	}

	.bm2-card {
		width: 150px;
	}

	.bm2-card__poster {
		width: 150px;
		height: 220px;
	}

	.bm2-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 14px;
	}

	.bm2-facts {
		grid-template-columns: 1fr;
	}
}

/* ============================================================
   Login / register page (wp-login.php)
   ============================================================ */
body.login {
	background: var(--bg);
	background-image:
		radial-gradient(ellipse 60% 50% at 50% -10%, rgba(229, 9, 20, 0.12) 0%, transparent 60%),
		radial-gradient(ellipse 50% 40% at 85% 110%, rgba(229, 9, 20, 0.06) 0%, transparent 60%);
	background-attachment: fixed;
}

/* Center the card. Newer WP (6.6+/7.x) has no #bodylogin wrapper, so
   #login and the logo are direct children of <body> — make the body a
   centered flex column so the logo sits above the card, both centered. */
body.login {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 16px;
}
body.login form {
	padding: 0px;
}

/* Older WP wraps everything in #bodylogin — center there too. */
body.login #bodylogin {
	min-height: 100vh;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 16px;
}

body.login .bm2-login-logo {
	display: block;
	text-align: center;
	margin: 0 auto 28px;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: 1px;
	color: var(--accent);
	text-transform: uppercase;
}

body.login .bm2-login-logo:hover {
	color: var(--accent-2);
}

body.login #login {
	width: 100%;
	max-width: 420px;
	margin: 0;
	padding: 36px 32px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
}

body.login #login h1,
body.login h1,
body.login .wp-login-logo {
	display: none !important;
}

body.login .message,
body.login #login p {
	color: var(--text-dim);
	font-size: 15px;
	/* margin-bottom: 18px; */
}

.login #backtoblog a, .login #nav a {
	color: var(--text-dim);
}

#backtoblog {
	margin-bottom: 0px;
}

.login #backtoblog, .login #nav {
	padding: 0px;
}

body.login .notice {
	margin: 0 0 18px;
	padding: 12px 14px;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 15px;
}

body.login .message a {
	color: var(--accent-2);
}

body.login .message a:hover {
	color: var(--accent);
}

/* All login-page forms (#loginform, #registerform, #lostpasswordform,
   #resetpass) live inside #login — target them as a group. */
body.login #login form {
	margin-top: 8px;
	background: transparent;
	border: none;
}

body.login #login form label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

body.login #login form input[type="text"],
body.login #login form input[type="password"],
body.login #login form input[type="email"] {
	width: 100%;
	margin: 0 0 18px;
	padding: 12px 14px;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s ease, background 0.2s ease;
}

/* Some fields (e.g. the baw-invitation-codes "Invitation Code" field) wrap the
   input inside its <label>, so the label's margin-bottom lands below the input.
   Add a top gap so the label text and the field don't touch. (Type selectors are
   needed to out-specificity the `margin: 0 0 18px` shorthand above.) */
body.login #login form label input[type="text"],
body.login #login form label input[type="password"],
body.login #login form label input[type="email"] {
	margin-top: 8px;
}

body.login #login form input[type="text"]:focus,
body.login #login form input[type="password"]:focus,
body.login #login form input[type="email"]:focus {
	outline: none;
	box-shadow: none;
	border-color: var(--accent);
	background: var(--bg-3);
}

body.login #login form input::placeholder {
	color: var(--text-mute);
}

body.login .forgetmenot {
	float: none;
	margin: 0 0 18px;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Overrides the #login form label rule above (more classes wins). */
body.login #login .forgetmenot label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--text-dim);
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

body.login .forgetmenot input {
	width: 16px;
	height: 16px;
	margin: 0;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: 4px;
	accent-color: var(--accent);
}

/* login.min.css adds a blue box-shadow ring on focus — remove it. */
body.login .forgetmenot input:focus {
	outline: none;
	box-shadow: none;
}

body.login .button,
body.login #wp-submit,
body.login .button-primary {
	display: block;
	width: 100%;
	margin: 20px 0px;
	padding: 9px 18px;
	background: var(--accent);
	border: none;
	border-radius: var(--radius);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
}
body.login #wp-submit:hover,
body.login .button-primary:hover {
	background: var(--accent-2);
	color: #fff;
	transform: translateY(-1px);
}

body.login #backto {
	float: none;
	display: block;
	text-align: center;
	margin-top: 8px;
	font-size: 14px;
	color: var(--text-mute);
}

body.login #backto a {
	color: var(--text-dim);
}

body.login #backto a:hover {
	color: var(--accent-2);
}

body.login .forgetmenot label {
	color: var(--text-dim);
}

body.login .forgetmenot a {
	color: var(--accent-2);
}

body.login .forgetmenot a:hover {
	color: var(--accent);
}

body.login #nav,
body.login #footer {
	display: none;
}

body.login .wp-error {
	margin: 0 0 18px;
	padding: 12px 14px;
	background: var(--accent-soft);
	border: 1px solid rgba(229, 9, 20, 0.4);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 14px;
}

body.login .wp-error a {
	color: var(--accent-2);
}

body.login .success {
	margin: 0 0 18px;
	padding: 12px 14px;
	background: rgba(46, 160, 67, 0.15);
	border: 1px solid rgba(46, 160, 67, 0.4);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 14px;
}

body.login .success a {
	color: #5fd07a;
}

@media (max-width: 480px) {
	/* On very small screens the logo and the actions (search / login /
	   toggle) can't share one row, so stack the header into two rows.
	   Bumping --header-h grows the fixed header and auto-adjusts every
	   calc(var(--header-h) + ...) content offset below it (and the mobile
	   nav dropdown, which sits at top: var(--header-h)). */
	:root {
		--header-h: 96px;
	}

	.bm2-header__inner {
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}

	.bm2-header__actions {
		margin-left: 0;
		justify-content: center;
	}

	body.login #login {
		padding: 28px 22px;
	}

	body.login .bm2-login-logo {
		font-size: 24px;
	}
}
/* ------------------------------------------------------------------
 * Poster lightbox (single movie page)
 * ------------------------------------------------------------------ */
.bm2-poster-btn {
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        background: none;
        cursor: zoom-in;
        border-radius: var(--radius-lg);
}

.bm2-poster-btn img {
        display: block;
        transition: transform 0.3s ease;
}

.bm2-poster-btn:hover img {
        transform: scale(1.03);
}

.bm2-lightbox {
        position: fixed;
        inset: 0;
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(4px);
        animation: bm2-lightbox-fade 0.2s ease;
}

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

.bm2-lightbox__frame {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        max-height: 100%;
}

.bm2-lightbox__img {
        max-width: 100%;
        max-height: 100vh;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        animation: bm2-lightbox-zoom 0.2s ease;
}

.bm2-lightbox__close {
        position: absolute;
        top: -18px;
        right: -18px;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        transition: background 0.2s ease;
}

.bm2-lightbox__close:hover {
        background: rgba(255, 255, 255, 0.25);
}

body.bm2-lightbox-open {
        overflow: hidden;
}

@keyframes bm2-lightbox-fade {
        from {
                opacity: 0;
        }
        to {
                opacity: 1;
        }
}

@keyframes bm2-lightbox-zoom {
        from {
                transform: scale(0.95);
        }
        to {
                transform: scale(1);
        }
}

/* AdSense units */
.bm2-ad {
        margin: 20px 0;
        text-align: center;
}

.bm2-ad .adsbygoogle {
        display: block;
}
/* ---------- Comments ---------- */
.bm2-comments {
	padding: 50px 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.bm2-comments__title {
	font-size: 22px;
	font-weight: 800;
	margin-bottom: 30px;
}

.bm2-comments__nav {
	margin: 16px 0;
}

.bm2-comments__nav .nav-links {
	display: flex;
	gap: 12px;
}

.bm2-comments__nav a {
	color: var(--text-dim);
	font-size: 14px;
	text-decoration: none;
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: color 0.2s, border-color 0.2s;
}

.bm2-comments__nav a:hover {
	color: var(--text);
	border-color: var(--accent);
}

.bm2-comments__list,
.bm2-comments__list ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bm2-comments__list {
	margin: 0;
}

.bm2-comment-item {
	padding: 18px 0;
}

.bm2-comments__list .children {
	padding-left: 48px;
}

.bm2-comment--reply {
	padding-top: 4px;
}

.bm2-comment {
	display: flex;
	gap: 16px;
}

	.bm2-comments li.comment.bm2-comment--top {
		margin-bottom: 10px;
	}

.bm2-comment--top:not(:first-child) {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
}

.bm2-comment__avatar img {
	border-radius: 50%;
	background: var(--bg-3);
}

.bm2-comment__main {
	flex: 1;
	min-width: 0;
}

.bm2-comment__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 6px;
}

.bm2-comment__author {
	font-weight: 700;
}

.bm2-comment__date {
	color: var(--text-mute);
	font-size: 13px;
}

.bm2-comment__text {
	color: var(--text-dim);
	font-size: 15px;
	line-height: 1.6;
	overflow-wrap: break-word;
}

.bm2-comment__foot {
	/* margin-top: 8px; */
	margin-bottom: 15px;
}

.bm2-comment__foot .comment-reply-link {
	color: var(--accent-2);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.bm2-comment__foot .comment-reply-link:hover {
	text-decoration: underline;
}

.bm2-comments__respond {
	margin-top: 40px;
}

.bm2-comments__respond .logged-in-as {
	color: var(--text-mute);
	font-size: 14px;
	margin-bottom: 12px;
}

.bm2-comments__respond .logged-in-as__name {
	color: var(--text);
	font-weight: 700;
}

.bm2-comments__form-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 16px;
}

.bm2-comments__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

.bm2-comments__fields .comment-author {
	grid-column: 1 / -1;
}

.bm2-comments__fields .comment-email {
	grid-column: 1 / -1;
}

.bm2-comments__fields .comment-url {
	grid-column: 1 / -1;
}

.bm2-comments__fields input,
.bm2-comments__fields textarea,
#commentform textarea {
	width: 100%;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	padding: 12px 14px;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s;
}

.bm2-comments__fields input:focus,
.bm2-comments__fields textarea:focus,
#commentform textarea:focus {
	outline: none;
	border-color: var(--accent);
}

#commentform textarea {
	min-height: 120px;
	resize: vertical;
	margin-bottom: 12px;
}

.bm2-comments__form .form-submit {
	margin: 0;
}

.bm2-comments__form .form-submit input[type="submit"] {
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius);
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
}

.bm2-comments__form .form-submit input[type="submit"]:hover {
	background: var(--accent-2);
}

.bm2-comments__error {
	margin-bottom: 20px;;
	padding: 10px 14px;
	background: var(--accent-soft);
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	color: var(--accent-2);
	font-size: 14px;
	font-weight: 600;
}

@media (max-width: 640px) {
	.bm2-comments__list .children {
		padding-left: 24px;
	}

	.bm2-comments__fields {
		grid-template-columns: 1fr;
	}
}
