/*code tu them: doi mau header duoi logo*/
.header-tpl-2 {
  background: #1c1c1c !important;
  background-image: none !important;
}
.navbar-container.nav-tpl-2 {
  background-color: #1f2021 !important;
  background-image: none !important;
}

@media screen and (max-width: 768px) {
  .header-tpl-2 {
    background: #1c1c1c !important;
    background-image: none !important;
  }

  .navbar-container.nav-tpl-2 {
    background-color: #1f2021 !important;
    background-image: none !important;
  }
}
/*code tu them: doi font ten movie*/
.entry-title {
  font-family: 'Montserrat', sans-serif !important;
}
/*code tu them: in dam ten pim*/
.entry-title {
  font-weight: bold !important;
}

/*code tu them: in dam status pim*/
.status {
  font-weight: 700 !important;
}
.title {
  font-weight: bold;
}
span.episode {
  font-weight: bold !important;
}
/* chọn tất cả các link trong menu chính */
.halim-navbar .navbar-nav li a {
  font-weight: 800 !important;  /* 700 = bold */
}
/* In đậm toàn bộ chữ trong các ô ngày của lịch chiếu */
ul.halim-showtimes-block li.weekday,
ul.halim-showtimes-block li.weekday * {
  font-weight: 700 !important;
}
/* Ẩn nút toggle-pagination-pc */
button.toggle-pagination-pc,
.toggle-pagination-pc.navbar-toggle-pc {
  display: none !important;
}

/* Ẩn thẻ tag dưới phim */
.the_tag_list {
  display: none ;
}
/* Báo lịch chiếu pim chiếu mấy h*/
.halim_showtime_movies {
  font-weight: bold ;
  font-size: 14px ;
}








/* 1. Container chung - flex wrap cho desktop, đều ô cho mobile */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #444;
  padding: 0;
  margin-bottom: 20px;
}

/* 2. Tab chung */
.tab-list a {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: #fff;
  padding: 6px 4px;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 50px;
  flex: 1;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* 3. Active tab - Mới Cập Nhập */
.tab-list a.active {
  background-color: transparent;
  color: #1FC3F9;
}
.tab-list a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 3px;
  background-color: #1FC3F9;
  border-radius: 2px;
  z-index: -1;
}

/* 4. Màu các tab còn lại */
.tab-list a:nth-of-type(2) { background-color: #1FC3F9; }
.tab-list a:nth-of-type(3) { background-color: #e91e63; }
.tab-list a:nth-of-type(4) { background-color: #9c27b0; }
.tab-list a:nth-of-type(5) { background-color: #ff9800; }

/* 5. Hover tinh tế */
.tab-list a:not(.active):hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0.95;
  z-index: 2;
}

/* 6. Responsive Tablet */
@media (max-width: 768px) {
  .tab-list a {
    font-size: 15px;
    padding: 8px 6px;
  }
}

/* 7. Responsive Mobile */
@media (max-width: 480px) {
  .tab-list {
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
  }
  .tab-list a {
    font-size: 13px;
    padding: 10px 4px;
    flex: none;
  }
  .tab-list a:first-child {
    flex: 2.6;
    border-radius: 10px 0 0 10px;
  }
  .tab-list a:nth-of-type(2),
  .tab-list a:nth-of-type(3),
  .tab-list a:nth-of-type(4) {
    flex: 0.55;
  }
  .tab-list a:last-child {
    flex: 2.2;
    border-radius: 0 10px 10px 0;
  }
}

/* 8. Cực nhỏ: co chữ và cho scroll nếu tràn */
@media (max-width: 360px) {
  .tab-list {
    overflow-x: auto;
  }
  .tab-list a {
    font-size: 12px;
    padding: 8px 4px;
    flex-shrink: 0;
  }
}

/* Spinner loading */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #db3345;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}




.input-password {
  position: relative;
  display: flex;
  align-items: center;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2em;
  color: #888;
  user-select: none;
  z-index: 2;
}
.input-password input {
  width: 100%;
  padding-right: 32px;
}




.profile-sidebar .profile-userpic .avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff; /* Viền trắng mỏng */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


#wpdcom.wpd-layout-2 .wpd-comment .wpd-blog-post_author .wpd-avatar img {
    border-bottom: none !important;
    border-color: transparent !important;
}
#wpdcom .wpd-avatar img,
#wpdcom.wpd-layout-2 .wpd-comment .wpd-avatar img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: none !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
#wpdcom .wpd-avatar,
#wpdcom .wpd-avatar img {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}



/* Tùy chỉnh thông báo đăng nhập mới trong wpDiscuz */
.wpd-login-to-comment.custom-login-prompt {
  font-size: 16px; /* Đảm bảo chữ không quá nhỏ */
  padding: 15px;
  text-align: center;
}

.wpd-login-to-comment.custom-login-prompt a {
  font-weight: bold;
  color: #ffc837 !important; /* Màu vàng, !important để ghi đè nếu cần */
  text-decoration: none;
  cursor: pointer;
}

.wpd-login-to-comment.custom-login-prompt a:hover {
  text-decoration: underline;
}


/* Ẩn hoàn toàn khu vực "Kết nối với" và "Đăng nhập" của wpDiscuz */
#wpdcom .wpd-form-head {
    display: none !important;
}


/* Ẩn thanh thông báo theo dõi bình luận */
#wpdcom .wpdiscuz-subscribe-bar {
    display: none !important;
}

/* Ẩn thanh tiêu đề góp ý (thread head) */
#wpdcom .wpd-thread-head {
    display: none !important;
}

/* ... các css khác ... */

/* XÓA BORDER-LEFT CỦA COMMENT REPLY */
#wpdcom .wpd-comment.wpd-reply .wpd-comment-wrap,
#wpdcom.wpd-layout-2 .wpd-comment.wpd-reply .wpd-comment-wrap,
#wpdcom.wpd-dark.wpd-layout-2 .wpd-comment.wpd-reply .wpd-comment-wrap {
    border-left: none !important;
}


#wpdcom * {
    line-height: unset !important;
}


/* Ẩn chuông thông báo (Subscribe to comments) */
#wpdcom .wc-field-submit .wpd-tooltip {
    display: none !important;
}






/*
================================================================================
==              CSS HOÀN CHỈNH CHO HỆ THỐNG THÔNG BÁO (FINAL)                 ==
================================================================================
*/

/* --- 1. CẤU TRÚC CHUNG CỦA DANH SÁCH & ITEM --- */
.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-list .notification-item a {
    display: flex;
    align-items: center;
    gap: 15px; /* Thay cho margin-right, hiện đại hơn */
    padding: 12px 10px;
    text-decoration: none !important;
    border-radius: 8px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #2a2a2a;
}

.notification-list .notification-item:last-child a {
    border-bottom: none;
}

/* --- 2. CÁC THÀNH PHẦN BÊN TRONG MỘT ITEM --- */
.notification-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover; /* Đảm bảo ảnh không bị méo */
    border-radius: 50%; /* Ảnh tròn */
    flex-shrink: 0; /* Ngăn ảnh bị co lại */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #333; /* Màu nền cho ảnh nếu ảnh bị lỗi */
}

.notification-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.notification-content p {
    margin: 0;
    line-height: 1.4;
}

.notification-title {
    font-size: 15px; /* Giảm nhẹ cho cân đối */
}

.notification-episode {
    font-size: 14px;
    color: #ff9601 !important;
    font-weight: bold;
    margin-top: 4px;
}

.notification-time {
    font-size: 12px;
    margin-top: 5px;
}

/* --- 3. ĐỊNH DẠNG TRẠNG THÁI (CHƯA ĐỌC / ĐÃ ĐỌC) --- */

/* === 3.1. TRẠNG THÁI: CHƯA ĐỌC (.unread) === */
.notification-item.unread a {
    background-color: #2c2f3b;
}

.notification-item.unread:hover a {
    background-color: #353846;
}

/* Màu chữ cho các thành phần khi CHƯA ĐỌC */
.notification-item.unread .notification-title strong {
    color: #f0f2f5 !important;
    font-weight: 700 !important;
}

.notification-item.unread .notification-title .noti-text-light {
    color: #e4e6eb !important; /* Màu trắng sáng hơn theo yêu cầu */
    font-weight: 500 !important; /* Dày hơn một chút theo yêu cầu */
}

.notification-item.unread .notification-time {
    color: #b0b3b8 !important;
}

/* === 3.2. TRẠNG THÁI: ĐÃ ĐỌC (.read) === */
.notification-item.read a {
    background-color: transparent;
}

.notification-item.read:hover a {
    background-color: #222;
}

/* Màu chữ cho các thành phần khi ĐÃ ĐỌC */
.notification-item.read .notification-title,
.notification-item.read .notification-title strong,
.notification-item.read .notification-title .noti-text-light {
    color: #8a8d91 !important; /* Màu xám chung */
    font-weight: 400 !important; /* Tất cả đều là chữ thường */
}

.notification-item.read .notification-time {
    color: #6a6d71 !important;
}


/*
================================================================================
==                  CSS CHO HUY HIỆU THÔNG BÁO (BADGE)                        ==
================================================================================
*/

/* --- 4. HUY HIỆU (BADGE) BÁO SỐ LƯỢNG THÔNG BÁO --- */

/* Vị trí tương đối cho container của avatar để định vị badge */
.user-dropdown {
    position: relative;
}

/* Định dạng cho chính cái huy hiệu màu đỏ */
.notification-badge {
    position: absolute;
    top: -5px;      /* Dịch lên trên một chút so với góc trên bên phải */
    right: 5px;     /* Dịch sang trái một chút so với góc trên bên phải */
    width: 22px;
    height: 22px;
    line-height: 22px; /* Căn giữa số theo chiều dọc */
    font-size: 12px;
    font-weight: bold;
    color: white;
    background-color: #e41e26; /* Màu đỏ chuẩn */
    text-align: center;
    border-radius: 50%; /* Bo tròn thành hình tròn */
    border: 2px solid #1e1e1e; /* Viền xung quanh trùng màu nền header */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Đổ bóng nhẹ */
    box-sizing: border-box; /* Đảm bảo padding và border không làm tăng kích thước */
    z-index: 10; /* Đảm bảo nó nổi lên trên các thành phần khác */
}



/* === CSS DÀNH RIÊNG CHO MÀN HÌNH DI ĐỘNG (BẢN SỬA LỖI) === */
@media (max-width: 768px) {
    .notification-badge {
        /* Bỏ 'right' và dùng 'left' kết hợp 'transform' */
        right: auto; /* Hủy bỏ thuộc tính right để tránh xung đột */
        left: 50%;   /* 1. Đặt mép TRÁI của chấm đỏ vào chính giữa avatar */
        top: 0;      /* Có thể điều chỉnh giá trị này */

        /* 2. Dùng transform để tinh chỉnh vị trí */
        /* Dịch nó sang phải 10px và dịch lên trên 4px so với vị trí hiện tại */
        transform: translate(6px, -4px);

        /* 3. (Tùy chọn) Điều chỉnh lại kích thước cho cân đối */
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 10px;
        border-width: 2px;
    }
}



/* Nút Xóa tất cả - Hiệu ứng khi di chuột vào */
#clear-all-notifications:hover {
    background-color: #c9302c !important; /* Màu đỏ sẫm hơn */
    opacity: 0.9; /* Giảm độ sáng nhẹ */
}


.phim-update-title {
    color: #fff;
}
.notification-group-header {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin: 0px 0 5px 0;
    padding-left: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}






/* =================================================================== */
/* ===  CSS CUỐI CÙNG - SỬA LỖI MẤT LOGO DESKTOP                === */
/* =================================================================== */

/* --- 1. KIỂU DÁNG CHUNG CHO CÁC ICON CỦA BẠN --- */
/* (Áp dụng cho mọi màn hình) */
.user-actions-area {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Mặc định đẩy về bên phải */
}
.user-actions-area .user-action-btn {
    color: #ccc;
    font-size: 22px;
    margin: 0 5px;
    padding: 8px;
    background: none; border: none; cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.user-actions-area .user-action-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}
.user-actions-area .user-action-btn i { font-weight: 300 !important; }

user-dropdown .dropdown-toggle::after { display: none; }
.notification-icon-wrapper { position: relative; }
.notification-badge {
    position: absolute; top: 0; right: 0; background-color: red; color: white; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; line-height: 16px; text-align: center;
}

/* --- 2. BỐ CỤC CHO DESKTOP VÀ TABLET (>= 768px) --- */
@media (min-width: 768px) {
    #headwrap.row {
        display: flex;
        align-items: center; 
    }
    /* Sửa dòng này */
    #headwrap .hidden-xs {
         height: 80px; 
         display: flex;
         align-items: center;
         justify-content: flex-end; /* Thêm lệnh này để đẩy nội dung về bên phải */
    }
    #headwrap .halim-search-form .header-nav { width: 100%; }
}
/* --- 3. BỐ CỤC CHO MOBILE (< 768px) --- */
/* (Phần này sẽ KHÔNG ảnh hưởng đến desktop) */
@media (max-width: 767.98px) {
    #header .slogan {
        width: 100%;
        text-align: center; /* Dùng text-align để căn giữa logo */
    }
    #header .slogan .logo {
        margin: 10px auto 0;
    }
    /* Căn giữa dãy icon bằng flexbox */
    #header .slogan .user-actions-area {
        justify-content: center;
        padding: 5px 0 10px;
    }
}





/* =================================================================== */
/* === CSS CUỐI CÙNG - DÙNG CLASS MỚI ĐỂ TRÁNH XUNG ĐỘT          === */
/* =================================================================== */

/* Bố cục lưới */
#history-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px; /* Bù trừ padding */
}

/* Từng item phim */
.history-item {
    padding: 0 10px;
    margin-bottom: 20px;
}
.history-item-link {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 8px;
    position: relative;
    min-height: 100px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.history-item-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.history-item-link:hover .history-item-thumb {
    transform: scale(1.03);
}

/* Thumbnail */
.history-item-thumb {
    width: 60px;
    height: 85px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #333;
    transition: transform 0.2s ease;
}
.history-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Phần thân chứa thông tin */
.history-item-body {
    flex-grow: 1;
    overflow: hidden; /* Quan trọng */
}

/* Tên phim */
.history-item-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 10px;
    
    /* Cắt chuỗi */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Thông tin meta */
.history-item-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.history-item-meta .meta-item {
    font-size: 13px;
    color: #aaa;
    display: flex;
    align-items: center;
}
.history-item-meta .meta-item.episode {
    color: #ffc107;
    font-weight: 500;
}
.history-item-meta .meta-item i {
    margin-right: 8px;
    font-size: 12px;
    width: 14px;
    text-align: center;
}

/* Nút xóa (nằm ngoài thẻ a) */
.history-item {
    position: relative; /* Để định vị nút xóa */
}
.history-item-remove {
    position: absolute;
    top: 10px;
    right: 20px; /* 10px của item + 10px của link */
    background: none;
    color: #888;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s ease;
}
.history-item-remove:hover {
    color: #fff;
}

/* Thêm khoảng cách cho tiêu đề trang Lịch Sử */
body.page-template-default #main-contents h1.entry-title {
    margin-bottom: 25px !important;
}


/* Style cho dòng cảnh báo đăng nhập */
.history-login-warning {
    background-color: #4e2a2a; /* Màu đỏ sẫm */
    color: #f2dcdc;
    border: 1px solid #8c4a4a;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
}
.history-login-warning a {
    color: #ffc107; /* Màu vàng */
    text-decoration: underline;
    cursor: pointer;
}
.history-login-warning a:hover {
    text-decoration: none;
}


/* Chỉ trên trang BuddyPress/Youzify */
body.buddypress .youzify .settings,
body.buddypress .youzify-account-page .settings {
  position: static !important;
  left: auto !important;
  right: auto !important;
}

/* Nếu nút switch-mode của theme bị đẩy ra ngoài khung, ép về bên phải */
body.buddypress .switch-mode {
  position: fixed !important;
  left: auto !important;
  right: 10px !important;
}

/* Phòng ngừa tràn ngang do phần tử “ẩn nửa ngoài” */
html.buddypress, body.buddypress { overflow-x: hidden !important; }



.halim-list-eps li a {
    font-weight: 650 !important;
}


/* --- 1. Container chính: NỀN MỚI, NỔI BẬT HƠN --- */
.halim-ajax-list-server {
    /* Đổi sang màu xám-xanh đậm, khác biệt với nền trang */
    background-color: #25293C !important; 
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 20px !important; 
    margin-bottom: 25px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s ease !important;
}

/* --- 2. XÓA PHẦN TỬ THỪA --- */
.halim-ajax-list-server::before,
.halim-ajax-list-server::after {
    display: none !important;
}

/* --- 3. KHUNG CHỨA TEXT: Tối giản, dễ đọc --- */
.custom-text-container {
    text-align: center;
    margin-bottom: 15px !important; 
}
.custom-text-container p {
    color: #c5c8d0;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    line-height: 1.6;
    font-weight: 400 !important;
}
.custom-text-container p:first-child { 
    font-size: 15px; 
    font-weight: 600 !important;
    color: #ffffff;
}
.custom-text-container p:last-child { font-size: 13px; }
.custom-text-container a {
    color: #3498db !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
.custom-text-container a:hover {
    color: #5dade2 !important;
    text-decoration: underline !important;
}

/* --- 4. CÁC NÚT SERVER: Rõ ràng, trực quan --- */
.halim-ajax-list-server .get-eps {
    /* Nền nút mặc định tối hơn container để có độ sâu */
    background-color: #1c1e2a !important; 
    color: #c5c8d0 !important;
    border: 1px solid transparent !important; /* Thêm border ẩn để hover không bị giật */
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 18px !important;
    margin: 5px !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
    cursor: pointer;
}

/* Hiệu ứng khi di chuột: Sáng lên và có viền */
.halim-ajax-list-server .get-eps:hover {
    background-color: #3b3b4f !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important; /* Hiện viền khi hover */
    transform: translateY(-2px);
}

/* Nút ĐANG CHỌN (active): NỔI BẬT VỚI MÀU CAM */
.halim-ajax-list-server .get-eps.active {
    background: linear-gradient(45deg, #f97316, #ef4444) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: transparent !important; /* Bỏ viền cho nút active */
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.4) !important; 
}

/* Hiệu ứng khi nhấn nút */
.halim-ajax-list-server .get-eps:active {
    transform: scale(0.98) !important;
}

/* --- 5. Tối ưu cho điện thoại --- */
@media (max-width: 480px) {
    .halim-ajax-list-server {
        padding: 15px !important;
    }
    .custom-text-container p:first-child { font-size: 14px; }
    .custom-text-container p:last-child { font-size: 12px; }
    .halim-ajax-list-server .get-eps {
        font-size: 13px !important;
        padding: 8px 14px !important;
        margin: 4px !important;
    }
}
/* Ẩn nav Youzify cho KHÁCH (chưa đăng nhập) */
body:not(.logged-in) #youzify-wall-nav { display: none !important; }
body:not(.logged-in) #youzify-mobile-nav { display: none !important; }
/* Nếu có subnav phụ, ẩn luôn */
body:not(.logged-in) .item-list-tabs.activity-type-tabs-subnav { display: none !important; }


/* Làm chữ trên tab server đậm và to hơn */
#halim-list-server .nav-tabs > li > a {
    font-weight: bold;
    font-size: 13px !important; /* Thay đổi 18px theo ý muốn, !important sẽ ép nó hoạt động */
}


#server-item-vip0 { cursor: pointer; }
/* Nếu container là flex thì luôn để VIP0 ngoài cùng trái */
#server-item-vip0 { order: -1; }


