/* Custom CSS cho Motchilltv Theme */

/* ===== Font & Variables (y hệt motchillv.mom) ===== */
:root {
    --color-primary: #d1ff95;
    --font-montserrat: 'Montserrat', sans-serif;
}

html, body {
    font-family: var(--font-montserrat) !important;
    background: #191b24 !important;
}

@media (max-width: 640px) {
    .logo {
        width: 120px !important;
    }
}

/* Model Tabs (y hệt motchillv.mom) */
.model-tabs {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: .5rem;
    padding: 2px;
    font-size: 14px;
    font-weight: 400;
}
.model-tabs .item {
    font-size: 12px;
    height: 26px;
    padding: 0 .5rem;
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.model-tabs .item.active {
    background-color: #fff;
    color: #000;
}

/* Section Heading Gradient */
.section-heading {
    font-size: 18px;
    line-height: 32px;
    font-weight: 700;
    padding: 0;
    margin: 0;
    background: linear-gradient(90deg, #00ffe8, #d1ff95);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Mega Menu */
.navItem {
    position: relative;
    list-style: none;
}

.megaMenu {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 130;
    margin-top: 20px;
    width: 420px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(15, 17, 26, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s linear;
}

.megaMenu:after {
    content: "";
    height: 20px;
    left: 0;
    position: absolute;
    top: -20px;
    width: 100%;
}

.navItem .megaMenu.is-open {
    opacity: 1;
    pointer-events: inherit;
}

.mega-item {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    color: white;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
    background-size: 0% 100%;
    background-position: left;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease-out, color 0.3s ease-out;
}

.mega-item:hover {
    background-size: 100% 100%;
    color: #d1ff95;
}

/* Swiper */
.swiper-pagination-bullet {
    background-color: #8a898a !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet-active {
    background: #f3f4f6 !important;
    border-radius: 5px !important;
    width: 17px !important;
}

.swiper-pagination {
    text-align: end !important;
    bottom: 0 !important;
}

/* Custom Scrollbar */
.scroll-customer-dropdown::-webkit-scrollbar {
    width: 7px;
}

.scroll-customer-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.scroll-customer-dropdown::-webkit-scrollbar-thumb {
    background: #424040;
    border-radius: 2px;
}

/* Hide scrollbar but keep scrollable */
.hide-scrollbar::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar,
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Pagination */
.pagination-container {
    column-gap: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.paginate-buttons {
    background-color: #414144;
    border: 1px solid #414144;
    border-radius: 5px;
    color: #d8d8d8;
    cursor: pointer;
    font-size: 14px;
    height: 35px;
    width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.paginate-buttons:hover {
    background-color: #18181b;
}

.active-page {
    border: 1px solid #d1ff95;
    color: #fff;
}

.active-page,
.active-page:hover {
    background-color: #d1ff95;
}

/* Ẩn admin bar background trên frontend */
body.admin-bar {
    margin-top: 0 !important;
}

/* WP admin bar override */
#wpadminbar {
    background: #1a1a1a !important;
}

/* Tab active highlight */
.tab-active {
    background-color: #d1ff95;
}

/* Episode buttons */
.episode-btn {
    transition: all 0.15s ease;
}

.episode-btn:hover {
    background-color: #d1ff95;
    color: white;
}

.episode-btn.active {
    background-color: #d1ff95;
    color: white;
}

/* Server button */
.server-btn.active {
    background-color: #d1ff95;
    color: white;
    border-color: #d1ff95;
}

/* Lights off mode - using fixed z-20 overlay like original */
/* The overlay and z-index are handled inline via JS */

/* Star rating */
.star-rating .star {
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #fbbf24;
}

/* Filter dropdown */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown.open .filter-dropdown-content {
    display: block;
}

/* Theo dõi (bookmark) button */
.theodoi {
    background-color: #ffffff;
    border-radius: 9999px;
    padding: 8px 24px;
    transition: background-color 0.2s;
}

.theodoi:hover {
    background-color: #e4e4e7;
}

.theodoi[data-saved="1"] {
    background-color: #d1ff95;
    color: #000000;
}

.theodoi[data-saved="1"]:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Fix Tailwind CDN potential conflicts */
img {
    max-width: 100%;
    height: auto;
}

/* Breadcrumb separator */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 8px;
    color: #71717a;
}

/* ===== Ads: Catfish / Popup / Banner ===== */
.sspp-area {
    position: relative;
    width: 100%;
    z-index: 8;
    gap: 4px;
}

.sspp-area.is-wide {
    max-width: 100%;
    width: 100%;
    padding: 0 1rem;
}

.sspp-area,
.sspp-area .display-single {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sspp-area .display-single {
    width: 100%;
    height: 100%;
}

.sspp-area.is-wide .display-single.is-demo {
    max-width: 900px;
}

.sspp-area .display-single .is-image {
    display: block;
    width: 100%;
}

.sspp-area .display-single .is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Catfish Top */
.sspp-area.is-wide.is-catfish-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0;
    flex-direction: column;
    z-index: 1050;
}

/* Catfish Bottom */
.sspp-area.is-wide.is-catfish {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0;
    flex-direction: column;
    z-index: 1050;
}

/* Close button */
.sspp-area .close-it {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 5;
    cursor: pointer;
    opacity: .5;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .5rem;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: .4rem;
}

.sspp-area .close-it:hover {
    opacity: 1;
}

/* Popup square */
.sspp-area.is-square-400 {
    max-width: 400px;
    margin: 0 auto;
}

.sspp-area.is-square-400 .display-single {
    max-width: 400px;
}

/* Popup modal */
.sspp-modal {
    z-index: 1060 !important;
}

.sspp-modal .sspp-area.is-square-400 {
    max-width: 100%;
}

.sspp-modal .sspp-area.is-square-400 .display-single {
    max-width: 100%;
}

.sspp-modal .sspp-area .is-image img {
    width: 100%;
    height: auto;
}

/* Body padding when catfish visible */
body.has-catfish-top {
    padding-top: 110px;
}

body.has-catfish-bottom {
    padding-bottom: 110px;
}

/* ===== Movie Card Hover Popup ===== */
#mc-popup {
    position: fixed !important;
    z-index: 9999 !important;
    width: 288px;
    background: rgba(63,63,70,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 20px 40px -8px rgba(0,0,0,0.7);
    display: none;
    pointer-events: auto !important;
    color: #d4d4d8;
    font-size: 12px;
    line-height: 1.4;
}
#mc-popup.is-visible { display: block; }

#mc-popup h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#mc-popup .mc-pop-arrow {
    position: absolute;
    bottom: -7px;
    width: 14px;
    height: 7px;
    overflow: hidden;
}
#mc-popup .mc-pop-arrow svg { display: block; }

/* Badges */
#mc-popup .mc-pop-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}
#mc-popup .mc-pop-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 20px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
    border-radius: 3px;
}
#mc-popup .mc-pop-badge-q   { background: #ffd785; color: #18181b; }
#mc-popup .mc-pop-badge-ep  { background: rgba(255,255,255,0.1); color: #fff; }
#mc-popup .mc-pop-badge-year{ background: #fff; color: #18181b; }
#mc-popup .mc-pop-badge-vs  { background: #a7f3d0; color: #000; }
#mc-popup .mc-pop-badge-tm  { background: #fbcfe8; color: #000; }
#mc-popup .mc-pop-badge-lt  { background: #fde68a; color: #000; }

/* Description */
#mc-popup .mc-pop-desc-wrap { margin-bottom: 8px; font-size: 12px; }
#mc-popup .mc-pop-desc-wrap .lbl { color: #a1a1aa; }
#mc-popup .mc-pop-desc-wrap .txt {
    color: #d4d4d8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta */
#mc-popup .mc-pop-meta { margin-bottom: 10px; font-size: 12px; }
#mc-popup .mc-pop-meta p { line-height: 1.75; }
#mc-popup .mc-pop-meta .lbl { color: #a1a1aa; }
#mc-popup .mc-pop-meta .txt { color: #d4d4d8; }

/* Actions */
#mc-popup .mc-pop-actions { display: flex; align-items: center; gap: 8px; }
#mc-popup .mc-pop-btn-watch {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    background: #d1ff95;
    color: #18181b !important;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    letter-spacing: -0.01em;
    transition: box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(209,255,149,0.2);
    border: none;
    cursor: pointer;
}
#mc-popup .mc-pop-btn-watch:hover { box-shadow: 0 4px 20px rgba(209,255,149,0.4); color: #18181b !important; }
#mc-popup .mc-pop-btn-watch .play-wrap {
    width: 20px; height: 20px;
    background: #000;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
#mc-popup .mc-pop-btn-watch .play-wrap svg { width: 8px; height: 8px; }
#mc-popup .mc-pop-pill {
    display: flex;
    align-items: center;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    overflow: hidden;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
#mc-popup .mc-pop-pill:hover { border-color: rgba(255,255,255,0.9); }
#mc-popup .mc-pop-pill-btn {
    width: 48px; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    background: none; border: none; cursor: pointer;
    transition: color 0.15s;
}
#mc-popup .mc-pop-pill-btn:first-child { border-right: 1.5px solid rgba(255,255,255,0.1); }
#mc-popup .mc-pop-pill-btn:hover { color: #ffd785; }
#mc-popup a.mc-pop-pill-btn { text-decoration: none; }

/* Mobile responsive */
@media (max-width: 768px) {
    .sspp-area.is-catfish-top,
    .sspp-area.is-catfish {
        display: block;
        min-height: 40px;
    }

    .sspp-area .is-image img {
        max-height: 60px;
    }

    .sspp-modal .sspp-area .is-image img {
        max-height: none;
        width: 100%;
        height: auto;
    }

    body.has-catfish-top {
        padding-top: 60px;
    }

    body.has-catfish-bottom {
        padding-bottom: 60px;
    }
}

/* ===== Mobile Sidebar Submenu Gradient Hover (y hệt motchillv.mom) ===== */
.mc-sub-item {
    background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.12)) left / 0% 100% no-repeat;
    transition: background-size 0.3s ease-out, color 0.3s ease-out;
}
.mc-sub-item:hover {
    background-size: 100% 100%;
}

/* ===== Mobile Sidebar Quick Buttons Gradient Hover ===== */
.mc-quick-btn {
    background-image: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.12));
    background-size: 0% 100%;
    background-position: left;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease-out, color 0.3s ease-out, background-color 0.3s ease-out;
}
.mc-quick-btn:hover {
    background-size: 100% 100%;
    background-color: rgba(255,255,255,0.1);
}

/* ===== Body Load / Splash Screen (motchillv.mom) ===== */
.body-load {
    z-index: 99999;
    background: #191b24;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    display: flex;
    position: fixed;
    inset: 0;
}
.body-load .bl-logo {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    width: min(520px, 100vw - 48px);
    animation: 2.3s forwards default-logo-load;
    display: flex;
}
.body-load .bl-logo img {
    width: min(360px, 78vw);
    height: auto;
    display: block;
}
.body-load .text-h1 {
    color: #ffffffb8;
    letter-spacing: -.02em;
    max-width: 720px;
    font-size: clamp(18px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}
@keyframes default-logo-load {
    0%   { opacity: 0; transform: translateY(10px) scale(.96); }
    25%  { opacity: 1; transform: translateY(0) scale(1); }
    82%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-8px) scale(.92); }
}

/* ===== V-Loader (motchillv.mom) ===== */
.v-loader-area {
    justify-content: center;
    align-items: center;
    height: 200px;
    padding: 0 3rem;
    display: flex;
    position: relative;
}
.v-loader-area.fixed {
    background-color: #ffffff05;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}
.v-loader {
    aspect-ratio: 1;
    --c: no-repeat linear-gradient(#5b5d68 0 0);
    background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
    background-size: 20% 100%;
    border-radius: 50%;
    width: 45px;
    animation: 1s linear infinite l1;
    transform: scale(.9);
}
@keyframes l1 {
    0%   { background-size: 20% 100%, 20% 100%, 20% 100%; }
    33%  { background-size: 20% 10%,  20% 100%, 20% 100%; }
    50%  { background-size: 20% 100%, 20% 10%,  20% 100%; }
    66%  { background-size: 20% 100%, 20% 100%, 20% 10%;  }
    100% { background-size: 20% 100%, 20% 100%, 20% 100%; }
}

/* ===== Spotlight / Hero (motchillv.mom) ===== */
.spotlight {
    background-color: #191b24;
    position: relative;
    overflow: hidden;
}
.spotlight-overlay {
    z-index: 1;
    background:
        radial-gradient(circle at 130%, #191b2400 50%, #191b2480 60%, #191b24 80% 100%),
        linear-gradient(#191b2400 0% 80%, #191b24 100%),
        linear-gradient(270deg, #191b24 0%, #191b2400 20% 100%),
        linear-gradient(#191b24 0%, #191b2400 20% 100%);
    width: 100.1%;
    height: 100.1%;
    position: absolute;
    inset: 0;
}
@media (max-width: 1024px) {
    .spotlight-overlay {
        background:
            linear-gradient(#191b244d 0% 50%, #191b24cc 80%, #191b24 100%),
            linear-gradient(90deg, #191b24cc 0%, #191b2400 50%);
    }
}

/* ===== Hero Slide (motchillv.mom) ===== */
.hero-slide-banner { width: 100%; height: 100%; position: relative; }
.hero-slide-content {
    z-index: 10;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    width: 100%;
    padding: 1rem;
    transition: all .7s ease-in-out;
    display: flex;
    position: absolute;
    inset: 0;
}
@media (min-width: 640px)  { .hero-slide-content { width: 70%; } }
@media (min-width: 1024px) { .hero-slide-content { justify-content: flex-end; padding-bottom: 4rem; padding-left: 3rem; padding-right: 3rem; } }
@media (min-width: 1280px) { .hero-slide-content { width: 50%; padding-bottom: 2.5rem; } }

.hero-slide-content-active   { opacity: 1; transform: translate(0); }
.hero-slide-content-inactive { opacity: 0; transform: translate(-2.5rem); }
.hero-slide-inner { width: 100%; padding-top: .5rem; padding-bottom: .5rem; }
.hero-slide-tags-wrapper {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: .5rem;
    font-size: 10px;
    display: flex;
}
@media (min-width: 768px)  { .hero-slide-tags-wrapper { display: flex; } }
@media (min-width: 1024px) { .hero-slide-tags-wrapper { gap: 2rem; font-size: .75rem; } }
.hero-slide-tags-row {
    color: #fff;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: .5rem .75rem;
    font-weight: 400;
    display: flex;
}
@media (min-width: 768px) { .hero-slide-tags-row { gap: 1rem; } }
.hero-slide-description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    color: #e5e7eb;
    -webkit-box-orient: vertical;
    min-height: 60px;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.5rem;
    display: -webkit-box;
    overflow: hidden;
}

/* ===== Button Prev/Next & Touch Group (motchillv.mom) ===== */
.button-prev, .button-next {
    color: #fff;
    cursor: pointer;
    background-color: #383747;
    border-radius: 7px;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    transition: all .3s ease-out;
    display: flex;
}
.button-prev:hover, .button-next:hover {
    background-color: var(--color-primary);
    color: #383747;
}
.touch-group {
    border-radius: 60px;
    align-items: center;
    height: 52px;
    transition: all .3s;
    display: flex;
    overflow: hidden;
    background: transparent !important;
    border: 1.5px solid rgba(255,255,255,0.2) !important;
}
.touch-group:hover { border-color: rgba(255,255,255,0.9) !important; }
.touch-group .item {
    color: #fff;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 100%;
    transition: all .2s;
    display: flex;
}
.touch-group .item:hover { color: var(--color-primary) !important; }
.touch-group .item:first-child { border-right: 1.5px solid rgba(255,255,255,0.1) !important; }
.inc-icon { pointer-events: none; justify-content: center; align-items: center; display: flex; }

/* ===== Hero Slider Pagination Mobile (motchillv.mom) ===== */
@media (max-width: 1023px) {
    .hero-slider-section .swiper-pagination,
    .hero-slider-section .swiper-pagination-horizontal {
        z-index: 30 !important;
        flex-direction: column !important;
        gap: .85rem !important;
        width: auto !important;
        display: flex !important;
        position: absolute !important;
        inset: 50% 1.5rem auto auto !important;
        transform: translateY(-50%) !important;
    }
    .hero-slider-section .swiper-pagination .swiper-pagination-bullet,
    .hero-slider-section .swiper-pagination-horizontal .swiper-pagination-bullet {
        cursor: pointer;
        border-radius: 50%;
        width: 8px;
        height: 8px;
        transition: all .3s;
        opacity: 1 !important;
        background-color: #9ca3af !important;
        margin: 0 !important;
    }
    .hero-slider-section .swiper-pagination .swiper-pagination-bullet-active,
    .hero-slider-section .swiper-pagination-horizontal .swiper-pagination-bullet-active {
        transform: scale(1.3);
        background-color: var(--color-primary) !important;
    }
}
@media (min-width: 1024px) {
    .hero-slider-section .swiper-pagination,
    .hero-slider-section .swiper-pagination-horizontal {
        display: none !important;
    }
}

/* Mobile search icon */
#mobile_search { margin: 10px 5px; }
#mobile_search i { font-size: 20px; line-height: 30px; height: 30px; display: inline-block; }
