/* --- RESET & VARIABEL DASAR --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    z-index: 10010;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: #141414;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
}
.logo .text-red { color: #e50914; }
.logo .text-white { color: #ffffff; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: #ffffff;
    font-weight: bold;
}

.nav-actions {
    display: flex;
    gap: 20px;
    font-size: 18px;
    cursor: pointer;
}

/* --- HERO SLIDER --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px; /* Tambahkan min-height agar tidak 0px saat konten kosong */
    overflow: hidden;
}

.slide-container {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    visibility: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Gradien Hitam dari Kiri & Bawah agar teks terbaca */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #000000 0%, rgba(0,0,0,0.6) 40%, transparent 100%),
                linear-gradient(to top, #0a0a0a 0%, transparent 30%);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 4%;
    transform: translateY(-40%);
    max-width: 600px;
    z-index: 10;
}

/* --- KONTEN DALAM SLIDE --- */
.slide-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 15px;
}
.badge-movie { background-color: #e50914; }
.badge-tv { background-color: #28a745; }

.slide-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #e5e5e5;
    margin-bottom: 20px;
}

.slide-meta .rating i {
    color: #ffc107;
    margin-right: 5px;
}

.slide-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #cccccc;
    margin-bottom: 30px;
    /* Membatasi teks maksimal 3 baris */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-watch {
    background-color: #e50914;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s, transform 0.2s;
}
.btn-watch:hover {
    background-color: #f40612;
    transform: scale(1.05);
}

/* --- NAVIGASI SLIDER --- */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000 !important;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
	
}
.slide-nav:hover { background: rgba(0,0,0,0.8); }
.slide-nav.prev { left: 20px; }
.slide-nav.next { right: 20px; }

.slide-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.dot.active {
    background: #ffffff;
    transform: scale(1.3);
}
/* --- KARTU FILM & BADGE UNIVERSAL --- */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px 0;
}

.movie-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: scale(1.05);
}

.poster-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1a1a1a;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Efek Gelap di Atas dan Bawah Poster agar teks terbaca */
.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

/* Pengaturan Posisi Badge */
.card-badge {
    position: absolute;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    color: #fff;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* Kiri Atas (Tipe: MOVIE / TV) */
.badge-tl { top: 8px; left: 8px; background-color: #e50914; }

/* Sub Kiri Atas (Status: Ongoing/Complete) */
.badge-sub-tl { top: 32px; left: 8px; background-color: rgba(0,0,0,0.7); border: 1px solid #fff; font-size: 9px; }

/* Kanan Atas (Kualitas / Season) */
.badge-tr { top: 8px; right: 8px; background-color: #007bff; }

/* Sub Kanan Atas (Episode) */
.badge-sub-tr { top: 32px; right: 8px; background-color: #28a745; font-size: 10px; }

/* Kiri Bawah (Rating) */
.badge-bl { bottom: 8px; left: 8px; font-size: 13px; background: transparent; box-shadow: none; display: flex; align-items: center; gap: 4px; }
.badge-bl i { color: #ffc107; }

/* Kanan Bawah (Votes) */
.badge-br { bottom: 8px; right: 8px; font-size: 10px; background: transparent; box-shadow: none; color: #ccc; }

.movie-title {
    font-size: 14px;
    color: white;
    margin-top: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* --- HORIZONTAL CAROUSEL (TRENDING NOW) --- */
.horizontal-section {
    padding: 30px 40px;
    position: relative;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: bold;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Wadah Track Film */
.carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth; /* Animasi geser halus */
    padding: 10px 0;
}

/* Sembunyikan Scrollbar bawaan browser */
.carousel-track::-webkit-scrollbar {
    display: none;
}
.carousel-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Paksa kartu agar ukurannya tetap dan tidak menyusut */
.carousel-track .movie-card {
    flex: 0 0 auto;
    width: 180px; /* Samakan dengan lebar di grid utama */
}

/* Tombol Kanan & Kiri */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.carousel-btn:hover {
    background: #e50914;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }


		.footer {
            background: #0a0a0a;
            padding: 30px 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid #222;
            gap: 20px;
            margin-top: 50px;
        }
        .footer-disclaimer {
            color: #666;
            font-size: 12px;
            max-width: 500px;
            text-align: center;
            line-height: 1.5;
        }
        .discord-btn {
            background: #222;
            color: #fff;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            text-decoration: none;
            transition: 0.3s;
        }
        .discord-btn:hover {
            background: #5865F2;
            transform: scale(1.1);
        }

        /* Responsif untuk Mobile */
        @media (max-width: 768px) {
            .footer {
                flex-direction: column;
                text-align: center;
                padding: 20px;
            }
        }
		
		/* --- PENGATURAN HALAMAN & NAVIGASI --- */
.hidden {
    display: none !important;
}

/* --- SORTING SECTION (MOVIES PAGE) --- */
.sorting-section {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #141414;
    border-bottom: 1px solid #333;
}

.sorting-controls {
    display: flex;
    gap: 15px;
}

.sorting-controls select {
    padding: 8px 15px;
    background-color: #000;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.sorting-controls .btn-sort {
    padding: 8px 15px;
    background-color: #e50914;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.sorting-controls .btn-sort:hover {
    background-color: #f40612;
}

.grid-section {
    padding: 20px 40px;
}

/* --- PAGINATION (TOMBOL HALAMAN) --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 0 50px 0;
}

.pagination button {
    background-color: #222;
    color: white;
    border: 1px solid #444;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.pagination button:hover {
    background-color: #e50914;
    border-color: #e50914;
}

.pagination button.active {
    background-color: #e50914;
    border-color: #e50914;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.5);
}



/* =========================================
   MODAL PENCARIAN & BLUR EFFECT
========================================= */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px); /* Efek blur background */
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    opacity: 0;
    pointer-events: none; /* Tidak bisa diklik saat hidden */
    transition: opacity 0.3s ease;
	z-index: 20000; /* UBAH DARI 9999 MENJADI 20000 */
}

.search-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.search-modal-content {
    width: 90%;
    max-width: 700px;
    background: #141414;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: #1f1f1f;
    border-bottom: 1px solid #333;
}

.search-modal-icon {
    font-size: 22px;
    color: #aaa;
    margin-right: 15px;
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    outline: none;
}

.close-search {
    font-size: 26px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-search:hover {
    color: white;
}

.search-body {
    padding: 25px;
}

#search-title {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Container Hasil Pencarian (Bisa di-scroll) */
.search-results-container {
    max-height: 55vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 10px;
}

.search-results-container::-webkit-scrollbar { width: 6px; }
.search-results-container::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* Thumbnail Style */
.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-item-img {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.search-item-info {
    flex: 1;
}

.search-item-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.search-item-meta {
    color: #aaa;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-search {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}



/* =========================================
   GENRE PAGE STYLES
========================================= */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 40px;
}

.genre-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #111 100%);
    border: 1px solid #333;
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Garis aksen merah saat di hover */
.genre-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: #e50914;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.genre-card:hover {
    transform: translateY(-8px);
    border-color: #e50914;
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.3);
}

.genre-card:hover::before {
    transform: scaleX(1);
}



/* =========================================
   GENRE RESULTS HEADER & LAYOUT
========================================= */

/* Kontainer Judul dan Tombol Kembali */
.genre-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Jarak kanan kiri sejajar dengan grid film */
    margin-top: 100px; /* Jarak dari navbar */
    margin-bottom: 20px;
}

.genre-header-container .section-title {
    margin: 0;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tombol Kembali (Back Button) */
.btn-back {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #e50914; /* Aksen merah saat di-hover */
    border-color: #e50914;
    transform: translateX(-3px); /* Efek geser sedikit ke kiri */
}

/* Pastikan Grid Film di Halaman Genre Rapi */
#genre-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0 40px 40px 40px; /* Padding selaras dengan header */
}

/* Penyesuaian untuk layar HP / Mobile */
@media (max-width: 768px) {
    .genre-header-container {
        padding: 0 20px;
        margin-top: 80px;
    }
    
    .genre-header-container .section-title {
        font-size: 18px;
    }
    
    .btn-back {
        padding: 8px 15px;
        font-size: 14px;
    }

    #genre-page-grid {
        padding: 0 20px 20px 20px;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
	
	
	/* --- PERBAIKAN POSTER HP --- */
    .poster-wrapper {
        width: 100%;
        height: auto !important; /* Hapus batasan tinggi sebelumnya */
        aspect-ratio: 2 / 3; /* Paksa proporsi standar poster film TMDB */
        overflow: hidden;
    }

    .poster-img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Pastikan gambar memenuhi kotak tanpa gepeng */
        object-position: center;
    }
}


/* =========================================
   HAMBURGER ICON (Hidden di Desktop)
========================================= */
.hamburger {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.3s;
}

.hamburger:hover {
    color: #e50914;
}

/* =========================================
   RESPONSIVE MOBILE RULES (Maksimal Layar 768px)
========================================= */
@media (max-width: 768px) {
    /* --- 1. ATURAN HAMBURGER & NAVBAR --- */
    .hamburger {
        display: block; /* Tampilkan Hamburger di HP */
    }
    
    .nav-links {
        position: fixed;
        top: 60px; /* Sesuaikan dengan tinggi navbar Anda */
        right: -100%; /* Sembunyikan ke luar layar kanan */
        width: 60%;
        height: 100vh;
        background-color: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 30px;
        transition: right 0.3s ease-in-out;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        right: 0; /* Munculkan menu saat diklik */
    }

    .nav-links li {
        margin: 15px 0;
        width: 100%;
    }

    /* --- 2. ATURAN BANNER SLIDER & GRID POSTER --- */
    /* Banner/Slider diperkecil */
    .slide-container, #tv-slide-container {
        height: 50vh !important;
    }
    .slide-title {
        font-size: 24px !important;
    }
    .slide-desc {
        display: none; /* Sembunyikan deskripsi di HP agar rapi */
    }
    
    /* Poster Film menjadi persis 2 baris kebawah */
    .movie-grid, #genre-page-grid, #country-page-grid, #network-page-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
    }
    
    /* Sesuaikan ukuran kartu dan teks di dalam poster */

    .movie-title {
        font-size: 12px;
        margin-top: 5px;
    }
    .card-badge {
        font-size: 9px;
        padding: 2px 4px;
    }

    /* --- 3. ATURAN GRID KOTAK (GENRE, COUNTRY, NETWORK) --- */
    /* Kotak menu diperkecil menjadi 2 baris */
    .genre-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
    }
    .genre-card {
        padding: 20px 10px;
        font-size: 14px;
    }

    /* --- 4. ATURAN FILTER PENCARIAN (MOVIES & TV) --- */
    .sorting-section {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    .sorting-controls {
        width: 100%;
        display: flex;
        flex-wrap: wrap; /* Izinkan elemen turun baris */
        justify-content: space-between;
        gap: 8px;
        margin-top: 10px;
    }
    .sorting-controls select {
        width: 48%; /* 2 item per baris */
        font-size: 12px;
        padding: 8px 5px;
    }
    .btn-sort {
        width: 100%; /* Tombol filter memanjang penuh */
        font-size: 14px;
        padding: 10px;
        margin-top: 5px;
    }
}



/* =========================================
   WADAH 1: MODAL DETAIL
========================================= */
.detail-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #141414;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.detail-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Background Backdrop */
.detail-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 80vh;
    background-size: cover;
    background-position: center top;
}

.detail-gradient {
    position: absolute;
    bottom: -2px; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, #141414 0%, rgba(20,20,20,0.6) 50%, transparent 100%);
}

/* Tombol Kembali */
.close-detail {
    position: absolute;
    top: 30px; left: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    z-index: 10001;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

.close-detail:hover { background: #e50914; border-color: #e50914; }

/* Tombol Play di Tengah */
.detail-play-center {
    position: absolute;
    top: 45%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10001;
}

.btn-play-center {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.85);
    color: white;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.5);
    padding-left: 5px; /* Biar ikon play seimbang */
}

.btn-play-center:hover {
    transform: scale(1.15);
    background: #e50914;
    border-color: white;
}

.play-text { font-size: 16px; font-weight: 600; text-shadow: 2px 2px 5px black; }

/* Konten Teks Informasi */
.detail-content {
    position: relative;
    margin-top: 55vh;
    padding: 0 5%;
    padding-bottom: 50px;
    z-index: 10001;
}
/* --- PERBAIKAN OVERLAP DETAIL TEXT --- */
.detail-title { margin-bottom: 10px; line-height: 1.1; }
.detail-meta {
    font-size: 14px;
    color: #ccc;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}
.detail-synopsis {
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
    max-width: 900px;
}
.director-text {
    display: block;
    color: #aaa;
    font-size: 14px;
}
.director-text span { color: #fff; font-weight: 500; }


/* --- SECTIONS (CAST, REC, COMMENTS) --- */
.detail-section { margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.section-title-sm { font-size: 20px; margin-bottom: 15px; border-left: 4px solid #e50914; padding-left: 10px; }

/* Horizontal Scroll untuk Cast & Rec */
.horizontal-scroll {
    display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; scroll-behavior: smooth;
}
.horizontal-scroll::-webkit-scrollbar { height: 8px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }

/* Cast Cards */
.cast-card { min-width: 150px; max-width: 150px; text-align: center; }
.cast-img { width: 80px; height: auto; object-fit: cover; border: 2px solid #fff; margin-bottom: 8px; }
.cast-name { font-size: 13px; font-weight: bold; color: #fff; line-height: 1.2; }
.cast-character { font-size: 11px; color: #aaa; margin-top: 4px; }

/* Recommendation Cards */
.rec-card { min-width: 140px; max-width: 140px; cursor: pointer; transition: transform 0.3s; }
.rec-card:hover { transform: scale(1.05); }
.rec-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; }

/* Comments UI */
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px; }
.comment-form input, .comment-form textarea {
    background: rgba(255,255,255,0.05); border: 1px solid #444; color: white; padding: 12px; border-radius: 6px; font-family: inherit; font-size: 14px; outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: #e50914; }
.btn-comment { background: #e50914; color: white; border: none; padding: 12px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-comment:hover { background: #b80710; }

.comment-item { background: rgba(255,255,255,0.03); padding: 15px; border-radius: 8px; margin-bottom: 12px; border-left: 3px solid #e50914; }
.comment-item h4 { margin: 0 0 5px 0; color: #fff; font-size: 15px; }
.comment-item p { margin: 0; color: #ddd; font-size: 14px; line-height: 1.5; }
.comment-date { font-size: 12px; color: #777; margin-left: auto; }
.comment-text-content { font-size: 14px; color: #ccc; line-height: 1.5; margin-left: 47px; }
.comment-item-new {
    background: transparent;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 5px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 35px; height: 35px;
    background: linear-gradient(135deg, #e50914, #8b0000);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 16px; color: white;
}

.comment-name { font-weight: bold; font-size: 15px; color: #fff; }

.comment-badge-rating {
    background: rgba(245, 197, 24, 0.1);
    color: #f5c518;
    border: 1px solid rgba(245, 197, 24, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}


.detail-extra-info p { margin: 5px 0; font-size: 14px; color: #aaa; }
.detail-extra-info strong { color: #fff; }

/* Responsive HP */
@media (max-width: 768px) {
    .close-detail { top: 20px; left: 20px; padding: 8px 15px; font-size: 14px; }
    .detail-backdrop { height: 60vh; }
    .detail-content { margin-top: 45vh; }
    .detail-title { font-size: 28px; }
    .btn-play-center { width: 60px; height: 60px; font-size: 22px; }
}




/* =========================================
   PEMUTAR VIDEO & ANIMASI GESER TEKS
========================================= */
.detail-video-container {
    display: none;
    padding-bottom: 56.25%;
    width: 100%;
    height: 56.25%; 
    max-height: 85vh; 
    background-color: #000;
    margin-top: 0;
    position: relative;
    z-index: 10005; /* WAJIB: Agar video muncul di atas lapisan warna */
}

.detail-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 10006;
}

.detail-modal.is-playing .detail-backdrop,
.detail-modal.is-playing .detail-play-center {
    display: none !important; /* Hilangkan gambar dan tombol play */
}
.detail-modal.is-playing .detail-video-wrapper {
    display: flex; /* Munculkan wrapper beserta videonya */
}
.detail-modal.is-playing .detail-video-container {
    display: block; /* Tampilkan video */
}
.detail-modal.is-playing .detail-content {
    margin-top: 30px; 
    
    z-index: 10001;
}
/* --- KONTROL SERVER --- */
.detail-video-wrapper {
    display: none; /* Sembunyikan sebelum play */
    width: 100%;
    margin-top: 70px !important;
    flex-direction: column;
    z-index: 10005;
    position: relative;
    background: #000;
}

.server-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: #111;
    border-bottom: 1px solid #333;
}

.btn-server {
    background: #222;
    color: white;
    border: 1px solid #444;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-server.active, .btn-server:hover {
    background: #e50914;
    border-color: #e50914;
}


/* --- KOTAK PENGUMUMAN SERVER --- */
.server-announcement {
    background: #1a1a1a;
    border-left: 4px solid #e50914;
    padding: 15px 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px solid #333;
}

/* Pastikan tombol server bisa turun baris di HP (Wrap) */
.server-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Ini penting agar 7 tombol tidak gepeng di HP */
    gap: 8px;
    padding: 15px;
    background: #111;
    border-bottom: 1px solid #333;
}


/* =========================================
   TV SEASONS & EPISODES STYLE
========================================= */
.season-dropdown {
    background: #1a1a1a;
    color: white;
    border: 1px solid #444;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    font-weight: bold;
}
.season-dropdown:focus { border-color: #e50914; }

.episodes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    max-height: 400px; /* Agar bisa di-scroll jika episode banyak */
    overflow-y: auto;
    padding-right: 10px;
}
.episodes-container::-webkit-scrollbar { width: 6px; }
.episodes-container::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }

.episode-card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.3s, background 0.3s;
}
.episode-card:hover, .episode-card.active-eps {
    background: rgba(255,255,255,0.1);
    border-color: #e50914;
    transform: translateY(-3px);
}
.episode-img {
    width: 100%;
    aspect-ratio: 16/9; /* Rasio widescreen */
    object-fit: cover;
    background: #000;
}
.episode-info { padding: 12px; }
.episode-title {
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Potong teks jika kepanjangan */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.episode-meta { font-size: 12px; color: #aaa; }


/* Container pembungkus judul dan tombol */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-right: 20px; /* Agar tombol tidak menempel ke pinggir layar */
}

/* Styling tombol View All */
.btn-view-all {
    background: transparent;
    color: #ffffff;
    border: 1px solid #444;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: #e50914; /* Warna merah saat dihover */
    border-color: #e50914;
    color: white;
    transform: scale(1.05);
}


/* =========================================
   PERBAIKAN GRID & POSTER UNTUK MOBILE (HP)
   (Versi Anti-Blowout Judul Panjang)
========================================= */
@media (max-width: 768px) {
    /* 1. Grid 2 Kolom Ketat */
    .movie-grid {
        display: grid !important;
        /* KUNCI PERBAIKAN: minmax(0, 1fr) memaksa kolom tidak peduli pada teks panjang */
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
        gap: 12px !important;
        padding: 15px !important;
    }

    /* 2. Kartu HANYA di dalam Grid (Agar tidak merusak carousel Slider) */
    .movie-grid .movie-card {
        width: 100% !important;
        min-width: 0 !important; /* KUNCI PERBAIKAN: Mengunci elemen agar tidak mekar */
        margin: 0 !important;
        display: flex;
        flex-direction: column;
    }

    /* 3. Poster selalu proporsional 2:3 */
    .movie-grid .poster-wrapper {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 2 / 3 !important; 
        position: relative;
    }

    .movie-grid .poster-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 4. Judul Film agar terpotong rapi (ellipsis) */
    .movie-grid .movie-title {
        font-size: 12px !important;
        margin-top: 8px !important;
        width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .card-badge {
        font-size: 9px !important;
        padding: 3px 5px !important;
    }
}

/* Ukuran ekstra untuk HP sangat kecil */
@media (max-width: 380px) {
    .movie-grid .movie-title { font-size: 11px !important; }
}