/** xcbx888.com — shell overrides + mobile + ababseo */

body.body-tpl-portal {
  min-height: 100%;
  overflow-x: hidden;
}

body.body-tpl-portal .app-shell.tpl-portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.body-tpl-portal .site-outlet {
  flex: 1;
  min-width: 0;
}

/* 面包屑垂直对齐：覆盖全局 a{min-height:32px} */
body.body-tpl-jx .fv-crumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  line-height: 1.25;
}

body.body-tpl-jx .fv-crumbs > a,
body.body-tpl-jx .fv-crumbs > span {
  display: inline-flex;
  align-items: center;
  min-height: 0 !important;
  line-height: 1.25;
  height: auto;
  padding: 0;
}

body.body-tpl-jx .fv-crumbs > span[aria-hidden="true"] {
  color: var(--jx-ink-faint, #94a3b8);
  font-size: 0.8125rem;
  opacity: 0.8;
  user-select: none;
}

body.body-tpl-jx .fv-crumbs > span:not([aria-hidden]) {
  color: var(--jx-ink-muted, #cbd5e1);
}

/* 移动端头部导航横向滚动 */
@media (max-width: 960px) {
  body.body-tpl-jx .jx-header__nav-shell {
    min-width: 0;
  }

  body.body-tpl-jx .jx-header__nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 2px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  }

  body.body-tpl-jx .jx-header__nav::-webkit-scrollbar {
    display: none;
  }

  body.body-tpl-jx .jx-header__nav-link {
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  body.body-tpl-jx .container {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .fv-hero__title {
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.25;
  }

  .fv-hero__lead {
    font-size: 0.9rem;
  }

  .fv-play__video,
  .fv-play__video video,
  .video-el {
    max-width: 100%;
  }

  .fv-sortbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.5rem;
  }

  .fv-sortbar::-webkit-scrollbar {
    display: none;
  }

  .fv-sortbar__btn {
    flex-shrink: 0;
    min-height: 2.5rem;
  }

  .fv-footer__friends {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    justify-content: center;
  }

  .fv-footer__bottom {
    text-align: center;
  }

  .fv-footer__legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .fv-statsbar__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .fv-substats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fv-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .fv-hero__btn {
    justify-content: center;
    min-height: 2.75rem;
  }

  .jx-header__login,
  .jx-header__search-btn {
    min-height: 2.5rem;
    min-width: 2.5rem;
  }
}

/* ABABSEO · TG 图标 + 文字飞动 */
.ababseo-inline {
  margin-top: 1.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.ababseo-inline__fly {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  animation: ababseo-inline-fly 4.2s ease-in-out infinite;
  will-change: transform;
}

.ababseo-inline__tg {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(55, 174, 226, 0.45));
}

.ababseo-inline__brand {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1;
  color: transparent;
  background-image: linear-gradient(135deg, #7c3aed 0%, #06b6d4 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes ababseo-inline-fly {
  0%, 100% { transform: translate(0, 6px) rotate(-3deg); }
  20% { transform: translate(10px, -14px) rotate(4deg); }
  45% { transform: translate(-8px, -22px) rotate(-2deg); }
  70% { transform: translate(12px, -10px) rotate(3deg); }
  90% { transform: translate(-4px, -4px) rotate(-1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ababseo-inline__fly {
    animation: none;
    transform: translateY(-6px);
  }
}

@media print {
  .ababseo-inline { display: none !important; }
}

/* 分类列表分页 */
.fv-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
}

.fv-pager__pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.fv-pager__btn {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: #fff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fv-pager__btn:hover:not(:disabled) {
  border-color: rgba(124, 58, 237, 0.45);
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}

.fv-pager__btn.is-active {
  border-color: #7c3aed;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.22);
}

.fv-pager__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fv-pager__btn--edge {
  padding-inline: 1rem;
}

.fv-pager__gap {
  min-width: 1.5rem;
  text-align: center;
  color: #94a3b8;
  user-select: none;
}

@media (max-width: 640px) {
  .fv-pager {
    gap: 0.5rem;
  }

  .fv-pager__btn--edge {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .fv-pager__pages {
    flex: 1 1 100%;
    order: -1;
  }
}
