/*
Theme Name: Movie Video Theme
Theme URI: https://example.com
Author: Baba
Author URI: https://example.com
Description: A lightweight, performance-optimized WordPress theme for video/movie websites. Includes login/register, video grid homepage, single video page with related videos.
Version: 1.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: movie-video-theme
*/

/* ============================
   Reset / Base
============================ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #0f0f11;
	color: #e6e6e6;
	line-height: 1.5;
}

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

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

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

.container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ============================
   Header
============================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #16161a;
	border-bottom: 1px solid #26262c;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	max-width: 1280px;
	margin: 0 auto;
}

.site-logo {
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.5px;
}

.site-logo span {
	color: #e63946;
}

.main-nav ul {
	display: flex;
	gap: 22px;
	align-items: center;
}

.main-nav a {
	font-size: 15px;
	color: #cfcfcf;
	transition: color 0.15s ease;
}

.main-nav a:hover {
	color: #fff;
}

.header-auth {
	display: flex;
	gap: 12px;
	align-items: center;
}

.btn {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary {
	background: #e63946;
	color: #fff;
}

.btn-primary:hover {
	background: #c72d39;
}

.btn-outline {
	background: transparent;
	border: 1px solid #3a3a40;
	color: #e6e6e6;
}

.btn-outline:hover {
	border-color: #e63946;
}

/* ============================
   Hero / Live Video (full-width, right below header)
============================ */
.hero-live-section {
	width: 100%;
	background: #000;
	line-height: 0;
}

.hero-live-inner {
	width: 100%;
	max-width: 100%;
	position: relative;
}

.hero-live-inner iframe,
.hero-live-inner video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

/* ============================
   Homepage sections (Trending / Recent / All Videos)
============================ */
.home-section {
	padding: 34px 0;
}

.home-section:not(:last-child) {
	border-bottom: 1px solid #1c1c20;
}

.btn-large {
	padding: 12px 34px;
	font-size: 15px;
}

.all-videos-btn-wrap {
	margin-top: 30px;
	text-align: center;
}

/* ============================
   Category filter (All Videos / category archive)
============================ */
.video-filter-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: -6px 0 22px;
	flex-wrap: wrap;
}

.video-filter-bar label {
	font-size: 14px;
	color: #cfcfcf;
}

.video-filter-bar select {
	background: #18181c;
	color: #e6e6e6;
	border: 1px solid #2c2c32;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 14px;
	cursor: pointer;
	max-width: 100%;
}

.video-filter-bar select:focus {
	outline: none;
	border-color: #e63946;
}

/* ============================
   Video Grid (Homepage)
============================ */
.video-grid-section {
	padding: 30px 0 60px;
}

.section-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 18px;
	color: #fff;
	border-left: 4px solid #e63946;
	padding-left: 10px;
}

.video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}

.video-card {
	background: #18181c;
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-thumb-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.video-thumb-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.video-card:hover .video-thumb-wrap img {
	transform: scale(1.05);
}

.video-duration {
	position: absolute;
	bottom: 6px;
	right: 6px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 4px;
}

.play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(230, 57, 70, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.video-card:hover .play-icon {
	opacity: 1;
}

.play-icon svg {
	width: 16px;
	height: 16px;
	fill: #fff;
	margin-left: 2px;
}

.video-card-body {
	padding: 10px 12px 14px;
}

.video-card-title {
	font-size: 14px;
	font-weight: 600;
	color: #f0f0f0;
	margin: 0 0 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.video-card-meta {
	font-size: 12px;
	color: #8a8a8f;
}

/* ============================
   Pagination
============================ */
.pagination-wrap {
	margin-top: 34px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.pagination-wrap a,
.pagination-wrap span {
	padding: 8px 14px;
	border-radius: 6px;
	background: #18181c;
	color: #cfcfcf;
	font-size: 14px;
}

.pagination-wrap .current {
	background: #e63946;
	color: #fff;
}

/* ============================
   Single Video Page
============================ */
.single-video-wrap {
	padding: 24px 0 60px;
}

.video-player-box {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 18px;
}

.video-player-box iframe,
.video-player-box video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.single-video-title {
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 8px;
}

.single-video-meta {
	font-size: 13px;
	color: #8a8a8f;
	margin-bottom: 16px;
}

.single-video-desc {
	font-size: 15px;
	color: #cfcfcf;
	margin-bottom: 30px;
	max-width: 900px;
}

.related-videos-title {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 16px;
	border-left: 4px solid #e63946;
	padding-left: 10px;
}

/* ============================
   Login / Register
============================ */
.auth-wrap {
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
}

.auth-box {
	width: 100%;
	max-width: 380px;
	background: #18181c;
	border-radius: 12px;
	padding: 30px 28px;
}

.auth-tabs {
	display: flex;
	margin-bottom: 22px;
	border-bottom: 1px solid #26262c;
}

.auth-tab {
	flex: 1;
	text-align: center;
	padding: 10px 0;
	font-size: 14px;
	font-weight: 600;
	color: #8a8a8f;
	cursor: pointer;
	border-bottom: 2px solid transparent;
}

.auth-tab.active {
	color: #fff;
	border-color: #e63946;
}

.auth-form {
	display: none;
	flex-direction: column;
	gap: 14px;
}

.auth-form.active {
	display: flex;
}

.auth-form label {
	font-size: 13px;
	color: #cfcfcf;
	margin-bottom: 4px;
	display: block;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid #2c2c32;
	background: #0f0f11;
	color: #fff;
	font-size: 14px;
}

.auth-form input:focus {
	outline: none;
	border-color: #e63946;
}

.auth-submit {
	margin-top: 6px;
	width: 100%;
	padding: 11px;
}

.auth-msg {
	font-size: 13px;
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 14px;
}

.auth-msg.error {
	background: rgba(230, 57, 70, 0.15);
	color: #ff8b93;
}

.auth-msg.success {
	background: rgba(46, 204, 113, 0.15);
	color: #7ee6a0;
}

/* ============================
   Footer
============================ */
.site-footer {
	background: #16161a;
	border-top: 1px solid #26262c;
	padding: 26px 0;
	text-align: center;
	color: #8a8a8f;
	font-size: 13px;
	margin-top: 40px;
}

/* ============================
   Responsive
============================ */
@media (max-width: 640px) {
	.main-nav {
		display: none;
	}
	.video-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}
	.single-video-title {
		font-size: 19px;
	}
}
