@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Nunito:wght@400;700&display=swap');
body {
  font-family: 'Be Vietnam Pro', 'Inter', 'Nunito Sans', sans-serif;
  line-height: 1.6;
  background-color: #0d1117;
  color: #ddd;
  text-align: center;
  padding: 10px;
}
/* ===== HEADER CHÍNH ===== */
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #000;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  }
  .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .logo span {
    font-size: 22px;
    font-weight: bold;
    color: #f30505;
  }
.search-box form {
  display: flex;       
  align-items: center;
  gap: 5px;
  width: 100%;         
}
  .search-box {
    flex: 1;
    margin: 0 20px;
    display: flex;
  }
  .search-box input {
    width: 100%;
    padding: 8px;
    border: none;
    outline: none;
  }
  .search-box button {
    background: #f30505;
    border: none;
    padding: 8px 15px;
    color: #fff;
    cursor: pointer;
  }
  .header-icons {
    display: flex;
    gap: 10px;
  }
  .header-icons button {
    background: #d00;
    border: none;
    color: #fff;
    font-size: 18px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 3px;
  }
  /* ===== THANH MENU NGANG ===== */
  nav {
    background: #000;
    border-top: 1px solid #222;
    margin: 0;
  padding: 0;
  }
  .menu {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .menu li {
    padding: 10px 15px;
    font-weight: bold;
  }
  .menu a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
  }
  .menu a:hover {
    color: #f30505;
  }
  /* ===== RESPONSIVE ===== */
  .menu-toggle {
    display: none;
    background: #f30505;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 3px;
  }
  @media (max-width: 768px) {
    .search-box {
      display: none;
    }
    .menu {
    position: fixed;           /* cố định toàn màn hình */
    left: 0;
    width: 100%;
    height: calc(80vh); /* phần còn lại của màn hình */
    background: #000;
    flex-direction: column;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    display: none;
    z-index: 9999;             /* nổi lên trên tất cả */
  }
    .menu.active {
      display: flex;
    }
     .menu li {
      border-bottom: 1px solid #222;
      text-align: left;
      padding: 12px 20px;
    }
    .menu li:last-child {
      border-bottom: none;
    }
    .menu-toggle {
      display: block;
    }
     .submenu {
    display: none;
  }
  .dropdown.show .submenu {
    display: block;
  }
   .dropdown.show .dropdown-toggle i {
    transform: rotate(180deg);
    transition: transform 0.3s;
  }
  }
  /* ===== NỘI DUNG ===== */
  main {
    padding-top: 80px;
  }
 /* ===== SUBMENU ===== */
.submenu {
  display: none;
  position: absolute;
  text-align: left;
  top: 100%;
  left: 0;
  background: #000;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 160px;
  max-height: 100vh;
  border: 1px solid #222;
  z-index: 10;
  scrollbar-width: thin; /* (Tùy chọn) Thanh cuộn mảnh cho Firefox */
}
.menu-item.dropdown.show .submenu {
  display: block; /* hiện submenu khi class show có trên <li> */
}
.submenu li a {
  display: block;
  padding: 5px 0;
  color: #fff;
  text-decoration: none;
  font-weight: normal;
}
.submenu li a:hover {
  /* background: #f30505; */
  color: #f30505;
}
.dropdown {
  position: relative;
}
/* Hiển thị khi hover (desktop) */
.dropdown:hover .submenu {
  display: block;
}
/* Khi có class 'show' (mobile) */
.dropdown.show .submenu {
  display: block;
}
a {
  /* color: #fff; */
  font-size: 16px;
  text-decoration: none;
}
.title-related a {
    color: #d7d7d7;
    font-size: 18px;
  }
  .title-related a:hover,
.title-related a:active {
  color: #f30505;          /* đỏ nhấn mạnh */
   transition: color 0.3s ease;
}
 .lienquan {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
    color: #cfcfcf;
    text-align: center;
    bottom: 10px;
  }
  .lienquan .line {
    flex: 1;
    height: 2px;
    background: #122035;
    min-width: 10px;
    transform: translateY(-2px);
  }
  .views {
    font-size: 12px;
    color: #bdbdbd;
    padding: 5px 0;
  }
  .title {
    color: #d7d7d7;
  }
hr {
  border: none;
  border-top: 1px solid rgb(20 40 69);
  margin: 10px 0;
}
#playlive {
  width: 80%;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}
@media screen and (max-width: 430px) {
  main {
    padding-top: 50px;
}
  #playlive {
    width: 100%;
  }
  .list-related {
    width: 100%;
    padding: 5px 0;
  }
  .title-related {
    text-align: left;
    line-height: 24px;
    font-weight: 500;
  }
  .title-related a {
    color: #d7d7d7;
    font-size: 18px;
  }
  .lienquan {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
    color: #cfcfcf;
    text-align: left;
    bottom: 10px;
  }
  .lienquan .line {
    flex: 1;
    height: 2px;
    background: #122035;
    min-width: 10px;
    transform: translateY(-2px);
  }
  .views {
    text-align: left;
    font-size: 12px;
    color: #bdbdbd;
    padding: 5px 0;
  }
  .title {
    color: #d7d7d7;
  }
}
video {
  width: 100%;
  /* height: 100%; */
  border-radius: 12px;
}
.wrap-pd {
  padding: 30px;
  text-align: center;
}
.lds-facebook {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-facebook div {
  display: inline-block;
  position: absolute;
  left: 8px;
  width: 16px;
  background: #fff;
  animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}
.lds-facebook div:nth-child(1) {
  left: 8px;
  animation-delay: -0.24s;
}
.lds-facebook div:nth-child(2) {
  left: 32px;
  animation-delay: -0.12s;
}
.lds-facebook div:nth-child(3) {
  left: 56px;
  animation-delay: 0;
}
@keyframes lds-facebook {
  0% {
    top: 8px;
    height: 64px;
  }
  50%, 100% {
    top: 24px;
    height: 32px;
  }
}
footer {
  background: #0d1117;        /* nền tối */
  color: #979797;             /* chữ xám nhạt */
  padding: 5px 0;
  text-align: center;
  font-size: 14px;
}
/* Link trong footer */
footer a {
  color: #979797;
  text-decoration: none;
  transition: color 0.3s ease;
}
/* Hover hoặc Active */
footer a:hover,
footer a:active {
  color: #f30505;          /* đỏ nhấn mạnh */
}
/* Nếu muốn footer link khi nhấn giữ khác màu */
footer a:active {
  color: #d7d7d7;
}
.pagination-wrapper {
  text-align: center;
  margin: 25px 0;
}
.pagination-wrapper ul.page-numbers {
  display: inline-flex;
  list-style: none;
  padding: 0;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-wrapper ul.page-numbers li {
  border: 1px solid #444;
  border-radius: 4px;
  padding: 5px 10px;
  transition: all 0.3s ease;
  background: #000;
}
/* Link thường */
.pagination-wrapper ul.page-numbers li a,
.pagination-wrapper ul.page-numbers li span {
  color: #fff;
  text-decoration: none;
  display: block;
}
/* Hover */
.pagination-wrapper ul.page-numbers li:hover {
  background: #f30505;
  border-color: #f30505;
}
/* 🔥 Ô đang active (hiện tại) đỏ toàn phần */
.pagination-wrapper ul.page-numbers li span.current {
  background: #f30505;
  border-color: #f30505;
  color: #fff;
  font-weight: bold;
}
/* Đảm bảo khi active, toàn ô đỏ chứ không chỉ chữ */
.pagination-wrapper ul.page-numbers li:has(span.current) {
  background: #f30505;
  border-color: #f30505;
}
/* Nút prev / next */
.pagination-wrapper ul.page-numbers li a.prev,
.pagination-wrapper ul.page-numbers li a.next {
  font-size: 18px;
  padding: 5px 12px;
}
#load-more {
    display: flex;
    flex-direction: column;   /* chữ trên, spinner dưới */
    align-items: center;      /* căn giữa */
    justify-content: center;
    margin: 30px auto;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff4d6d, #ff6b81);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}
#load-more.loading::after {
    content: '';
    display: block;
    margin-top: 5px;          /* khoảng cách giữa chữ và spinner */
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}