* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- CSS CHO PC (Mặc định) --- */
.hamburger {
  display: none; /* Ẩn trên máy tính */
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
  padding: 5px;
}

.line {
  width: 25px;
  height: 3px;
  background-color: #fff;
  transition: 0.4s;
  border-radius: 2px;
}

/* --- BẢN FIX CUỐI CÙNG CHO MOBILE --- */
@media screen and (max-width: 768px) {
  /* 1. RESET CHỐNG TRÀN BẰNG VIEWPORT */
  html,
  body {
    overflow-x: hidden !important;
    width: 100vw !important; /* Khóa cứng chiều rộng bằng màn hình */
  }

  * {
    box-sizing: border-box !important;
  }

  header {
    height: auto !important;
    min-height: 100vh !important;
    padding-bottom: 30px;
    background-attachment: fixed !important;
  }

  /* 2. NAVBAR: ÉP LOGO - SEARCH - 3 GẠCH TRÊN 1 HÀNG */
  .navbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 15px !important;
    width: 100% !important;
  }

  .logo {
    padding: 0 !important;
    flex-shrink: 0 !important; /* Không cho phép bóp méo logo */
  }
  .logo img {
    max-height: 35px !important;
  }

  /* Ép thẻ div bọc <nav> phải chiếm trọn phần trống còn lại */
  .navbar > div:nth-child(2) {
    flex-grow: 1 !important;
    width: calc(100% - 60px) !important;
  }

  nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 10px !important;
  }

  .search-container {
    flex-grow: 1 !important; /* Thanh search tự động co giãn */
    width: auto !important;
    height: 35px !important;
    margin: 0 !important;
    padding: 5px 10px !important;
  }

  .search-container input {
    width: 100% !important;
  }

  .hamburger {
    display: flex !important;
    flex-shrink: 0 !important; /* BẢO VỆ NÚT 3 GẠCH: cấm bị đẩy văng ra ngoài */
    z-index: 2200 !important;
  }

  /* Cố định nút 3 gạch khi mở menu */
  .hamburger.toggle {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
  }

  .actions {
    display: none !important;
  }

  /* 3. MENU SIDEBAR */
  .menu .nav-link {
    display: flex !important;
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 250px !important;
    height: 100vh;
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 70px 20px 20px 20px !important;
    gap: 10px !important;
    transition: 0.3s;
    z-index: 2000;
    overflow-y: auto;
  }

  .menu .nav-link.active {
    right: 0 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  }

  /* 4. MENU CON */
  .menu1 {
    display: none !important;
    position: static !important;
    width: 100% !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    margin-top: 5px !important;
    padding: 10px !important;
  }
  .menu1.show-submenu {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* 5. NỘI DUNG HERO */
  .hero-container {
    width: 100% !important;
    padding: 15px !important;
  }
  .hero-content {
    min-width: unset !important;
    width: 100% !important;
  }

  /* 6. THUMBNAILS (CĂN ĐỀU 2 BÊN, KHÔNG BÁM LỀ) */
  .hero-thumbnails {
    position: static !important;
    width: 100% !important; /* Trả về 100% thay vì 100vw */
    margin: 20px 0 !important; /* Xóa bỏ margin-left âm */
    padding: 0 15px !important; /* Thêm lề trái & phải 15px đều đặn */
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 12px !important; /* Giãn cách các ảnh nhỏ cho thoáng */
    justify-content: flex-start !important;
  }

  .hero-thumbnails::-webkit-scrollbar {
    display: none;
  }

  .thumb-item {
    flex: 0 0 auto !important;
    width: 80px !important; /* Chỉnh to lên một xíu cho dễ bấm */
    height: 55px !important;
    scroll-snap-align: start;
  }

  /* 7. CATEGORIES (CHIA 2 CỘT CĂN GIỮA ĐẸP MẮT) */
  .hero-movie-type {
    position: static !important;
    width: 100% !important; /* Trả về 100% */
    margin: 0 !important; /* Xóa bỏ margin-left âm */
    padding: 0 15px 40px 15px !important; /* Lề trái - phải 15px đều nhau */
    box-sizing: border-box !important;
  }

  .item {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Cân bằng đúng 2 cột */
    gap: 15px !important; /* Khoảng cách giữa 2 hộp màu */
    width: 100% !important;
  }

  .box-movie {
    width: 100% !important;
    min-height: 90px !important;
    margin: 0 !important;
    padding: 15px !important;
    box-sizing: border-box !important;
  }

  /* 8. LIST PHIM BẢN MOBILE (Cuộn ngang) */
  .block-main {
    padding: 10px 0 10px 15px !important; /* Trái 15px, phải 0 để cuộn vuốt sát mép màn hình */
    margin: 5px 0 !important;
    min-height: auto !important;
  }

  .block-item1 {
    padding-right: 15px !important; /* Giữ lề phải cho tiêu đề */
  }

  .movie-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 10px !important;
    padding-bottom: 120px !important; /* Không gian dư bên dưới để hiển thị Hover Card không bị cắt */
    padding-right: 15px !important;
    -webkit-overflow-scrolling: touch;
  }

  .movie-list::-webkit-scrollbar {
    display: none;
  }

  .movie-card {
    flex: 0 0 auto !important;
    width: 220px !important;
    height: 140px !important;
    scroll-snap-align: start;
  }

  .item-info {
    height: 140px !important;
  }

  /* Ép kích thước chữ nhỏ lại trên card mobile */
  .title-vn {
    font-size: 13px !important;
  }
  .title-en {
    font-size: 10px !important;
  }
  
  .action-buttons {
    flex-wrap: wrap !important;
    height: auto !important;
    gap: 4px !important;
  }
  .btn {
    font-size: 10px !important;
    padding: 3px 5px !important;
  }
  .data-card {
    height: auto !important;
  }
  .tag {
    font-size: 10px !important;
    padding: 3px !important;
  }

  /* 9. FOOTER MOBILE (Xếp dọc) */
  .footer {
    padding: 40px 15px 20px 15px !important;
  }

  .footer-container {
    flex-direction: column !important;
    padding: 0 !important;
    gap: 5px !important;
  }

  .footer-col {
    width: 100% !important;
    margin-bottom: 25px !important;
  }

  .brand-col {
    text-align: center !important;
  }

  .social-icons {
    justify-content: center !important;
  }

  .footer-bottom {
    margin-top: 10px !important;
  }
}

body {
  height: 100vh;
  background-color: #15151a;
  font-family: "Inter", sans-serif;
}

header {
  background-size: cover;
  background-position: center;
  height: 100%;
  background-image:
    linear-gradient(
      to right,
      /* Chuyển màu từ trái sang phải */ rgba(0, 0, 0, 0.9) 10%,
      /* Màu đen đặc (0.9 độ mờ) ở 10% bên trái (vùng có chữ) */
      rgba(0, 0, 0, 0.5) 40%,
      /* Màu đen mờ hơn (0.5 độ mờ) ở 40% (khu vực chuyển tiếp) */
      rgba(0, 0, 0, 0) 100%
        /* Hoàn toàn trong suốt ở 100% bên phải (vùng có ảnh nhân vật) */
    ),
    url("./ig/a1.jpg");
  background-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      /* Tối nhẹ ở thanh navbar phía trên cùng */ rgba(0, 0, 0, 0) 25%,
      /* Đoạn 25% là trong suốt hoàn toàn để rõ mặt diễn viên */
      rgba(0, 0, 0, 0.6) 60%,
      /* Bắt đầu tối dần xuống từ đoạn có các ảnh phim nhỏ */ #15151a 85%,
      /* Chuyển sang đen tuyền ở đoạn chứa các box thể loại */ #15151a 100%
        /* Phủ đen hoàn toàn phần đáy */
    ),
    url("./ig/a1.jpg");
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.background img {
  width: 100%;
}

.navbar .logo img {
  max-height: 45px;
  transition: 0.3s;
}

.logo {
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 10px;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 35px;
}

.menu .nav-link {
  display: flex;
  gap: 35px;
  padding-left: 30px;
  align-items: center;
  justify-content: center;
}

.menu ul li {
  list-style-type: none;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  color: #fff;
  font-size: 15px;
  text-align: center;
  padding-top: 10px;
  text-align: left; /* LUÔN CĂN TRÁI CHỮ */
  white-space: nowrap; /* Không cho chữ nhảy xuống dòng */
  cursor: pointer;
}

.search-container {
  display: flex;
  align-items: center;
  width: 300px;
  background-color: rgba(255, 255, 255, 0.201);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 8px 15px;
  transition: 0.3s;
  height: 40px;
  position: relative; /* Cần thiết cho dropdown autocomplete */
  z-index: 1200;
}


.search-container input {
  flex: 1; /* Cho phép input chiếm toàn bộ không gian còn lại */
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  outline: none; /* Loại bỏ viền khi focus */
}

.search::placeholder {
  color: rgba(255, 255, 255, 0.7); /* Placeholder màu trắng mờ */
}

.search-icon img {
  display: flex;
  width: 30px;
  backdrop-filter: blur(10px);
  margin-left: 10px;
  opacity: 0.3; /* Mặc định mờ hơn */
  transition: opacity 0.3s; /* Hiệu ứng chuyển đổi mượt mà */
  cursor: pointer;
  border-radius: 30%;
  align-items: center;
  justify-content: center;
}

.search-icon:hover {
  opacity: 1;
}

.nav-link li {
  position: relative; /* Để menu con có thể định vị tuyệt đối bên trong */
  padding: 10px 0;
}

.menu1 {
  position: absolute;
  top: 100%; /* Đặt menu con ngay dưới menu cha */
  left: 0;
  display: none; /* Ẩn menu con mặc định */
  width: 195px;
  /* Căn đều khoảng cách giữa các cột và hàng */
  gap: 15px 30px;
  /* Tạo bảng có 2 cột bằng nhau */
  grid-template-columns: repeat(2, 1fr);
  background-color: rgba(255, 255, 255, 0.201); /* Nền trắng trong suốt */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Viền mỏng để rõ khối */
  border-radius: 12px; /* Bo góc tròn trịa */
  backdrop-filter: blur(10px);
  padding-left: 10px;
}

.menu1 .option1 li {
  border-radius: 12px;
}

.menu1 .option2 li {
  border-radius: 12px;
}

.nav-link li:hover .menu1 {
  display: grid; /* Dùng grid thay vì flex để chia cột chuẩn nhất */
}

.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  margin-left: 60px; /* Thêm khoảng cách rộng hơn với menu Phim 4K */
}

.action-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px; /* More rounded like a pill */
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 8px 22px; /* More horizontal padding */
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.366); /* Nền sáng hơn khi hover */
  box-shadow: 5px 5px 5px rgba(255, 255, 255, 0.2); /* Hiệu ứng bóng khi hover */
}

.menu1 ul li:hover {
  color: rgba(255, 255, 255, 0.652);
  /* transform: translateX(5px); Hiệu ứng nhích sang phải nhẹ khi hover */
  box-shadow: 5px 5px 5px rgba(255, 255, 255, 0.2); /* Hiệu ứng bóng khi hover */
}

.hero-container {
  height: calc(100%);
  max-width: 95%;
  width: 1100px;
  padding: 0.5%;
  /* Thay vì dùng margin-top cố định, ta dùng flex để căn giữa */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 30px;
}

.hero-content {
  min-width: 600px;
  color: #fff;
  font-family: "Inter", sans-serif;
}

.movie-title {
  font-size: 25px;
  margin-bottom: 5px;
}

.movie-sub {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.movie-info {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.movie-info .badge {
  background-color: rgba(255, 255, 255, 0);
  backdrop-filter: blur(5px);

  /* Viền mỏng để tạo khối rõ ràng */
  border: 1px solid rgba(255, 255, 255, 0.081);

  color: white;
  padding: 4px 10px;
  border-radius: 6px; /* Bo góc vừa phải như mẫu */
  font-size: 13px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  display: flex;
  align-items: center;
  transition: 0.3s;
  box-shadow: 1px 1px 1px 1px rgba(128, 128, 128, 0.404);
}

.badge:hover {
  cursor: pointer;
  box-shadow: 2px 2px 2px 2px rgba(128, 128, 128, 0.404);
}
.badge.quality {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  border: none !important;
}

.badge.episode {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%) !important;
  border: none !important;
}

.movie-type {
  margin-bottom: 8px;
  transform: translateY(-2px);
}

.movie-type .type {
  padding: 4px 7px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.234);
  margin: 2px;
}

.movie-desc {
  max-width: 550px;
  margin-top: 10px;
  font-family: "Inter", sans-serif;
  font-size: 14px; /* Kích thước chữ nhỏ vừa phải */
  color: #cccccc; /* Màu xám nhạt (không phải trắng tinh) để dịu mắt */
  line-height: 1.6; /* Khoảng cách giữa các dòng giúp đoạn văn thoáng hơn */

  /* Hiệu ứng giới hạn số dòng và hiện dấu 3 chấm (nếu text quá dài) */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Chỉ cho hiện tối đa 2 dòng */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  /* Thêm một chút bóng đổ nhẹ cho chữ để nổi trên nền ảnh */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.movie-desc:hover {
  -webkit-line-clamp: unset; /* Bỏ giới hạn số dòng khi hover */
  cursor: pointer;
}

.play-btn {
  margin-top: 50px;
  margin-bottom: 150px; /* Visually center it between description and absolute category section */
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(2px);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.play-btn:hover {
  transform: translateX(2px) scale(1.15);
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.8);
}

.play-btn i, .play-btn span {
  color: #fff;
  font-size: 24px;
}

.hero-thumbnails {
  position: absolute;
  bottom: 200px;
  right: 5%;
  display: flex;
  gap: 10px;
  align-items: center;
}

.thumb-item {
  width: 75px;
  height: 50px;
  border-radius: 7px;
  overflow: hidden; /* Để ảnh con không tràn ra ngoài khi bo góc */
  cursor: pointer;
  border: 2px solid transparent; /* Mặc định viền trong suốt */
  transition: all 0.3s ease;
  opacity: 0.8; /* Mặc định hơi mờ để nổi bật ảnh đang chọn */
  box-shadow: 1px 1px 1px 1px rgba(128, 128, 128, 0.404);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Giúp ảnh không bị méo khi co giãn */
}

.thumb-item.active,
.thumb-item:hover {
  border: 2px solid #fff;
  box-shadow: 2px 2px 2px 2px rgba(128, 128, 128, 0.404);
  transform: scale(1.1); /* Phóng to nhẹ */
  opacity: 1;
}

.hero-movie-type {
  padding: 30px;
  position: absolute;
  bottom: 25px;
  left: 0;
  width: 70%;
  /* Tạo lớp phủ mờ nhẹ phía sau khối danh mục */
  /* background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); */
}

.hero-movie-title {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 20px;
}

.item {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  /* overflow-x: auto; Cho phép vuốt ngang nếu quá nhiều chủ đề */
  padding-bottom: 10px;
  padding-top: 5px;
}

.box-movie {
  height: 120px;
  width: 170px;
  border-radius: 24px 4px 24px 4px;
  color: #fff;
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.box-movie::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.box-movie:hover {
  transform: translateY(-8px) scale(1.05);
  filter: brightness(1.15);
}

.box-movie i {
  font-size: 28px;
  margin-bottom: 12px;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.box-movie:hover i {
  transform: scale(1.2) rotate(-10deg);
}

.box-movie h3 {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.box-movie p {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

.box-movie p span {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.box-movie:hover p span {
  transform: translateX(4px);
}


.box1 { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.box1:hover { box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5); }

.box2 { background: linear-gradient(135deg, #064e3b 0%, #10b981 100%); }
.box2:hover { box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5); }

.box3 { background: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 100%); }
.box3:hover { box-shadow: 0 10px 25px rgba(139, 92, 246, 0.5); }

.box4 { background: linear-gradient(135deg, #7c2d12 0%, #f59e0b 100%); }
.box4:hover { box-shadow: 0 10px 25px rgba(245, 158, 11, 0.5); }

.box5 { background: linear-gradient(135deg, #7f1d1d 0%, #ef4444 100%); }
.box5:hover { box-shadow: 0 10px 25px rgba(239, 68, 68, 0.5); }

.box6 { background: linear-gradient(135deg, #831843 0%, #ec4899 100%); }
.box6:hover { box-shadow: 0 10px 25px rgba(236, 72, 153, 0.5); }


/* -----------------Main-------------------------- */
.domain-link {
  color: #fff;
  font-family: "Inter", sans-serif;
  padding: 5px 30px 30px 30px;
  width: 95%;
  height: 50px;
  border: 1px solid gray;
  margin: 0px 30px 0px 30px;
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.234);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.domain-link span {
  padding-top: 20px;
}

.domain-link .text-ig {
  text-decoration: none;
  padding-left: 8px;
  /* Dải màu chuẩn của logo Instagram */
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );

  /* Cắt nền theo chữ và làm chữ trong suốt */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  /* Căn chỉnh thêm cho đẹp */
  font-weight: 700; /* In đậm lên nhìn màu gradient sẽ rõ và đẹp hơn */
}

.text-ig:hover {
  filter: brightness(2);
}

.domain-link i {
  padding: 0 0 0 8px;
}

/* ==============Main====================== */
.block-main {
  width: 100%;
  height: auto;
  min-height: 330px;
  margin: 5px 0;
  padding: 10px 40px;
  box-sizing: border-box;
}

.block-item1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  z-index: 10;
}

.block-item1 a {
  text-decoration: none;
  color: #fff;
  display: flex;
  gap: 6px;
  transition: 0.2s;
  margin-right: 55px;
}

.view-all:hover {
  transform: scale(1.1);
}

.slider-wrapper {
  position: relative;
  width: 100%;
  z-index: 1;
}

.slider-wrapper:hover {
  z-index: 20;
}

.slider-btn {
  position: absolute;
  top: 165px; 
  transform: translateY(-50%);
  z-index: 999; 
  background: rgba(0, 0, 0, 0.5);
  color: #fff !important; /* Luôn giữ màu trắng cho mũi tên */
  border: none;
  width: 45px;
  height: 90px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px; /* Mũi tên to hơn như hình mẫu */
}

.slider-wrapper:hover .slider-btn {
  opacity: 1;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  color: #efb003;
}

.prev-btn {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.next-btn {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.movie-list {
  display: flex;
  gap: 15px;
  color: #fff;
  padding-bottom: 160px; 
  margin-bottom: -130px;  
  padding-top: 30px; 
  margin-top: -15px;
  
  /* Chuyển sang dùng transform để không bị clip card khi phóng to */
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.movie-list::-webkit-scrollbar {
  display: none;
}

.movie-card {
  position: relative;
  width: 320px; /* Tỉ lệ chuẩn 16:9 (320x180) để ảnh không bị crop */
  height: 270px; 
  flex-shrink: 0; /* Prevent shrinking when there are many items */
  z-index: 1;
}

.card-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  height: auto; /* Tự động kéo dài ra khi xuất hiện nút bấm lúc hover */
  display: flex;
  flex-direction: column;
  background-color: transparent;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1c1c24;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.movie-card:hover {
  z-index: 10;
}

.movie-card:hover .card-wrapper {
  transform: scale(1.15) translateY(-5%); /* Phóng to và hơi đẩy lên trên */
  background-color: #1c1c24; /* Hiện nền hơi xám đậm khi phóng to */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

.item-info {
  position: relative;
  width: 100%;
  height: 180px; /* 320x180 chuẩn tỷ lệ 16:9 */
  overflow: hidden;
  background-color: #000;
}

.item-info .bg-blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  opacity: 0.5;
  z-index: 1;
}

.item-info .main-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.item-info .episode {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #a37255;
  padding: 5px;
  border-radius: 3px;
  font-weight: bold;
  z-index: 3;
}

.movie-card:hover .episode {
  display: none;
}

.card-info {
  padding: 15px 18px; /* Tăng padding để các nút không sát lề */
  flex-direction: column;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  background-color: transparent; 
  min-height: 85px;
}

.title-vn {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  color: #fff;
  letter-spacing: 0.3px;
}

.title-en {
  font-size: 13px;
  font-weight: 400;
  color: #a0a0a0;
  margin: 0;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.hover {
  display: none;
  padding: 0; /* Đã có padding của card-info lo liệu */
  text-align: left;
  width: 100%;
}

.movie-card:hover .hover {
  display: block;
}

.action-buttons {
  display: flex;
  justify-content: space-between; /* Đẩy đều 2 đầu, đảm bảo cách lề 2 bên bằng nhau */
  align-items: center;
  gap: 5px; /* Giảm gap một chút để vừa khít chiều rộng card */
  width: 100%;
  margin-bottom: 12px;
  margin-top: 10px;
}

.btn.btn-play {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  padding: 8px 14px; /* Giảm nhẹ padding để fit card */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  outline: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
  filter: brightness(1.1);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 8px 12px; /* Giảm nhẹ padding */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.data-card {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag.solid {
  background-color: rgba(119, 117, 117, 0.421);
}

.tag.solid-brown {
  background: linear-gradient(
    to right,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

.Manufacturer {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

img.logo.VTV {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

/* ============== Footer ============== */
.footer {
  background-color: #141414; /* Đổi sang màu đen đậm phù hợp nền web */
  color: #fff;
  padding: 60px 0 20px 0;
  font-family: Arial, sans-serif;
  margin-top: 40px;
  border-top: 1px solid #333;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 20px;
}

.footer-col {
  flex: 1;
  min-width: 220px;
  margin-bottom: 20px;
}

.brand-col {
  flex: 1.5; /* Rộng hơn 1 chút cho phần mô tả */
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.footer-logo span {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #b3b3b3;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: #fff;
  font-size: 18px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  transform: translateY(-3px);
  color: #efb003;
}

.footer-col h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: #efb003; /* Đường gạch dưới màu vàng cam */
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  text-decoration: none;
  color: #b3b3b3;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #efb003;
}

.address-col p {
  margin-bottom: 10px;
  font-size: 14px;
  color: #b3b3b3;
}

.address-col strong {
  font-weight: 600;
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: #b3b3b3;
}

/* ============== Video Modal & API Styles ============== */
.video-modal {
  display: none; 
  position: fixed; 
  z-index: 9999; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.9); 
  align-items: center;
  justify-content: center;
}

.video-modal.show {
  display: flex;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: #141414;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.video-close-btn {
  color: #aaa;
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.video-close-btn:hover,
.video-close-btn:focus {
  color: #efb003;
  text-decoration: none;
}

.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Episode List Styles */
.episode-container {
  margin-top: 15px;
  width: 100%;
}

.episode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Custom scrollbar for episode list */
.episode-list::-webkit-scrollbar {
  width: 5px;
}
.episode-list::-webkit-scrollbar-thumb {
  background: #efb003;
  border-radius: 5px;
}

/* Server & Episode Selector Styling - Modern Premium UI */
.server-container, .episode-container {
  margin-top: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-modal-content h4 {
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 15px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-modal-content h4::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(to bottom, #f43f5e, #fb923c);
  border-radius: 2px;
}

.server-list, .episode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.server-btn, .ep-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.server-btn:hover, .ep-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.server-btn.active {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.ep-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}


/* Grid for Search Results */
#search-results-section {
  background: #15151a;
}

.grid-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 20px !important;
  overflow: visible !important;
  padding-bottom: 160px !important; /* Không gian cho hover */
  margin-bottom: -130px !important; /* Bù lại padding */
}

.grid-list .movie-card {
  width: 100% !important;
  height: 270px !important; /* Đồng bộ với chiều cao thẻ phim */
  position: relative;
}

@media screen and (max-width: 768px) {
  .grid-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding-bottom: 100px !important;
    margin-bottom: -70px !important;
  }
  .grid-list .movie-card {
    height: 200px !important;
  }
}

/* ============== Ranking Board ============== */
.ranking-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background-color: #15151a;
  border: 1px solid #2d2d35;
  border-radius: 8px;
  padding: 0;
  margin: 40px 0;
}

.ranking-col {
  padding: 20px;
  border-right: 1px solid #2d2d35;
}
.ranking-col:last-child {
  border-right: none;
}

.ranking-header {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  color: #ccc;
  font-size: 13px;
}

.ranking-list .rank-num {
  font-weight: bold;
  color: #666;
  width: 15px;
}

.ranking-list .rank-icon {
  width: 15px;
  text-align: center;
}

.ranking-list .rank-dash {
  color: #839b25;
  font-weight: bold;
}

.ranking-list .rank-thumb {
  width: 35px;
  height: 50px;
  object-fit: cover;
  border-radius: 3px;
}

.ranking-list .rank-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: calc(100% - 80px);
}

.ranking-list .rank-title {
  color: #fff;
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px 0;
}

.ranking-list .rank-year {
  color: #888;
  font-size: 11px;
}

.view-more {
  display: block;
  font-size: 12px;
  color: #666;
  text-decoration: none;
  margin-top: 15px;
  transition: color 0.3s;
}
.view-more:hover {
  color: #efb003;
}

/* Category Badges */
.badge-cat {
  padding: 4px 12px;
  border-radius: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
}

/* Responsive Ranking */
@media (max-width: 992px) {
  .ranking-board {
    grid-template-columns: repeat(2, 1fr);
  }
  .ranking-col:nth-child(2) {
    border-right: none;
  }
  .ranking-col:nth-child(1), .ranking-col:nth-child(2) {
    border-bottom: 1px solid #2d2d35;
  }
}
@media (max-width: 600px) {
  .ranking-board {
    grid-template-columns: 1fr;
  }
  .ranking-col {
    border-right: none !important;
    border-bottom: 1px solid #2d2d35;
  }
  .ranking-col:last-child {
    border-bottom: none;
  }
}

/* --- TOP 10 TRONG NGÀY --- */
.top10-list {
  padding-bottom: 30px; 
  margin-bottom: 0px;
}

.top10-card {
  width: 180px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s;
}

.top10-card:hover {
  transform: translateY(-10px);
}

.top10-img-box {
  width: 100%;
  height: 260px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.top10-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.top10-card:hover .top10-img-box img {
  transform: scale(1.05);
}

.top10-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: #00c853; 
  color: white;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  z-index: 2;
  white-space: nowrap;
}

.top10-info-container {
  display: flex;
  align-items: flex-start;
  margin-top: 15px;
  position: relative;
}

.top10-rank {
  font-size: 55px;
  font-weight: 900;
  font-style: italic;
  color: #f1c40f; 
  line-height: 0.8;
  margin-left: -10px;
  margin-right: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.top10-text {
  flex: 1;
  overflow: hidden;
}

.top10-title {
  font-size: 13px;
  font-weight: bold;
  color: white;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.top10-sub {
  font-size: 11px;
  color: #aaa;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- PHIM THEO QUỐC GIA (SIDEBAR LAYOUT) --- */
.country-section {
  padding: 30px; 
  background-color: #1a1a20; 
  border-radius: 10px;
}

.country-group {
  display: flex;
  align-items: center; /* Căn giữa theo chiều dọc để title nằm ngang hàng với slider */
  margin-bottom: 40px;
}

.country-sidebar {
  width: 200px;
  flex-shrink: 0;
  padding-right: 20px;
}

.country-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  
  /* Hiệu ứng chuyển sắc (Gradient) */
  background: linear-gradient(to right, #bca0c9, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block; /* Quan trọng để gradient bao phủ đúng diện tích chữ */
}

.country-view-all {
  font-size: 13px;
  color: #efb003; /* Chuyển sang màu vàng đặc trưng cho nổi bật */
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
}

.country-view-all:hover {
  opacity: 1;
  transform: translateX(5px);
  color: #fff;
}

.country-slider-wrapper {
  flex: 1;
  width: calc(100% - 200px);
  position: relative;
  overflow: visible; /* Cho phép nội dung bên trong thoát ra ngoài khung của wrapper */
  padding-bottom: 180px; 
  margin-top: -10px;
  margin-bottom: -170px; 
}

.country-section .movie-list {
  margin: 0 !important;
  padding: 0 0 180px 0 !important; 
  margin-bottom: -170px !important;
  gap: 15px !important;
}

.country-section .movie-list::-webkit-scrollbar {
  display: none; /* Ẩn scrollbar trên Chrome/Safari */
}

.country-section .movie-card {
  width: calc((100% - 45px) / 4) !important; /* Chia đều 4 phim mỗi hàng */
  height: 230px !important;
  transition: transform 0.3s ease;
}

.country-section .item-info {
  height: 140px !important; /* Tỷ lệ lại ảnh cho phù hợp chiều rộng mới */
}

.country-slider-wrapper .slider-btn {
  top: 80px !important; 
  z-index: 50;
  background: rgba(0, 0, 0, 0.7);
}

.country-slider-wrapper .prev-btn {
  left: 0; /* Reset lại vị trí nút vì lề đã được xử lý bằng margin âm của movie-list */
}

.country-slider-wrapper .next-btn {
  right: 0;
}

.country-divider {
  height: 1px;
  background-color: #2d2d35;
  margin-bottom: 40px;
}

/* Responsive cho layout ngang này */
@media screen and (max-width: 992px) {
  .country-group {
    flex-direction: column;
    align-items: flex-start;
  }
  .country-sidebar {
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .country-title {
    margin-bottom: 0;
    font-size: 20px;
  }
  .country-title span {
    display: inline !important; /* Không rớt dòng trên mobile */
  }
  .country-slider-wrapper {
    width: 100%;
    padding-bottom: 100px;
    margin-bottom: -90px;
  }
  .country-section .movie-card {
    width: calc((100% - 15px) / 2) !important; /* Mobile hiện 2 phim */
    height: 200px !important;
  }
  .country-section .item-info {
    height: 110px !important;
  }
}

/* ============== Actor Section in Video Modal ============== */
.actor-container {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.actor-section-title {
  color: #efb003;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.actor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 130px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Custom scrollbar for actor list */
.actor-list::-webkit-scrollbar {
  width: 4px;
}
.actor-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
}
.actor-list::-webkit-scrollbar-thumb {
  background: #efb003;
  border-radius: 5px;
}

.actor-tag {
  background: rgba(255, 255, 255, 0.07);
  color: #d4d4d4;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: "Inter", sans-serif;
}

.actor-tag i {
  font-size: 11px;
  color: #efb003;
  transition: transform 0.2s ease;
}

.actor-tag:hover {
  background: linear-gradient(135deg, rgba(239, 176, 3, 0.25) 0%, rgba(239, 176, 3, 0.1) 100%);
  border-color: rgba(239, 176, 3, 0.6);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 176, 3, 0.2);
}

.actor-tag:hover i {
  transform: scale(1.2);
  color: #efb003;
}

.actor-tag:active {
  transform: translateY(0px) scale(0.97);
  box-shadow: none;
}

/* ============== Search Autocomplete Dropdown ============== */
.search-suggest-box {
  /* globally highest to always cover content */
  z-index: 99999 !important;

  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  background: rgba(18, 18, 26, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 176, 3, 0.25);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 9999;
  /* Ẩn mặc định */
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-suggest-box.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Scrollbar của dropdown */
.search-suggest-box::-webkit-scrollbar {
  width: 4px;
}
.search-suggest-box::-webkit-scrollbar-track {
  background: transparent;
}
.search-suggest-box::-webkit-scrollbar-thumb {
  background: rgba(239, 176, 3, 0.4);
  border-radius: 4px;
}
.search-suggest-box::-webkit-scrollbar-thumb:hover {
  background: #efb003;
}

/* Mỗi dòng gợi ý */
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover {
  background: rgba(239, 176, 3, 0.1);
}

.suggest-item:hover .suggest-title {
  color: #efb003;
}

.suggest-item:hover .suggest-play-icon {
  opacity: 1;
  transform: scale(1.1);
  color: #efb003;
}

/* Thumbnail nhỏ */
.suggest-thumb {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #222;
}

/* Khối thông tin */
.suggest-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.suggest-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.suggest-meta {
  color: #888;
  font-size: 11px;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon play bên phải */
.suggest-play-icon {
  font-size: 11px;
  color: rgba(239, 176, 3, 0.4);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}

/* Responsive mobile */
@media screen and (max-width: 768px) {
  .search-suggest-box {
  /* globally highest to always cover content */
  z-index: 99999 !important;

    width: calc(100vw - 30px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    max-height: 300px;
  }
  .search-suggest-box.show {
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1) rotate(15deg);
}

.theme-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
  display: block;
}

.theme-toggle-btn:hover .theme-icon {
  transform: rotate(30deg) scale(1.15);
}

/* ============================================================
   LIGHT MODE OVERRIDES  –  body.light-mode
   ============================================================ */
body.light-mode {
  background: linear-gradient(135deg, #f0f4ff 0%, #fef3f3 50%, #f0fff4 100%);
}

/* Navbar - Transparent over hero image */
body.light-mode .navbar,
body.light-mode nav {
  background: transparent;
  backdrop-filter: none;
}

body.light-mode .menu ul li,
body.light-mode .nav-link li {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

body.light-mode .theme-toggle-btn {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.light-mode .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

body.light-mode .action-btn {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  border: none;
}

body.light-mode .search-container {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .search-container input {
  color: #1e293b;
}

body.light-mode .search::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

/* Hero header - Full cinematic image background like dark mode */
body.light-mode header {
  background-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0) 25%,
      rgba(0, 0, 0, 0) 60%,
      rgba(240, 244, 255, 0.5) 85%,
      #f0f4ff 100%
    ),
    url("./ig/a1.jpg");
}

body.light-mode .movie-title,
body.light-mode .hero-movie-title,
body.light-mode .movie-desc {
  color: #fff;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.7);
}

body.light-mode .movie-type .type {
  background: rgba(0, 0, 0, 0.40);
  color: #fff;
  backdrop-filter: blur(6px);
}

/* Main body sections */
body.light-mode .section-wrapper,
body.light-mode .main,
body.light-mode .content-section {
  background: transparent;
}

/* Section headings & branding */
/* Giữ chữ trắng cho các phần nằm trên nền ảnh (hero area) */
body.light-mode .hero-movie-title,
body.light-mode .hero-content h1,
body.light-mode .hero-content h3 {
  color: #fff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Chỉ đổi màu tối cho các tiêu đề trong phần nội dung chính (main content) */
body.light-mode main .section-header h2,
body.light-mode main h2 {
  color: #1e293b !important;
}

/* NTB MOVIECHILL text in light mode */
body.light-mode .Manufacturer,
body.light-mode .Manufacturer span {
  color: #1e293b !important;
}

body.light-mode .see-all-btn,
body.light-mode .view-all {
  color: #6366f1;
}

/* Movie cards */
body.light-mode .card-wrapper {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5ff 100%);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

body.light-mode .movie-card:hover .card-wrapper {
  background: linear-gradient(145deg, #ffffff 0%, #e8edff 100%);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.3);
}

body.light-mode .title-vn {
  color: #1e293b !important;
}

body.light-mode .title-en {
  color: #64748b !important;
}

body.light-mode .movie-list {
  color: #1e293b;
}

/* Trending & ranking lists */
body.light-mode .trending-item,
body.light-mode .ranking-item,
body.light-mode .rank-item {
  background: linear-gradient(135deg, #ffffff, #f1f5ff);
  border: 1px solid rgba(99, 102, 241, 0.1);
  color: #1e293b;
}

body.light-mode .rank-number {
  color: #6366f1;
}

/* Category boxes - make them pop with vivid gradients */
body.light-mode .box1 { background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); }
body.light-mode .box2 { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
body.light-mode .box3 { background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%); }
body.light-mode .box4 { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
body.light-mode .box5 { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }
body.light-mode .box6 { background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%); }

body.light-mode .box1:hover { box-shadow: 0 12px 30px rgba(59, 130, 246, 0.6); }
body.light-mode .box2:hover { box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6); }
body.light-mode .box3:hover { box-shadow: 0 12px 30px rgba(139, 92, 246, 0.6); }
body.light-mode .box4:hover { box-shadow: 0 12px 30px rgba(245, 158, 11, 0.6); }
body.light-mode .box5:hover { box-shadow: 0 12px 30px rgba(239, 68, 68, 0.6); }
body.light-mode .box6:hover { box-shadow: 0 12px 30px rgba(236, 72, 153, 0.6); }

/* Dropdown menus */
body.light-mode .menu1 {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

body.light-mode .menu1 ul li {
  color: #1e293b;
}

body.light-mode .menu1 ul li:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  box-shadow: none;
}

/* Footer */
body.light-mode .footer {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

/* Modals */
body.light-mode .video-modal-content {
  background: linear-gradient(145deg, #ffffff, #f1f5ff);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 25px 80px rgba(99, 102, 241, 0.2);
}

body.light-mode #video-title {
  color: #1e293b !important;
}

body.light-mode .video-close-btn {
  color: #64748b;
}

/* Light mode: Video Player Episode & Server list */
body.light-mode .video-modal-content h4 {
  color: #1e293b !important;
}

body.light-mode .server-container, 
body.light-mode .episode-container {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .server-btn, 
body.light-mode .ep-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .server-btn:hover, 
body.light-mode .ep-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}

body.light-mode .server-btn.active {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3) !important;
}

body.light-mode .ep-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

body.light-mode .video-close-btn:hover {
  color: #1e293b;
}

/* Domain link bar - Improved separator for light mode */
body.light-mode .domain-link {
  background: linear-gradient(90deg, #ffffff 0%, #f8faff 50%, #ffffff 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.08);
  color: #1e293b;
}

/* Scrollbar in light mode */
body.light-mode::-webkit-scrollbar-track {
  background: #f1f5f9;
}

body.light-mode::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1, #a855f7);
}

/* Slider buttons */
body.light-mode .slider-btn {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

body.light-mode .slider-btn:hover {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
}

/* Light mode: Like & Chi Tiet buttons need dark colors to be visible on white card */
body.light-mode .btn-icon {
  background: rgba(0, 0, 0, 0.08);
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-weight: 700;
}

body.light-mode .btn-icon:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.3);
}

/* Search suggestions - fully opaque to cover all content behind */
body.light-mode .search-suggest-box {
  /* globally highest to always cover content */
  z-index: 99999 !important;

  background: #ffffff !important;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  z-index: 99999 !important;
}

body.light-mode .suggest-item {
  color: #1e293b;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

body.light-mode .suggest-item:hover {
  background: rgba(99, 102, 241, 0.07);
}

body.light-mode .suggest-title {
  color: #1e293b !important;
}

body.light-mode .suggest-meta {
  color: #64748b !important;
}

body.light-mode header .search-container {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
body.light-mode header .search-container input {
  color: #ffffff;
}
body.light-mode header .search-container input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}