/* Layout Grid chuẩn BEM */
.related {
  margin-top: 20px;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 10px;
  row-gap: 15px;
}

/* Nút Xem thêm đẹp, clean */
.related__actions {
  text-align: center;
  margin-top: 30px;
}

.related__btn {
  background: var(--color-primary);
  color: #dadada;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 40px;
}

.related__btn:hover {
}

/* Hiệu ứng Loading Spinner */
.spinner {
  animation: rotate 2s linear infinite;
  width: 20px;
  height: 20px;
}
.spinner .path {
  display: block;
  stroke: #dadada;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}
@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* Hiệu ứng Fade In khi load ajax xong */
.devvip-fade-in {
  animation: fadeInName 0.6s ease-out forwards;
  opacity: 0; /* Mặc định ẩn để animate */
}

@keyframes fadeInName {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:root {
  /* --color-primary: #ff3565; */
}
*,
*::before,
*::after {
  box_sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  color: #dadada;
  background-color: #181818;
  text-rendering: optimizeSpeed;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: #fff;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--color-primary);
}

img,
picture,
video,
canvas,
svg,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

iframe {
  width: 100%;
  aspect-ratio: 16/9;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  font-style: italic;
  color: #aaa;
}

::selection {
  background-color: var(--color-primary);
  color: #dadada;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.icon-svg {
  display: block;
  width: 27px;
  height: 27px;
  stroke: #dadada;
  stroke-width: 1.5;
}

/* === BLOCK: xheader === */
.xheader {
  background: #181818;
  position: relative;
  z-index: 1000;
  width: 100%;
}

.xheader__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

/* --- MOBILE VIEW (Default) --- */

/* 1. Top Bar: Logo + Toggle */
.xheader__top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 55px;
  margin-bottom: 10px;
}

.xheader__logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--xh-primary);
  text-transform: uppercase;
}

.xheader__toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--xh-text);
  padding: 4px;
}

/* WRAP */
.xheader__search-wrap {
  width: 100%;
}

/* FORM */
.xheader__search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #282828;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

/* INPUT */
.xheader__search-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  background-color: #282828;
  border: 1px solid #282828;
  color: #ccc;
  outline: none;
  height: 40px;
  box-shadow: 0 0 1px #ffffff4d, inset 0 0 5px #000;
}

.xheader__search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
}

/* BUTTON */
.xheader__search-btn {
  width: 60px;
  height: 40px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #0000004d 0, #0000 70%);
  box-shadow: 0 1px 6px 0 #0000001f;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.xheader__search-btn:hover {
  filter: brightness(1.1);
}

.xheader__search-btn svg {
  stroke: #fff;
}

/* 3. Nav: Overlay Side Left */
.xheader__nav-wrap {
  /* Mặc định ẩn overlay logic */
}

.xheader__nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 70%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1002;
  display: flex;
  flex-direction: column;
}

.xheader__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: var(--xh-transition);
  z-index: 1001;
}

/* State Open Mobile Menu */
.xheader__nav-wrap--open .xheader__nav {
  transform: translateX(0);
}
.xheader__nav-wrap--open .xheader__overlay {
  opacity: 1;
  visibility: visible;
}

/* Mobile Nav Header (Close btn) */
.xheader__mobile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.xheader__mobile-title {
  font-weight: bold;
  font-size: 1.2rem;
}

.xheader__close {
  background: none;
  border: none;
  cursor: pointer;
}

.xheader__menu {
  list-style: none;
  padding: 0;
  overflow-y: auto; /* Scroll nếu menu dài */
}

.xheader__link {
  display: block;
  padding: 8px 10px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s ease;
}

.xheader__link:hover,
.xheader__link--active {
  color: #f9f9f9;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-primary) 70%, black) 0%,
    var(--color-primary) 100%
  );
}

.xmain {
  width: 100%;
  padding: 20px 0;
}

.xmain__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.xmain__heading,
.xsidebar__heading,
.video-single__title,
.related__heading,
.page-area__title {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 20px;
  padding: 6px 6px 6px 12px;
  border-left: 5px solid var(--color-primary);
  position: relative;
  background: #282828;
  color: #dadada;
  box-shadow: 0 8px 17px 0 #0003, 0 6px 6px 0 #00000030;
}

.xmain__header {
  margin-bottom: 15px;
}

.xmain__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 10px;
  row-gap: 20px;
}

.xvideo {
  overflow: hidden;
  transition: transform 0.2s ease;
}

.xvideo:hover {
}

.xvideo__thumb-wrap {
  position: relative;
  background: linear-gradient(90deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
  padding-top: 56.25%;
  overflow: hidden;
  width: 100%;
}

.xvideo__thumb {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s ease-in-out;
  z-index: 2;
}

.xvideo__thumb.is-loaded {
  opacity: 1;
}

.xvideo__thumb.skeleton-loading + .shimmer-layer, /* Fallback nếu sếp muốn dùng thẻ riêng */
.xvideo__thumb-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
  background-size: 200% 100%;
  animation: skeletonRun 1.5s infinite linear;
  z-index: 1; /* Nằm dưới ảnh thật */
  pointer-events: none;
}

.xvideo__thumb-wrap.loaded::before {
  display: none;
}

/* Keyframes Animation */
@keyframes skeletonRun {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.xvideo__label {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-primary) 70%, black) 0%,
    var(--color-primary) 100%
  );
  color: #dadada;
  font-size: 0.75rem;
  padding: 2px 6px;
  font-weight: 400;
  z-index: 5;
}

.xvideo__duration {
  display: none;
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  z-index: 5;
}

.xvideo__info {
  padding-top: 10px;
}

.xvideo__title {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  color: #dadada;
}

.xvideo__meta {
  display: none;
  font-size: 0.875rem;
  color: #606060;
  /*  display: flex;*/
  flex-wrap: wrap;
  gap: 10px;
}

.xsidebar__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 10px;
  row-gap: 20px;
}

.xvideo--small {
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.xvideo--small:hover {
  transform: none;
}

.xvideo--small .xvideo__link {
  flex-direction: column;
  display: flex;
  gap: 10px;
}

.xvideo--small .xvideo__thumb-wrap {
  width: 100%;
  /* padding-top: 67.5px;*/
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  padding-top: 56.25%;
  background-color: #000;
}

.xvideo--small .xvideo__info {
  padding: 0;
}

.xvideo--small .xvideo__title {
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  text-align: center;
}

.xpaging {
  margin-top: 30px;
}

.xpaging ul.page-numbers {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.page-numbers li {
  display: inline-flex;
}

.page-numbers a,
.page-numbers span.current {
  min-width: 35px;
  height: 35px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 400;
  color: #dadada;
  background-color: #333 !important;
  background: linear-gradient(180deg, #0000004d 0, #0000 70%);
  box-shadow: 0 1px 6px 0 #0000001f;
  text-decoration: none;
  transition: all 0.25s ease;
}

.page-numbers a:hover {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-primary) 70%, black) 0%,
    var(--color-primary) 100%
  );
}

.xpaging__prev,
.xpaging__next {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-numbers li span.current {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-primary) 70%, black) 0%,
    var(--color-primary) 100%
  );
}

.xpaging__prev svg,
.xpaging__next svg {
  display: block;
  stroke-width: 1.2;
  width: 20px;
  height: 20px;
}

.video-single {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 1rem;
}

.video-single__player-box {
  margin-bottom: 20px;
}

.video-single__player {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
}

.video-single__servers {
  display: inline-block;
  margin-bottom: 20px;
  background: #282828;
  padding: 10px;
}

.video-single__server-btn {
  display: inline-block;
  padding: 5px 12px;
  margin: 5px;
  background: var(--color-primary);
  color: #dadada;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.video-single__server-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.video-single__content {
  margin-bottom: 15px;
}

.breadcrumbs {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: #dadada;
  margin-bottom: 15px;
  background-color: #333 !important;
  background: linear-gradient(180deg, #0000004d 0, #0000 70%);
  border: 1px solid #333;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
}

.breadcrumbs__link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.25s;
}

.breadcrumbs__link:hover {
}

.breadcrumbs__item--current {
  font-weight: 400;
  color: #dadada;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 120px;
}

.breadcrumbs__separator {
  display: inline-flex;
  opacity: 0.5;
  align-items: center;
}

.breadcrumbs__separator svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 2.5;
}

.video-single__cats,
.video-single__tags {
  margin: 15px 0;
}

.video-single__cat-list,
.video-single__tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.video-single__cat-link,
.video-single__tag-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.85rem;
  padding: 5px 10px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-primary) 70%, black) 0%,
    var(--color-primary) 100%
  );
  color: #f4f4f4;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.video-single__cat-icon,
.video-single__tag-icon {
  display: inline-flex;
}

.video-single__cat-icon svg,
.video-single__tag-icon svg {
  stroke-width: 1.4;
  display: block;
  width: 15px;
  height: 15px;
}

.xmain__404 a {
  color: var(--color-primary);
  text-decoration: dotted underline;
}

.xfooter {
  background-color: #282828;
  color: #b0b0b0;
  font-size: 1rem;
  line-height: 1.6;
  width: 100%;
  margin-top: 35px;
}

.xfooter__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.xfooter__nav {
  margin-bottom: 20px;
}

.xfooter__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.xfooter__item {
}

.xfooter__link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.xfooter__link:hover {
  color: #dadada;
}

.xfooter__bottom {
}

@media (min-width: 768px) {
  .related__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .xvideo--small .xvideo__title {
    text-align: left;
  }
  .xvideo--small .xvideo__thumb-wrap {
    width: 120px;
    padding-top: 67.5px;
  }
  .xvideo--small .xvideo__link {
    flex-direction: row;
  }
  .xsidebar__list {
    display: flex;
    flex-direction: column;
  }
  .xmain__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) {
  .xmain__inner {
    flex-direction: row;
    align-items: flex-start;
  }

  .xmain__content {
    width: 70%;
  }

  .xmain__sidebar {
    width: 30%;
    position: sticky;
    top: 20px;
  }

  .xmain__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .xheader__container {
    display: flex;
    flex-wrap: wrap; /* Cho phép rớt dòng */
    align-items: center;
    padding-top: 15px;
    padding-bottom: 0;
  }

  /* 1. Layout: Logo (Left) */
  .xheader__top-bar {
    width: auto;
    flex-grow: 0;
    height: auto;
    margin-right: 30px;
  }

  .xheader__toggle {
    display: none; /* Ẩn nút hamburger */
  }

  /* 2. Layout: Search (Right/Center - Top Row) */
  .xheader__search-wrap {
    width: auto;
    flex-grow: 1; /* Chiếm phần còn lại */
    padding-bottom: 0;
    max-width: 350px;
    margin-left: auto; /* Đẩy sang phải nếu muốn */
  }

  /* 3. Layout: Nav (Bottom Row - Full Width) */
  .xheader__nav-wrap {
    width: 100%;
    margin-top: 15px;
    background: linear-gradient(180deg, #222 0, #333 50%, #222 51%, #151515);
  }

  .xheader__nav {
    position: static; /* Reset fixed */
    transform: none; /* Reset translate */
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    display: block;
  }

  .xheader__overlay,
  .xheader__mobile-head {
    display: none; /* Ẩn các thành phần mobile */
  }

  .xheader__menu {
    display: flex;
  }

  .xheader__item {
    border-right: 1px solid #121212;
    background: linear-gradient(180deg, #0000004d 0, #0000 70%);
  }

  .xheader__link {
    border-bottom: none;
    padding: 12px 15px;
    position: relative;
    color: #dadada;
  }

  /* Hiệu ứng hover line chuẩn UX */
  .xheader__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--xh-primary);
    transition: width 0.3s ease;
  }

  .xheader__link:hover::after,
  .xheader__link--active::after {
    background: #111;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.5); /* Đổ bóng vào trong */
    color: #fff;
  }
}

@media (min-width: 1200px) {
}
