/* ---------- Hongguo clone: bổ sung ---------- */
html[data-theme="hongguo-original"],
:where(html[data-theme="hongguo-original"]) body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* chặn cuộn nền khi mở modal */
html[data-theme="hongguo-original"].ns-lock,
:where(html[data-theme="hongguo-original"]) body.ns-lock {
  overflow: hidden !important;
}

/* ---------- Overlay chung ---------- */
:where(html[data-theme="hongguo-original"]) .ns-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
:where(html[data-theme="hongguo-original"]) .ns-overlay.show {
  display: flex;
}
:where(html[data-theme="hongguo-original"]) .ns-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
:where(html[data-theme="hongguo-original"]) .ns-dialog-wrap {
  position: relative;
  z-index: 1;
  max-width: 96vw;
  max-height: 94vh;
  transform-origin: center center;
}
:where(html[data-theme="hongguo-original"]) .ns-dialog-wrap .pc-login-dialog-I1zYTU {
  max-height: 94vh;
}

/* ---------- Modal tải app ---------- */
:where(html[data-theme="hongguo-original"]) .ns-dl-box {
  position: relative;
  z-index: 1;
  width: 300px;
  max-width: 88vw;
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: #222424;
  color: #fff;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
:where(html[data-theme="hongguo-original"]) .ns-dl-qr {
  display: block;
  width: 170px;
  height: 170px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}
:where(html[data-theme="hongguo-original"]) .ns-dl-box p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 22px;
  font-family: "PingFang SC", sans-serif;
}
:where(html[data-theme="hongguo-original"]) .ns-dl-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
:where(html[data-theme="hongguo-original"]) .ns-dl-close:hover {
  color: #fff;
}

/* ---------- Header: dropdown khi bấm (mobile / touch) ---------- */
:where(html[data-theme="hongguo-original"]) .pc-page-BTzUmP .pc-dropdown-nav-uopGHx.ns-open .pc-dropdown-menu-nW0Gzq {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: none;
}

/* ---------- Header: đóng popup QR ---------- */
:where(html[data-theme="hongguo-original"]) .pc-download-P_xecQ.ns-guide-closed:hover .pc-guide-box-PEF_dz {
  display: none !important;
}

/* ---------- Rail: nút trái tạo động ---------- */
:where(html[data-theme="hongguo-original"]) .pc-rail-mask-left-kucfPK .pc-rail-arrow-left-OtgdSb {
  left: 4px;
}
:where(html[data-theme="hongguo-original"]) .pc-rail-mask-left-kucfPK {
  left: -1px;
}
:where(html[data-theme="hongguo-original"]) .pc-card-rail-EBQ1oj {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
:where(html[data-theme="hongguo-original"]) .pc-card-rail-EBQ1oj::-webkit-scrollbar {
  display: none !important;
}

/* ---------- Hero: nút cuộn ---------- */
:where(html[data-theme="hongguo-original"]) .pc-hero-scroll-axDkKm {
  cursor: pointer;
}

/* ---------- Fallback reveal hàng 热播短剧 ---------- */
:where(html[data-theme="hongguo-original"]) .pc-featured-animation-wrapper-ThhpsL.ns-featured-on > .pc-header-nR8KVS {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: none !important;
}
:where(html[data-theme="hongguo-original"]) .pc-featured-animation-wrapper-ThhpsL.ns-featured-off > .pc-header-nR8KVS {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: none !important;
}

/* ---------- Hàng 热播短剧: hiện sau khi poster bay xong ---------- */
:where(html[data-theme="hongguo-original"]) .pc-page-BTzUmP {
  z-index: 50;
}
:where(html[data-theme="hongguo-original"]) .pc-page-VWGA8l {
  z-index: 3;
}
:where(html[data-theme="hongguo-original"]) .pc-scatter-scene-jzCaRr {
  z-index: 4;
}

/* ---------- Tắt blur/fade intro khi tải trang (giữ animation scroll) ---------- */
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-background-strip-UB8ju5,
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-download-ZDATUY,
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-logo-hFm4Du,
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-scroll-axDkKm,
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-slogan-aSwNRX,
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-scatter-card-A9ta9y {
  animation: none !important;
}
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-background-strip-UB8ju5 {
  opacity: 1 !important;
  filter: none !important;
}
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-download-ZDATUY,
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-slogan-aSwNRX {
  opacity: 1 !important;
  filter: none !important;
}
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-logo-hFm4Du {
  opacity: var(--pc-hero-logo-opacity) !important;
  filter: none !important;
}
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-hero-scroll-axDkKm {
  opacity: var(--pc-more-opacity) !important;
  filter: none !important;
}
:where(html[data-theme="hongguo-original"]) .pc-intro-ready-yHIqhb .pc-scatter-card-A9ta9y {
  opacity: 1;
  filter: none !important;
}

/* ---------- Mobile landing gate ---------- */
:where(html[data-theme="hongguo-original"]) .ns-mobile-gate { display: none; }
:where(html[data-theme="hongguo-original"]) .ns-mobile-gate.ns-gate-force { display: block; }
@media (max-width: 768px) {
  :where(html[data-theme="hongguo-original"]) .ns-mobile-gate { display: block; }
  html[data-theme="hongguo-original"].ns-gate-open, :where(html[data-theme="hongguo-original"]) body.ns-gate-open { overflow: hidden !important; height: 100%; }
}
:where(html[data-theme="hongguo-original"]) .ns-mobile-gate.ns-gate-hidden { display: none !important; }

/* ---------- Category: pagination chuyển grid 1/2/3/34 ---------- */
:where(html[data-theme="hongguo-original"]) .pc-pagination-p6PHeC [class*="pc-item-"] {
  cursor: pointer;
}
:where(html[data-theme="hongguo-original"]) .pc-pagination-p6PHeC [class*="pc-item-"][aria-disabled="true"] {
  cursor: default;
}

/* ---------- Category mobile: scale 10rem layout + không tràn ngang ở tablet ---------- */
html[data-theme="hongguo-original"].ns-cat-mobile-page {
  font-size: min(10vw, 64px) !important;
}
html[data-theme="hongguo-original"].ns-cat-mobile-page .pc-category-nav-eYIenx {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
html[data-theme="hongguo-original"].ns-cat-mobile-page .pc-content-types-jLM1l0,
html[data-theme="hongguo-original"].ns-cat-mobile-page .pc-tags-QMxdu0 {
  width: 100% !important;
  max-width: 100% !important;
}
html[data-theme="hongguo-original"].ns-cat-mobile-page .pc-tags-QMxdu0 {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
html[data-theme="hongguo-original"].ns-cat-mobile-page .pc-tags-QMxdu0::-webkit-scrollbar {
  display: none;
}
html[data-theme="hongguo-original"].ns-cat-mobile-page .pc-tags-QMxdu0 .pc-tag-vD2QT8 {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ---------- Home: the original mobile layout behind the landing gate ---------- */
:where(html[data-theme="hongguo-original"]) .ns-home-mobile {
  display: none;
}
@media (max-width: 768px) {
  html[data-theme="hongguo-original"].ns-home-page {
    font-size: min(10vw, 64px) !important;
  }
  html[data-theme="hongguo-original"].ns-home-page #root .pc-container-GZW8Fw {
    display: none;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-page-IGqlPw,
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-container-HjIuqt {
    left: 50%;
    width: 100%;
    max-width: 640px;
    transform: translateX(-50%);
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-card-rail-ZAMiX2 {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-page-CKwOub {
    position: relative;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile a {
    text-decoration: none;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .ns-mobile-dot {
    border: 0;
    padding: .18rem .07rem;
    background: transparent;
    cursor: pointer;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .ns-mobile-dot[aria-pressed="true"] .m-indicator-icon-cvje5o {
    background: #fff;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-btn-VZM03v {
    border: 0;
    font-family: inherit;
    cursor: pointer;
  }
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-card-TeGjTY:focus-visible,
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile button:focus-visible {
    outline: 2px solid #ff9233;
    outline-offset: -2px;
  }
  html[data-theme="hongguo-original"].ns-home-page .v2-footer-fIKhHq {
    max-height: 100%;
    overflow-y: auto;
  }
  html[data-theme="hongguo-original"].ns-home-page .v2-mask-Xcd2Vx {
    height: 100dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  :where(html[data-theme="hongguo-original"]) .ns-home-mobile .m-track-eByvMx {
    transition: none !important;
  }
}

