/* Reset & Base */
:root {
    --primary: #e50914;
    --dark: #141414;
    --dark-sec: #1f1f1f;
    --light: #f5f5f5;
    --gray: #aaa;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: var(--dark); color: var(--light); }

/* Navbar */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; background-color: rgba(0,0,0,0.95);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
/* Update Navbar Layout */
.navbar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(0,0,0,0.95);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px; /* Jarak antara Logo dan Menu */
}

/* Style Menu Link */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    font-size: 16px;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* --- Style Dropdown (Menu Kategori) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none; /* Sembunyikan secara default */
    position: absolute;
    background-color: #1f1f1f;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
    top: 30px; /* Jarak dari menu induk */
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid #333;
}

.dropdown-content a:hover {
    background-color: var(--primary);
    color: white;
}

/* Tampilkan dropdown saat di-hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Responsif untuk HP (Menu agak mengecil) */
@media (max-width: 768px) {
    .nav-left { gap: 15px; }
    .nav-links { gap: 10px; }
    .nav-links a { font-size: 14px; }
    .logo { font-size: 20px; }
}
.logo { font-size: 28px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.logo span { color: var(--light); }
.search-box input {
    padding: 10px 15px; border-radius: 4px; border: 1px solid #333;
    background: #000; color: white; width: 200px; transition: 0.3s;
}
.search-box input:focus { width: 300px; border-color: var(--primary); outline: none; }

/* Hero */
.hero {
    height: 350px; 
    background: linear-gradient(to top, #141414, transparent), url('https://w0.peakpx.com/wallpaper/201/290/HD-wallpaper-movie-collage-movies.jpg');
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-content h1 { font-size: 3rem; margin-bottom: 10px; text-shadow: 2px 2px 4px #000; }

/* Grid Film */
.container { padding: 40px 5%; max-width: 1400px; margin: 0 auto; }
.section-header { margin-bottom: 25px; border-left: 5px solid var(--primary); padding-left: 15px; }
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

/* Kartu Film */
.movie-card {
    background: var(--dark-sec); border-radius: 8px; overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; position: relative;
}
.movie-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4); }
.movie-card img { width: 100%; height: 240px; object-fit: cover; }
.movie-info { padding: 12px; }
.movie-info h3 { font-size: 14px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Halaman Nonton */
.watch-container { max-width: 1100px; }
.back-btn { display: inline-block; margin-bottom: 20px; color: var(--gray); text-decoration: none; font-weight: 600; }
.back-btn:hover { color: var(--primary); }

.video-wrapper {
    position: relative; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0; background: #000; margin-bottom: 25px; border-radius: 8px; overflow: hidden;
}
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.movie-details h1 { font-size: 2rem; margin-bottom: 10px; }
.meta-info { margin-bottom: 15px; font-size: 0.9rem; color: var(--gray); display: flex; align-items: center; gap: 15px; }
.rating-badge { background: #f5c518; color: #000; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.genre-tags { color: var(--primary); font-weight: 600; margin-bottom: 20px; }

.plot-box { background: rgba(255,255,255,0.05); padding: 20px; border-radius: 8px; margin-bottom: 20px; border-left: 4px solid var(--primary); }
.plot-box h3 { margin-bottom: 10px; color: var(--light); }
.plot-box p { line-height: 1.6; color: #ddd; }

/* Responsive */
@media (max-width: 768px) {
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hero { height: 200px; }
    .hero-content h1 { font-size: 1.8rem; }
    .search-box input { width: 150px; }

}
/* --- PAGINATION (Navigasi Halaman) --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
    padding-bottom: 20px;
}

.pagination-container button {
    background-color: var(--dark-sec);
    color: white;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.pagination-container button:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.pagination-container button:disabled {
    background-color: #000;
    color: #555;
    border-color: #222;
    cursor: not-allowed;
}

#pageIndicator {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}
