/*
Theme Name: Film Dollar
Theme URI: https://se-gada.online
Author: Zed
Description: Portal film. Kunci TMDB & kode iklan diisi sendiri di Setelan. SPA tanpa reload, PWA ready.
Version: 2.3.0
License: GPLv2 or later
Text Domain: filmdollar
*/

:root {
	--fd-bg: #0a0a0a;
	--fd-surface: #141414;
	--fd-text: #ffffff;
	--fd-muted: #b3b3b3;
	--fd-accent: #e50914;
	--fd-accent-hover: #f40612;
	--fd-border: #2a2a2a;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Helvetica Neue", Arial, sans-serif; }

body {
	background-color: var(--fd-bg);
	color: var(--fd-text);
	overflow-x: hidden;
	line-height: 1.5;
}

.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- NAVBAR ---------- */
nav {
	position: fixed; top: 0; left: 0; width: 100%;
	padding: 15px 50px;
	display: flex; justify-content: space-between; align-items: center;
	z-index: 100;
	background: linear-gradient(to bottom, rgba(0,0,0,.85), transparent);
	transition: background .3s ease;
}
nav.scrolled { background: var(--fd-bg); }

.logo {
	color: var(--fd-accent);
	font-size: 1.8rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: 1px;
	text-decoration: none;
}
.logo:hover { color: var(--fd-accent-hover); }

.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links li { cursor: pointer; color: var(--fd-muted); font-size: .9rem; transition: color .2s; }
.nav-links li:hover, .nav-links li.active { color: var(--fd-text); }

.search-box {
	display: flex; align-items: center;
	background: rgba(255,255,255,.1);
	padding: 5px 10px; border-radius: 4px;
}
.search-box input {
	background: transparent; border: none; outline: none;
	color: #fff; padding: 5px; width: 160px;
}

/* ---------- HERO ---------- */
.hero { height: 80vh; position: relative; overflow: hidden; margin-bottom: 30px; }
.hero-slide {
	position: absolute; inset: 0;
	opacity: 0; transition: opacity 1s ease-in-out;
	display: flex; align-items: flex-end; padding: 0 50px 100px;
}
.hero-slide.active { opacity: 1; }
.hero-slide .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.3) 50%, transparent 100%); }
.hero-content { position: relative; z-index: 2; max-width: 650px; }
.hero-content h1 { font-size: 2.8rem; margin-bottom: 12px; }
.hero-content p { color: #ddd; margin-bottom: 20px; }
.hero-btns { display: flex; gap: 12px; }

/* ---------- TOMBOL ---------- */
.btn {
	display: inline-block; padding: 11px 26px;
	border: none; border-radius: 4px;
	font-size: .95rem; font-weight: 600;
	cursor: pointer; text-decoration: none; color: #fff;
}
.btn-play { background: var(--fd-accent); }
.btn-play:hover { background: var(--fd-accent-hover); }
.btn-info { background: rgba(255,255,255,.2); }
.btn-info:hover { background: rgba(255,255,255,.3); }

/* ---------- FILTER ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

.filters {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
	margin-bottom: 24px;
}
.filter-pill {
	background: var(--fd-surface); color: var(--fd-muted);
	border: 1px solid var(--fd-border);
	padding: 8px 16px; border-radius: 20px;
	font-size: .85rem; cursor: pointer;
}
.filter-pill:hover { color: var(--fd-text); }
.filter-pill.active { background: var(--fd-accent); color: #fff; border-color: var(--fd-accent); }

#yearFilter {
	background: var(--fd-surface); color: var(--fd-text);
	border: 1px solid var(--fd-border);
	padding: 8px 12px; border-radius: 20px; font-size: .85rem;
}

.grid-title { font-size: 1.4rem; margin-bottom: 16px; }

/* ---------- GRID FILM ---------- */
.movie-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 18px;
}
.movie-card {
	position: relative; border-radius: 6px; overflow: hidden;
	cursor: pointer; background: var(--fd-surface);
	aspect-ratio: 2 / 3;
}
.movie-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.movie-card:hover img { transform: scale(1.06); }
.movie-card .overlay {
	position: absolute; inset: auto 0 0 0;
	padding: 14px 12px 12px;
	background: linear-gradient(to top, rgba(0,0,0,.95), transparent);
	opacity: 0; transition: opacity .25s;
}
.movie-card:hover .overlay { opacity: 1; }
.movie-card .overlay h3 { font-size: .95rem; margin-bottom: 4px; }
.movie-card .overlay p { color: var(--fd-muted); font-size: .8rem; }

.skeleton-card {
	background: linear-gradient(90deg, #141414 25%, #1e1e1e 50%, #141414 75%);
	background-size: 200% 100%;
	animation: fd-shimmer 1.3s infinite;
	border-radius: 6px;
	aspect-ratio: 2 / 3;
}
@keyframes fd-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ---------- SLOT IKLAN ---------- */
.fd-ad { display: block; text-align: center; margin: 30px auto; }
.fd-ad-banner { min-height: 250px; max-width: 320px; }
.fd-ad-native { min-height: 90px; }
.fd-ad-empty {
	display: flex; align-items: center; justify-content: center;
	min-height: 90px; border: 1px dashed #333; border-radius: 6px;
	color: #4a4a4a; font-size: .7rem; letter-spacing: .2em;
}

/* ---------- FOOTER ---------- */
.site-footer {
	padding: 40px 20px 24px; text-align: center;
	color: var(--fd-muted); font-size: .85rem;
}

/* ---------- MODAL PEMAIN ---------- */
.modal-overlay {
	position: fixed; inset: 0; z-index: 200;
	background: rgba(0,0,0,.92);
	display: none; align-items: center; justify-content: center;
	padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content {
	position: relative;
	background: var(--fd-surface);
	border-radius: 8px; width: 100%; max-width: 900px;
	max-height: 90vh; overflow-y: auto;
}
.modal-content video, .modal-content iframe { width: 100%; height: 400px; border: 0; }
.close-btn {
	position: absolute; top: 8px; right: 12px; z-index: 3;
	background: transparent; border: none; color: #fff;
	font-size: 2rem; line-height: 1; cursor: pointer;
}
.modal-info { padding: 20px 24px 24px; }
.modal-info h2 { font-size: 1.5rem; margin-bottom: 8px; }
.modal-info p { color: var(--fd-muted); }

/* ---------- HALAMAN DETAIL ---------- */
.fd-single { max-width: 1100px; margin: 110px auto 40px; padding: 0 20px; }
.fd-single-grid { display: grid; grid-template-columns: 300px 1fr; gap: 32px; }
.fd-single-poster img { width: 100%; border-radius: 8px; }
.fd-single-info h1 { font-size: 2.2rem; margin-bottom: 12px; }
.fd-single-meta { display: flex; gap: 16px; color: var(--fd-muted); margin-bottom: 20px; }
.fd-single-actions { margin-bottom: 22px; }
.fd-single-content { color: #ddd; line-height: 1.75; }

/* ---------- 404 ---------- */
body.fd-404 { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; }
.fd-404-box h1 { font-size: 5rem; color: var(--fd-accent); }
.fd-404-box p { color: var(--fd-muted); margin-bottom: 24px; }

/* ---------- RESPONSIF ---------- */
@media (max-width: 760px) {
	nav { padding: 12px 18px; }
	.nav-links { display: none; }
	.hero { height: 60vh; }
	.hero-content h1 { font-size: 1.9rem; }
	.movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
	.fd-single-grid { grid-template-columns: 1fr; }
	.modal-content video, .modal-content iframe { height: 220px; }
}

/* ---------- ARSIP / TAKSONOMI ---------- */
.fd-archive-head { max-width: 1200px; margin: 130px auto 10px; padding: 0 20px; }
.fd-archive-head h1 { font-size: 2.2rem; margin-bottom: 8px; }
.fd-archive-desc { color: var(--fd-muted); margin-bottom: 8px; }
.fd-archive-count { color: var(--fd-muted); font-size: .85rem; }
.fd-empty { color: var(--fd-muted); padding: 40px 20px; text-align: center; }

/* badge kualitas + rating di kartu */
.movie-card { position: relative; display: block; text-decoration: none; color: inherit; }
.movie-card img { display: block; }
.fd-quality, .fd-rating {
	position: absolute; top: 8px; z-index: 2;
	padding: 3px 8px; border-radius: 3px;
	font-size: .7rem; font-weight: 700; letter-spacing: .04em;
}
.fd-quality { left: 8px; background: var(--fd-accent); color: #fff; }
.fd-rating { right: 8px; background: rgba(0,0,0,.8); color: #ffc107; }
.movie-card .overlay .fd-genres { font-size: .75rem; color: #888; }

.nav-links li a { color: inherit; text-decoration: none; }

/* pagination */
.navigation.pagination { margin: 34px auto; max-width: 1200px; padding: 0 20px; }
.nav-links { gap: 8px; }
.nav-links .page-numbers {
	display: inline-block; padding: 8px 14px; min-width: 38px; text-align: center;
	background: var(--fd-surface); border: 1px solid var(--fd-border);
	border-radius: 4px; color: var(--fd-muted); text-decoration: none;
}
.nav-links .page-numbers.current, .nav-links .page-numbers:hover {
	background: var(--fd-accent); color: #fff; border-color: var(--fd-accent);
}

/* ---------- DETAIL: fakta & tag ---------- */
.fd-single-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.fd-tag {
	display: inline-block; padding: 4px 11px; border-radius: 12px;
	background: var(--fd-surface); border: 1px solid var(--fd-border);
	color: var(--fd-muted); font-size: .75rem; text-decoration: none;
}
.fd-tag:hover { color: var(--fd-text); border-color: #444; }
.fd-tag-quality { background: rgba(229,9,20,.15); border-color: var(--fd-accent); color: #ff6b73; }
.fd-status-pill {
	background: rgba(0,200,120,.15); border: 1px solid #0a8;
	color: #3ddc97; border-radius: 3px; padding: 2px 8px; font-size: .75rem;
}
.fd-facts { width: 100%; margin: 0 0 22px; border-collapse: collapse; font-size: .9rem; }
.fd-facts th {
	width: 110px; text-align: left; padding: 8px 0;
	color: var(--fd-muted); font-weight: 500; vertical-align: top;
}
.fd-facts td { padding: 8px 0; border-bottom: 1px solid var(--fd-border); }
.fd-single-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

/* ---------- DETAIL: tambahan ---------- */
.fd-tagline { color: var(--fd-muted); font-style: italic; margin-bottom: 6px; font-size: .95rem; }
.fd-rated {
	background: #444; color: #fff; border-radius: 3px;
	padding: 1px 7px; font-size: .72rem; font-weight: 700;
}
.btn.is-off { background: #2a2a2a; color: #666; cursor: not-allowed; }
.fd-gallery-title { max-width: 1100px; margin: 40px auto 14px; padding: 0 20px; font-size: 1.2rem; }
.fd-gallery {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px; max-width: 1100px; margin: 0 auto; padding: 0 20px 20px;
}
.fd-gallery img { width: 100%; border-radius: 6px; display: block; }

/* ---------- MENU KATEGORI ---------- */
.nav-links li a { display: block; }
