/* ==========================================================================
   顶部 NavBar (纯净沉稳固定顶部 · 顶深底浅蔚蓝渐变 · 微信小程序标准 44px 自定义导航栏)
   ========================================================================== */
.cfb-header {
  position: relative;
  flex-shrink: 0;
  z-index: 100;
  /* 纯净顶深底浅渐变，沉稳大气，彻底去除任何纹理杂质 */
  background: linear-gradient(180deg, #004B99 0%, #0054A8 50%, #005BB5 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  /* 微信小程序标准 44px 导航栏内容高度：上 padding (7px + safe-area-inset-top) + 内容 30px + 下 padding 7px = 44px 内容区 */
  padding: calc(7px + env(safe-area-inset-top)) 14px 7px 14px;
  min-height: calc(44px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0, 75, 153, 0.15);
  transform: none !important;
}

.cfb-header__logo {
  height: 30px; /* 微信小程序标准 44px 导航栏基准高度，与右侧标准原生胶囊（32px）保持完美视觉重心平齐 */
  width: auto;
  display: block;
  object-fit: contain;
}

/* ==========================================================================
   主体内容 (Header 下边缘独立滚动区 · 预留 TabBar 高度)
   ========================================================================== */
.cfb-main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  overscroll-behavior-y: contain; /* 约束仅在内容流内部弹性滚动 */
  overflow-anchor: none; /* 彻底屏蔽由于折叠/展开引发的浏览器二次虚假回补滚动，杜绝临界点抖动 */
  padding-bottom: 60px; /* 固定 60px 即可完全避开 50px TabBar，杜绝留白空洞 */
}

/* ==========================================================================
   Header 下边缘专属下拉刷新指示条 (微信小程序同款在 Header 底线下探出)
   ========================================================================== */
.cfb-pull-refresh {
  height: 0px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--cfb-bg-page);
  color: var(--cfb-text-sub);
  font-size: 11px;
  font-weight: 700;
  transition: height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
}

.cfb-pull-refresh.is-pulling {
  transition: none; /* 拖拽过程中实时响应高度 */
}

.cfb-pull-refresh__spinner {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfb-pull-refresh__ball {
  width: 16px;
  height: 16px;
  opacity: 0.85;
  filter: invert(24%) sepia(91%) saturate(2365%) hue-rotate(200deg) brightness(94%) contrast(102%);
  transition: transform 0.2s ease;
}

.cfb-pull-refresh.is-refreshing .cfb-pull-refresh__ball {
  animation: spinBall 0.8s linear infinite;
}

@keyframes spinBall {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 4 大 Tab 滑动视窗与无级轨道 (支持向左向右优雅滑移切换) */
.cfb-tabs-viewport {
  width: 100%;
  overflow-x: clip; /* 采用现代 clip 代替 hidden，既截断横向溢出，又绝不阻断子级 position: sticky 磁吸 */
  overflow-y: visible;
  position: relative;
}

.cfb-tabs-track {
  display: flex;
  width: 400%;
  align-items: flex-start;
  transform: translateX(0%);
  transition: transform 0.32s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.tab-pane {
  width: 25%;
  flex-shrink: 0;
  min-width: 0;
  box-sizing: border-box;
  display: block;
  transition: opacity 0.25s ease;
}

.tab-pane:not(.is-active) {
  height: 0;
  overflow: hidden;
  opacity: 0.3;
  pointer-events: none;
}

.tab-pane.is-active {
  height: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}


/* ==========================================================================
   底部 TabBar (固定 50px 紧致高度 · 彻底移除大下巴与伪安全区)
   ========================================================================== */
.cfb-tabbar {
  position: absolute; /* 相对于 cfb-phone-shell 底部锚定，杜绝 fixed 脱离视口造成的下巴悬空 */
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  box-sizing: border-box;
  height: 50px; /* 坚决写死 50px！彻底去除一切 env(safe-area) 多余外扩下巴 */
  background: linear-gradient(180deg, #005BB5 0%, #0054A8 50%, #004B99 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center; /* 垂直完美居中 */
  justify-content: space-around;
  padding: 0; /* 0 padding，绝不向下蔓延厚重底垫 */
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0, 91, 181, 0.12);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
  will-change: transform;
}

/* 底部收缩态：手指向下滑动查看内容时，优雅平滑滑出视窗 */
.cfb-tabbar.is-collapsed {
  transform: translateY(100%);
}

.cfb-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  cursor: pointer;
  color: rgba(230, 240, 255, 0.72); /* 未选中项：清透纯净冰蓝白，高亮清晰 */
  text-decoration: none; /* 确保作为 a 标签跳转时绝无下划线 */
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.cfb-tabbar__item:visited {
  color: rgba(230, 240, 255, 0.72);
}

.cfb-tabbar__item.is-active {
  color: #F1C136 !important; /* 选中项：纯正赛事曜金 (#F1C136) */
}

.cfb-tabbar__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.78;
  filter: brightness(0) invert(1) opacity(0.78); /* 未选中：通透柔白 */
  transition: all 0.15s ease;
}

.cfb-tabbar__item.is-active .cfb-tabbar__icon {
  opacity: 1;
  /* 纯正赛事曜金 #F1C136 (0 红相偏色) */
  filter: invert(81%) sepia(36%) saturate(1185%) hue-rotate(357deg) brightness(99%) contrast(92%);
}

.cfb-tabbar__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   骨架屏与区块扫光系统 (Skeleton Screen & GPU Shimmer Animation)
   对标微信小程序 WXSS 规范，纯 CSS3 硬件加速，未来 1:1 无缝移植
   ========================================================================== */
@keyframes cfb-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.cfb-skeleton {
  position: relative;
  background-color: #E2E8F0; /* Slate-200 柔和浅灰 */
  overflow: hidden;
  border-radius: var(--cfb-radius-xs, 4px);
  display: inline-block;
  box-sizing: border-box;
}

/* 扫光光泽图层 (伪元素平移，零重绘，GPU 硬件加速) */
.cfb-skeleton--shimmer::after,
.cfb-skeleton-card .cfb-skeleton::after,
.cfb-skeleton-tournament .cfb-skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: cfb-shimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
  pointer-events: none;
}

/* 骨架几何形态原子类 */
.cfb-skeleton--circle {
  border-radius: 50% !important;
}

.cfb-skeleton--pill {
  border-radius: 9999px !important;
}

.cfb-skeleton--text {
  height: 14px;
  border-radius: 4px;
}

.cfb-skeleton--text-sm {
  height: 11px;
  border-radius: 3px;
}

.cfb-skeleton--text-lg {
  height: 18px;
  border-radius: 5px;
}

/* 预设卡片骨架结构 (对标单场卡片 cfb-match-card) */
.cfb-skeleton-card {
  background: #FFFFFF;
  border-radius: var(--cfb-radius-md, 14px);
  padding: 16px 14px;
  box-shadow: var(--cfb-shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  animation: cfb-fade-in 0.2s ease;
}

.cfb-skeleton-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfb-skeleton-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
}

.cfb-skeleton-card__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 72px;
}

.cfb-skeleton-card__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cfb-skeleton-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

/* 预设杯赛卡片骨架结构 (对标 cfb-tournament-card) */
.cfb-skeleton-tournament {
  background: #FFFFFF;
  border-radius: var(--cfb-radius-md, 14px);
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 30, 80, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 6px;
  animation: cfb-fade-in 0.2s ease;
}

.cfb-skeleton-tournament__cover {
  height: 44px;
  background: #CBD5E1;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfb-skeleton-tournament__body {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 国际赛事专属：海外俱乐部中文队名前单字符宽度原生微缩国旗 */
.cfb-match-flag {
  width: 14px;
  height: 10px;
  object-fit: cover;
  border-radius: 1.5px;
  display: inline-block;
  vertical-align: -1px;
  margin-right: 3.5px;
  box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.cfb-hero-tour__team-name .cfb-match-flag {
  width: 15px;
  height: 10.5px;
  vertical-align: -1.5px;
  margin-right: 3px;
}


