/*
Theme Name: ToroPlay Movie Catalog
Theme URI: https://example.com/toroplay-movie-catalog
Author: Site Administrator
Description: A responsive movie-catalog theme designed to work with the ToroPlay Movie Catalog plugin.
Version: 1.0.12
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: toroplay-movie-catalog
*/

:root {
	--tp-background: #101114;
	--tp-surface: #191b20;
	--tp-surface-raised: #22252b;
	--tp-text: #f5f5f5;
	--tp-muted: #a7aab2;
	--tp-accent: #71be44;
	--tp-accent-hover: #85d451;
	--tp-accent-soft: rgba(113, 190, 68, 0.14);
	--tp-border: #2e3138;
	--tp-content: 1240px;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--tp-background);
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--tp-background);
	color: var(--tp-text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

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

a:hover,
a:focus-visible {
	color: var(--tp-accent);
}

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

.screen-reader-text {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	margin: -1px;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	clip-path: inset(50%);
}

.tp-skip-link {
	position: absolute;
	top: -50px;
	left: 16px;
	z-index: 20;
	padding: 10px 14px;
	background: var(--tp-accent);
	color: #111;
}

.tp-skip-link:focus {
	top: 12px;
}

.tp-site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid var(--tp-border);
	background: rgba(16, 17, 20, 0.96);
	backdrop-filter: blur(12px);
}

.tp-header-inner,
.tp-main,
.tp-footer-inner {
	width: min(var(--tp-content), calc(100% - 40px));
	margin-inline: auto;
}

.tp-header-inner {
	display: grid;
	min-height: 76px;
	grid-template-columns: 1fr;
	align-items: center;
	gap: 10px;
}

.tp-brand {
	display: block;
	justify-self: center;
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-align: center;
}

.tp-brand-mark {
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border-radius: 10px;
	background: var(--tp-accent);
	color: #111;
	font-size: 1rem;
}

.tp-header-tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.tp-header-inner > .tp-search {
	grid-column: 1 / -1;
	width: 100%;
}

.tp-nav ul {
	display: flex;
	margin: 0;
	padding: 0;
	gap: 20px;
	list-style: none;
}

.tp-search {
	display: flex;
	min-width: 0;
	gap: 6px;
}

.tp-search input[type="search"] {
	width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	padding: 9px 12px;
	border: 1px solid var(--tp-border);
	border-radius: 7px;
	background: var(--tp-surface);
	color: var(--tp-text);
}

.tp-search button,
.tp-button {
	padding: 9px 14px;
	border: 0;
	border-radius: 7px;
	background: var(--tp-accent);
	color: #151515;
	cursor: pointer;
	font-weight: 700;
}

.tp-main {
	min-height: 70vh;
	padding-block: 36px 64px;
}

.tp-hero {
	display: grid;
	min-height: 290px;
	align-content: center;
	margin-bottom: 40px;
	padding: clamp(28px, 6vw, 72px);
	border: 1px solid var(--tp-border);
	border-radius: 18px;
	background:
		radial-gradient(ellipse at 82% 18%, var(--tp-accent-soft), transparent 38%),
		linear-gradient(125deg, #1d2027, #111216 75%);
}

.tp-eyebrow {
	margin: 0 0 8px;
	color: var(--tp-accent);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.tp-hero h1,
.tp-archive-heading h1,
.tp-single-title {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.6rem);
	line-height: 1.1;
}

.tp-hero p:last-child {
	max-width: 620px;
	margin-bottom: 0;
	color: var(--tp-muted);
	font-size: 1.08rem;
}

.tp-section-heading,
.tp-archive-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 22px;
}

.tp-section-heading h2,
.tp-archive-heading h1 {
	margin: 0;
}

.tp-section-heading h2 {
	font-size: 1.5rem;
}

.tp-movie-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 12px;
	margin: 0 0 28px;
	padding: 18px;
	border: 1px solid var(--tp-border);
	border-radius: 10px;
	background: var(--tp-surface);
}

.tp-movie-filters label {
	display: grid;
	gap: 5px;
	color: var(--tp-muted);
	font-size: 0.85rem;
}

.tp-movie-filters select {
	min-width: 180px;
	padding: 9px 12px;
	border: 1px solid var(--tp-border);
	border-radius: 7px;
	background: var(--tp-background);
	color: var(--tp-text);
}

.tp-movie-filters a {
	padding: 9px 4px;
	color: var(--tp-muted);
}

.tp-home-main {
	max-width: 1040px;
	padding-top: 26px;
}

.tp-home-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: center;
	gap: 10px;
	margin: 0 -24px 0;
	padding: 16px 24px 20px;
	border-bottom: 1px solid var(--tp-border);
	background: #17181a;
}

.tp-home-filters label {
	display: grid;
	min-width: 110px;
	gap: 4px;
	color: var(--tp-muted);
	font-size: 0.78rem;
}

.tp-home-filters select {
	width: 100%;
	min-height: 34px;
	padding: 6px 9px;
	border: 1px solid #34363a;
	border-radius: 2px;
	background: #242629;
	color: var(--tp-text);
	font-size: 0.82rem;
}

.tp-home-filter-submit {
	min-height: 34px;
	padding: 6px 12px;
	border: 1px solid #34363a;
	border-radius: 2px;
	background: #242629;
	color: var(--tp-text);
	cursor: pointer;
}

.tp-home-filter-submit:hover,
.tp-home-filter-submit:focus-visible {
	border-color: var(--tp-accent);
}

.tp-home-result-count {
	margin: 0;
	padding: 12px 0;
	color: var(--tp-accent);
	font-size: 0.9rem;
	text-align: center;
}

.tp-home-result-count strong {
	font-weight: 800;
}

.tp-home-result-count span {
	font-style: italic;
}

.tp-home-movie-grid {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px 18px;
}

.tp-home-movie-grid .tp-card-poster {
	border: 2px solid #e8e8e8;
	border-radius: 2px;
	background: #202124;
}

.tp-home-movie-grid .tp-card-title {
	display: -webkit-box;
	overflow: hidden;
	margin: 4px 0 0;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
}

.tp-home-movie-grid .tp-card-year {
	display: block;
	margin-top: 1px;
	font-size: 0.7rem;
}

.tp-home-pagination {
	display: flex;
	justify-content: center;
	margin: 0 0 22px;
}

.tp-home-pagination-bottom {
	margin: 22px 0 0;
}

.tp-home-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tp-home-pagination .page-numbers a,
.tp-home-pagination .page-numbers span {
	display: grid;
	min-width: 30px;
	min-height: 30px;
	place-items: center;
	padding: 3px 7px;
	border: 1px solid #383a3d;
	border-radius: 2px;
	color: var(--tp-text);
	font-size: 0.75rem;
}

.tp-home-pagination .page-numbers .current {
	border-color: var(--tp-accent);
	background: var(--tp-accent);
	color: #101114;
	font-weight: 800;
}

.tp-movie-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 24px 18px;
}

.tp-movie-card {
	min-width: 0;
}

.tp-card-poster {
	position: relative;
	overflow: hidden;
	aspect-ratio: 2 / 3;
	border: 1px solid var(--tp-border);
	border-radius: 10px;
	background:
		linear-gradient(145deg, var(--tp-accent-soft), transparent 48%),
		var(--tp-surface-raised);
}

.tp-card-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}

.tp-movie-card a:hover .tp-card-poster img,
.tp-movie-card a:focus-visible .tp-card-poster img {
	transform: scale(1.045);
}

.tp-poster-placeholder {
	display: grid;
	height: 100%;
	place-items: center;
	padding: 16px;
	color: var(--tp-muted);
	text-align: center;
}

.tp-rating {
	position: absolute;
	top: 9px;
	right: 9px;
	padding: 3px 7px;
	border-radius: 5px;
	background: rgba(15, 16, 18, 0.88);
	color: var(--tp-accent);
	font-size: 0.82rem;
	font-weight: 800;
}

.tp-card-title {
	margin: 10px 0 2px;
	font-size: 0.98rem;
	line-height: 1.35;
}

.tp-card-year,
.tp-muted {
	color: var(--tp-muted);
	font-size: 0.88rem;
}

.tp-pagination {
	margin-top: 40px;
}

.tp-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tp-pagination a,
.tp-pagination span {
	display: inline-grid;
	min-width: 38px;
	min-height: 38px;
	place-items: center;
	padding: 5px 10px;
	border: 1px solid var(--tp-border);
	border-radius: 6px;
}

.tp-pagination .current {
	border-color: var(--tp-accent);
	background: var(--tp-accent);
	color: #111;
}

.tp-movie-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
	max-width: 1180px;
	align-items: start;
	gap: 28px;
	margin-inline: auto;
}

.tp-movie-primary {
	min-width: 0;
}

.tp-single {
	display: grid;
	gap: 24px;
}

.tp-movie-sidebar {
	display: grid;
	gap: 22px;
}

.tp-movie-sidebar-section {
	overflow: hidden;
	border: 1px solid var(--tp-border);
	border-top: 2px solid var(--tp-accent);
	background: var(--tp-surface);
}

.tp-movie-sidebar-section h2 {
	margin: 0;
	padding: 11px 13px;
	border-bottom: 1px solid var(--tp-border);
	font-size: 1rem;
}

.tp-sidebar-movie-list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tp-sidebar-movie-list li + li {
	border-top: 1px solid var(--tp-border);
}

.tp-sidebar-movie-list a {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 10px;
	padding: 9px;
}

.tp-sidebar-movie-list a:hover strong,
.tp-sidebar-movie-list a:focus-visible strong {
	color: var(--tp-accent);
}

.tp-sidebar-poster {
	display: grid;
	width: 48px;
	height: 64px;
	flex: 0 0 48px;
	overflow: hidden;
	place-items: center;
	border: 1px solid var(--tp-border);
	background: var(--tp-background);
	color: var(--tp-accent);
}

.tp-sidebar-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tp-sidebar-movie-info {
	display: grid;
	min-width: 0;
	gap: 3px;
}

.tp-sidebar-movie-info strong {
	display: -webkit-box;
	overflow: hidden;
	font-size: 0.84rem;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.tp-sidebar-movie-info > span,
.tp-sidebar-empty {
	color: var(--tp-muted);
	font-size: 0.75rem;
}

.tp-sidebar-empty {
	margin: 0;
	padding: 12px;
}

.tp-single {
	max-width: none;
	margin-inline: 0;
}

.tp-single-heading {
	width: 100%;
}

.tp-single-content {
	padding-inline: clamp(0px, 2vw, 16px);
}

.tp-movie-layout .tp-suggested-movies {
	grid-column: 1 / -1;
	width: 100%;
	max-width: none;
}

.tp-movie-layout .tp-suggested-movies .tp-suggested-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 900px) {
	.tp-movie-layout {
		grid-template-columns: minmax(0, 1fr) 220px;
		gap: 18px;
	}
}

@media (max-width: 700px) {
	.tp-movie-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.tp-movie-sidebar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}

	.tp-movie-layout .tp-suggested-movies .tp-suggested-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tp-single-heading {
	padding: 18px 22px;
	border: 1px solid var(--tp-border);
	border-bottom: 2px solid var(--tp-accent);
	background: var(--tp-surface);
}

.tp-single-heading .tp-single-title {
	font-size: clamp(1.45rem, 3vw, 2rem);
}

.tp-single-poster {
	overflow: hidden;
	width: min(100%, 220px);
	justify-self: center;
	border: 1px solid var(--tp-border);
	border-radius: 2px;
	background: var(--tp-surface);
}

.tp-single-poster img {
	width: 100%;
	height: auto;
}

.tp-single-poster .tp-poster-placeholder {
	aspect-ratio: 2 / 3;
}

.tp-single-content {
	min-width: 0;
	padding-inline: clamp(0px, 2vw, 16px);
}

.tp-single-title {
	margin-bottom: 12px;
}

.tp-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 5px 0 0;
	color: var(--tp-muted);
	font-size: 0.88rem;
}

.tp-single-meta span + span::before {
	content: "•";
	margin-right: 12px;
	color: var(--tp-accent);
}

.tp-single-poster {
	box-shadow: 0 0 0 1px var(--tp-accent-soft);
}

.tp-single-meta strong {
	color: var(--tp-accent);
}

.tp-single-overview {
	max-width: 760px;
	font-size: 1.08rem;
}

.tp-single-overview h2 {
	margin-bottom: 8px;
	font-size: 1.35rem;
}

.tp-movie-genre-block h2 {
	margin-bottom: 8px;
	font-size: 1rem;
}

.tp-movie-details {
	display: grid;
	gap: 4px;
	margin: 0 0 24px;
}

.tp-movie-details > div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 5px;
}

.tp-movie-details dt {
	color: var(--tp-muted);
	font-weight: 700;
}

.tp-movie-details dt::after {
	content: ":";
}

.tp-movie-details dd {
	margin: 0;
}

.tp-movie-details dd.tp-detail-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tp-detail-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border: 1px solid var(--tp-border);
	border-radius: 999px;
	background: var(--tp-surface-raised);
	color: var(--tp-text);
	font-size: 0.88rem;
	line-height: 1.6;
}

.tp-detail-tag:hover,
.tp-detail-tag:focus-visible {
	border-color: var(--tp-accent);
	background: var(--tp-accent-soft);
	color: var(--tp-accent-hover);
}

.tp-suggested-movies {
	max-width: 980px;
	margin: 34px auto 0;
	padding-top: 20px;
	border-top: 1px solid var(--tp-border);
}

.tp-suggested-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.tp-suggested-heading h2 {
	margin: 0;
	font-size: 1.35rem;
}

.tp-suggested-heading a {
	padding: 6px 11px;
	border: 1px solid var(--tp-accent);
	border-radius: 3px;
	color: var(--tp-accent);
	font-size: 0.82rem;
	font-weight: 700;
}

.tp-suggested-heading a:hover,
.tp-suggested-heading a:focus-visible {
	background: var(--tp-accent);
	color: #101114;
}

.tp-suggested-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

.tp-suggested-grid .tp-card-poster {
	border-color: var(--tp-border);
	border-radius: 2px;
}

.tp-suggested-grid .tp-card-title {
	margin-top: 5px;
	font-size: 0.82rem;
}

.tp-genre-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}

.tp-genre-list a {
	padding: 5px 10px;
	border: 1px solid var(--tp-border);
	border-radius: 99px;
	color: var(--tp-muted);
	font-size: 0.88rem;
}

.tp-empty {
	padding: 32px;
	border: 1px solid var(--tp-border);
	border-radius: 12px;
	background: var(--tp-surface);
	color: var(--tp-muted);
}

.tp-site-footer {
	border-top: 1px solid var(--tp-border);
	color: var(--tp-muted);
}

.tp-footer-inner {
	display: flex;
	min-height: 80px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	font-size: 0.88rem;
}

@media (max-width: 1000px) {
	.tp-movie-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.tp-home-movie-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.tp-header-inner {
		min-height: 68px;
		padding-block: 12px;
	}

	.tp-header-tools {
		width: 100%;
		justify-content: flex-end;
		gap: 12px;
	}

	.tp-header-inner > .tp-search {
		grid-column: 1 / -1;
	}

	.tp-nav ul {
		gap: 12px;
	}

	.tp-main {
		padding-top: 24px;
	}

	.tp-movie-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 18px 12px;
	}

	.tp-home-filters {
		justify-content: stretch;
		margin-inline: -20px;
		padding-inline: 20px;
	}

	.tp-home-filters label {
		flex: 1 1 42%;
	}

	.tp-home-movie-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 14px 10px;
	}

	.tp-single {
		grid-template-columns: minmax(0, 1fr);
	}

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

	.tp-single-poster {
		width: min(100%, 220px);
	}

	.tp-footer-inner {
		align-items: flex-start;
		flex-direction: column;
		justify-content: center;
		gap: 4px;
		padding-block: 16px;
	}
}

@media (max-width: 420px) {
	.tp-header-tools {
		align-items: flex-start;
		flex-direction: column;
	}

	.tp-header-inner > .tp-search {
		width: 100%;
	}

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