/* =============================================
   Episode List & Grid — Full Redesign
   ============================================= */

/* Outer panel wrapper */
#episodes-content {
    background: #16181f !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Header row: "List of Episodes:" + range dropdown */
.ssc-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 12px 14px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Episode range <select> dropdown — fully styled */
#episode-range {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #1e2030 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2306C149' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 5px 30px 5px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    height: auto !important;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

#episode-range:focus,
#episode-range:hover {
    border-color: #06C149 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(6, 193, 73, 0.15) !important;
    background-color: #232540 !important;
}

/* Style the dropdown options (supported in Firefox/Chrome) */
#episode-range option {
    background-color: #1a1d2e !important;
    color: #e0e0e0 !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

#episode-range option:checked,
#episode-range option:hover {
    background-color: #06C149 !important;
    color: #000 !important;
}

/* ---- LIST VIEW items (< 24 episodes) ---- */
.ss-list:not(.ss-list-min) .ssl-item {
    display: flex !important;
    align-items: center !important;
    padding: 9px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    position: relative;
    gap: 12px !important;
    background: #16181f !important;
}

.ss-list:not(.ss-list-min) .ssl-item:hover {
    background: rgba(6, 193, 73, 0.08) !important;
}

/* Episode number bubble */
.ss-list:not(.ss-list-min) .ssl-item .ssli-order {
    flex-shrink: 0;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

/* Episode title */
.ss-list:not(.ss-list-min) .ssl-item .ep-name {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

/* Play icon (right side) */
.ss-list:not(.ss-list-min) .ssl-item .ssli-btn {
    margin-left: auto !important;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease !important;
}

.ss-list:not(.ss-list-min) .ssl-item:hover .ssli-btn {
    opacity: 1 !important;
}

.ss-list:not(.ss-list-min) .ssl-item .ssli-btn .btn-circle {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: #06C149 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.ss-list:not(.ss-list-min) .ssl-item .ssli-btn .btn-circle i {
    font-size: 9px !important;
    color: #000 !important;
}

/* Hover state — list view */
.ss-list:not(.ss-list-min) .ssl-item:hover .ssli-order {
    background: rgba(6, 193, 73, 0.2) !important;
    color: #06C149 !important;
}

.ss-list:not(.ss-list-min) .ssl-item:hover .ep-name {
    color: #fff !important;
}

/* Active episode — list view */
.ss-list:not(.ss-list-min) .ssl-item.active {
    background: rgba(6, 193, 73, 0.12) !important;
    border-left: 3px solid #06C149 !important;
}

.ss-list:not(.ss-list-min) .ssl-item.active .ssli-order {
    background: #06C149 !important;
    color: #000 !important;
}

.ss-list:not(.ss-list-min) .ssl-item.active .ep-name {
    color: #06C149 !important;
    font-weight: 600 !important;
}

.ss-list:not(.ss-list-min) .ssl-item.active .ssli-btn {
    opacity: 1 !important;
}

/* ---- GRID VIEW items (>= 24 episodes, ss-list-min) ---- */
.ss-list-min .ssl-item {
    aspect-ratio: 1 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    position: relative;
}

.ss-list-min .ssl-item:hover {
    background: rgba(6, 193, 73, 0.15) !important;
    border-color: #06C149 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.ss-list-min .ssl-item .ssli-order {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: color 0.2s ease !important;
}

.ss-list-min .ssl-item:hover .ssli-order {
    color: #06C149 !important;
}

/* Active episode — grid view */
.ss-list-min .ssl-item.active {
    background: #06C149 !important;
    border-color: #06C149 !important;
    box-shadow: 0 0 12px rgba(6, 193, 73, 0.4) !important;
}

.ss-list-min .ssl-item.active .ssli-order {
    color: #000 !important;
}

/* Watched state */
.ssl-item.watched {
    opacity: 0.6;
    background: rgba(6, 193, 73, 0.05) !important;
}

.ssl-item.watched .ssli-order::after {
    content: "✓";
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 8px;
    color: #06C149;
    line-height: 1;
}

/* Override: Active + watched should look fully active */
.ssl-item.active,
.ssl-item.watched.active {
    opacity: 1 !important;
}

/* Filler badge */
.filler-badge {
    display: inline-block;
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    background: rgba(255, 180, 0, 0.15) !important;
    color: #ffb400 !important;
    border: 1px solid rgba(255, 180, 0, 0.3) !important;
    vertical-align: middle;
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Filler episode order bubble (grid) */
.ss-list-min .ssl-item.ssl-item-filler .ssli-order {
    color: #ffb400 !important;
}

.ss-list-min .ssl-item.ssl-item-filler:hover {
    border-color: #ffb400 !important;
    background: rgba(255, 180, 0, 0.1) !important;
}

/* ======================================
   Player Controls — Full Layout Fix
   ====================================== */

/* Single-row flex container for all controls */
.player-controls {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;            /* reduced gap */
    padding: 6px 10px !important;   /* reduced padding */
    overflow-x: auto !important;   /* Enable horizontal scroll on mobile */
    overflow-y: hidden !important;
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.player-controls::-webkit-scrollbar {
    display: none;
}

/* Make every pc-item sit inline, no block wrapping */
.player-controls .pc-item {
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
}

/* Push Prev/Next/Add-to-List to the right */
.player-controls .pc-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;            /* reduced gap */
    margin-left: auto !important;   /* This forces right-alignment */
    flex-shrink: 0;
}

/* Toggle pills (Auto Play / Next / Skip) */
.player-controls .toggle-basic {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 0 4px 0 10px !important;       /* Adjusted for height */
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none;
    height: 32px !important;                /* Consistent height */
    white-space: nowrap;
}

.player-controls .toggle-basic:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(6, 193, 73, 0.5) !important;
}

.player-controls .toggle-basic .tb-name {
    font-size: 9.5px !important;            /* slightly smaller */
    font-weight: 700 !important;
    margin-right: 6px !important;
    color: #eee !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.player-controls .toggle-basic .tb-result {
    font-size: 8px !important;              /* smaller text */
    font-weight: 900 !important;
    padding: 0 !important;                  /* no padding needed for square */
    border-radius: 50% !important;          /* perfect circle */
    text-transform: uppercase;
    transition: all 0.3s ease !important;
    width: 26px !important;                 /* square dimensions */
    height: 26px !important;
    text-align: center;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* OFF State */
.player-controls .toggle-basic.off .tb-result {
    background: #ff426e !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(255, 66, 110, 0.2);
}
.player-controls .toggle-basic.off .tb-result:after {
    content: "OFF" !important;
}

/* ON State */
.player-controls .toggle-basic:not(.off) .tb-result,
.player-controls .toggle-basic.on:not(.off) .tb-result {
    background: #06C149 !important;
    color: #000 !important;
    box-shadow: 0 0 8px rgba(6, 193, 73, 0.2);
}
.player-controls .toggle-basic:not(.off) .tb-result:after,
.player-controls .toggle-basic.on:not(.off) .tb-result:after {
    content: "ON" !important;
}

/* Hide legacy ball indicator */
.player-controls .toggle-basic .tb-result:before {
    display: none !important;
}

/* Base style for all standard buttons in the controls row */
.player-controls .btn-sm {
    padding: 0 12px !important;            /* Adjusted for height */
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    height: 32px !important;                /* Consistent height */
    line-height: normal !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.player-controls .btn-sm:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(6,193,73, 0.5) !important;
}

.player-controls .btn-voted, 
.player-controls .btn-sm:active {
    background: rgba(6, 193, 73, 0.15) !important;
    color: #06C149 !important;
}

/* Adjust icons in buttons */
.player-controls .btn-sm i {
    font-size: 11px !important;
}

.player-controls .btn-sm i.mr-1,
.player-controls .btn-sm i.mr-2 {
    margin-right: 4px !important;
}

.player-controls .btn-sm i.ml-1,
.player-controls .btn-sm i.ml-2 {
    margin-left: 4px !important;
}

/* Mobile Small Breakpoint Fix */
@media screen and (max-width: 767px) {
    .player-controls {
        gap: 3px !important;
        padding: 4px 6px !important;
        height: 36px !important;
    }
    
    .player-controls .btn-sm,
    .player-controls .toggle-basic {
        height: 28px !important;
        padding: 0 8px !important;
    }

    /* Hide text on Expand/Prev/Next on very small screens to keep icon only */
    @media screen and (max-width: 480px) {
        .player-controls .pc-resize a,
        .player-controls .btn-prev,
        .player-controls .btn-next,
        .player-controls .pc-fav a {
            font-size: 0 !important;
        }
        .player-controls .btn-sm i {
            margin: 0 !important;
            font-size: 14px !important;
        }
        /* Keep "Add to List" arrow if needed, or just icon */
        .player-controls .toggle-basic .tb-name {
            display: none !important;
        }
    }
    
    .player-controls .toggle-basic .tb-result {
        width: 22px !important;
        height: 22px !important;
        font-size: 7px !important;
    }

    .player-controls .toggle-basic .tb-name {
        font-size: 8px !important;
        margin-right: 4px !important;
    }
}

.tick-age {
    background-color: #FF5700;
    /* Red color */
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;

    top: 0;
    left: 0;
}

.dropdown-menu {
    background: rgba(206, 211, 205, 0.568);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 160px;
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 8px;

}

.dropdown-menu .dropdown-item {
    color: rgba(0, 0, 0, 0.9);
    padding: 8px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(56, 56, 56, 0.5);
    color: #06C149;
}

.dropdown-menu-model {
    margin-top: 5px;
}

.dropdown-menu.show {
    display: block;
    position: absolute;
    transform: translate3d(0px, 38px, 0px);
    top: 0px;
    left: 0px;
    will-change: transform;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate3d(0px, 30px, 0px);
    }

    to {
        opacity: 1;
        transform: translate3d(0px, 38px, 0px);
    }
}





.episode-container {
    width: 100%;
    padding: 5px;
    background-color: #161B22;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.filter {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}

#episode-range {

    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #21262D;
    border-radius: 5px;
    background-color: #161B22;
    color: #F0F6FC;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

#episode-range:hover {
    background-color: #21262D;
    color: #fff;
    border-color: #06C149;
}

.episodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 12px;
}

.episode-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease-in-out;
    background-color: #35373d;
    color: #9ca3af;
}

.episode-item:hover {
    background-color: #67686f;
    color: #fff;
}


.episode-item.filler-highlight {
    color: #d1d5db;
    background: #35373d;
    background-image: linear-gradient(to right, #5a4944, #645a4b);
    transition: all 0.3s ease-in-out;
}

.episode-item.filler-highlight:hover {
    background: #9a6700;
    color: #fff;
}

.episode-item.active {
    background: #06C149;
    color: #000;
    font-weight: 600;
}

.episodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 8px;
}

.tick-age {
    background-color: #FF5700;
    /* Red color */
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.tick-item.tick-sub {
    background: #b0e3af;
    /* Blue color for sub */
    font-weight: 600;
    color: #111 !important;

}

.tick-item.tick-dub {
    background: #B9E7FF;
    /* Yellow color for dub */
    font-weight: 600;
    color: #111 !important;

}

.anime-qtip {
    position: absolute;
    z-index: 9999;
    width: 300px;
    background: #161B22;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    padding: 15px;
}

.qtip-content {
    color: #fff;
}

.qtip-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.qtip-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rating {
    color: #ffd700;
}

.quality-info {
    display: flex;
    gap: 5px;
}

.qtip-description {
    font-size: 14px;
    margin-bottom: 10px;
    color: #ccc;
}

.qtip-meta>div {
    font-size: 13px;
    margin-bottom: 5px;
    color: #ccc;
}

.qtip-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-watch {
    flex: 1;
    background: #7676ff;
    color: white;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
}

.search-result-pop {
    background-color: #161B22 !important;
    border: 1px solid #21262D !important;
}

.search-result-pop .nav-item:hover {
    background: #21262D !important;
    color: #06C149 !important;
}

.sb-setting {
    background-color: #0D1017 !important;
    border-bottom: 1px solid #21262D !important;
}

#xheader,
.header-home {
    background-color: #0D1017 !important;
    border-bottom: 1px solid #21262D !important;
}

.btn-primary,
.btn-primary:hover {
    background-color: #06C149 !important;
    color: #000 !important;
    border: none !important;
}

.text-primary,
.highlight-text {
    color: #06C149 !important;
}

/* TMDb Logo Styles */
.tmdb-logo {
    max-height: 100px;
    width: auto;
    max-width: 500px;
    object-fit: contain;
    object-position: left center;
    /* Ensure the image content is aligned to the left of its box */
    display: block;
    margin: 0 auto 15px 0 !important;
    /* Forces left alignment in most layouts */
    padding: 0 !important;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.tmdb-logo:hover {
    transform: scale(1.02);
}

.desi-head-title,
.film-name-wrap {
    text-align: left !important;
    display: block !important;
}

.desi-head-title .tmdb-logo {
    max-height: 120px;
    max-width: 100%;
    margin-left: 0 !important;
}

.film-name-wrap .tmdb-logo {
    max-height: 150px;
    max-width: 100%;
    margin-left: 0 !important;
}

@media screen and (max-width: 768px) {
    .tmdb-logo {
        max-height: 80px !important;
        margin: 0 auto 15px auto !important;
        /* Still keep it centered on mobile for balance */
        object-position: center;
    }

    .desi-head-title,
    .film-name-wrap {
        text-align: center !important;
    }

    .desi-head-title .tmdb-logo,
    .film-name-wrap .tmdb-logo {
        max-height: 80px !important;
        margin-left: auto !important;
    }
}



.d-none {
    display: none !important;
}

[data-page="page_home"] .deslide-wrap {
    margin-top: 20px !important; 
}

/* Decrease Hero Banner Height to show Trending below */
#slider {
    padding-bottom: 31% !important; 
}

@media screen and (max-width: 1300px) {
    #slider {
        padding-bottom: 35% !important; 
    }
}

@media screen and (max-width: 1024px) {
    #slider {
        padding-bottom: 43% !important; 
    }
}

@media screen and (max-width: 768px) {
    #slider {
        padding-bottom: 50% !important; 
    }
    [data-page="page_home"] .deslide-wrap {
        margin-top: 10px !important;
    }
}

/* 3-state language toggle (TMDB / EN / JP) */
.toggle-lang {
    /* Override: wider to fit 3 spans */
    width: auto !important;
    min-width: 74px;
}

.toggle-lang>span {
    /* Each span narrower to fit 3 */
    width: 24px !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: #ccc;
}

.toggle-lang>span.tmdb {
    font-size: 11px !important;
    font-weight: 600;
    width: 30px !important;
}

/* Active state: highlight the selected span */
.toggle-lang>span.active {
    background: #06C149 !important;
    color: #111 !important;
}

/* Remove the old .off-based rules that conflict */
.toggle-lang>span.en,
.toggle-lang>span.jp {
    background: transparent;
    color: #ccc;
}

/* =========================================
   SIDEBAR MENU PREMIUM REDESIGN
   ========================================= */

/* Fix body-hidden position fixed scrolling to top */
body.body-hidden,
.body-hidden {
    position: static !important;
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
}

/* Remove Intense Blur and replace with nice tinted dim */
#sidebar_menu_bg {
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    background: rgba(10, 10, 15, 0.8) !important;
}

/* Redesign Sidebar Menu */
#sidebar_menu {
    background: #14151a !important;
    /* Premium dark background */
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5) !important;
    width: 280px !important;
    left: -320px !important;
    /* hide further out so it doesn't peek */
    transition: left 0.4s cubic-bezier(0.19, 1, 0.22, 1) !important;
    /* Smooth apple-like transition */
    padding-top: 20px;
}

#sidebar_menu.active {
    left: 0 !important;
}

/* Sidebar close button - Made smaller and sleeker */
#sidebar_menu .toggle-sidebar {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    margin: 15px 20px !important;
    padding: 8px 15px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
    border-radius: 10px !important;
    width: auto !important;
    align-self: flex-start;
    margin-right: auto !important; /* Push it to the left */
}

#sidebar_menu .toggle-sidebar i {
    font-size: 16px;
}

#sidebar_menu .toggle-sidebar:hover {
    background: #06C149 !important;
    /* Theme Color */
    color: #111 !important;
}

/* Sidebar Items styling */
#sidebar_menu .sidebar_menu-list>.nav-item>.nav-link,
#sidebar_menu .sidebar_menu-list>.nav-item>div.nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    padding: 10px 25px !important;
    transition: all 0.2s ease !important;
    border-radius: 0 25px 25px 0 !important;
    margin-right: 20px !important;
    font-size: 15px !important;
    cursor: pointer;
}

/* Unique styling for Th3-Anime app button */
#sidebar_menu .nav-item-app {
    margin: 10px 20px 10px 0 !important;
}

#sidebar_menu .nav-item-app .nav-link {
    background: linear-gradient(90deg, rgba(6, 193, 73, 0.15) 0%, transparent 100%) !important;
    border-left: 3px solid #06C149 !important;
    color: #06C149 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#sidebar_menu .nav-item-app .nav-link i {
    color: #06C149 !important;
    filter: drop-shadow(0 0 5px rgba(6, 193, 73, 0.5));
}

#sidebar_menu .nav-item-app .nav-link:hover {
    background: linear-gradient(90deg, rgba(6, 193, 73, 0.25) 0%, transparent 100%) !important;
    padding-left: 30px !important;
}

#sidebar_menu .sidebar_menu-list>.nav-item>.nav-link:hover,
#sidebar_menu .sidebar_menu-list>.nav-item.active>.nav-link {
    background: rgba(6, 193, 73, 0.1) !important;
    color: #06C149 !important;
}

/* Sidebar Header Setting items (Popular / Random) */
#sidebar_menu .sb-setting {
    padding: 0 20px 20px 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 20px !important;
}

#sidebar_menu .hs-toggles {
    display: flex;
    gap: 10px;
}

#sidebar_menu .hs-toggles .hst-item {
    flex: 1;
    background: transparent !important;
    padding: 0 !important;
    text-align: center;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.2s ease !important;
    border: none !important;
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

#sidebar_menu .hs-toggles .hst-item:hover {
    color: #06C149 !important;
    transform: none !important;
}

#sidebar_menu .hs-toggles .hst-item .hst-icon {
    width: 100% !important;
    height: 38px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 6px !important;
    margin-right: 0 !important;
    font-size: 18px !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
}

#sidebar_menu .hs-toggles .hst-item:hover .hst-icon {
    background: rgba(6, 193, 73, 0.2) !important;
    color: #06C149 !important;
}

#sidebar_menu .hs-toggles .hst-item .name span {
    font-size: 12px;
    font-weight: 600;
}

/* Genre Dropdown list styling */
#sidebar_menu .sidebar_menu-sub {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 15px !important;
    margin: 10px 20px !important;
    padding: 10px 0 !important;
}

#sidebar_menu .sidebar_menu-sub .sub-menu {
    columns: 2;
    /* Split genres into 2 columns nicely */
    -webkit-columns: 2;
    padding: 0 15px !important;
    margin: 0 !important;
}

#sidebar_menu .sidebar_menu-sub .nav-item {
    break-inside: avoid-column;
}

#sidebar_menu .sidebar_menu-sub .nav-item .nav-link {
    font-size: 13px !important;
    padding: 6px 10px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.2s ease;
    border-radius: 5px;
}

#sidebar_menu .sidebar_menu-sub .nav-item .nav-link:hover,
#sidebar_menu .sidebar_menu-sub .nav-item.active .nav-link {
    color: #06C149 !important;
    background: rgba(255, 255, 255, 0.03);
    padding-left: 15px !important;
    /* Slide element inward */
}

#sidebar_menu .hs-toggles .hst-item:hover .hst-icon,
#sidebar_menu .hs-toggles .hst-item.active .hst-icon {
    background: rgba(6, 193, 73, 0.2) !important;
    color: #06C149 !important;
}

#sidebar_menu .hs-toggles .hst-item:hover,
#sidebar_menu .hs-toggles .hst-item.active {
    background: transparent !important;
    border-color: transparent !important;
    color: #06C149 !important;
    transform: none !important;
}

/* General Mobile Setting Buttons Fix */
@media screen and (max-width: 991px) {
    .hs-toggles .hst-item {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        float: none !important;
        height: auto !important;
        margin: 5px !important;
        text-decoration: none !important;
    }
    
    .hs-toggles .hst-item .hst-icon {
        width: 50px !important;
        height: 36px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 6px !important;
        margin-right: 0 !important;
    }

    .hs-toggles .hst-item .hst-icon i {
        font-size: 18px !important;
        line-height: 1 !important;
    }
}

.btn-genre-toggle.collapsed .toggle-icon {
    transform: rotate(0deg);
}

.btn-genre-toggle:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

/* User Profile Dropdown Fix */
#user-slot .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    z-index: 1050 !important;
    min-width: 250px;
    background: #1a1b21 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    margin-top: 15px;
    padding: 15px 0;
    overflow: hidden;
}

#user-slot .dropdown-menu.show {
    display: block !important;
}

/* Watchlist Status Tags */
.tick-type {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.cbox-item:hover .tick-type {
    color: #ffbade;
}

#user-slot .btn-user-avatar {
    cursor: pointer;
    transition: transform 0.2s;
}

#user-slot .btn-user-avatar:hover {
    transform: translateY(-2px);
}

#user-slot .profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ff0055;
    background: #202125;
}

#user-slot .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social Media Buttons - Color Fix */
.zr-social-button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
}

.zr-social-button:hover {
    background: #06C149 !important;
    color: #000 !important;
    border-color: #06C149 !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(6, 193, 73, 0.3);
}

.zr-social-button i {
    color: inherit !important;
    font-size: 18px !important;
}

/* --- Player Component - Premium Theme Overrides --- */

/* Server Selection Buttons */
.btn-server {
    background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #8b949e !important;
    padding: 5px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    margin-right: 6px !important;
    margin-bottom: 8px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: auto !important;
}

.btn-server:hover, .btn-server.active {
    background: rgba(6, 193, 73, 0.12) !important;
    color: #06C149 !important;
    border-color: #06C149 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(6, 193, 73, 0.1);
    transform: translateY(-1px);
}

.btn-server i {
    color: inherit !important;
    font-size: 14px;
}

/* "Currently Watching" Status Box — match height of SUB/DUB section */
.ps_-status {
    background: rgba(6, 193, 73, 0.08) !important;
    border: 1px solid rgba(6, 193, 73, 0.2) !important;
    border-radius: 12px !important;
    padding: 5px 14px !important;       /* tight padding so height matches servers */
    transition: all 0.3s ease !important;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.25);
    align-self: stretch;                /* stretch to full height of its grid cell */
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.ps_-status .content {
    width: 100%;
}

.ps_-status .server-notice {
    color: #ced4da !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    text-align: center !important;
    margin: 0 !important;
}

.ps_-status .server-notice strong,
.ps_-status .server-notice b {
    color: #06C149 !important;
    font-weight: 700 !important;
}

/* Expand Button Refinement */
#media-resize {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #eee !important;
    padding: 7px 18px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: auto !important;
    text-decoration: none !important;
}

#media-resize:hover {
    background: rgba(6, 193, 73, 0.12) !important;
    color: #06C149 !important;
    border-color: #06C149 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#media-resize i {
    color: inherit !important;
}

/* Player Navigation Buttons (Prev/Next) */
.btn-prev, .btn-next {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #eee !important;
    padding: 7px 18px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
}

.btn-prev:hover, .btn-next:hover {
    background: rgba(6, 193, 73, 0.12) !important;
    color: #06C149 !important;
    border-color: #06C149 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Add to List Dropdown Styling */
#watch-list-content .dropdown-toggle {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #eee !important;
    border-radius: 10px !important;
    padding: 7px 18px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

#watch-list-content .dropdown-toggle:hover {
    background: rgba(6, 193, 73, 0.1) !important;
    color: #06C149 !important;
    border-color: #06C149 !important;
}

#watch-list-content .dropdown-toggle .fa-plus,
#watch-list-content .dropdown-toggle .fa-check {
    margin-right: 8px;
    color: inherit !important;
}

/* --- Responsive Fix: Social Buttons On Mobile (Invisible Fix) --- */
@media screen and (max-width: 479px) {
    .footer-joingroup .anw-group {
        background: rgba(255, 255, 255, 0.05) !important;
        color: #fff !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 10px 15px !important;
        display: flex !important;
        align-items: center;
        gap: 12px;
    }
    .footer-joingroup .anw-group .zrg-title .top {
        padding: 0 !important;
        margin: 0 !important;
        font-size: 11px !important;
        opacity: 0.6 !important;
    }
    .footer-joingroup .anw-group .zrg-title .bottom {
        color: #fff !important;
        display: block !important;
        font-size: 13px !important;
    }
    .footer-joingroup .anw-group .zrg-list {
        margin-left: auto !important;
        height: auto !important;
    }
}

/* --- Watchlist & Continue Watching Grid Fix --- */
#watchlist-container.cbox-list,
#cw-container.cbox-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px 15px !important;
    justify-content: flex-start !important;
}

#watchlist-container.cbox-list .cbox-item,
#cw-container.cbox-list .cbox-item {
    width: calc(16.66% - 13px) !important; /* Desktop: 6 items */
    margin: 0 !important;
    display: block !important;
    flex-shrink: 0;
}

#watchlist-container.cbox-list .cbox-img,
#cw-container.cbox-list .cbox-img {
    position: relative;
    width: 100%;
    padding-bottom: 145%; /* Standard anime poster aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

#watchlist-container.cbox-list .cbox-img img,
#cw-container.cbox-list .cbox-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#watchlist-container.cbox-list .cbox-item:hover .cbox-img img,
#cw-container.cbox-list .cbox-item:hover .cbox-img img {
    transform: scale(1.05);
}

#watchlist-container.cbox-list .cbox-title,
#cw-container.cbox-list .cbox-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff !important;
}

/* Responsive Grid Adjustments */
@media screen and (max-width: 1400px) {
    #watchlist-container.cbox-list .cbox-item,
    #cw-container.cbox-list .cbox-item {
        width: calc(20% - 12px) !important; /* 5 items */
    }
}

@media screen and (max-width: 1200px) {
    #watchlist-container.cbox-list .cbox-item,
    #cw-container.cbox-list .cbox-item {
        width: calc(25% - 11.5px) !important; /* 4 items */
    }
}

@media screen and (max-width: 991px) {
    #watchlist-container.cbox-list .cbox-item,
    #cw-container.cbox-list .cbox-item {
        width: calc(33.33% - 10px) !important; /* 3 items */
    }
}

@media screen and (max-width: 580px) {
    #watchlist-container.cbox-list,
    #cw-container.cbox-list {
        gap: 15px 10px !important;
    }
    #watchlist-container.cbox-list .cbox-item,
    #cw-container.cbox-list .cbox-item {
        width: calc(50% - 5px) !important; /* 2 items*/
    }
}

/* --- Watch Page Mobile Player Controls Fix (Refined) --- */
@media screen and (max-width: 767px) {
    .player-controls {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        padding: 15px 10px !important;
        gap: 8px !important;
        background: #0b0b0b !important;
        border-radius: 0 0 12px 12px !important;
        margin-top: 0 !important;
        height: auto !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-top: none !important;
    }

    /* Row 1: Toggles (Auto Play, Skip, Next) */
    .player-controls .pc-item.pc-toggle {
        display: flex !important;
        flex: 1 1 calc(33.33% - 8px) !important;
        max-width: calc(33.33% - 8px) !important;
        margin: 0 !important;
        float: none !important;
    }

    .player-controls .toggle-basic {
        width: 100% !important;
        padding: 8px 2px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: #222 !important;
        border: 1px solid #333 !important;
        color: #aaa !important;
        border-radius: 8px !important;
    }

    .player-controls .toggle-basic.on {
        background: #1e4d2b !important; /* Muted green for better look */
        color: #fff !important;
        border-color: #06C149 !important;
    }

    .player-controls .toggle-basic .tb-name {
        margin: 0 !important;
        display: block !important;
    }

    .player-controls .toggle-basic .tb-result {
        font-size: 8px !important;
        margin-top: 2px !important;
        opacity: 0.7 !important;
    }

    /* Row 2: Secondary Controls (Prev, Next, Fav) */
    .player-controls .pc-right {
        float: none !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-top: 5px !important;
    }

    .player-controls .pc-right .pc-item {
        margin: 0 !important;
        flex: 1 !important;
    }

    .player-controls .pc-right .btn-sm {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 5px !important;
        font-size: 12px !important;
        height: auto !important;
        background: #222 !important;
        color: #fff !important;
        border-radius: 8px !important;
        width: 100% !important;
    }

    .player-controls .pc-right .btn-sm i {
        font-size: 14px !important;
    }

    .player-controls .pc-resize {
        display: none !important;
    }

    /* Dropdown Fix */
    .player-controls .pc-fav {
        position: relative;
    }

    .player-controls .dropdown-menu.show {
        bottom: 100% !important;
        top: auto !important;
        left: auto !important;
        right: 0 !important;
        width: 200px !important;
        background: #1a1a1a !important;
        border: 1px solid #333 !important;
        border-radius: 12px !important;
        padding: 8px 0 !important;
        margin-bottom: 10px !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.8) !important;
    }
}