/* =========================================================
   RTT home page layout
   - CSS riêng cho trang chủ, không nhét inline
   - Hero kiểu POPRCM nhưng hợp ảnh bìa truyện tranh
   - Top BXH + Top theo dõi dạng section full-width, thoáng hơn
   ========================================================= */

body.rtt-home-page {
  --home-panel: rgba(255, 255, 255, 0.88);
  --home-panel-2: rgba(247, 240, 255, 0.9);
  --home-text: #351857;
  --home-muted: #82679f;
  --home-line: rgba(143, 97, 216, 0.18);
  --home-shadow: 0 22px 58px rgba(68, 33, 117, 0.13);
  --home-radius: 30px;
}

/* Header hòa vào hero trên trang chủ */
body.rtt-home-page header.site-header,
body.rtt-home-page .site-header {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(31, 14, 52, 0.72), rgba(31, 14, 52, 0.06)) !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  backdrop-filter: blur(10px);
}

body.rtt-home-page header.site-header .header-container,
body.rtt-home-page .site-header .header-container {
  width: min(1240px, calc(100% - 34px)) !important;
  margin: 0 auto !important;
}

body.rtt-home-page header.site-header .header-bar a > div,
body.rtt-home-page header.site-header .rtt-header-ai,
body.rtt-home-page header.site-header .rtt-theme-toggle,
body.rtt-home-page header.site-header .rtt-header-bell,
body.rtt-home-page header.site-header .search-icon,
body.rtt-home-page header.site-header .login-signup-icon,
body.rtt-home-page .mobile-menu-toggle {
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 10px 24px rgba(18, 8, 30, 0.18) !important;
}

/* HERO */
.rtt-feature-hero {
  width: 100%;
  margin: 0 auto 34px;
}

.rtt-feature-stage {
  position: relative;
  min-height: min(760px, 78vh);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
  padding: 132px max(40px, calc((100vw - 1240px) / 2)) 62px;
  background:
    radial-gradient(circle at 82% 18%, rgba(143, 97, 216, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 239, 255, 0.9));
  border-bottom: 1px solid var(--home-line);
  box-shadow: 0 18px 54px rgba(68, 33, 117, 0.14);
}

.rtt-feature-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-position: center;
  background-size: cover;
  opacity: 0.24;
  filter: blur(18px) saturate(1.2);
  transform: scale(1.1);
}

.rtt-feature-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.84) 48%, rgba(255, 255, 255, 0.5) 100%),
    radial-gradient(circle at 80% 60%, rgba(143, 97, 216, 0.2), transparent 36%);
}

.rtt-feature-content,
.rtt-feature-visual {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.rtt-feature-kicker,
.rtt-clean-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--rtt-gradient-deep, linear-gradient(135deg, #6b37b6, #8f61d8));
  box-shadow: 0 12px 28px rgba(143, 97, 216, 0.2);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.rtt-feature-title {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--home-text) !important;
  font-family: "Oswald", var(--rtt-ui-font, Arial, sans-serif);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.08;
  font-weight: 1000;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: anywhere;
}

.rtt-feature-subtitle {
  max-width: 620px;
  margin: 12px 0 0;
  color: #8f61d8 !important;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.25;
  font-weight: 1000;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rtt-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.rtt-feature-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(143, 97, 216, 0.16);
  color: #4b2a77 !important;
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 8px 20px rgba(68, 33, 117, 0.08);
}

.rtt-feature-desc {
  max-width: 650px;
  margin: 22px 0 0;
  color: #59426f !important;
  font-size: 16px;
  line-height: 1.72;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rtt-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.rtt-feature-actions a {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 24px;
  text-decoration: none !important;
  font-weight: 1000;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.rtt-feature-actions a:hover { transform: translateY(-2px); }
.rtt-feature-primary {
  background: var(--rtt-gradient-deep, linear-gradient(135deg, #6b37b6, #8f61d8));
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(143, 97, 216, 0.25);
}
.rtt-feature-secondary {
  color: #442175 !important;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(143, 97, 216, 0.22);
}

.rtt-feature-visual {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.rtt-feature-poster {
  width: min(340px, 80%);
  aspect-ratio: 3 / 4.16;
  display: block;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.5);
  border: 8px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 72px rgba(53, 25, 90, 0.28);
  transform: rotate(1.2deg);
}

.rtt-feature-poster img,
.rtt-feature-thumb img,
.rtt-follow-cover img,
.rtt-rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rtt-feature-thumbs {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 12px;
  scroll-snap-type: x mandatory;
}

.rtt-feature-thumb {
  flex: 0 0 58px;
  width: 58px;
  height: 78px;
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #efe4ff;
  opacity: 0.72;
  box-shadow: 0 10px 22px rgba(68, 33, 117, 0.16);
  scroll-snap-align: center;
  transition: transform 0.16s ease, opacity 0.16s ease, outline-color 0.16s ease;
}

.rtt-feature-thumb.is-active {
  opacity: 1;
  outline: 4px solid rgba(143, 97, 216, 0.56);
  transform: translateY(-4px) scale(1.04);
}

/* HOME SECTIONS */
body.rtt-home-page .product.spad {
  padding-top: 34px;
}

body.rtt-home-page .product.spad > .container {
  max-width: 1240px;
}

body.rtt-home-page .rtt-home-rank-row,
body.rtt-home-page .rtt-home-follow-row {
  margin-top: 30px;
}

body.rtt-home-page .rtt-clean-section {
  position: relative;
  overflow: hidden;
  border-radius: var(--home-radius);
  background:
    radial-gradient(circle at 94% 0%, rgba(201, 167, 255, 0.16), transparent 36%),
    var(--home-panel) !important;
  border: 1px solid var(--home-line) !important;
  box-shadow: var(--home-shadow) !important;
}

body.rtt-home-page .rtt-clean-head,
body.rtt-home-page .rtt-ranking-title {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 0 20px !important;
}

body.rtt-home-page .rtt-clean-head h4,
body.rtt-home-page .rtt-ranking-title h5 {
  margin: 10px 0 0 !important;
  color: var(--home-text) !important;
  font-size: clamp(26px, 3vw, 34px) !important;
  line-height: 1.1 !important;
  font-weight: 1000 !important;
}

body.rtt-home-page .rtt-clean-head p {
  max-width: 440px;
  margin: 0 !important;
  color: var(--home-muted) !important;
  text-align: right;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 900;
}

/* Top BXH full-width */
body.rtt-home-page .rtt-ranking-sidebar.product__sidebar {
  margin: 0 !important;
}

body.rtt-home-page .rtt-home-rankings {
  padding: 28px !important;
}

body.rtt-home-page .rtt-ranking-title .rtt-ranking-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(143, 97, 216, 0.12);
  color: #8f61d8 !important;
  font-size: 12px;
  font-weight: 1000;
}

body.rtt-home-page .rtt-ranking-tabs.filter__controls {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
  margin: -10px 0 18px !important;
  padding: 0 !important;
  list-style: none !important;
}

body.rtt-home-page .rtt-ranking-tabs li {
  margin: 0 !important;
  padding: 8px 14px !important;
  border-radius: 999px;
  background: rgba(143, 97, 216, 0.1);
  color: #72578f !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  cursor: pointer;
}

body.rtt-home-page .rtt-ranking-tabs li:hover,
body.rtt-home-page .rtt-ranking-tabs li.active {
  background: var(--rtt-gradient-deep, linear-gradient(135deg, #6b37b6, #8f61d8)) !important;
  color: #fff !important;
}

body.rtt-home-page .rtt-ranking-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px !important;
  overflow: visible !important;
  max-height: none !important;
  padding: 0 !important;
}

body.rtt-home-page .rtt-rank-card {
  min-width: 0;
  display: grid !important;
  grid-template-columns: 44px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 12px;
  border-radius: 22px;
  color: #442175 !important;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(143, 97, 216, 0.14) !important;
  box-shadow: 0 10px 24px rgba(68, 33, 117, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

body.rtt-home-page .rtt-rank-card:hover,
body.rtt-home-page .rtt-follow-card:hover {
  transform: translateY(-3px);
  border-color: rgba(143, 97, 216, 0.34) !important;
  box-shadow: 0 16px 34px rgba(68, 33, 117, 0.13);
}

body.rtt-home-page .rtt-rank-number {
  color: #8f61d8 !important;
  font-size: 26px;
  line-height: 1;
  font-weight: 1000;
  text-align: center;
  letter-spacing: -0.08em;
}

body.rtt-home-page .rtt-rank-1 .rtt-rank-number,
body.rtt-home-page .rtt-rank-2 .rtt-rank-number,
body.rtt-home-page .rtt-rank-3 .rtt-rank-number {
  color: #ff4f93 !important;
}

body.rtt-home-page .rtt-rank-cover {
  width: 72px;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: #efe4ff;
}

body.rtt-home-page .rtt-rank-info {
  min-width: 0;
}

body.rtt-home-page .rtt-rank-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #442175 !important;
  font-size: 15px;
  line-height: 1.32;
  font-weight: 1000;
}

body.rtt-home-page .rtt-rank-info small,
body.rtt-home-page .rtt-rank-info em {
  display: block;
  margin-top: 4px;
  color: #8f61d8 !important;
  font-style: normal;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
}

/* Top theo dõi */
body.rtt-home-page .rtt-top-follow-section {
  padding: 28px !important;
}

body.rtt-home-page .rtt-top-follow-track {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 18px !important;
  overflow: visible !important;
  padding: 0 !important;
}

body.rtt-home-page .rtt-follow-card {
  position: relative;
  min-width: 0;
  display: block;
  padding: 10px;
  border-radius: 22px;
  color: #442175 !important;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(143, 97, 216, 0.14) !important;
  box-shadow: 0 10px 24px rgba(68, 33, 117, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

body.rtt-home-page .rtt-follow-rank {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  min-width: 38px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #ff4f93;
  color: #fff !important;
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(255, 79, 147, 0.24);
}

body.rtt-home-page .rtt-follow-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  border-radius: 16px;
  background: #efe4ff;
}

body.rtt-home-page .rtt-follow-body {
  display: block;
  padding: 10px 2px 2px;
}

body.rtt-home-page .rtt-follow-body strong {
  min-height: 2.65em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #442175 !important;
  font-size: 15px;
  line-height: 1.32;
  font-weight: 1000;
}

body.rtt-home-page .rtt-follow-body small,
body.rtt-home-page .rtt-follow-body em {
  display: block;
  margin-top: 4px;
  color: #8f61d8 !important;
  font-style: normal;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.rtt-loading-line,
.rtt-api-empty,
.rtt-api-error {
  margin: 0;
  color: var(--home-muted) !important;
  font-weight: 900;
}

/* Dark mode */
html[data-theme="dark"] body.rtt-home-page,
body.rtt-dark.rtt-home-page,
body.dark-mode.rtt-home-page {
  --home-panel: rgba(31, 21, 50, 0.92);
  --home-panel-2: rgba(44, 31, 69, 0.86);
  --home-text: #f7efff;
  --home-muted: #d8c5f2;
  --home-line: rgba(216, 191, 255, 0.18);
  --home-shadow: 0 22px 58px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-stage,
body.rtt-dark.rtt-home-page .rtt-feature-stage,
body.dark-mode.rtt-home-page .rtt-feature-stage {
  background:
    radial-gradient(circle at 80% 14%, rgba(143, 97, 216, 0.24), transparent 34%),
    rgba(20, 10, 34, 0.96) !important;
  border-bottom-color: var(--home-line);
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-shade,
body.rtt-dark.rtt-home-page .rtt-feature-shade,
body.dark-mode.rtt-home-page .rtt-feature-shade {
  background:
    linear-gradient(90deg, rgba(18, 10, 30, 0.98) 0%, rgba(23, 13, 39, 0.88) 52%, rgba(23, 13, 39, 0.58) 100%),
    radial-gradient(circle at 80% 56%, rgba(201, 167, 255, 0.16), transparent 38%);
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-title,
html[data-theme="dark"] body.rtt-home-page .rtt-clean-head h4,
html[data-theme="dark"] body.rtt-home-page .rtt-ranking-title h5,
html[data-theme="dark"] body.rtt-home-page .rtt-rank-info strong,
html[data-theme="dark"] body.rtt-home-page .rtt-follow-body strong,
body.rtt-dark.rtt-home-page .rtt-feature-title,
body.rtt-dark.rtt-home-page .rtt-clean-head h4,
body.rtt-dark.rtt-home-page .rtt-ranking-title h5,
body.rtt-dark.rtt-home-page .rtt-rank-info strong,
body.rtt-dark.rtt-home-page .rtt-follow-body strong,
body.dark-mode.rtt-home-page .rtt-feature-title,
body.dark-mode.rtt-home-page .rtt-clean-head h4,
body.dark-mode.rtt-home-page .rtt-ranking-title h5,
body.dark-mode.rtt-home-page .rtt-rank-info strong,
body.dark-mode.rtt-home-page .rtt-follow-body strong {
  color: #f7efff !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-subtitle,
html[data-theme="dark"] body.rtt-home-page .rtt-feature-desc,
html[data-theme="dark"] body.rtt-home-page .rtt-clean-head p,
html[data-theme="dark"] body.rtt-home-page .rtt-rank-info small,
html[data-theme="dark"] body.rtt-home-page .rtt-rank-info em,
html[data-theme="dark"] body.rtt-home-page .rtt-follow-body small,
html[data-theme="dark"] body.rtt-home-page .rtt-follow-body em,
body.rtt-dark.rtt-home-page .rtt-feature-subtitle,
body.rtt-dark.rtt-home-page .rtt-feature-desc,
body.rtt-dark.rtt-home-page .rtt-clean-head p,
body.rtt-dark.rtt-home-page .rtt-rank-info small,
body.rtt-dark.rtt-home-page .rtt-rank-info em,
body.rtt-dark.rtt-home-page .rtt-follow-body small,
body.rtt-dark.rtt-home-page .rtt-follow-body em,
body.dark-mode.rtt-home-page .rtt-feature-subtitle,
body.dark-mode.rtt-home-page .rtt-feature-desc,
body.dark-mode.rtt-home-page .rtt-clean-head p,
body.dark-mode.rtt-home-page .rtt-rank-info small,
body.dark-mode.rtt-home-page .rtt-rank-info em,
body.dark-mode.rtt-home-page .rtt-follow-body small,
body.dark-mode.rtt-home-page .rtt-follow-body em {
  color: #d8c5f2 !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-meta span,
html[data-theme="dark"] body.rtt-home-page .rtt-feature-secondary,
html[data-theme="dark"] body.rtt-home-page .rtt-rank-card,
html[data-theme="dark"] body.rtt-home-page .rtt-follow-card,
body.rtt-dark.rtt-home-page .rtt-feature-meta span,
body.rtt-dark.rtt-home-page .rtt-feature-secondary,
body.rtt-dark.rtt-home-page .rtt-rank-card,
body.rtt-dark.rtt-home-page .rtt-follow-card,
body.dark-mode.rtt-home-page .rtt-feature-meta span,
body.dark-mode.rtt-home-page .rtt-feature-secondary,
body.dark-mode.rtt-home-page .rtt-rank-card,
body.dark-mode.rtt-home-page .rtt-follow-card {
  background: rgba(255, 255, 255, 0.075) !important;
  border-color: rgba(216, 191, 255, 0.13) !important;
  color: #f7efff !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-poster,
body.rtt-dark.rtt-home-page .rtt-feature-poster,
body.dark-mode.rtt-home-page .rtt-feature-poster {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.38);
}

/* Responsive */
@media (max-width: 991px) {
  body.rtt-home-page header.site-header .header-container,
  body.rtt-home-page .site-header .header-container {
    width: calc(100% - 24px) !important;
  }

  .rtt-feature-stage {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 108px 22px 34px;
  }

  .rtt-feature-title {
    font-size: clamp(34px, 7vw, 52px);
    -webkit-line-clamp: 2;
  }

  .rtt-feature-visual {
    justify-items: start;
  }

  .rtt-feature-poster {
    width: min(220px, 58vw);
  }

  .rtt-feature-thumbs {
    justify-content: flex-start;
  }

  body.rtt-home-page .rtt-clean-head,
  body.rtt-home-page .rtt-ranking-title {
    align-items: flex-start !important;
    flex-direction: column;
  }

  body.rtt-home-page .rtt-clean-head p {
    text-align: left;
  }

  body.rtt-home-page .rtt-ranking-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 576px) {
  .rtt-feature-stage {
    padding: 96px 16px 28px;
  }

  .rtt-feature-title {
    font-size: 31px;
    line-height: 1.12;
  }

  .rtt-feature-meta span:nth-child(n+4) {
    display: none !important;
  }

  .rtt-feature-desc {
    font-size: 14px;
    line-height: 1.55;
  }

  .rtt-feature-actions a {
    min-height: 48px;
    padding: 0 18px;
  }

  body.rtt-home-page .rtt-home-rankings,
  body.rtt-home-page .rtt-top-follow-section {
    padding: 20px 14px !important;
    border-radius: 22px;
  }

  body.rtt-home-page .rtt-ranking-list {
    grid-template-columns: 1fr;
  }

  body.rtt-home-page .rtt-rank-card {
    grid-template-columns: 36px 64px minmax(0, 1fr);
    min-height: 100px;
  }

  body.rtt-home-page .rtt-rank-cover {
    width: 64px;
    height: 86px;
  }

  body.rtt-home-page .rtt-top-follow-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px !important;
  }

  body.rtt-home-page .rtt-follow-body strong {
    font-size: 13px;
  }

  body.rtt-home-page .rtt-follow-rank {
    left: 13px;
    top: 13px;
    min-width: 32px;
    height: 26px;
    font-size: 12px;
  }
}

/* =========================================================
   RTT HOME FINAL: BXH 3 cột + Theo dõi nhiều carousel
   - CSS tách riêng, không inline
   - Ghi đè các layout ranking/follow cũ ở trang chủ
   ========================================================= */

body.rtt-home-page .rtt-home-rank-row {
  margin-top: 36px !important;
}

body.rtt-home-page .rtt-bxh-section {
  padding: 30px 34px 34px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(143, 97, 216, 0.14), transparent 34%),
    var(--home-panel, rgba(255,255,255,.88)) !important;
}

body.rtt-home-page .rtt-bxh-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 22px !important;
  margin-bottom: 24px !important;
}

body.rtt-home-page .rtt-bxh-head h5 {
  margin: 12px 0 0 !important;
  color: var(--home-text, #351857) !important;
  font-size: clamp(30px, 4vw, 46px) !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  letter-spacing: .01em;
}

body.rtt-home-page .rtt-bxh-head p {
  max-width: 460px;
  margin: 0 !important;
  color: var(--home-muted, #82679f) !important;
  text-align: right;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 900;
}

body.rtt-home-page .rtt-bxh-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border: 1px solid rgba(143, 97, 216, 0.24);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 18px 42px rgba(68, 33, 117, 0.1);
}

body.rtt-home-page .rtt-bxh-column {
  min-width: 0;
  padding: 28px 26px 24px;
  border-right: 1px solid rgba(143, 97, 216, 0.2);
}

body.rtt-home-page .rtt-bxh-column:last-child {
  border-right: 0;
}

body.rtt-home-page .rtt-bxh-column h6 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px !important;
  color: #442175 !important;
  font-size: 19px !important;
  line-height: 1.2 !important;
  font-weight: 1000 !important;
  text-transform: uppercase;
  letter-spacing: .02em;
}

body.rtt-home-page .rtt-bxh-column:nth-child(1) h6 { color: #ffb703 !important; }
body.rtt-home-page .rtt-bxh-column:nth-child(2) h6 { color: #ff4f93 !important; }
body.rtt-home-page .rtt-bxh-column:nth-child(3) h6 { color: #28d95a !important; }

body.rtt-home-page .rtt-bxh-list {
  display: grid;
  gap: 15px;
}

body.rtt-home-page .rtt-bxh-item {
  min-width: 0;
  display: grid !important;
  grid-template-columns: 34px 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  color: #442175 !important;
  text-decoration: none !important;
  border-radius: 16px;
  padding: 8px 10px 8px 6px;
  transition: background .16s ease, transform .16s ease;
}

body.rtt-home-page .rtt-bxh-item:hover {
  background: rgba(143, 97, 216, 0.09);
  transform: translateX(2px);
}

body.rtt-home-page .rtt-bxh-no {
  color: #8f61d8 !important;
  font-size: 22px;
  line-height: 1;
  font-weight: 1000;
  text-align: center;
}

body.rtt-home-page .rtt-bxh-item.is-podium .rtt-bxh-no {
  color: #ff6a3d !important;
}

body.rtt-home-page .rtt-bxh-cover {
  display: block;
  width: 46px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  background: #efe4ff;
  box-shadow: 0 8px 18px rgba(68, 33, 117, 0.13);
}

body.rtt-home-page .rtt-bxh-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.rtt-home-page .rtt-bxh-info {
  min-width: 0;
  display: block;
}

body.rtt-home-page .rtt-bxh-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #442175 !important;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 1000;
}

body.rtt-home-page .rtt-bxh-info small,
body.rtt-home-page .rtt-bxh-info em {
  display: block;
  margin-top: 3px;
  color: #8f61d8 !important;
  font-style: normal;
  font-size: 12px;
  line-height: 1.24;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Theo dõi nhiều: carousel ngang, không grid */
body.rtt-home-page .rtt-top-follow-section {
  padding: 30px 34px 32px !important;
  border-radius: 30px !important;
}

body.rtt-home-page .rtt-top-follow-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 18px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 4px 4px 18px !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar {
  height: 8px;
}

body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-track {
  background: rgba(143, 97, 216, 0.13);
  border-radius: 999px;
}

body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-thumb {
  background: rgba(143, 97, 216, 0.58);
  border-radius: 999px;
}

body.rtt-home-page .rtt-follow-card {
  flex: 0 0 168px !important;
  min-width: 168px !important;
  max-width: 168px !important;
  scroll-snap-align: start;
  padding: 10px !important;
  border-radius: 22px !important;
}

body.rtt-home-page .rtt-follow-cover {
  aspect-ratio: 3 / 4.12 !important;
  border-radius: 16px !important;
}

body.rtt-home-page .rtt-follow-body strong {
  -webkit-line-clamp: 2 !important;
  min-height: 2.6em !important;
}

/* Dark mode riêng cho cụm BXH/follow */
html[data-theme="dark"] body.rtt-home-page .rtt-bxh-grid,
body.rtt-dark.rtt-home-page .rtt-bxh-grid,
body.dark-mode.rtt-home-page .rtt-bxh-grid {
  background: rgba(12, 7, 22, 0.34) !important;
  border-color: rgba(201, 167, 255, 0.22) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-bxh-column,
body.rtt-dark.rtt-home-page .rtt-bxh-column,
body.dark-mode.rtt-home-page .rtt-bxh-column {
  border-right-color: rgba(201, 167, 255, 0.16) !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-bxh-head h5,
html[data-theme="dark"] body.rtt-home-page .rtt-bxh-info strong,
body.rtt-dark.rtt-home-page .rtt-bxh-head h5,
body.rtt-dark.rtt-home-page .rtt-bxh-info strong,
body.dark-mode.rtt-home-page .rtt-bxh-head h5,
body.dark-mode.rtt-home-page .rtt-bxh-info strong {
  color: #f7efff !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-bxh-head p,
html[data-theme="dark"] body.rtt-home-page .rtt-bxh-info small,
html[data-theme="dark"] body.rtt-home-page .rtt-bxh-info em,
body.rtt-dark.rtt-home-page .rtt-bxh-head p,
body.rtt-dark.rtt-home-page .rtt-bxh-info small,
body.rtt-dark.rtt-home-page .rtt-bxh-info em,
body.dark-mode.rtt-home-page .rtt-bxh-head p,
body.dark-mode.rtt-home-page .rtt-bxh-info small,
body.dark-mode.rtt-home-page .rtt-bxh-info em {
  color: #d8c5f2 !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-bxh-item:hover,
body.rtt-dark.rtt-home-page .rtt-bxh-item:hover,
body.dark-mode.rtt-home-page .rtt-bxh-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}

@media (max-width: 991px) {
  body.rtt-home-page .rtt-bxh-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  body.rtt-home-page .rtt-bxh-head p {
    text-align: left !important;
  }
  body.rtt-home-page .rtt-bxh-grid {
    grid-template-columns: 1fr !important;
  }
  body.rtt-home-page .rtt-bxh-column {
    border-right: 0 !important;
    border-bottom: 1px solid rgba(143, 97, 216, 0.2);
  }
  body.rtt-home-page .rtt-bxh-column:last-child {
    border-bottom: 0 !important;
  }
}

@media (max-width: 576px) {
  body.rtt-home-page .rtt-bxh-section,
  body.rtt-home-page .rtt-top-follow-section {
    padding: 22px 15px !important;
    border-radius: 22px !important;
  }
  body.rtt-home-page .rtt-bxh-column {
    padding: 20px 14px !important;
  }
  body.rtt-home-page .rtt-bxh-item {
    grid-template-columns: 28px 46px minmax(0, 1fr);
    gap: 10px;
  }
  body.rtt-home-page .rtt-follow-card {
    flex-basis: 136px !important;
    min-width: 136px !important;
    max-width: 136px !important;
  }
}


/* =========================================================
   RTT home visual polish v2
   - Gradient ảnh nền phía sau poster/hero
   - Khôi phục icon search và user trên header trang chủ
   ========================================================= */

/* Cho JS đổ ảnh đang active vào biến --rtt-feature-cover. Nếu chưa có thì vẫn fallback bằng .rtt-feature-bg. */
body.rtt-home-page .rtt-feature-stage {
  overflow: hidden !important;
}

body.rtt-home-page .rtt-feature-bg {
  opacity: 0.34 !important;
  filter: blur(24px) saturate(1.35) contrast(1.05) brightness(0.92) !important;
  transform: scale(1.16) !important;
  transform-origin: center;
}

/* Lớp phủ gradient để ảnh nền không bị bẹt/tối một mảng */
body.rtt-home-page .rtt-feature-shade {
  background:
    radial-gradient(circle at 76% 34%, rgba(180, 154, 221, 0.36), transparent 30%),
    radial-gradient(circle at 88% 72%, rgba(244, 134, 212, 0.22), transparent 32%),
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.88) 43%,
      rgba(247, 240, 255, 0.52) 72%,
      rgba(245, 234, 255, 0.32) 100%) !important;
}

/* Glow sử dụng chính ảnh bìa active, nằm sau poster */
body.rtt-home-page .rtt-feature-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2% -12% -2% -6%;
  border-radius: 44% 56% 48% 52%;
  background:
    linear-gradient(135deg, rgba(143, 97, 216, 0.28), rgba(244, 134, 212, 0.16)),
    var(--rtt-feature-cover) center / cover no-repeat;
  opacity: 0.5;
  filter: blur(42px) saturate(1.45);
  transform: scale(0.92) rotate(-4deg);
  pointer-events: none;
}

body.rtt-home-page .rtt-feature-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(440px, 76vw);
  aspect-ratio: 1;
  right: 50%;
  top: 50%;
  transform: translate(50%, -52%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(143, 97, 216, 0.26), transparent 62%);
  pointer-events: none;
}

body.rtt-home-page .rtt-feature-poster {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.86), rgba(222,205,245,0.48)) !important;
  box-shadow:
    0 28px 72px rgba(53, 25, 90, 0.26),
    0 0 0 1px rgba(255,255,255,0.32) inset !important;
}

body.rtt-home-page .rtt-feature-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.28), transparent 34%),
    linear-gradient(0deg, rgba(42, 18, 69, 0.1), transparent 44%);
}

/* Header icons: rtt-home-feature trước đó dùng background shorthand nên làm mất background-image của icon. */
body.rtt-home-page header.site-header .search-icon,
body.rtt-home-page header.site-header .login-signup-icon {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 999px !important;
  background-image: none !important;
  color: #fff !important;
  cursor: pointer !important;
}

body.rtt-home-page header.site-header .search-icon::before,
body.rtt-home-page header.site-header .login-signup-icon::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  color: #fff !important;
  font-family: "Segoe UI Symbol", "Segoe UI Emoji", Arial, sans-serif !important;
  font-weight: 900;
  line-height: 1;
}

body.rtt-home-page header.site-header .search-icon::before {
  content: "⌕";
  font-size: 27px;
  transform: translateY(-1px);
}

body.rtt-home-page header.site-header .login-signup-icon::before {
  content: "👤";
  font-size: 18px;
}

body.rtt-home-page header.site-header .search-icon:hover,
body.rtt-home-page header.site-header .login-signup-icon:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

/* Dark mode: giữ vibe hero nhưng làm gradient sâu hơn */
html[data-theme="dark"] body.rtt-home-page .rtt-feature-shade,
body.rtt-dark.rtt-home-page .rtt-feature-shade,
body.dark-mode.rtt-home-page .rtt-feature-shade {
  background:
    radial-gradient(circle at 74% 34%, rgba(143, 97, 216, 0.36), transparent 34%),
    radial-gradient(circle at 88% 70%, rgba(244, 134, 212, 0.14), transparent 34%),
    linear-gradient(90deg,
      rgba(16, 8, 28, 0.98) 0%,
      rgba(20, 10, 34, 0.92) 42%,
      rgba(28, 14, 48, 0.62) 72%,
      rgba(24, 11, 41, 0.42) 100%) !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-visual::before,
body.rtt-dark.rtt-home-page .rtt-feature-visual::before,
body.dark-mode.rtt-home-page .rtt-feature-visual::before {
  opacity: 0.42;
  mix-blend-mode: screen;
}

@media (max-width: 991px) {
  body.rtt-home-page .rtt-feature-visual::before {
    inset: -8% 0 -4%;
    filter: blur(32px) saturate(1.35);
  }
}

@media (max-width: 576px) {
  body.rtt-home-page header.site-header .search-icon,
  body.rtt-home-page header.site-header .login-signup-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  body.rtt-home-page header.site-header .search-icon::before {
    font-size: 24px;
  }
  body.rtt-home-page header.site-header .login-signup-icon::before {
    font-size: 16px;
  }
}


/* =========================================================
   RTT HOME scrollbar polish FINAL
   - Đổi thanh kéo thumbnail hero + carousel theo dõi thành thanh tím gọn
   - Ẩn nút mũi tên/track xám mặc định của browser
   ========================================================= */
body.rtt-home-page .rtt-feature-thumbs,
body.rtt-home-page .rtt-top-follow-track {
  scrollbar-width: thin;
  scrollbar-color: rgba(176, 126, 242, 0.78) rgba(143, 97, 216, 0.13);
}

body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar,
body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar {
  height: 8px !important;
}

body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-track,
body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-track {
  background: rgba(143, 97, 216, 0.13) !important;
  border-radius: 999px !important;
  margin: 0 8px !important;
}

body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-thumb,
body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #8f61d8, #c59cff) !important;
  border-radius: 999px !important;
  border: 2px solid transparent !important;
  background-clip: padding-box !important;
}

body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-thumb:hover,
body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #7a42cb, #d5b4ff) !important;
  background-clip: padding-box !important;
}

body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-button,
body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-button,
body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-corner,
body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-corner {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

/* Hero thumbnail bar: bỏ nền trắng/xám của native scrollbar, nhìn giống carousel theo dõi */
body.rtt-home-page .rtt-feature-thumbs {
  padding-bottom: 16px !important;
  background: transparent !important;
}

/* Follow carousel: đồng bộ thanh kéo với hero */
body.rtt-home-page .rtt-top-follow-track {
  padding-bottom: 18px !important;
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-thumbs,
html[data-theme="dark"] body.rtt-home-page .rtt-top-follow-track,
body.rtt-dark.rtt-home-page .rtt-feature-thumbs,
body.rtt-dark.rtt-home-page .rtt-top-follow-track,
body.dark-mode.rtt-home-page .rtt-feature-thumbs,
body.dark-mode.rtt-home-page .rtt-top-follow-track {
  scrollbar-color: rgba(201, 167, 255, 0.78) rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-track,
html[data-theme="dark"] body.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-track,
body.rtt-dark.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-track,
body.rtt-dark.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-track,
body.dark-mode.rtt-home-page .rtt-feature-thumbs::-webkit-scrollbar-track,
body.dark-mode.rtt-home-page .rtt-top-follow-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08) !important;
}


/* =========================================================
   RTT HOME mobile/header + hero button icon fix FINAL
   - Khôi phục icon cho 2 nút Đọc ngay / Chi tiết
   - Mobile: ẩn icon tài khoản trên header, giữ search + bell + theme + menu
   ========================================================= */
body.rtt-home-page .rtt-feature-actions a .fa,
body.rtt-home-page .rtt-feature-actions a i {
  width: 1.1em !important;
  min-width: 1.1em !important;
  height: 1.1em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-style: normal !important;
  font-family: "Segoe UI Symbol", "Segoe UI Emoji", Arial, sans-serif !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: currentColor !important;
}

body.rtt-home-page .rtt-feature-actions .fa-play::before {
  content: "▶" !important;
  font-size: 0.92em !important;
  transform: translateX(1px);
}

body.rtt-home-page .rtt-feature-actions .fa-info::before,
body.rtt-home-page .rtt-feature-actions .fa-info-circle::before {
  content: "i" !important;
  width: 1.15em;
  height: 1.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 0.72em !important;
  font-family: Arial, sans-serif !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

/* Chắc chắn search/user icon trên desktop không bị trống do background-image cũ. */
body.rtt-home-page header.site-header .search-icon,
body.rtt-home-page header.site-header .login-signup-icon {
  background-image: none !important;
}

body.rtt-home-page header.site-header .search-icon::before {
  content: "⌕" !important;
}

body.rtt-home-page header.site-header .login-signup-icon::before {
  content: "👤" !important;
}

@media (max-width: 768px) {
  /* Mobile bỏ icon tài khoản ngoài header cho đỡ chật. Tài khoản vẫn vào được qua menu hamburger. */
  body.rtt-home-page header.site-header .login-signup-icon {
    display: none !important;
  }

  body.rtt-home-page header.site-header .login-signup {
    gap: 8px !important;
  }

  body.rtt-home-page .rtt-feature-actions {
    gap: 10px !important;
  }

  body.rtt-home-page .rtt-feature-actions a {
    min-height: 46px !important;
    padding: 0 16px !important;
    gap: 8px !important;
  }
}
