/* ==========================================================================
   Header Inline Styles — Extracted from header.php
   Block 1: Global overflow fix, toggle, grid system
   Block 2: Header/nav/search/dropdowns/responsive
   ========================================================================== */

/* Global Overflow Fix */
html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

#wrapper {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Custom Header Styles */
.toggle-name {
    display: inline-flex;
    background: #3a3951;
    border-radius: 4px;
    overflow: hidden;
}

.tn-btn {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s;
}

.tn-btn.active {
    background: #FFBADE;
    color: #000;
}

.header-group .anw-group {
    display: flex;
    align-items: center;
}

.btn-login {
    border-radius: 20px !important; /* overrides Bootstrap .btn border-radius */
    padding: 6px 20px !important;   /* overrides Bootstrap .btn padding */
}

/* Full Width Sections: 6 items on Desktop, Responsive downwards */
.film_list-6col .film_list-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 0;
}

.film_list.film_list-6col .film_list-wrap .flw-item,
.film_list-6col .film_list-wrap .flw-item {
    width: calc(50% - 8px);
    /* Mobile: 2 items */
    margin: 0 !important; /* overrides Bootstrap column margins */
    padding: 0;
    float: none !important; /* overrides Bootstrap float */
    box-sizing: border-box;
}

@media (min-width: 480px) {
    .film_list.film_list-6col .film_list-wrap .flw-item,
    .film_list-6col .film_list-wrap .flw-item {
        width: calc(33.33% - 11px);
        /* Small Tablet: 3 items */
    }
}

@media (min-width: 768px) {
    .film_list.film_list-6col .film_list-wrap .flw-item,
    .film_list-6col .film_list-wrap .flw-item {
        width: calc(25% - 12px);
        /* Tablet: 4 items */
    }
}

@media (min-width: 992px) {
    .film_list.film_list-6col .film_list-wrap .flw-item,
    .film_list-6col .film_list-wrap .flw-item {
        width: calc(20% - 13px);
        /* Laptop: 5 items */
    }
}

@media (min-width: 1200px) {
    .film_list.film_list-6col .film_list-wrap .flw-item,
    .film_list-6col .film_list-wrap .flw-item {
        width: calc(16.66% - 14px) !important; /* overrides Bootstrap col width */
        /* Desktop: 6 items */
    }
}

/* ==========================================================================
   Block 2: Compact header, search, nav items, dropdowns, responsive
   ========================================================================== */

/* Force compact header styles to bypass cache */
#header {
    min-height: 60px !important; /* overrides theme default height */
    height: 60px !important;
    padding: 0 !important;
    overflow: visible !important;
    /* Allow dropdowns */
}

#header .container {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 40px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Fix the large space by ensuring center alignment and no extra margins */
#header #logo {
    margin: 0 15px 0 0 !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: auto !important;
    max-width: 150px !important;
    /* Restrain logo width */
}

#header #logo img {
    height: 100% !important;
    width: auto !important;
    max-height: 30px !important;
}

/* Clearer Search Bar Modern Style */
#search {
    margin: 0 15px 0 0 !important;
    width: 380px !important;
    flex-shrink: 0 !important;
}

#search .search-content {
    background: #fff !important;
    border-radius: 4px !important;
    padding: 0 4px 0 0 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    overflow: hidden !important;
}

#search .search-content form {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    margin: 0 !important;
}

#search .search-content input.search-input {
    border: none !important;
    background: transparent !important;
    height: 34px !important;
    font-size: 13px !important;
    color: #444 !important;
    padding: 0 10px !important;
    width: 100% !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
    margin: 0 !important;
}

#search .search-content input.search-input::placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

#search .search-content .search-icon {
    background: transparent !important;
    color: #333 !important;
    border: none !important;
    font-size: 14px !important;
    padding: 0 8px !important;
    cursor: pointer !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    right: auto !important;
    top: auto !important;
    z-index: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

#search .search-content .search-icon:hover {
    color: #cae962 !important;
}

/* Filter button as a pill inside */
#search .search-content .filter-icon {
    background: #111 !important;
    color: #fff !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    padding: 0 8px !important;
    margin-right: 4px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    position: static !important;
    height: 22px !important;
    line-height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
}

#search .search-content .filter-icon:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Compact Navigation Items - Uniform Sizing */
.hst-item {
    padding: 6px 8px !important;
    min-width: 50px !important;
    border-radius: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    color: #ddd !important;
    transition: all 0.2s ease !important;
    height: auto !important;
}

/* Dropdown wrapper - no extra spacing */
.hs-toggles > .hst-item[style*="position: relative"] {
    padding: 0 !important;
    min-width: auto !important;
    margin: 0 !important;
    background: transparent !important;
}

.hs-toggles > .hst-item[style*="position: relative"] > .hst-item {
    padding: 6px 10px !important;
    min-width: 56px !important;
}

.hst-item:hover,
.hst-item.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.hst-item.active .hst-icon i,
.hst-item.active .name {
    color: #FFBADE !important;
}

.hst-item .hst-icon {
    font-size: 16px !important;
    margin-bottom: 4px !important;
    line-height: 1 !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
}

.hst-item .hst-icon i {
    font-size: 16px !important;
}

.hst-item .name {
    display: block !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    text-align: center !important;
    width: 100% !important;
}

.hst-item .name span {
    font-size: 11px !important;
    display: inline-block !important;
}

/* Language Toggle alignment - Smaller */
#en-jp-switch {
    padding: 2px 4px !important;
}

#en-jp-switch .toggle-name {
    margin-bottom: 2px !important;
    display: flex !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

#en-jp-switch .tn-btn {
    font-size: 8px !important;
    padding: 2px 6px !important;
    height: 16px !important;
    line-height: 12px !important;
    display: block !important;
}

/* Ensure Single Line Layout */
.header-setting {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.hs-toggles {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    /* Uniform small gap */
}

/* Genre Grid System - Modern 4 Column */
.genre-dropdown .genre-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px 15px !important;
    padding: 20px !important;
}

.genre-dropdown .genre-item {
    display: block !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background: rgba(255, 255, 255, 0.05) !important;
    font-weight: 500 !important;
}

.genre-dropdown .genre-item:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    z-index: 1 !important;
}

/* Responsive tweaks */
@media screen and (max-width: 1400px) {
    #search {
        width: 350px !important;
        margin-right: 10px !important;
    }

    .hst-item {
        padding: 4px 4px !important;
        min-width: 40px !important;
    }

    .hst-item .hst-icon i {
        font-size: 12px !important;
    }

    .hst-item .name span {
        font-size: 9px !important;
    }
}

@media screen and (max-width: 1200px) {
    #search {
        width: 150px !important;
    }

    .hst-item .name {
        display: none !important;
    }

    /* Hide text on smaller screens */
    .hst-item {
        min-width: 30px !important;
        padding: 6px !important;
    }

    .hst-item .hst-icon {
        margin-bottom: 0 !important;
    }

    .hst-item .hst-icon i {
        font-size: 16px !important;
    }
}

/* Dropdown Hover Fix - prevent dropdown from disappearing */
.header_menu-sub {
    top: 100% !important;
    /* Position directly below trigger */
    padding-top: 10px !important;
    /* Creates hover bridge */
    margin-top: 0 !important;
    z-index: 9999 !important;
}

/* Dropdown wrapper needs to maintain hover state */
.hs-toggles > .hst-item[style*="position: relative"]:hover .header_menu-sub,
.header_menu-sub:hover {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Add pseudo-element to bridge the gap */
.hs-toggles > .hst-item[style*="position: relative"]::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    /* Bridge height */
    background: transparent;
}

/* Genre Dropdown Styles */
.genre-dropdown {
    padding: 15px !important;
    background: #2a2a3d !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

.genre-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 15px !important;
}

.genre-item {
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 5px 0 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.genre-item:hover {
    opacity: 0.8 !important;
    transform: translateX(3px) !important;
}

/* ========== POLISHED DROPDOWN ANIMATIONS ========== */
.header_menu-sub {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none !important;
}

.hs-toggles > .hst-item[style*="position: relative"]:hover .header_menu-sub {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Dropdown menu styling */
.header_menu-sub .sub-menu {
    background: #2a2a3d !important;
    border-radius: 8px !important;
    padding: 10px 0 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
    list-style: none !important;
    margin: 0 !important;
}

.header_menu-sub .sub-menu li {
    margin: 0 !important;
}

.header_menu-sub .sub-menu li a {
    display: flex !important;
    align-items: center !important;
    padding: 10px 20px !important;
    color: #ddd !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}

.header_menu-sub .sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFBADE !important;
    padding-left: 25px !important;
}

.header_menu-sub .sub-menu li a i {
    width: 20px !important;
    text-align: center !important;
    margin-right: 10px !important;
    color: #FFBADE !important;
}

/* ========== SMART RESPONSIVE BREAKPOINTS ========== */

/* Large Desktop (1400px+) - Full navigation */
@media screen and (min-width: 1400px) {
    .hst-item {
        padding: 8px 12px !important;
        min-width: 65px !important;
    }

    .hst-item .hst-icon i {
        font-size: 18px !important;
    }

    .hst-item .name span {
        font-size: 12px !important;
    }
}

/* Medium Desktop (1200px - 1400px) - Slightly compact */
@media screen and (max-width: 1400px) and (min-width: 1200px) {
    #search {
        width: 350px !important;
    }

    .hst-item {
        padding: 5px 6px !important;
        min-width: 50px !important;
    }

    .hst-item .hst-icon i {
        font-size: 15px !important;
    }

    .hst-item .name span {
        font-size: 10px !important;
    }
}

/* Small Desktop / Tablet Landscape (992px - 1200px) - Icon only mode */
@media screen and (max-width: 1200px) and (min-width: 992px) {
    #search {
        width: 300px !important;
    }

    .hst-item .name {
        display: none !important;
        /* Hide text labels */
    }

    .hst-item {
        min-width: 36px !important;
        padding: 8px !important;
    }

    .hst-item .hst-icon {
        margin-bottom: 0 !important;
    }

    .hst-item .hst-icon i {
        font-size: 16px !important;
    }

    .genre-dropdown {
        width: 280px !important;
        left: -110px !important;
    }
}

/* Tablet / Mobile (below 992px) - Show hamburger, hide desktop nav */
@media screen and (max-width: 991px) {

    /* Show hamburger menu */
    #mobile_menu {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 1 !important;
        width: 40px !important;
        height: 40px !important;
        margin-right: 10px !important;
        cursor: pointer !important;
        font-size: 20px !important;
        color: #fff !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        transition: all 0.2s ease !important;
    }

    #mobile_menu:hover {
        background: rgba(255, 255, 255, 0.15) !important;
    }

    /* Hide desktop navigation */
    .header-setting {
        display: none !important;
    }

    /* Adjust logo */
    #header #logo {
        order: 2 !important;
        margin-right: 10px !important;
    }

    /* Hide full search on mobile */
    #search {
        display: none !important;
    }

    /* Mobile search icon - push to right */
    #mobile_search {
        display: flex !important;
        order: 3 !important;
        margin-left: auto !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }

    /* Mobile search overlay when active - High Specificity */
    #header #search.mobile-active {
        display: block !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        background: #2a2a4a !important;
        padding: 10px 12px !important;
        z-index: 9999 !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #header #search.mobile-active .search-content {
        background: transparent !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    #header #search.mobile-active .search-content form {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 10px !important;
        align-items: center !important;
        position: relative !important;
        height: 42px !important;
    }

    /* Filter icon - Left side, dark purple */
    #header #search.mobile-active .filter-icon {
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        background: #3d3d5c !important;
        border-radius: 6px !important;
        color: #fff !important;
        font-size: 16px !important;
        text-decoration: none !important;
        flex-shrink: 0 !important;
        border: none !important;
    }

    #header #search.mobile-active .filter-icon::before,
    #header #search.mobile-active .filter-icon::after {
        content: none !important;
        display: none !important;
    }

    #header #search.mobile-active .filter-icon i {
        color: #fff !important;
        font-size: 16px !important;
    }

    /* Search input - Middle, white background */
    #header #search.mobile-active input.search-input {
        order: 2 !important;
        display: block !important;
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        background-color: #ffffff !important;
        background-image: none !important;
        border: none !important;
        color: #333333 !important;
        padding: 0 45px 0 15px !important;
        border-radius: 6px !important;
        font-size: 14px !important;
        line-height: 42px !important;
        height: 42px !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        visibility: visible !important;
        appearance: none !important;
        box-shadow: none !important;
    }

    #header #search.mobile-active input.search-input::placeholder {
        color: #999 !important;
        opacity: 1 !important;
    }

    /* Search icon - Inside input right side */
    #header #search.mobile-active button.search-icon {
        order: 3 !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        width: 45px !important;
        height: 42px !important;
        background: transparent !important;
        color: #666 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 18px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 5 !important;
    }

    /* Ensure mobile_search is visible and clickable */
    #mobile_search {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        color: #fff !important;
        font-size: 20px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        transition: all 0.2s ease !important;
        z-index: 10 !important;
    }

    #mobile_search:hover {
        background: rgba(255, 255, 255, 0.15) !important;
    }
}

/* Mobile Portrait (below 576px) - Redesigned header */
@media screen and (max-width: 575px) {
    #header {
        height: 50px !important;
        min-height: 50px !important;
    }

    #header .container {
        padding: 0 12px !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        height: 50px !important;
        min-height: 50px !important;
    }

    /* Hamburger on left — force out of absolute */
    #mobile_menu {
        order: 1 !important;
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    /* Logo next to hamburger */
    #header #logo {
        order: 2 !important;
        height: 28px !important;
        max-width: 110px !important;
        margin: 0 0 0 8px !important;
        padding: 0 !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        position: static !important;
    }

    #header #logo img {
        max-height: 28px !important;
    }

    /* Search icon pushed to right */
    #search {
        order: 3 !important;
        margin-left: auto !important;
        position: static !important;
        width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }

    #search .search-content {
        background: transparent !important;
        box-shadow: none !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 0 !important;
        padding: 0 !important;
        justify-content: center !important;
        position: static !important;
    }

    #search .search-content form {
        width: 34px !important;
        height: 34px !important;
        position: relative !important;
    }

    #search .search-content input.search-input {
        display: none !important;
    }

    #search .search-content .search-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 18px !important;
        color: #fff !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
    }

    #search .search-content .filter-icon {
        display: none !important;
    }
}




/* ─── HiAnime Auth Modal Styles ─── */
.auth-modal-dialog {
    max-width: 420px;
    margin: 1.75rem auto;
}
/* ─── Modal Header & Close Button Fix ─── */
.auth-modal-content {
    background: #11141d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
    position: relative;
    overflow: hidden;
}
/* Close button ko top-right par alag space di gayi hai */
.auth-modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    color: #94a3b8 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    cursor: pointer !important;
    z-index: 20 !important;
    transition: 0.2s ease !important;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

/* Tabs ko close button ke neeche shift karne ke liye padding-top 44px kiya */
.auth-modal-header {
    padding: 44px 20px 0 20px !important;
}

.auth-tabs-nav {
    display: flex;
    background: #1b1f2d;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    width: 100%;
}
.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 0;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.auth-tab-btn.active {
    background: #ffbade;
    color: #0f1422;
}

.auth-modal-body {
    padding: 20px 24px 26px 24px;
}
.auth-tab-pane {
    display: none;
}
.auth-tab-pane.active {
    display: block;
    animation: fadeInTab 0.25s ease-in-out;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form-group {
    margin-bottom: 14px;
}
.auth-form-group label {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon i {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 13px;
}
.auth-input {
    width: 100%;
    background: #1b1f2d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 14px 10px 38px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: 0.15s;
}
.auth-input:focus {
    border-color: #ffbade;
    box-shadow: 0 0 0 2px rgba(255, 186, 222, 0.15);
}
.auth-link-sm {
    color: #94a3b8;
    font-size: 11.5px;
    text-decoration: none;
}
.auth-link-sm:hover { color: #ffbade; }

.auth-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 16px;
}
.custom-check-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.custom-check-label input { cursor: pointer; }

.btn-auth-submit {
    width: 100%;
    background: #ffbade;
    color: #0f1422;
    border: none;
    border-radius: 6px;
    padding: 11px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-auth-submit:hover {
    background: #f3a3cf;
}
.auth-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    margin-bottom: 14px;
}
.auth-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.auth-alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* User Profile in Header */
.user-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1b1e28;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px 4px 5px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    text-decoration: none !important;
}
.user-avatar-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.btn-open-login {
    background: #ffbade;
    color: #0f1422 !important;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 15px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.btn-open-login:hover { background: #f3a3cf; }
/* ─── HiAnime Dedicated Modal Overlay (Bypasses Bootstrap Conflicts) ─── */
.hianime-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hianime-modal-overlay.show-modal {
    visibility: visible !important;
    opacity: 1 !important;
}

.hianime-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px);
    z-index: 1 !important;
}

.hianime-modal-dialog {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 410px !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hianime-modal-overlay.show-modal .hianime-modal-dialog {
    transform: scale(1);
}
/* ─── Header Outer Container ─── */
.header-container-mobile {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
    height: 100% !important;
}

.header-left-box {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.btn-mobile-nav {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 19px !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: none;
}

.header-brand-logo {
    display: flex !important;
    align-items: center !important;
}

.header-brand-logo img {
    height: 30px !important;
    width: auto !important;
}

/* ─── Right Action Box (Search + Login) ─── */
.header-right-box {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.btn-mobile-search-trigger {
    display: none;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 17px !important;
    padding: 4px 6px !important;
    cursor: pointer !important;
}

.desktop-nav-area {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    justify-content: space-between !important;
    margin: 0 20px !important;
}

/* ─── Mobile Dropdown Search Drawer ─── */
.mobile-search-drawer {
    display: none;
    background: #161822;
    padding: 8px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    z-index: 998;
}

.mobile-search-drawer.active {
    display: block;
}

.mobile-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-input {
    width: 100%;
    background: #1e2230;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 38px 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}

.btn-mobile-search-submit {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
}

/* ==========================================================================
   STRICT MOBILE BREAKPOINT (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
    #header {
        height: 54px !important;
        min-height: 54px !important;
    }

    .btn-mobile-nav {
        display: flex !important;
    }

    .desktop-nav-area {
        display: none !important; /* Hide search and nav links from row */
    }

    .btn-mobile-search-trigger {
        display: flex !important; /* Show search icon next to login */
    }

    .header-brand-logo img {
        height: 26px !important;
    }

    /* Aniwatch pill login button */
    .btn-open-login {
        padding: 5px 16px !important;
        font-size: 12.5px !important;
        border-radius: 6px !important; /* Rectangular pill with slight curve */
        font-weight: 700 !important;
    }

    .user-name-txt {
        display: none !important; /* Mobile par sirf avatar dikhe taake spacing kharab na ho */
    }
}
/* ─── Profile Wrapper & Right Alignment ─── */
.header-right-box {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
}

.auth-profile-wrap {
    position: relative !important;
    display: inline-block !important;
}

.profile-details {
    position: relative !important;
    padding: 0 !important;
    background: transparent !important;
}

.user-avatar-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #1b1e28 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 3px 10px 3px 4px !important;
    border-radius: 20px !important;
    color: #fff !important;
    cursor: pointer !important;
    list-style: none !important;
    outline: none !important;
}

.user-avatar-btn img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.user-name-txt {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
}

.profile-arrow {
    font-size: 10px !important;
    color: #94a3b8 !important;
}

/* ─── Dropdown Menu Position Fix (Anchor to Right Corner) ─── */
.profile-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    width: 210px !important;
    z-index: 99999 !important;
    transform: none !important;
}

.profile-details[open] > .profile-dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.profile-dropdown-menu .sub-menu {
    background: #161822 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 6px 0 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8) !important;
    list-style: none !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.profile-header-info {
    padding: 8px 16px !important;
    display: flex !important;
    flex-direction: column !important;
}

.phi-name {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.phi-email {
    font-size: 11px !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.profile-divider {
    height: 1px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    margin: 4px 0 !important;
}

.profile-dropdown-menu .sub-menu li a {
    display: flex !important;
    align-items: center !important;
    padding: 8px 16px !important;
    color: #cbd5e1 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    background: transparent !important;
    transition: 0.15s ease !important;
}

.profile-dropdown-menu .sub-menu li a:hover {
    background: rgba(255, 186, 222, 0.08) !important;
    color: #ffbade !important;
}

.logout-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    padding: 8px 16px !important;
    background: transparent !important;
    border: none !important;
    color: #f87171 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: 0.15s ease !important;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Mobile adjust */
@media (max-width: 991px) {
    .user-name-txt {
        display: none !important;
    }
}
/* ─── HiAnime Floating Toast Notification ─── */
.ha-toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.ha-toast {
    pointer-events: auto;
    background: #181b24;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 360px;
    font-size: 13.5px;
    font-weight: 500;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ha-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.ha-toast-success {
    border-left: 4px solid #ffbade;
}

.ha-toast-success .toast-icon {
    color: #ffbade;
    font-size: 18px;
}

.ha-toast-danger {
    border-left: 4px solid #ef4444;
}

.ha-toast-danger .toast-icon {
    color: #ef4444;
    font-size: 18px;
}

.ha-toast-info {
    border-left: 4px solid #38bdf8;
}

.ha-toast-info .toast-icon {
    color: #38bdf8;
    font-size: 18px;
}

/* Default State: Dark Subtle Button */
.btn-watchlist-default {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
    transition: all 0.2s ease !important;
}

.btn-watchlist-default i {
    color: #ffbade !important;
}

.btn-watchlist-default:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
}

/* Active State: Anime Already in Watchlist */
.btn-watchlist-active {
    background: #ffbade !important;
    border: 1px solid #ffbade !important;
    color: #0f1422 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(255, 186, 222, 0.25) !important;
    transition: all 0.2s ease !important;
}

.btn-watchlist-active i {
    color: #0f1422 !important;
}

.btn-watchlist-active:hover {
    background: #ff9ecf !important;
    border-color: #ff9ecf !important;
    color: #000 !important;
}
