/* RESET & BASE */
* {
    box-sizing: border-box;
}

body {
    background: #15171c;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* HEADER */
.main-header {
    background: #000;
    height: 60px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid #1a1d24;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    margin-right: 30px;
    text-transform: lowercase;
}

/* MAIN MENU SAJA */
.header-nav>ul,
.main-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.header-nav ul li a {
    color: #abb1ba;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-nav ul li a:hover {
    color: #fff;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-form {
    background: #1a1d24;
    border-radius: 20px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
}

.search-form input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 13px;
    width: 140px;
}

.search-form button {
    background: transparent;
    border: none;
    color: #abb1ba;
    cursor: pointer;
    padding: 0;
}

.top-spacer {
    height: 50px;
}

/* Memberi ruang agar konten tidak tertutup header */

/* LAYOUT CONTAINER */
.dooplay-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
}

.main-content {
    flex: 3;
    min-width: 0;
    /* Penting untuk Slick Slider di dalam Flexbox */
    overflow: hidden;
}

.sidebar {
    flex: 1;
}

/* ==========================================================================
   FEATURED SLIDER - MODERN REDESIGN
   ========================================================================== */

/* FEATURED SLIDER - MODERN POSTER STYLE */
.featured-slider {
    margin: 20px -10px 50px;
    /* Margin negatif agar sejajar dengan container */
    opacity: 0;
    transition: opacity 0.5s ease;
}

.featured-slider.slick-initialized {
    opacity: 1;
}

.featured-item {
    padding: 0 10px;
    /* Spasi antar poster */
    outline: none;
}

.featured-item a {
    position: relative;
    display: block;
    aspect-ratio: 2/3;
    /* Rasio standar poster anime */
    border-radius: 10px;
    overflow: hidden;
    background: #1a1d24;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-item:hover img {
    transform: scale(1.1) rotate(1deg);
}

/* Overlay Info Modern */
.featured-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    z-index: 2;
}

.featured-info h3 {
    margin: 0 0 5px;
    font-size: 15px;
    /* Lebih kecil karena ada 4 kolom */
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Judul tidak berantakan */
}

.featured-info .meta {
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    color: #ffb800;
}

/* Badge Type Modern (Kecil & Di Atas) */
.label-movie {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(122, 88, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 3;
}

/* Pastikan pembungkus luar memiliki lebar yang jelas */
.slider-container-wrapper {
    width: 100%;
    position: relative;
    display: block;
    margin-bottom: 40px;
}

/* Sembunyikan item sebelum slick jadi agar tidak bertumpuk vertikal saat loading */
.featured-slider:not(.slick-initialized) {
    display: flex;
    overflow: hidden;
    gap: 10px;
}

.featured-slider:not(.slick-initialized) .featured-item {
    min-width: 25%;
    /* Biar tetap terlihat 4 kolom saat loading */
}

/* ==========================================================================
   MODERN SLICK NAVIGATION
   ========================================================================== */

/* Container utama untuk memastikan posisi absolut bekerja dengan benar */
.slider-container-wrapper {
    position: relative;
    padding: 0 40px;
    /* Memberi ruang di kiri-kanan agar panah tidak menabrak layar */
}

/* Base style untuk panah */
.slick-prev,
.slick-next {
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 100 !important;
    background: rgba(26, 29, 36, 0.8) !important;
    /* Warna gelap transparan */
    backdrop-filter: blur(8px);
    /* Efek kaca kekinian */
    border: 1px solid rgba(122, 88, 255, 0.3) !important;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    /* Kotak membulat (modern) bukan bulat sempurna */
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Posisi Panah (Keluar sedikit dari poster) */
.slick-prev {
    left: -5px !important;
}

.slick-next {
    right: -5px !important;
}

/* Efek Hover */
.slick-prev:hover,
.slick-next:hover {
    background: #7a58ff !important;
    /* Berubah jadi ungu solid */
    border-color: #7a58ff !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 0 20px rgba(122, 88, 255, 0.4);
}

/* Icon di dalam panah */
.slick-prev i,
.slick-next i {
    font-size: 16px !important;
    color: #fff !important;
    line-height: 1;
}

/* Desain Dots (Titik-titik di bawah) */
.slick-dots {
    bottom: -35px !important;
    display: flex !important;
    justify-content: center;
    list-style: none;
    padding: 0;
    width: 100%;
}

.slick-dots li {
    margin: 0 5px;
}

.slick-dots li button {
    width: 8px;
    height: 8px;
    background: #2d333f;
    border-radius: 50%;
    border: none;
    padding: 0;
    font-size: 0;
    /* Sembunyikan angka default */
    transition: 0.3s;
}

.slick-dots li.slick-active button {
    background: #7a58ff;
    width: 25px;
    /* Efek memanjang untuk dot aktif */
    border-radius: 10px;
}

/* Sembunyikan panah bawaan Slick yang teks "Previous" */
.slick-prev:before,
.slick-next:before {
    display: none !important;
}

.poster-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 4px;
    overflow: hidden;
    background: #252932;
    pointer-events: none;
    /* Agar klik diteruskan ke tag <a> di luarnya */
}

.badge-episode {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: #000;
    /* hitam */
    color: #fff;
    /* putih */
    font-weight: bold;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 2;
    text-transform: uppercase;
}

/* Badge Release baru di sebelah kanan */
.badge-release {
    position: absolute;
    bottom: 8px;
    right: 8px;
    /* Di sisi berlawanan dengan episode */
    background-color: #0073aa;
    /* Warna Biru (Bisa ganti sesuai selera) */
    color: #fff;
    font-weight: bold;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 2;
    text-transform: uppercase;
}

.film-info {
    pointer-events: none;
    /* Agar klik pada judul juga tembus ke link utama */
}

/* SECTION & GRID */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    text-transform: uppercase;
}

.section-header .line {
    color: #7a58ff;
    margin-right: 5px;
    font-weight: bold;
}

.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.poster-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 4px;
    overflow: hidden;
    background: #252932;
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.lineborder {
    border-top: 1px solid #2e323d;
    margin-bottom: 20px;
}

.film-item:hover .poster-wrapper img {
    transform: scale(1.05);
}

.badge-featured {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #39b54a;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 2px;
    z-index: 2;
}

.film-info h3 {
    font-size: 13px;
    margin: 10px 0 2px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.film-year {
    color: #666;
    font-size: 11px;
}

/* === DOOPLAY GENRES SIDEBAR === */

.dt_mainmeta {
    float: left;
    width: 100%;
    margin-bottom: 20px;
    background: #1a1d24;
    border-radius: 4px;
    padding: 15px;
}

.dt_mainmeta nav {
    float: left;
    width: 100%;
}

.dt_mainmeta nav h2 {
    font-weight: 400;
    font-size: 15px;
    margin-bottom: 15px;
    color: #fff;
}

.dt_mainmeta nav h2:after {
    content: "\f0d7";
    /* fa-chevron-down */
    font-family: FontAwesome;
    float: right;
    font-size: 14px;
    opacity: .6;
}

/* LIST */
.dt_mainmeta nav.genres ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 282px;
    overflow-y: auto;
}

/* ITEM */
.dt_mainmeta nav.genres ul li {
    float: left;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 3px;
    transition: background .2s;
}

.dt_mainmeta nav.genres ul li:hover {
    background: #252932;
}

/* LINK */
.dt_mainmeta nav.genres ul li a {
    color: #abb1ba;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.dt_mainmeta nav.genres ul li a:before {
    content: "\f02b";
    /* fa-tag */
    font-family: FontAwesome;
    margin-right: 8px;
    font-size: 13px;
    opacity: .7;
}

/* COUNT */
.dt_mainmeta nav.genres ul li i {
    float: right;
    font-style: normal;
    font-size: 11px;
    color: #8f95a1;
}

/* SCROLL STYLE (OPTIONAL) */
.dt_mainmeta nav.genres ul::-webkit-scrollbar {
    width: 5px;
}

.dt_mainmeta nav.genres ul::-webkit-scrollbar-thumb {
    background: #2f3440;
    border-radius: 10px;
}

/* FORCE SCROLL */
.falsescroll {
    overflow-y: auto !important;
}


/* FOOTER */
/* --- FOOTER STYLES --- */
.footer-section {
    background: #15171c;
    height: auto;
    width: 100%;
    color: #fff;
    margin-top: 50px;
    /* Jarak dari konten atas */
}


.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
}

.footer-content h3 {
    font-size: 2.1rem;
    font-weight: 500;
    text-transform: capitalize;
    line-height: 3rem;
    margin: 0;
}

.footer-content p {
    max-width: 500px;
    margin: 10px auto;
    line-height: 28px;
    font-size: 14px;
    color: #cacdd2;
}

.socials {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 3rem 0;
    padding: 0;
}

.socials li {
    margin: 0 10px;
}

.socials a {
    text-decoration: none;
    color: #fff;
    border: 1.1px solid white;
    padding: 8px;
    /* Sedikit lebih besar agar nyaman diklik */
    border-radius: 50%;
    display: flex;
    transition: all .3s ease;
}

.socials a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.socials a:hover {
    background: #fff;
}

.socials a:hover i {
    color: #111;
}

.footer-bottom {
    background: #000;
    width: 100%;
    padding: 20px 30px;
    padding-bottom: 40px;
    display: flex;
    /* Menggunakan flex agar lebih rapi */
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 14px;
    word-spacing: 2px;
    text-transform: capitalize;
    margin: 0;
    color: #fff;
}

.footer-bottom p a {
    color: #44bae8;
    font-size: 16px;
    text-decoration: none;
}

.footer-menu {
    display: block;
}

.footer-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu ul li {
    padding-left: 20px;
}

.footer-menu ul li a {
    color: #cfd2d6;
    text-decoration: none;
    font-size: 14px;
}

.footer-menu ul li a:hover {
    color: #27bcda;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-menu ul li {
        padding: 0 10px;
    }

    /* Responsive Mobile */
    .server-btn {
        flex: 1 1 calc(50% - 10px);
        /* 2 Kolom di Tablet/Mobile */
    }

    .main-layout-flex {
        flex-direction: column;
    }

    aside.sidebar-content {
        width: 100% !important;
        flex: none !important;
    }
}

/* RESPONSIVE */
/* RESPONSIVE LAYOUT */
@media (max-width: 900px) {

    /* Pastikan container utama berubah dari baris ke kolom */
    .dooplay-container {
        flex-direction: column !important;
        padding: 0 15px;
    }

    /* Konten Utama mengambil lebar penuh */
    .main-content {
        width: 100%;
        flex: none;
        order: 1;
        /* Muncul pertama */
    }

    /* Sidebar turun ke bawah dan mengambil lebar penuh */
    .sidebar {
        width: 100%;
        flex: none;
        order: 2;
        /* Muncul setelah main-content */
        margin-top: 30px;
        /* Jarak dari konten di atasnya */
    }

    /* Agar list genre di sidebar mobile lebih hemat ruang (Opsional: buat 2 kolom) */
    .genre-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 15px;
    }

    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .section-header h2 {
        font-size: 16px;
    }
}

/* --- RESPONSIVE LOGIC FIXED --- */

.mobile-menu-toggle {
    display: none;
    /* Sembunyi di desktop */
    cursor: pointer;
    font-size: 24px;
    color: #fff;
    line-height: 1;
}

.mobile-menu-close {
    display: none;
    padding: 20px;
    text-align: right;
    cursor: pointer;
    color: #fff;
}

@media (max-width: 900px) {
    .header-container {
        justify-content: space-between;
        /* Logo kiri, header-right kanan */
    }

    .logo {
        margin-right: 0;
        /* Lepaskan margin agar logo benar-benar di kiri */
    }

    /* Tampilkan burger */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
    }

    /* Sembunyikan menu utama desktop */
    .header-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100%;
        background: #15171c;
        z-index: 10000;
        transition: 0.4s cubic-bezier(0.7, 0, 0.3, 1);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.8);
        display: block;
        /* Override display:none jika ada */
    }

    .header-nav.active {
        left: 0;
    }

    .header-nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .header-nav ul li a {
        padding: 15px;
        border-bottom: 1px solid #1a1d24;
        width: 100%;
        font-size: 16px;
    }

    .mobile-menu-close {
        display: block;
    }

    /* Sembunyikan FORM pencarian saja di mobile, 
       tapi biarkan header-right tetap ada untuk burger & user icon */
    .search-form {
        display: none;
    }

    .header-right {
        gap: 20px;
        /* Jarak antara ikon user dan burger */
    }

    .user-account i {
        font-size: 24px;
    }
}

/* Tambahan untuk layar sangat kecil */
@media (max-width: 480px) {
    .logo-text {
        font-size: 18px;
    }

    .header-container {
        background: #15171c57;
        padding: 0 15px;
    }
}

.main-menu li.has-children {
    position: relative;
}

/* --- SUBMENU MEGA MENU (4 KOLOM & SCROLLABLE) --- */

/* Hapus list marker untuk semua menu */
.main-menu,
.sub-menu {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.sub-menu li {
    list-style-type: none !important;
}

.sub-menu li::marker {
    content: none !important;
    /* Hapus penanda list */
}

/* Desktop: Hover & Grid Logic */
@media (min-width: 901px) {
    .has-children {
        position: relative;
    }

    .sub-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #1a1d24;
        width: 600px;
        /* Diperlebar untuk 4 kolom */
        max-height: 400px;
        /* Batas tinggi agar bisa scroll */
        overflow-y: auto;
        /* Aktifkan scroll vertikal */
        display: grid !important;
        /* Paksa grid */
        grid-template-columns: repeat(4, 1fr);
        /* 4 Kolom */
        padding: 15px !important;
        border-radius: 8px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
        border: 1px solid #2d333f;

        /* Efek Transisi */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9999;
    }

    .has-children:hover>.sub-menu {
        opacity: 1;
        visibility: visible;
        display: grid !important;
    }

    .sub-menu li a {
        padding: 10px !important;
        font-size: 13px !important;
        color: #abb1ba;
        border: none !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sub-menu li a:hover {
        background: rgba(122, 88, 255, 0.1);
        color: #7a58ff;
        border-radius: 4px;
    }

    /* Styling Scrollbar khusus Submenu */
    .sub-menu::-webkit-scrollbar {
        width: 5px;
    }

    .sub-menu::-webkit-scrollbar-track {
        background: #15171c;
    }

    .sub-menu::-webkit-scrollbar-thumb {
        background: #7a58ff;
        border-radius: 10px;
    }
}

/* Menyeimbangkan link dan icon agar sejajar horizontal */
.menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    /* Jarak antara teks Genres dan Panah */
    cursor: pointer;
}

.menu-item-wrapper a {
    display: flex;
    align-items: center;
    padding: 0 !important;
    /* Reset padding agar tidak mengganggu posisi icon */
}

/* Sembunyikan toggle panah di desktop jika ingin icon menempel langsung di link */
@media (min-width: 901px) {
    .submenu-toggle {
        display: flex;
        align-items: center;
        pointer-events: none;
        /* Klik akan tembus ke wrapper */
    }

    .submenu-toggle i {
        font-size: 14px;
        line-height: 1;
        margin-top: 2px;
        /* Penyesuaian mikro posisi vertikal */
    }
}

/* Base style untuk list agar bersih */
.main-menu li {
    list-style: none !important;
}

/* Mobile: Penyesuaian agar tidak grid di HP */
@media (max-width: 900px) {
    .sub-menu {
        display: none;
        grid-template-columns: 1fr;
        /* Jadi 1 kolom di mobile */
        max-height: none;
        position: static;
        width: 100%;
        transform: none;
        background: #0f1115;
    }

    .has-children.open>.sub-menu {
        display: block !important;
    }
}

/* --- MOBILE SUBMENU (ACCORDION) --- */
@media (max-width: 900px) {
    .header-nav {
        overflow-y: auto;
        /* Agar menu panjang bisa di-scroll */
    }

    .menu-item-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #1a1d24;
    }

    .header-nav ul li a {
        border-bottom: none !important;
        /* Reset border */
    }

    .submenu-toggle {
        padding: 15px 20px;
        color: #fff;
        cursor: pointer;
        border-left: 1px solid #1a1d24;
    }

    .sub-menu {
        display: none;
        /* Sembunyi awal di mobile */
        background: #0f1115;
        padding: 0 !important;
        list-style: none;
    }

    .sub-menu.open {
        display: block;
    }

    .sub-menu li a {
        padding: 12px 30px !important;
        font-size: 14px !important;
        background: rgba(255, 255, 255, 0.02);
    }

    /* Putar icon saat terbuka */
    .has-children.active-mobile .submenu-toggle i {
        transform: rotate(180deg);
        transition: 0.3s;
    }
}

.ep-btn {
    background: #1a1d24;
    color: #abb1ba;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #252932;
    transition: 0.2s;
}

.ep-btn:hover {
    background: #7a58ff;
    color: #fff;
    border-color: #7a58ff;
}

.film-detail-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.film-meta {
    color: #666;
    font-size: 14px;
}

.section-title {
    font-size: 16px;
    border-bottom: 2px solid #7a58ff;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.ep-btn {
    background: #252932;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 3px;
    transition: 0.3s;
}

.ep-btn:hover {
    background: #7a58ff;
}

.badge-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
    z-index: 2;
}

.badge-status.ongoing {
    background: #ff5c26;
}

.badge-status.completed {
    background: #00b341;
}

/* MOBILE SEARCH */
/* MOBILE SEARCH */
.mobile-search {
    display: none;
}

.mobile-search .search-forms {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.mobile-search input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #111;
    color: #fff;
    font-size: 14px;
}

.mobile-search button {
    padding: 10px 14px;
    background: #43494d;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
}

/* TAMPIL HANYA DI MOBILE */
@media (max-width: 768px) {
    .mobile-search {
        display: block;
    }
}

/* MODERN NAVIGATION BUTTONS */
.nav-btn {
    background: #7a58ff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover:not(:disabled) {
    background: #5a39d1;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background: #2d333f;
    cursor: not-allowed;
    opacity: 0.5;
}

/* SIDEBAR MODERN */
.sidebar-modern {
    flex: 1;
    min-width: 300px;
}

.widget-modern {
    background: #1a1d24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2d333f;
}

.widget-modern h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 3px solid #7a58ff;
    padding-left: 10px;
}

.pop-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    transition: 0.2s;
}

.pop-item:hover {
    transform: translateX(5px);
}

.pop-img img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.pop-info h6 {
    margin: 0;
    color: #fff;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pop-info span {
    color: #ffb800;
    font-size: 11px;
}

/* RE-DESIGN DAFTAR EPISODE */
.section-title-modern {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

.episode-list-container {
    position: relative;
    /* ✨ penting untuk scroll positioning */
    max-height: 300px;
    overflow-y: auto;
    background: #16191e;
    border: 1px solid #2d333f;
    border-radius: 8px;
    scrollbar-width: thin;
    /* Untuk Firefox */
    scrollbar-color: #3e4553 #1a1d24;
    /* Untuk Firefox */
    padding-right: 5px;
}

.ep-row {
    padding: 12px 20px;
    border-bottom: 1px solid #2d333f;
    transition: 0.2s;
}

.ep-row:hover {
    background: #1a1d24;
}

.active-row {
    border-left: 3px solid #7a58ff;
    background: #1a1d24;
}

.ep-title {
    color: #efefef;
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

.ep-btn-server {
    background: #2d333f;
    color: #abb1ba;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-decoration: none;
}

.ep-btn-server:hover {
    background: #7a58ff;
    color: #fff;
}

/* FILM INFO CARD */
.film-info-card {
    display: flex;
    gap: 25px;
    background: #1a1d24;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid #2d333f;
}

.film-poster-side img {
    width: 160px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.meta-grid-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
    font-size: 13px;
}

.genre-labels a {
    background: #7a58ff21;
    color: #7a58ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    margin-right: 5px;
    border: 1px solid #7a58ff52;
}

.synopsis-text {
    margin-top: 20px;
    font-size: 14px;
    color: #abb1ba;
    line-height: 1.8;
}

.badge-type {
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
}

/* ===== SUBMENU ===== */
.has-children {
    position: relative;
    /* parent untuk submenu absolute */
}

/* Desktop: hover */
@media (min-width: 901px) {
    .has-children:hover>.sub-menu {
        display: block;
    }
}

/* Submenu general */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #1a1d24;
    z-index: 9999;
}

.sub-menu li a {
    display: block;
    padding: 12px 15px;
    font-size: 13px;
    color: #abb1ba;
}

.sub-menu li a:hover,
.sub-menu li.active a {
    background: #7a58ff;
    color: #fff;
}

/* Mobile: klik toggle */
@media (max-width: 900px) {
    .sub-menu {
        position: static;
        background: #111;
    }

    .has-children.open>.sub-menu {
        display: block;
    }
}


/* singlephp style */
.dooplay-custom-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    font-family: sans-serif;
    color: #fff;
}

.video-player-area {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2d333f;
    position: relative;
}

#player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

#player-container iframe,
#player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.server-selection-wrapper {
    background: #1a1d24;
    border: 1px solid #2d333f;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    margin-bottom: 20px;
    border-top: none;
}

.resolution-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #2d333f;
    padding-bottom: 10px;
    overflow-x: auto;
}

.res-btn {
    background: #0f1116;
    border: 1px solid #3e4553;
    color: #abb1ba;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    transition: 0.2s;
}

.res-btn:hover {
    border-color: #7a58ff;
    color: #fff;
}

.res-btn.active {
    background: #7a58ff;
    color: #fff;
    border-color: #7a58ff;
}

.server-list-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.server-btn {
    background: #2d333f;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.server-btn:hover {
    background: #3e4553;
}

.server-btn.active-server {
    background: #00c853;
    font-weight: bold;
}

.player-nav-control {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-btn {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #1a1d24;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    border: 1px solid #2d333f;
}

#ads-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 20;
}

#play-ads-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    text-align: center;
    cursor: pointer;
    width: 100%;
}

#play-ads-btn .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #7a58ff;
}

#skip-container {
    position: absolute;
    bottom: 20px;
    right: 0;
    background: rgba(122, 88, 255, 0.9);
    color: #fff;
    padding: 8px 15px;
    font-size: 12px;
    cursor: not-allowed;
    z-index: 26;
}

#skip-container.can-skip {
    cursor: pointer;
    background: #7a58ff;
}

.section-title {
    border-left: 4px solid #7a58ff;
    padding-left: 15px;
    font-size: 16px;
    margin: 20px 0;
}

.ep-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #2d333f;
    cursor: pointer;
    transition: 0.2s;
}

.ep-row.active-row {
    background: #1a1d24;
}

.film-header-flex {
    display: flex;
    gap: 20px;
    background: #1a1d24;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.film-poster {
    flex: 0 0 180px;
}

.film-poster img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.film-info-detail {
    flex: 1;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

/* Styling Scrollbar untuk List Episode */
.episode-list-container::-webkit-scrollbar {
    width: 6px;
    /* Lebar scrollbar */
}

.episode-list-container::-webkit-scrollbar-track {
    background: #1a1d24;
    /* Warna dasar track */
    border-radius: 10px;
}

.episode-list-container::-webkit-scrollbar-thumb {
    background: #3e4553;
    /* Warna scrollbar saat diam */
    border-radius: 10px;
    border: 1px solid #1a1d24;
}

.episode-list-container::-webkit-scrollbar-thumb:hover {
    background: #7a58ff;
    /* Warna scrollbar saat di-hover (Ungu) */
}

/* Opsional: Agar list episode terasa lebih lega */

@media screen and (max-width: 768px) {
    .film-header-flex {
        flex-direction: column;
        align-items: center;
    }
}

/* Update atau tambahkan ini untuk responsif sidebar */
@media screen and (max-width: 900px) {
    .main-layout-flex {
        flex-direction: column !important;
    }

    .sidebar-content {
        flex: 1 1 auto !important;
        width: 100% !important;
        order: 2;
        /* Sidebar pindah ke bawah player di HP */
    }

    .main-content {
        order: 1;
    }
}

/* Tambahan styling halus untuk scrollbar sinopsis di sidebar */
.film-content::-webkit-scrollbar {
    width: 4px;
}

.film-content::-webkit-scrollbar-thumb {
    background: #3e4553;
    border-radius: 10px;
}

.see-all {
    background: #874ed8;
    font-size: 10px;
    font-weight: 300;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-left: 6px;
    color: #fff;
}

/* PAGINATION CONTAINER */
.pagination {
    float: left;
    width: 100%;
    font-size: 14px;
    margin-top: 30px;
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* BASE STYLE UNTUK LINK DAN SPAN */
.pagination a,
.pagination span {
    padding: 10px 18px;
    border: 1px solid #2d333f;
    /* Warna border disesuaikan tema gelap Anda */
    margin: 0 5px;
    border-radius: 3px;
    float: left;
    font-size: 13px;
    color: #abb1ba;
    background: #1a1d24;
    transition: all 0.3s ease;
}

/* TEXT "Page X of X" */
.pagination span:first-child {
    border-color: transparent;
    background: transparent;
    color: rgba(255, 255, 255, .5);
    padding-left: 0;
}

/* HALAMAN AKTIF */
.pagination .current {
    border-color: #000 !important;
    background: #00000041 !important;
    color: #7a58ff !important;
    /* Warna biru DooPlay */
    font-weight: 600;
}

/* HOVER EFFECT */
.pagination a:hover {
    background: #7a58ff;
    /* Warna ungu tema Anda */
    color: #fff;
    border-color: #7a58ff;
}

/* PANAH NEXT/PREV */
.pagination .next,
.pagination .prev {
    font-weight: bold;
}

.pagination .dots {
    display: none !important;
}

/* RESPONSIVE MOBILE (Layar di bawah 600px) */
@media (max-width: 600px) {
    .pagination {
        justify-content: center;
        /* Kotak angka jadi di tengah */
        gap: 5px;
    }

    /* Buat tulisan "Page X of X" memenuhi satu baris sendiri di paling atas */
    .pagination span:first-child {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
        order: -1;
        /* Pastikan selalu di paling atas */
    }

    /* Kecilkan padding tombol agar tidak sesak */
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 30px;
        height: 34px;
    }
}

/* CONTAINER UTAMA */
.comment-area-section {
    color: #abb1ba;
    font-family: sans-serif;
}

#respond {
    background: transparent;
    padding: 0;
}

#reply-title {
    font-size: 16px;
    color: #7a58ff;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

/* FORM LAYOUT */
#commentform {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Memberikan jarak antar elemen */
}

/* Textarea mengambil baris penuh */
.comment-form-comment {
    width: 100%;
    margin: 0;
}

/* Input Nama & Email Sejajar (Desktop) */
.comment-form-author,
.comment-form-email {
    flex: 1;
    /* Membuat keduanya berbagi ruang yang sama */
    min-width: 250px;
    /* Batas minimal agar tidak terlalu sempit */
    margin: 0;
}

/* Cookies Consent & Submit taking full width */
.comment-form-cookies-consent,
.form-submit {
    width: 100%;
    margin: 0;
}

/* STYLING INPUT & TEXTAREA */
#commentform textarea,
#commentform input[type="text"],
#commentform input[type="email"] {
    width: 100%;
    background: #0f1217;
    border: 1px solid #2d333f;
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Penting agar padding tidak merusak lebar */
}

#commentform label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #7a58ff;
    font-weight: 600;
}

/* Efek Fokus */
#commentform textarea:focus,
#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus {
    border-color: #7a58ff;
    background: #161b22;
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 88, 255, 0.2);
}

/* Checkbox Styling */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #888;
}

.comment-form-cookies-consent input {
    margin-top: 3px;
}

/* TOMBOL KIRIM */
.submit-btn-custom,
#commentform input[type="submit"] {
    background: #7a58ff;
    color: #fff !important;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.3s ease;
    width: auto;
    /* Tombol tidak lebar penuh di desktop */
}

.submit-btn-custom:hover,
#commentform input[type="submit"]:hover {
    background: #5e3fd1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(122, 88, 255, 0.3);
}

/* LIST KOMENTAR (Existing) */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
}

.comment-body {
    background: #0f1217;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #2d333f;
    transition: border-color 0.3s;
}

.comment-body:hover {
    border-color: #7a58ff;
}

.comment-author cite {
    color: #fff;
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
}

.comment-meta {
    margin-bottom: 10px;
}

.comment-meta a {
    color: #666;
    font-size: 12px;
    text-decoration: none;
}

/* RESPONSIVE KHUSUS MOBILE */
@media (max-width: 768px) {

    .comment-form-author,
    .comment-form-email {
        flex: 100%;
        /* Menjadi satu baris per kolom di HP */
    }

    .submit-btn-custom,
    #commentform input[type="submit"] {
        width: 100%;
        /* Tombol lebar penuh di HP agar mudah ditekan */
    }

    .slider-container-wrapper {
        position: relative;
        padding: 0 20px;
    }

    .slick-prev,
    .slick-next {
        width: 30px;
        height: 30px;
    }

    .slick-prev i,
    .slick-next i {
        font-size: 12px;
    }

    .slick-dots li button {
        width: 5px;
        height: 5px;
    }

    .slick-dots li.slick-active button {
        width: 15px;
        height: 5px;
    }

    .featured-slider .poster-wrapper {
        border-radius: 3px;
    }

    /* Jika ingin teks badge episode lebih kecil */
    .badge-episode {
        font-size: 8px;
        padding: 2px 4px;
    }

    .slick-prev {
        left: -2px !important;
    }

    .slick-next {
        right: -2px !important;
    }
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.site-logo {
    max-height: 55px;
    /* Sesuaikan tinggi logo dengan tinggi header (60px) */
    width: auto;
    display: block;
}

@media (max-width: 900px) {

    /* Container Header di dalam Sidebar */
    .mobile-menu-close {
        display: flex !important;
        /* Aktifkan flex */
        align-items: center;
        /* Rata tengah vertikal */
        justify-content: space-between;
        /* Sebar konten */
        padding: 15px 20px;
        border-bottom: 1px solid #1a1d24;
        height: 60px;
        /* Samakan dengan tinggi header utama */
    }

    /* Logo Mobile */
    .mobile-only-logo {
        display: block !important;
    }

    .mobile-only-logo img {
        max-width: 100px;
        height: auto;
        display: block;
    }

    /* Ikon Close */
    .mobile-menu-close i {
        font-size: 24px;
        color: #fff;
        cursor: pointer;
        width: 30px;
        /* Lebar tetap agar simetris dengan spacer */
        text-align: right;
    }

    /* Spacer untuk penyeimbang agar logo tepat di tengah */
    .flex-spacer {
        width: 30px;
        /* Harus sama dengan lebar ikon close */
    }

    /* Reset border dari kode sebelumnya jika ada */
    .mobile-only-logo {
        border-bottom: none !important;
    }
}