/* 对齐 web.xiaojiweb.com 首页 */
.xj-site {
  background: #fff;
  color: #1f2937;
}

.xj-site .layout-shell {
  padding-top: 0;
}

.xj-hero-stack {
  position: relative;
  background: #fff;
}

.xj-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: #fff;
  transition: background 0.3s, box-shadow 0.3s;
}

.xj-site:not(.category-mode) .xj-header-overlay {
  background: transparent;
  box-shadow: none;
}

.xj-site:not(.category-mode) .xj-header-overlay.xj-header-scrolled {
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.xj-site.category-mode .xj-header {
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.xj-header-inner {
  max-width: 2300px;
  margin: 0 auto;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 992px) {
  .xj-header-inner {
    padding: 10px 24px;
  }
}

.xj-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
}

.xj-logo-full {
  display: none;
  height: auto;
  width: 180px;
  max-height: 55px;
  object-fit: contain;
}

.xj-logo-sm {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

@media (min-width: 992px) {
  .xj-logo-full {
    display: block;
  }
  .xj-logo-sm {
    display: none;
  }
}

.xj-pc-nav-wrap {
  flex: 1;
  min-width: 0;
  display: none;
  align-items: center;
  gap: 4px;
}

.xj-language-anchor { position: relative; flex: 0 0 auto; }
.xj-language-button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 1px solid var(--app-border, #374151); border-radius: 999px; background: var(--app-surface-2, rgba(31,41,55,.8)); color: var(--app-text, #fff); cursor: pointer; white-space: nowrap; }
.xj-language-button i { font-size: 10px; transition: transform .2s ease; }
.xj-language-button[aria-expanded="true"] i { transform: rotate(180deg); }
.xj-language-menu { position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; display: flex; flex-direction: column; min-width: 132px; padding: 6px; border: 1px solid var(--app-border, #374151); border-radius: 10px; background: var(--app-surface, #151922); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.xj-language-menu[hidden] { display: none; }
.xj-language-menu button { border: 0; border-radius: 7px; background: transparent; color: var(--app-text, #fff); padding: 8px 10px; text-align: left; cursor: pointer; white-space: nowrap; }
.xj-language-menu button:hover, .xj-language-menu button.active { background: var(--app-accent-soft, rgba(255,45,120,.14)); color: var(--app-accent, #ff2d78); }

@media (max-width: 1023px) {
  .xj-language-anchor { display: none; }
}

/* 桌面端隐藏采集后台齿轮入口，移动端保留原入口。 */
@media (min-width: 1024px) {
  .xj-admin-link { display: none !important; }
}

@media (min-width: 992px) {
  .xj-pc-nav-wrap {
    display: flex;
  }
}

.xj-nav-scroll {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.xj-nav-scroll::-webkit-scrollbar {
  display: none;
}

.xj-pc-nav {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.xj-pc-nav a,
.xj-pc-nav button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 0.88rem;
  padding: 8px 10px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
}

.xj-pc-nav a:hover,
.xj-pc-nav button:hover {
  color: #fff;
}

.xj-pc-nav .active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-color: #fff;
}

.xj-nav-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.xj-search-wrap {
  position: relative;
  flex: 1;
  max-width: 240px;
  min-width: 180px;
}

.xj-search-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 36px 8px 14px;
  border-radius: 999px;
  border: 1px solid #444;
  background: rgba(0, 0, 0, 0.35);
  color: #e5e7eb;
  font-size: 0.85rem;
  outline: none;
}

.xj-search-wrap > button#btnSearch {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  z-index: 2;
}

.xj-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  width: min(320px, calc(100vw - 24px));
  min-width: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 12px;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.xj-search-dropdown.open {
  display: block;
}

.xj-search-dropdown p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: #d1d5db;
}

.xj-hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xj-hot-tags a,
.xj-hot-tags button,
.xj-rank-tag {
  position: static !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  width: auto;
  height: auto;
  top: auto;
  right: auto;
}

.xj-rank-tag em {
  font-style: normal;
  font-weight: 800;
  font-size: 0.68rem;
  min-width: 1rem;
  color: #9ca3af;
}

.xj-rank-tag.hot-1 {
  background: rgba(255, 45, 120, 0.22);
  border-color: rgba(255, 45, 120, 0.35);
  color: #fff;
}

.xj-rank-tag.hot-1 em {
  color: #ff2d78;
}

.xj-rank-tag.hot-2 em {
  color: #fb7185;
}

.xj-rank-tag.hot-3 em {
  color: #fbbf24;
}

.xj-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.xj-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #374151;
  color: #e5e7eb;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
}

.xj-auth-links {
  display: none;
  gap: 8px;
  font-size: 0.82rem;
}

@media (min-width: 768px) {
  .xj-auth-links {
    display: flex;
  }
}

.xj-auth-links a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.xj-mobile-nav {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 8px 12px 12px;
  scrollbar-width: none;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 992px) {
  .xj-mobile-nav {
    display: none;
  }
}

.xj-mobile-nav li {
  flex-shrink: 0;
}

.xj-mobile-nav a,
.xj-mobile-nav button {
  display: block;
  padding: 8px 12px;
  color: #e5e7eb;
  font-size: 0.85rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.xj-carousel {
  position: relative;
  background: #000;
  overflow: hidden;
  padding-top: 60px;
}

@media (min-width: 992px) {
  .xj-carousel {
    padding-top: 0;
  }
}

.xj-carousel-track {
  position: relative;
  width: 100%;
  height: 220px;
}

@media (min-width: 768px) {
  .xj-carousel-track {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .xj-carousel-track {
    height: 340px;
  }
}

@media (min-width: 1280px) {
  .xj-carousel-track {
    height: 580px;
  }
}

.xj-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.xj-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.xj-carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.xj-carousel-slide img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.xj-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.xj-carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.xj-carousel-dots button.active {
  background: #fff;
}

.xj-carousel-prev,
.xj-carousel-next {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 55px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}

@media (min-width: 992px) {
  .xj-carousel-prev,
  .xj-carousel-next {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.xj-carousel-prev {
  left: 12px;
}

.xj-carousel-next {
  right: 12px;
}

.xj-below-hero {
  background: #fff;
  padding: 20px 0 0;
}

.xj-site.category-mode #xjBelowHero {
  display: none;
}

@media (min-width: 768px) {
  .xj-below-hero {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.xj-notice-bar {
  margin: 0 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 44px;
}

.xj-notice-inner {
  display: flex;
  animation: xj-marquee 28s linear infinite;
  white-space: nowrap;
}

.xj-notice-bar:hover .xj-notice-inner {
  animation-play-state: paused;
}

@keyframes xj-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.xj-notice-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.85rem;
  color: #374151;
}

.xj-notice-item button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.xj-quick-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0 4px;
}

.xj-quick-tags-icon {
  color: #c2410c;
  font-size: 1.5rem;
}

.xj-quick-tags-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.xj-quick-tags-grid button {
  border: 1px solid #fdba74;
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
  color: #9a3412;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.78rem;
  cursor: pointer;
}

.xj-grid-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  padding: 24px;
  margin: 0;
}

.xj-main {
  max-width: 2300px;
  margin: 0 auto;
  padding: 0 12px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.home-portal {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .xj-main {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.xj-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 14px;
}

.xj-section-head-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.xj-section-head-left i {
  font-size: 1.35rem;
  color: #6b7280;
  margin-right: 4px;
}

.xj-section-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.xj-section-en {
  display: none;
  font-size: 1.35rem;
  font-weight: 300;
  color: #9ca3af;
}

@media (min-width: 768px) {
  .xj-section-en {
    display: inline;
  }
}

.xj-btn-shuffle {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.82rem;
  color: #6b7280;
  cursor: pointer;
}

.xj-btn-shuffle:hover {
  border-color: #ec4899;
  color: #ec4899;
}

/* 与源站一致：窄屏永远 2 列，不用 auto-fill（避免缩窄时变 1 个大图） */
.xj-video-grid {
  display: grid !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px 12px;
}

@media (min-width: 640px) {
  .xj-video-grid {
    gap: 16px 20px;
  }
}

@media (min-width: 1024px) {
  .xj-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px;
  }
}

@media (min-width: 1280px) {
  .xj-video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1536px) {
  .xj-video-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

.xj-video-grid > .xj-card-v2 {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.xj-card-v2 {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s;
  min-width: 0;
}

.xj-card-v2 .thumb,
.xj-card-v2 .xj-thumb {
  width: 100%;
  aspect-ratio: 600 / 370;
  max-height: none;
}

.xj-card-v2:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.xj-card-v2 .thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  opacity: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s;
  pointer-events: none;
}

.xj-card-v2:hover .thumb-play {
  opacity: 1;
}

.xj-card-v2 .vod-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.xj-card-v2 .thumb,
.xj-card-v2 .xj-thumb {
  position: relative;
  background: #e5e7eb;
  overflow: hidden;
}

.xj-card-v2 .thumb img,
.xj-card-v2 .xj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xj-card-body {
  padding: 10px 12px 12px;
}

.xj-card-title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #1f2937;
}

.xj-card-sub {
  font-size: 0.75rem;
  color: #9ca3af;
}

.xj-card-v2 .thumb-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
  z-index: 1;
}

.home-portal > .xj-section-head:first-child {
  margin-top: 8px;
}

.xj-live-scroll,
.xj-tv-grid,
.xj-img-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.xj-live-card,
.xj-tv-card,
.xj-img-card {
  flex: 0 0 160px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  font-size: 0.8rem;
}

.xj-tv-grid {
  flex-wrap: wrap;
  overflow: visible;
}

.xj-tv-card {
  flex: 1 1 140px;
  text-align: center;
  color: #374151;
}

/* 页脚：紧贴内容底部；底栏留白交给 body.has-tabbar */
.xj-footer {
  width: 100%;
  text-align: center;
  padding: 12px 12px 8px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: #6b7280;
  clear: both;
}

.xj-footer p {
  margin: 0;
  color: #6b7280;
  line-height: 1.4;
}

.xj-app-pop {
  display: none;
  position: fixed;
  bottom: 72px;
  left: 12px;
  right: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 35;
  border: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
  .xj-app-pop {
    display: none !important;
  }
}

.xj-app-pop.show {
  display: block;
}

.xj-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.xj-modal-backdrop.open {
  display: flex;
}

.xj-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  padding: 20px;
}

.xj-modal h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.xj-modal p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
}

.xj-modal button {
  border: none;
  background: #111;
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.xj-site.category-mode .xj-home-chrome {
  display: none !important;
}

.xj-site.category-mode .sub-bar-wrap {
  display: block !important;
}

.xj-site:not(.category-mode) .sub-bar-wrap {
  display: none;
}

.xj-site:not(.category-mode) .site-header.legacy-header {
  display: none;
}

.xj-site.category-mode .xj-hero-stack {
  display: none;
}

.xj-user-anchor {
  position: relative;
}

.xj-dropdown-login {
  width: 144px;
  right: 0;
  left: auto;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xj-login-user {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #e5e7eb;
  word-break: break-all;
}

.xj-logout-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font: inherit;
}

.xj-login-btn,
.xj-reg-btn {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  font-size: 0.85rem;
}

.xj-login-btn {
  background: #dc2626;
  color: #fff;
}

.xj-reg-btn {
  background: #374151;
  color: #fff;
  margin-bottom: 0;
}

.xj-admin-link {
  display: none;
}

@media (min-width: 1200px) {
  .xj-admin-link {
    display: inline-flex;
  }
}

.xj-dropdown-app {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  z-index: 70;
  text-align: center;
}

.xj-dropdown-app.open {
  display: block;
}

.xj-dropdown-app h3 {
  margin: 8px 0 4px;
  font-size: 1rem;
}

.xj-dropdown-app p {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: #d1d5db;
}

.xj-dropdown-app .dl-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.xj-dropdown-app .dl-btns a {
  display: block;
  padding: 8px;
  border-radius: 8px;
  background: #374151;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
}

.xj-app-anchor {
  position: relative;
}
.xj-carousel-slide video{width:100%;height:100%;object-fit:cover;display:block}

.top-telegram-link { display:inline-flex; align-items:center; height:32px; padding:0 10px; border-radius:8px; color:inherit; text-decoration:none; font-size:13px; white-space:nowrap; background:rgba(255,255,255,.12); }
.top-telegram-link:hover { background:rgba(255,255,255,.24); }

