/* ==========================================================================
   MHEnt. CINEMA THEME (THE CHERRY BLOSSOM EDITION - V2.0 PRO MAX)
   Đặc trị: Fix lỗi che Hero, Chuẩn hóa Search PC, Lưới Mobile 2 cột & Dọn Navbar
   ========================================================================== */

:root { 
    --hub-color: #ff85a2; 
    --hub-bg: rgba(255, 133, 162, 0.15); 
}

/* ==============================================================
   1. SỬA LỖI NAVBAR CHE HERO SECTION (BÙ KHOẢNG TRỐNG VẬT LÝ)
   ============================================================== */
.hero { 
    /* Đẩy toàn bộ Hero xuống 70px để né Navbar cố định trên PC */
    margin-top: 70px !important; 
    padding: 60px 5% 50px 5% !important; 
    text-align: center; 
    background: linear-gradient(135deg, rgba(255, 133, 162, 0.18) 0%, rgba(255, 92, 138, 0.03) 100%); 
    border-bottom: 1px solid var(--border-color); 
    box-sizing: border-box;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, rgba(255, 133, 162, 0.12) 0%, rgba(15, 23, 42, 1) 100%); 
}

.hero h1 { font-size: 38px; color: var(--text-primary); margin: 0 0 10px 0; font-weight: 900; }
.hero h1 span { color: var(--hub-color); }
.small-description { font-size: 15px; color: var(--text-secondary); margin: 0 0 30px 0; font-weight: 700; display: block; }

/* ==============================================================
   2. SỬA LỖI THANH TÌM KIẾM "PHIM ĐANG CHIẾU" TRÊN PC
   ============================================================== */
#search-box {
    width: 100% !important; 
    padding: 14px 45px 14px 45px !important; /* Chừa chỗ cho icon kính lúp và nút xóa */
    border-radius: 30px !important; 
    border: 2px solid rgba(255, 133, 162, 0.4) !important; 
    outline: none !important; 
    font-family: 'Nunito', sans-serif !important; 
    font-size: 15.5px !important; 
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    background: var(--bg-glass-strong, #ffffff) !important; 
    box-shadow: 0 8px 25px rgba(255, 133, 162, 0.08) !important; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-sizing: border-box !important;
}

#search-box:focus { 
    border-color: var(--hub-color) !important; 
    background: #ffffff !important; 
    box-shadow: 0 8px 30px rgba(255, 133, 162, 0.25) !important; 
    transform: translateY(-2px);
}

#search-box::placeholder {
    color: var(--text-muted, #94a3b8) !important;
    font-weight: 600 !important;
}

body.dark-mode #search-box { 
    background: rgba(30, 41, 59, 0.9) !important; 
    border-color: rgba(255, 133, 162, 0.4) !important; 
    color: #ffffff !important; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode #search-box:focus { 
    background: #0f172a !important; 
    border-color: var(--hub-color) !important; 
    box-shadow: 0 8px 30px rgba(255, 133, 162, 0.3) !important;
}

/* Căn chỉnh lại icon kính lúp và nút xóa trong khung search */
.filter-section .main-search-icon {
    position: absolute !important; left: 16px !important; top: 50% !important; 
    transform: translateY(-50%) !important; color: var(--hub-color) !important; pointer-events: none;
}
.filter-section .search-clear-btn {
    position: absolute !important; right: 16px !important; top: 50% !important; 
    transform: translateY(-50%) !important; color: var(--text-muted) !important; 
    cursor: pointer !important; padding: 4px; transition: 0.2s;
}
.filter-section .search-clear-btn:hover { color: #ef4444 !important; transform: translateY(-50%) scale(1.15) !important; }

/* ==============================================================
   3. CHUẨN HÓA NÚT LỌC PHIM (FILTER TAGS VECTOR)
   ============================================================== */
.filter-btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; 
    padding: 8px 18px; border: 1px solid var(--hub-color); background: transparent; 
    color: var(--hub-color); border-radius: 20px; font-weight: bold; cursor: pointer; 
    transition: 0.3s; font-family: 'Nunito', sans-serif; font-size: 13.5px; 
}
.filter-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.filter-btn:hover { background: rgba(255, 133, 162, 0.1); transform: translateY(-2px); }
.filter-btn.active { 
    background: var(--hub-color); color: #fff; 
    box-shadow: 0 4px 12px rgba(255, 133, 162, 0.4); border-color: var(--hub-color); 
}
body.dark-mode .filter-btn { border-color: var(--hub-color); color: var(--hub-color); }
body.dark-mode .filter-btn.active { background: var(--hub-color); color: #0f172a; font-weight: 900; }

/* Tinh chỉnh icon trong App Switcher */
.app-icon svg { width: 26px; height: 26px; stroke-width: 1.5; transition: 0.3s; }
.app-item:hover .app-icon svg { transform: scale(1.1); }
body.dark-mode .app-icon svg { color: #e2e8f0; }

/* ==========================================================================
   4. TỐI ƯU HÓA MOBILE (SMARTPHONES < 768px) - TRỊ LỖI POSTER TO & DỌN NAVBAR
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* --- A. DỌN DẸP NAVBAR MOBILE CHO THOÁNG --- */
    .hero { 
        margin-top: 55px !important; /* Bù Navbar mobile cao 55px */
        padding: 35px 15px 25px 15px !important; 
    }
    .hero h1 { font-size: 26px !important; }
    .small-description { font-size: 13.5px !important; margin-bottom: 20px !important; }

    /* Thu gọn Menu chuyển ứng dụng (App Switcher) không bị tràn viền */
    .dropdown-menu.app-switcher-menu {
        width: calc(100vw - 30px) !important;
        right: -50px !important;
        max-width: 300px !important;
    }

    /* --- B. TRỊ LỖI POSTER KHỔNG LỒ -> CHUYỂN THÀNH LƯỚI 2 CỘT GỌN GÀNG --- */
    #current-anime .movie-list,
    #movie-list-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Ép chia chính xác 2 cột đều nhau */
        gap: 12px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* Thẻ phim gọn gàng vừa vặn trong 1 ô lưới */
    #current-anime .movie-card,
    #movie-list-container .movie-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Ép tỷ lệ ảnh poster chuẩn 2:3 không bị méo hay phình to */
    #current-anime .anime-poster,
    #movie-list-container .anime-poster {
        width: 100% !important;
        aspect-ratio: 2 / 3 !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }

    /* Tinh chỉnh lại chữ thông tin dưới poster cho dễ đọc */
    .movie-info { padding-top: 8px !important; }
    .movie-info h3 { font-size: 13.5px !important; line-height: 1.3 !important; margin-bottom: 4px !important; }
    .movie-info p { font-size: 11px !important; margin-bottom: 6px !important; }
    .watch-link { font-size: 12px !important; }

    /* --- C. TRỊ LỖI THẺ "TIẾP TỤC XEM" BỊ TO THÙ LÙ --- */
    #continue-watching-container .cw-card {
        flex-direction: column !important; /* Chuyển thành xếp chồng dọc */
        padding: 15px !important;
        gap: 12px !important;
    }

    #continue-watching-container .cw-poster {
        width: 100% !important;
        max-width: 100% !important;
        height: 160px !important; /* Cắt thành ảnh ngang banner cực đẹp */
        aspect-ratio: auto !important;
        object-fit: cover !important;
        object-position: center 20% !important; /* Lấy phần tâm đẹp nhất của poster */
        border-radius: 12px !important;
    }

    #continue-watching-container .cw-info {
        width: 100% !important;
        text-align: left !important;
    }

    #continue-watching-container .cw-title { font-size: 18px !important; }
    #continue-watching-container .cw-subtitle { font-size: 13px !important; margin-bottom: 10px !important; }
    #continue-watching-container .cw-progress-row { margin-bottom: 12px !important; }
    #continue-watching-container .cw-action { width: 100% !important; justify-content: center !important; }
}

/* ==============================================================
   5. MÀN HÌNH SIÊU NHỎ (< 380px - iPhone SE/Mini)
   ============================================================== */
@media screen and (max-width: 380px) {
    #current-anime .movie-list,
    #movie-list-container {
        gap: 8px !important;
    }
    .movie-info h3 { font-size: 12.5px !important; }
    .filter-btn { padding: 6px 12px; font-size: 12px; }
}

@media screen and (max-width: 768px) {
    /* ⚡ DỌN SẠCH NAVBAR ĐỈNH TRÊN MOBILE: 
       Nút Hồ Sơ ở Bottom Nav đã làm nhiệm vụ mở Drawer, nên ẩn hết các nút thừa! */
    .navbar .menu-toggle,           /* Ẩn nút Hamburger */
    .navbar .user-profile,          /* Ẩn cụm Avatar Profile */
    #nav-search-wrapper,            /* Ẩn kính lúp tìm kiếm nhỏ */
    #bell-container {               /* Ẩn chuông thông báo */
        display: none !important;
    }

    /* Thu gọn Navbar đỉnh, tạo không gian thoáng đãng tối đa cho Logo và App Switcher */
    .navbar {
        padding: 8px 16px !important;
        justify-content: space-between !important;
    }

    .navbar .user-section {
        margin: 0 !important;
        gap: 8px !important;
    }
    
    .app-switcher-container {
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   MHEnt. CINEMA THEME - BỘ VÁ LỖI DROPDOWN & TỌA ĐỘ (PATCH V2.1)
   Khắc phục: CSS Thông báo PC, Dropdown Tìm kiếm Navbar & Tọa độ App Switcher
   ========================================================================== */

/* ==============================================================
   1. ĐẶC TRỊ LỖI THÔNG BÁO BỊ MẤT CSS TRÊN DESKTOP (ẢNH 1)
   ============================================================== */
.notif-dropdown {
    width: 330px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: var(--bg-glass-strong, rgba(255, 255, 255, 0.98)) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.notif-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid var(--border-color, rgba(203, 213, 225, 0.6)) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

.notif-title-text {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 900 !important;
    font-size: 15px !important;
    color: var(--text-primary) !important;
}

.notif-mark-read {
    font-family: 'Nunito', sans-serif !important;
    font-size: 11.5px !important;
    color: var(--hub-color, #ff85a2) !important;
    cursor: pointer !important;
    font-weight: 800 !important;
    transition: opacity 0.2s !important;
}
.notif-mark-read:hover { opacity: 0.7; }

.notif-body {
    max-height: 320px !important;
    overflow-y: auto !important;
}

/* Thẻ từng thông báo con */
.notif-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--border-color, rgba(203, 213, 225, 0.4)) !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    text-decoration: none !important;
    color: inherit !important;
}
.notif-item:hover { background: rgba(255, 133, 162, 0.08) !important; }
.notif-item.unread { background: rgba(255, 133, 162, 0.15) !important; }

.notif-poster {
    width: 42px !important;
    height: 58px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.notif-info { flex: 1 !important; min-width: 0 !important; text-align: left !important; }
.notif-title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    font-size: 13.5px !important;
    color: var(--text-primary) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.notif-desc {
    font-family: 'Nunito', sans-serif !important;
    font-size: 12px !important;
    color: var(--text-secondary, #64748b) !important;
    line-height: 1.4 !important;
    margin-top: 3px !important;
}

.notif-footer {
    padding: 10px !important;
    text-align: center !important;
    border-top: 1px solid var(--border-color, rgba(203, 213, 225, 0.6)) !important;
    background: rgba(0, 0, 0, 0.01) !important;
}
.btn-view-all {
    background: none !important;
    border: none !important;
    color: var(--hub-color, #ff85a2) !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    cursor: pointer !important;
}

/* ==============================================================
   2. ĐẶC TRỊ LỖI DROPDOWN TÌM KIẾM TRÊN NAVBAR (ẢNH 2 & 3)
   ============================================================== */
.nav-search-container {
    position: relative !important; /* Neo giữ tọa độ gốc cho dropdown */
}

.search-dropdown {
    position: absolute !important;
    top: 45px !important;
    right: 0 !important;
    width: 300px !important;
    background: var(--bg-glass-strong, rgba(255, 255, 255, 0.98)) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--border-color, rgba(203, 213, 225, 0.6)) !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
    z-index: 100000 !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    text-align: left !important;
}

.search-dropdown.show {
    display: flex !important;
    animation: fadeInDropdown 0.2s ease forwards !important;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid var(--border-color, rgba(203, 213, 225, 0.4)) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    color: var(--text-primary) !important;
    transition: background 0.2s ease !important;
}
.search-dropdown-item:hover {
    background: rgba(255, 133, 162, 0.1) !important;
}

.search-mini-poster {
    width: 35px !important;
    height: 50px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
}

.search-item-info {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.search-item-title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    font-size: 13.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--text-primary) !important;
}

.search-item-tag {
    font-family: 'Nunito', sans-serif !important;
    font-size: 11px !important;
    color: var(--hub-color, #ff85a2) !important;
    font-weight: 700 !important;
    margin-top: 2px !important;
}

.search-view-all {
    padding: 12px !important;
    text-align: center !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    color: var(--hub-color, #ff85a2) !important;
    cursor: pointer !important;
    background: rgba(0, 0, 0, 0.02) !important;
    transition: background 0.2s !important;
}
.search-view-all:hover {
    background: var(--hub-color, #ff85a2) !important;
    color: white !important;
}

/* --- DARK MODE CHO THÔNG BÁO & SEARCH NAVBAR --- */
body.dark-mode .notif-dropdown,
body.dark-mode .search-dropdown {
    background: var(--bg-glass-strong, rgba(15, 23, 42, 0.98)) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
}
body.dark-mode .notif-header,
body.dark-mode .notif-footer,
body.dark-mode .search-view-all {
    background: rgba(255, 255, 255, 0.02) !important;
}
body.dark-mode .notif-item:hover,
body.dark-mode .search-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}
body.dark-mode .notif-item.unread {
    background: rgba(255, 133, 162, 0.2) !important;
}

/* ==============================================================
   3. ĐẶC TRỊ LỖI APP SWITCHER BAY SANG LOGO TRÊN MOBILE (ẢNH 4)
   ============================================================== */
@media screen and (max-width: 768px) {
    /* Khóa cứng tọa độ neo của App Switcher vào đúng góc trên phải màn hình */
    .dropdown-menu.app-switcher-menu {
        position: fixed !important;
        top: 55px !important;
        right: 12px !important;
        left: auto !important; /* Xóa bỏ lực kéo từ cạnh trái */
        width: 280px !important;
        max-width: calc(100vw - 24px) !important;
        margin: 0 !important;
        transform-origin: top right !important;
    }
}

/* ==============================================================
   6. TỐI ƯU TRANG CHI TIẾT PHIM (DESCRIPTION.HTML) TRÊN MOBILE
   ============================================================== */
@media screen and (max-width: 768px) {
    /* Ép khung chi tiết xếp chồng theo chiều dọc thay vì nằm ngang */
    .details-container {
        flex-direction: column !important; 
        align-items: center !important;
        padding: 25px 15px !important;
        gap: 20px !important;
        margin-top: 20px !important;
    }
    
    /* Thu nhỏ poster lại vừa vặn giữa màn hình điện thoại */
    .poster-big {
        width: 180px !important; 
        max-width: 65% !important;
        margin: 0 auto !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
    }
    
    .info-box {
        width: 100% !important;
        text-align: left !important;
    }
    
    .info-box h1 { 
        font-size: 22px !important; 
        line-height: 1.3 !important; 
        margin-top: 8px !important;
    }
    
    /* Cụm nút hành động giãn 100% chiều ngang, cao tối thiểu 44px chuẩn Apple */
    .btn-group {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    
    .btn-group a, .btn-group button {
        width: 100% !important;
        min-height: 44px !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    /* Danh sách tập phim hỗ trợ cuộn mượt bằng quán tính ngón tay */
    .ep-list-container {
        max-height: 300px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Thu gọn nút quay lại trên mobile */
    .back-btn-wrapper { margin-top: 15px !important; }
    .btn-back { font-size: 13px !important; padding: 6px 14px !important; }
}

/* ==========================================================================
   ⚡ ĐẶC TRỊ LỖI TRAILER BỊ NHÉT XÓ CỦA CINEMA (MODAL POPUP 16:9)
   ========================================================================== */

/* 1. Khung nền tối mờ bao phủ toàn bộ màn hình */
#trailerModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 9999999 !important; /* Nổi lên trên tất cả, đè cả Navbar */
    padding: 20px !important;
    box-sizing: border-box !important;
    
    /* Bùa chú: Dù JS có bật bằng display: block hay flex thì vẫn ép thành flex để căn giữa! */
    display: none; 
    justify-content: center !important;
    align-items: center !important;
}

/* Khi JavaScript bật modal lên */
#trailerModal[style*="display: block"],
#trailerModal[style*="display: flex"] {
    display: flex !important;
}

/* 2. Hộp chứa video ở giữa màn hình */
#trailerModal .modal-content {
    position: relative !important;
    width: 100% !important;
    max-width: 850px !important; /* Độ rộng chuẩn đẹp cho màn hình PC */
    background: var(--bg-glass-strong, #1e293b) !important;
    border: 1px solid var(--border-color, rgba(255, 133, 162, 0.4)) !important;
    border-radius: 20px !important;
    padding: 12px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6) !important;
    animation: zoomInTrailer 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Hiệu ứng nảy lướt ra cực mượt */
@keyframes zoomInTrailer {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3. Khung Video chuẩn tỷ lệ vàng 16:9 của YouTube */
#trailerModal iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important; /* Tự động tính chiều cao, không bao giờ bị méo */
    border: none !important;
    border-radius: 12px !important;
    display: block !important;
    background: #000 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

/* 4. Nút tắt (X) đỏ rực nổi bật ở góc trên phải */
#trailerModal .close-btn {
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    width: 38px !important;
    height: 38px !important;
    background: #ef4444 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    border: 2px solid white !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

#trailerModal .close-btn:hover {
    transform: scale(1.15) rotate(90deg) !important;
    background: #dc2626 !important;
}

/* 5. Tối ưu cho điện thoại di động (< 768px) */
@media screen and (max-width: 768px) {
    #trailerModal { padding: 10px !important; }
    #trailerModal .modal-content { padding: 8px !important; border-radius: 14px !important; }
    #trailerModal .close-btn { 
        top: -10px !important; 
        right: -10px !important; 
        width: 32px !important; 
        height: 32px !important; 
        font-size: 18px !important; 
    }
}

/* ==========================================================================
   ⚡ ĐẶC TRỊ LỖI NAVBAR "NUỐT" NÚT QUAY LẠI TRÊN TRANG CHI TIẾT PHIM
   ========================================================================== */
/* Trên máy tính: Đẩy nút Quay lại xuống 85px để né Navbar cố định */
.back-btn-wrapper {
    margin-top: 85px !important;
    margin-bottom: 15px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Trên điện thoại: Bù khoảng cách 70px cho thoáng, nút bấm vừa vặn ngón tay */
@media screen and (max-width: 768px) {
    .back-btn-wrapper {
        margin-top: 70px !important;
        margin-bottom: 10px !important;
    }
    .btn-back {
        font-size: 13px !important;
        padding: 6px 14px !important;
    }
}

/* ==========================================================================
   ⚡ VÁ LỖI APP SWITCHER & CHỮ THÔNG BÁO MOBILE (PATCH V3.0 PRO MAX)
   ========================================================================== */

/* 1. KHÓA CỨNG TỌA ĐỘ APP SWITCHER & ACCOUNT MENU TRÊN MOBILE (< 768px) */
@media screen and (max-width: 768px) {
    .dropdown-menu.app-switcher-menu,
    .dropdown-menu.account-dropdown,
    .dropdown-menu.notif-dropdown {
        position: fixed !important;
        top: 55px !important;
        right: 10px !important;
        left: auto !important;
        width: 290px !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 !important;
        transform-origin: top right !important;
        z-index: 100000 !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35) !important;
    }

    /* Chỉnh mũi tên tam giác chỉ đúng vào icon trên Navbar */
    .dropdown-menu.app-switcher-menu::before {
        right: 20px !important;
    }
}

/* 2. ĐẶC TRỊ CHỮ THÔNG BÁO BỊ CẮT VÀ KHÔNG XUỐNG HÀNG TRÊN MOBILE */
.full-notif-item, .notif-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.full-notif-item .notif-info, 
.notif-item .notif-info,
.full-notif-item > div:not(.notif-poster) {
    flex: 1 !important;
    min-width: 0 !important; /* Chìa khóa vàng giúp Flexbox không bị tràn viền */
}

.full-notif-item .notif-title,
.notif-item .notif-title {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    white-space: normal !important; /* Cho phép rớt dòng */
    word-wrap: break-word !important;
    word-break: break-word !important; /* Ép từ dài phải xuống hàng */
    overflow-wrap: break-word !important;
}

.full-notif-item .notif-desc,
.notif-item .notif-desc {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* ==============================================================
   CINEMA GATEKEEPER - CỔNG SOÁT VÉ ĐIỆN ẢNH (BẮT BUỘC ĐĂNG NHẬP)
   ============================================================== */
html.cinema-pre-auth #cinema-gatekeeper {
    display: none !important;
}

.cinema-gatekeeper {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: radial-gradient(circle at center, rgba(28, 16, 33, 0.97) 0%, rgba(9, 7, 12, 0.99) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
}

.cinema-gatekeeper.unlocked {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cinema-gate-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 133, 162, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.cinema-gate-console {
    background: rgba(24, 16, 28, 0.88);
    border: 1px solid rgba(255, 133, 162, 0.35);
    box-shadow: 0 0 50px rgba(255, 133, 162, 0.18), 0 25px 50px rgba(0, 0, 0, 0.7), inset 0 0 25px rgba(255, 133, 162, 0.06);
    padding: 44px 36px;
    border-radius: 26px;
    text-align: center;
    max-width: 480px;
    width: 95%;
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.35s ease;
    animation: cinemaGateAppear 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
}

@keyframes cinemaGateAppear {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(18px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cinema-gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(255, 133, 162, 0.14);
    color: #ff85a2;
    border: 1px solid rgba(255, 133, 162, 0.32);
    margin-bottom: 22px;
    font-family: 'Nunito', sans-serif;
}

.cinema-gate-icon {
    font-size: 56px;
    color: #ff85a2;
    margin-bottom: 18px;
    filter: drop-shadow(0 0 24px rgba(255, 133, 162, 0.5));
    transition: all 0.35s ease;
}

.cinema-gate-title {
    font-size: 23px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 14px 0;
    font-family: 'Nunito', sans-serif;
    text-shadow: 0 0 16px rgba(255, 133, 162, 0.35);
}

.cinema-gate-desc {
    color: #cbd5e1;
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0 0 28px 0;
    font-family: 'Nunito', sans-serif;
}

.cinema-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-cinema-auth {
    background: linear-gradient(135deg, #ff85a2 0%, #ff5c8a 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 15px;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 92, 138, 0.35);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-cinema-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 92, 138, 0.55);
    background: linear-gradient(135deg, #ff94af 0%, #ff6b95 100%);
}

.btn-cinema-back {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 13.5px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cinema-back:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.cinema-loading-msg {
    color: #10b981;
    font-weight: 800;
    font-size: 15px;
    margin-top: 15px;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==========================================================================
   🤝 HỆ THỐNG HIỂN THỊ TẬP GIAO LƯU & CROSSOVER (COLAB SPECIALS)
   ========================================================================== */

/* 1. Phần Colab trên trang Description */
.colab-section-wrapper {
    margin-top: 28px !important;
    width: 100% !important;
}

.colab-header-title {
    font-size: 17px !important;
    font-weight: 900 !important;
    color: #ff5c8a !important;
    border-bottom: 2px solid rgba(255, 92, 138, 0.25) !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.colab-pill-tag {
    background: linear-gradient(135deg, #ff85a2, #ff5c8a) !important;
    color: #ffffff !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    padding: 2.5px 8px !important;
    border-radius: 6px !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.ep-colab-card-item {
    background: linear-gradient(135deg, rgba(255, 133, 162, 0.07), rgba(255, 92, 138, 0.03)) !important;
    border: 1.5px dashed rgba(255, 133, 162, 0.4) !important;
    border-radius: 12px !important;
    padding: 13px 18px !important;
    margin-bottom: 8px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-decoration: none !important;
}

.ep-colab-card-item:hover {
    background: linear-gradient(135deg, rgba(255, 133, 162, 0.16), rgba(255, 92, 138, 0.09)) !important;
    border-color: #ff5c8a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(255, 92, 138, 0.18) !important;
}

body.dark-mode .ep-colab-card-item {
    background: rgba(255, 133, 162, 0.05) !important;
    border-color: rgba(255, 133, 162, 0.3) !important;
}

body.dark-mode .ep-colab-card-item:hover {
    background: rgba(255, 133, 162, 0.12) !important;
    border-color: #ff85a2 !important;
}

/* 2. Nút bấm Colab trên trang Watch (Sidebar) */
.ep-btn-colab {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    text-align: left !important;
    background: rgba(255, 133, 162, 0.05) !important;
    border: 1.5px dashed rgba(255, 133, 162, 0.38) !important;
    margin-bottom: 5px !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

.ep-btn-colab:hover {
    background: rgba(255, 133, 162, 0.13) !important;
    border-color: #ff5c8a !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 12px rgba(255, 92, 138, 0.12) !important;
}

.ep-btn-colab.active {
    background: linear-gradient(135deg, #ff85a2, #ff5c8a) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(255, 92, 138, 0.35) !important;
    transform: translateY(-1.5px) !important;
}

.colab-badge-inner {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    padding: 2.5px 7px !important;
    border-radius: 20px !important;
    background: rgba(255, 133, 162, 0.15) !important;
    color: #ff5c8a !important;
    white-space: nowrap !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.ep-btn-colab.active .colab-badge-inner {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* 3. Nút chuyển đổi (Toggle) Tập Colab trong Studio & Admin */
.btn-colab-toggle {
    background: rgba(255, 133, 162, 0.08) !important;
    border: 1.5px dashed rgba(255, 133, 162, 0.45) !important;
    color: #ff5c8a !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    user-select: none !important;
}

.btn-colab-toggle:hover {
    background: rgba(255, 133, 162, 0.18) !important;
    border-color: #ff5c8a !important;
    transform: translateY(-1px) !important;
}

.btn-colab-toggle.active {
    background: linear-gradient(135deg, #ff85a2, #ff5c8a) !important;
    color: #ffffff !important;
    border: 1.5px solid transparent !important;
    box-shadow: 0 4px 12px rgba(255, 92, 138, 0.35) !important;
    transform: translateY(-1px) !important;
}

