@font-face {
  font-family: 'Spartan';
  src: url('/Font/Spartan-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #2f6bff;
  --red: #ff3b30;
  --text-dark: #1a1a1a;
  --text-gray: #9aa0aa;
  --text-mid: #6b7280;
  --line: #f0f1f3;
  --bg: #eef1f6;
}

html, body {
  height: 100%;
  overflow-anchor: none;
}

/* 始终保留滚动条占位，避免切换标签时（内容高度变化）造成横向位移 */
html {
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #c9d2e0;
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* 手机外框 */
.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: #0b2a6b;
  position: relative;
  overflow-x: hidden;
}

/* 顶部 banner */
.banner {
  width: 100%;
  line-height: 0;
}

.banner-img {
  width: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
}
/* 图片真正加载完成后再淡入，避免刷新时先闪一下默认图 */
.banner-img.loaded { opacity: 1; }

/* 回到顶部悬浮球 */
.back-top {
  position: fixed;
  right: 18px;
  bottom: 48px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 999;
}
.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* 积分排行标签：悬浮球移到左边，避免遮挡右侧比分列 */
.back-top.left {
  right: auto;
  left: 18px;
}
.back-top:active { background: #1f53d8; }

/* ===== 赛程日历悬浮球 ===== */
.cal-fab {
  position: fixed;
  right: 14px;
  top: 42%;
  z-index: 998;
  display: flex;
  align-items: center;
  height: 46px;
  width: 46px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .4);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  transition: width .38s cubic-bezier(.2, .7, .3, 1), padding .38s ease, transform .38s ease, opacity .38s ease;
}
.cal-fab:focus, .cal-fab:focus-visible { outline: none; }
/* 5 秒无操作后缩到右侧边缘（露出左半个球提示可点） */
.cal-fab.tucked {
  transform: translateX(52%);
  opacity: .55;
}
.cal-fab.tucked:hover { opacity: 1; }
.cal-fab-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-fab-text {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-left: 0;
  transition: opacity .3s ease, max-width .38s ease;
}
.cal-fab.expanded { width: 128px; padding-right: 14px; }
.cal-fab.expanded .cal-fab-text { opacity: 1; max-width: 84px; }
.cal-fab.hide { display: none; }
.cal-fab:active { background: #1f53d8; }
/* 引导说明显示期间：悬浮球置于引导蒙层之下（被压暗），引导关闭后再展开 */
body.guide-active .cal-fab { z-index: 200; }

/* 个性搜索悬浮球：位于赛程日历悬浮球正下方（46px 高 + 14px 间距） */
.search-fab { top: calc(42% + 60px); }

/* 个性搜索弹窗：球队下拉选择 */
.search-modal-card { width: min(92vw, 340px); }
.search-modal-title { font-size: 16px; font-weight: 800; color: var(--text-dark); text-align: center; margin-bottom: 14px; }
.search-team-select {
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--text-dark);
  border: 1px solid var(--blue);
  border-radius: 10px;
  background: #fff;
  outline: none;
}

/* 赛程日历弹窗 */
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.cal-modal.hidden { display: none; }
.cal-modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.cal-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 360px);
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.cal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-mtitle { font-size: 16px; font-weight: 800; color: var(--text-dark); }
.cal-mnav {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #e3e7ee;
  background: #fff;
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-mnav:active { background: #eef4ff; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekdays span {
  text-align: center;
  font-size: 12px;
  color: var(--text-gray);
  padding: 4px 0;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 14px;
  color: var(--text-dark);
  border-radius: 10px;
  border: none;
  background: transparent;
  padding: 0;
}
.cal-cell.empty { visibility: hidden; }
.cal-cell.has-match {
  color: var(--blue);
  font-weight: 800;
  background: #eef4ff;
  cursor: pointer;
}
.cal-cell.has-match:active { background: #dfeaff; }
.cal-dot {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.cal-modal-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-gray);
}
.cal-modal-close {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .4);
}
.cal-modal-close:active { background: #1f53d8; }

/* 日期跳转后高亮闪烁 */
@keyframes dayFlash {
  0% { background: #fff6cc; }
  70% { background: #fff6cc; }
  100% { background: transparent; }
}
.day-header.day-flash { animation: dayFlash 1.6s ease; border-radius: 8px; }

/* 向上加载更早赛程：在「前一天卡片将要出现的位置」就地显示的蓝色加载动效 */
.sched-loader-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  margin-bottom: 10px;
  color: var(--blue, #2f6bff);
  font-size: 13px;
  font-weight: 700;
}
/* 向上加载的赛程卡片淡入效果 */
.sched-fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.sched-fade-in.sched-fade-in-show {
  opacity: 1;
  transform: translateY(0);
}
.sched-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cfe0ff;
  border-top-color: var(--blue, #2f6bff);
  border-radius: 50%;
  animation: schedSpin .7s linear infinite;
}
@keyframes schedSpin { to { transform: rotate(360deg); } }

/* 通用轻提示（如赛程日期范围提示）：显示在吸顶 TAB 与第一个卡片之间，蓝底白字 */
.app-toast {
  position: fixed;
  left: 50%;
  top: 56px;
  transform: translateX(-50%);
  z-index: 3300;
  max-width: 86vw;
  padding: 10px 18px;
  background: var(--blue, #2f6bff);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(47, 107, 255, .35);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  text-align: center;
}
.app-toast.show { opacity: 1; }

/* 没有比赛的日期：白色卡片，尺寸与「未开始/进行中」比赛卡片一致，文字居中「暂无比赛」 */
.no-match-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 108px;
  padding: 16px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 40, 90, .04);
  color: #9aa3af;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* 内容区：上移盖住 banner 底部，形成圆角卡片 */
.content {
  position: relative;
  margin-top: -22px;
  background: #f4f6fa;
  border-radius: 22px 22px 0 0;
  min-height: 60vh;
  padding-bottom: 0;
}

/* TAB 导航 */
.tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 6px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1 0 auto;
  min-width: max-content;
  white-space: nowrap;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-mid);
  padding: 16px 16px 14px;
  cursor: pointer;
  font-weight: 500;
  transition: color .2s;
}

.tab.active {
  color: var(--blue);
  font-weight: 700;
}

/* 「赛程比分」TAB 用图标替换文字：未选中整体灰色，选中恢复正常颜色 */
.tab .tab-icon {
  display: block;
  height: 22px;
  width: auto;
  margin: 0 auto;
  transition: filter .2s, opacity .2s;
}
.tab:not(.active) .tab-icon { filter: grayscale(1); opacity: .45; }
.tab.active .tab-icon { filter: none; opacity: 1; }

/* 自定义阶段 TAB 超过 3 个：收窄左右内边距，配合 JS 缩小字体以铺满一屏、免横向滑动 */
.tabs-fit .tab {
  padding-left: 9px;
  padding-right: 9px;
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 28px;
  background: var(--blue);
  border-radius: 3px;
  /* 用 transform 位移（而非 left）并独立合成层，避免 iOS/安卓切换时留下蓝线残影 */
  transform: translateX(0);
  transition: transform .25s ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* TAB 面板 */
.tab-panel {
  display: none;
  padding: 6px 12px 0;
  overflow-anchor: none;
}

.tab-panel.active {
  display: block;
}

.loading {
  text-align: center;
  color: var(--text-gray);
  padding: 40px 0;
  font-size: 14px;
}

/* 日期分组头 */
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6px 8px;
}

.day-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 600;
}

.day-left .cal {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.day-left .weekday {
  color: var(--text-mid);
  font-weight: 500;
}

.day-count {
  font-size: 13px;
  color: var(--text-gray);
}

.day-count.live {
  color: var(--blue);
  font-weight: 600;
}

/* 比赛卡片 */
.match {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 16px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(20, 40, 90, .04);
}

.match.live {
  background: #eaf1ff;
  box-shadow: 0 2px 10px rgba(47, 107, 255, .12);
}

.team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  flex-shrink: 0;
}

.team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

/* 比分 */
.score {
  font-family: 'Spartan', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-gray);
  min-width: 44px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score.win {
  color: var(--red);
}

.match.live .score {
  color: var(--red);
}

/* 中间状态区 */
.center {
  width: 96px;
  flex-shrink: 0;
  text-align: center;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* VS 图标上方的自定义阶段标签 */
.vs-stage {
  max-width: 100%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.match-status {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-text {
  font-size: 12px;
  color: var(--text-gray);
  display: block;
}

/* 状态按钮：已结束红底白字，未开始蓝底白字，待开始橙底白字 */
.status-text.status-finished,
.status-text.status-upcoming,
.status-text.status-pending,
.status-text.status-awaiting {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
}
.status-text.status-finished { background: var(--red); }
.status-text.status-upcoming { background: var(--blue, #2f6bff); }
.status-text.status-pending { background: #f59e0b; }
.status-text.status-awaiting { background: var(--blue, #2f6bff); }

.match-time {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  display: block;
  line-height: 1.2;
}

.live-now {
  font-size: 12px;
  color: var(--red);
  font-weight: 700;
  display: block;
  line-height: 1.3;
  white-space: nowrap;
}

.live-venue {
  font-size: 12px;
  color: var(--text-mid);
  display: block;
  margin-top: 6px;
  line-height: 1.3;
}

/* 积分排行表 */
.rank-table {
  width: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: 0 1px 4px rgba(20, 40, 90, .04);
}

.rank-head, .rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px 44px;
  align-items: center;
  column-gap: 6px;
  padding: 15px 10px;
  font-size: 16px;
}

/* 含「组别」列时：排名 球队 组别 胜 负；
   删除积分列后空间更充裕，适当拉开组别/胜/负的列间距 */
.rank-table.has-group .rank-head,
.rank-table.has-group .rank-row {
  grid-template-columns: 36px minmax(0, 1fr) 48px 34px 34px;
  column-gap: 10px;
  padding: 15px 8px;
}
/* 组别与「胜」之间保留少量间距；表头“组别”强制一排显示 */
.rank-table.has-group .col-grp {
  padding-right: 6px;
  white-space: nowrap;
}

.col-grp {
  text-align: center;
  color: var(--blue);
  font-weight: 600;
}

/* 组别之间的蓝色分隔线 */
.rank-divider {
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}

.rank-head {
  background: #f7f9fc;
  color: var(--text-mid);
  font-weight: 600;
}

.rank-row {
  border-top: 1px solid var(--line);
}

.col-team {
  text-align: center;
}

.rank-row .r-team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  min-width: 0;
}

/* 积分为 0 的球队：不显示排名，队徽与队名统一左对齐到“球队”列左边缘，
   即与积分为 0 的球队中名字最长者（如“仙海大鱼摆摆队”，若其已有积分则为剩余最长者）左对齐 */
.rank-row.no-rank .r-team {
  justify-content: flex-start;
  margin-left: 0;
}

/* 所有球队都有积分：队徽与队名统一左对齐，与名字最长的球队对齐，整体右移 10px */
.rank-table.all-ranked .rank-row .r-team {
  justify-content: flex-start;
  padding-left: 10px;
}

.rank-row .r-team .logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.rank-row .r-team span {
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

.rank-num {
  text-align: center;
  font-weight: 700;
  color: var(--text-mid);
}

.rank-num.top {
  color: var(--text-mid);
  background: none;
}

/* 前三名奖牌图标 */
.rank-medal {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.col-c {
  text-align: center;
  color: var(--text-mid);
  font-size: 16px;
}

.col-pts {
  text-align: center;
  font-weight: 700;
  color: var(--blue);
  font-size: 16px;
}

/* 最终排名：领奖台（前三名） */
.final-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 22px auto 6px;
  padding: 0 6px;
}
.final-podium .podium-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final-podium .podium-col.empty { visibility: hidden; }

.final-podium .podium-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
}
.final-podium .podium-avatar {
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 40, 90, .12);
  border: 3px solid #fff;
}
.final-podium .podium-avatar img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.final-podium .podium-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 台面：中间最高，右边（第二）次之，左边（第三）最低 */
.final-podium .podium-block {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  color: #fff;
  font-weight: 800;
}
.final-podium .podium-no { font-size: 30px; line-height: 1; }

.final-podium .place1 .podium-avatar { width: 76px; height: 76px; }
.final-podium .place2 .podium-avatar { width: 62px; height: 62px; }
.final-podium .place3 .podium-avatar { width: 62px; height: 62px; }

.final-podium .place1 .podium-block {
  height: 120px;
  background: linear-gradient(180deg, #ffd75e, #f4b400);
}
.final-podium .place2 .podium-block {
  height: 88px;
  background: linear-gradient(180deg, #cdd4de, #aab3c0);
}
.final-podium .place3 .podium-block {
  height: 64px;
  background: linear-gradient(180deg, #e6b183, #cf8a53);
}

/* 最终排名列表 */
.final-rank {
  width: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: 0 1px 4px rgba(20, 40, 90, .04);
}
.final-rank .final-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.final-rank .final-row:first-child { border-top: none; }
.final-rank .final-num {
  width: 40px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-mid);
}
.final-rank .final-num .rank-medal {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.final-rank .final-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  font-size: 16px;
}
.final-rank .final-team .logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.final-rank .final-team span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* 页脚 */
.page-footer {
  text-align: center;
  color: var(--text-dark);
  font-size: 12px;
  padding: 12px 0 10px;
  /* 整体下移，避免被「球队支持」图标下方的蓝色横线遮挡 */
  margin-top: 60px;
  /* 置于「球队支持」图标及其背后光效之上 */
  position: relative;
  z-index: 70;
  /* 整体向上移动 10px */
  transform: translateY(-10px);
}

/* 卡片入场动画：依次左右滑入 */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-46px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(46px); }
  to   { opacity: 1; transform: translateX(0); }
}
.slide-left  { animation: slideInLeft .45s cubic-bezier(.22,.61,.36,1) both; }
.slide-right { animation: slideInRight .45s cubic-bezier(.22,.61,.36,1) both; }

/* ===== 篮球弹跳加载动效 ===== */
.ball-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 40px 0;
}

@keyframes rotateBall {
  0% { transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg); }
  50% { transform: rotateY(360deg) rotateX(360deg) rotateZ(0deg); }
  100% { transform: rotateY(720deg) rotateX(720deg) rotateZ(360deg); }
}
@keyframes bounceBall {
  0% { transform: translateY(-70px) scale(1, 1); }
  15% { transform: translateY(-56px) scale(1, 1); }
  45% { transform: translateY(70px) scale(1, 1); }
  50% { transform: translateY(73.5px) scale(1, 0.92); }
  55% { transform: translateY(70px) scale(1, 0.95); }
  85% { transform: translateY(-56px) scale(1, 1); }
  95% { transform: translateY(-70px) scale(1, 1); }
  100% { transform: translateY(-70px) scale(1, 1); }
}
.ball {
  animation-name: bounceBall;
  animation-duration: 1.2s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  border-radius: 50%;
  height: 60px;
  position: relative;
  transform: translateY(-70px);
  transform-style: preserve-3d;
  width: 60px;
  z-index: 1;
}
.ball::before {
  background: radial-gradient(circle at 36px 20px, #ff8c16, #b35100);
  border: 2px solid #333333;
  border-radius: 50%;
  content: "";
  height: calc(100% + 6px);
  left: -6px;
  position: absolute;
  top: -3px;
  transform: translateZ(1vmin);
  width: calc(100% + 6px);
}
.ball .inner {
  animation-name: rotateBall;
  animation-duration: 25s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  border-radius: 50%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  width: 100%;
}
.ball .line::before,
.ball .line::after {
  border: 2px solid #333333;
  border-radius: 50%;
  content: "";
  height: 99%;
  position: absolute;
  width: 99%;
}
.ball .line::before { transform: rotate3d(0, 0, 0, 0); }
.ball .line::after { transform: rotate3d(1, 0, 0, 90deg); }
.ball .line--two::before { transform: rotate3d(0, 0, 0, 2deg); }
.ball .line--two::after { transform: rotate3d(1, 0, 0, 88deg); }
.ball .oval::before,
.ball .oval::after {
  border-top: 4px solid #333333;
  border-radius: 50%;
  content: "";
  height: 99%;
  position: absolute;
  width: 99%;
}
.ball .oval::before { transform: rotate3d(1, 0, 0, 45deg) translate3d(0, 0, 6px); }
.ball .oval::after { transform: rotate3d(1, 0, 0, -45deg) translate3d(0, 0, -6px); }
.ball .oval--two::before { transform: rotate3d(1, 0, 0, 135deg) translate3d(0, 0, -6px); }
.ball .oval--two::after { transform: rotate3d(1, 0, 0, -135deg) translate3d(0, 0, 6px); }
@keyframes bounceShadow {
  0% { filter: blur(3px); opacity: 0.6; transform: translateY(73px) scale(0.5, 0.5); }
  45% { filter: blur(1px); opacity: 0.9; transform: translateY(73px) scale(1, 1); }
  55% { filter: blur(1px); opacity: 0.9; transform: translateY(73px) scale(1, 1); }
  100% { filter: blur(3px); opacity: 0.6; transform: translateY(73px) scale(0.5, 0.5); }
}
.shadow {
  animation-name: bounceShadow;
  animation-duration: 1.2s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  background: black;
  filter: blur(2px);
  border-radius: 50%;
  height: 6px;
  transform: translateY(73px);
  width: 54px;
}

/* 赛季选择页 */
.season-list-wrap { padding: 18px 14px 6px; }
.season-list-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  padding: 6px 4px 14px;
}
.season-list { display: flex; flex-direction: column; gap: 12px; }
.season-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  text-decoration: none;
  box-shadow: 0 1px 6px rgba(20, 40, 90, .06);
}
.season-link:active { transform: scale(.99); }
.sl-year {
  font-family: 'Spartan', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  min-width: 76px;
}
.sl-info { flex: 1; min-width: 0; }
.sl-name { font-size: 16px; font-weight: 700; color: var(--text-dark); }
.sl-meta { font-size: 13px; color: var(--text-mid); margin-top: 4px; }
.sl-arrow { font-size: 26px; color: var(--text-gray); font-weight: 300; }

/* 赛程页：返回赛季 */
.season-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 12px 0 0 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- 球队战绩弹窗 ---------- */
.match { cursor: pointer; }
.match:active { transform: scale(.995); }

.team-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.team-modal.hidden { display: none; }

.tm-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
}

/* 两张战绩卡并排，中间 5px 间距 */
.tm-cards {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 94%;
  max-width: 420px;
}
/* 单队弹窗：收窄居中显示 */
.tm-cards.single {
  width: 74%;
  max-width: 300px;
}

.tm-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border-radius: 18px;
  padding: 14px 14px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
  animation: tmPop .24s ease;
  overflow: visible;
}
@keyframes tmPop {
  from { transform: scale(.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 关闭按钮：卡片外下方，灰色圆形 + 黑色 X */
.tm-close {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.tm-close:active { transform: scale(.92); }

/* 双战绩弹窗关闭按钮下方的附加图标（与关闭按钮同层，置于遮罩之上） */
.tm-extra {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 90%;
  max-height: 214px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tm-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.tm-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f1f3;
  border: 4px solid #fff;
  /* 上移，使队徽约一半露在卡片外 */
  margin-top: -46px;
}
.tm-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tm-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tm-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tm-label {
  flex: 0 0 auto;
  min-width: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.tm-row.win .tm-label { color: var(--blue); }
.tm-row.loss .tm-label { color: var(--red); }

.tm-bar-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 12px;
  background: #f0f1f3;
  border-radius: 8px;
  overflow: hidden;
}
.tm-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: 8px;
  transition: width .5s ease;
}
.tm-bar.blue { background: var(--blue); }
.tm-bar.red { background: var(--red); }

.tm-val {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
}
.tm-row.win .tm-val { color: var(--blue); }
.tm-row.loss .tm-val { color: var(--red); }

/* ---------- 首次使用引导 ---------- */
.guide {
  position: fixed;
  inset: 0;
  z-index: 300;
}
.guide.hidden { display: none; }

/* 高亮镂空：用超大 box-shadow 压暗其余区域 */
.guide-spot {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62);
  transition: all .3s ease;
  pointer-events: none;
}

.guide-tip {
  position: absolute;
  width: 264px;
  max-width: 82vw;
  background: #fff;
  border-radius: 14px;
  padding: 15px 16px 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
  transition: left .3s ease, top .3s ease;
}
.guide-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark);
}
.guide-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.guide-step {
  font-size: 13px;
  color: var(--text-gray);
  font-weight: 600;
}
.guide-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-skip {
  border: none;
  background: transparent;
  color: var(--text-gray);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
}
.guide-next {
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
}
.guide-next:active { transform: scale(.96); }

/* 引导：向下滑动加载更早赛程的手势动效 */
.guide-gesture {
  position: absolute;
  z-index: 2;
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.guide-gesture.hidden { display: none; }
.gesture-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 6px rgba(255, 255, 255, .26);
  animation: guidePull 1.5s ease-in-out infinite;
}
.gesture-chevron {
  margin-top: 8px;
  width: 15px;
  height: 15px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  animation: guideChevron 1.5s ease-in-out infinite;
}
@keyframes guidePull {
  0% { transform: translateY(-4px); opacity: .35; }
  25% { opacity: 1; }
  70% { transform: translateY(30px); opacity: .95; }
  100% { transform: translateY(30px); opacity: 0; }
}
@keyframes guideChevron {
  0%, 100% { opacity: .3; }
  50% { opacity: .9; }
}

/* 前台弹窗（后台「个性设置」开启后进入排行榜显示） */
.front-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.front-popup.hidden { display: none; }
.front-popup-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  transition: opacity .26s ease;
}
.front-popup.show .front-popup-mask { opacity: 1; }
.front-popup-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 18px;
  padding: 26px 22px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  text-align: center;
  transform: scale(.9);
  opacity: 0;
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1), opacity .26s ease;
}
.front-popup.show .front-popup-card { transform: scale(1); opacity: 1; }
.front-popup-content {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  white-space: normal;
  word-break: break-word;
  max-height: 60vh;
  overflow-y: auto;
  text-align: left;
}
.front-popup-content p { margin: 0 0 8px; }
.front-popup-content p:last-child { margin-bottom: 0; }
.front-popup-btn {
  margin-top: 20px;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-radius: 999px;
  background: var(--blue, #2f6bff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.front-popup-btn:active { opacity: .85; }

/* ---------- 球队支持 ---------- */
/* 页面下方入口按钮 */
.support-entry {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  z-index: 60;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* 独立层叠上下文，保证光晕在移动端（微信 X5）也能正常渲染 */
  isolation: isolate;
}
.support-entry.hidden { display: none; }
/* 图标背后柔和白色光晕：与页面其他元素隔离，让「球队支持」更明显 */
.support-entry::before {
  content: '';
  position: absolute;
  left: 50%;
  /* 下移并压低高度，避免向上遮挡最后一场比赛的状态文字 */
  top: 28px;
  /* 横向偏宽的椭圆光晕，覆盖「支持球队」图案左右两侧 */
  width: 170px;
  height: 78px;
  border-radius: 50%;
  transform: translateX(-50%);
  /* 纯白、逐层渐隐，让两边羽化更柔和自然 */
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 1) 30%,
    rgba(255, 255, 255, .92) 48%,
    rgba(255, 255, 255, .55) 66%,
    rgba(255, 255, 255, 0) 82%);
  /* 用正值层级（不再用 -1），避免微信 X5 内核不渲染负 z-index 伪元素 */
  z-index: 0;
  pointer-events: none;
}
.support-entry img {
  position: relative;
  z-index: 1;
  width: 114px;
  height: 114px;
  object-fit: contain;
  display: block;
  /* 改用白色柔光代替黑色投影，避免移动端背后发灰 */
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9));
}
/* 图标下方蓝色横线：左右拉满整个页面宽度 */
.support-entry::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  height: 3px;
  background: var(--blue, #2f6bff);
  transform: translateX(-50%) translateY(-30px);
}
.support-entry:active { transform: translateX(-50%) translateY(10px) scale(.94); }
body.guide-active .support-entry { display: none; }

/* 弹窗 */
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.support-modal.hidden { display: none; }
.support-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  opacity: 0;
  transition: opacity .26s ease;
}
.support-modal.show .support-mask { opacity: 1; }
.support-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  transform: scale(.92);
  opacity: 0;
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1), opacity .26s ease;
}
.support-modal.show .support-card { transform: scale(1); opacity: 1; }
.support-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
/* 顶部 TAB */
.support-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  padding-right: 40px;
  overflow: visible;
}
.support-tab {
  flex: 1 1 auto;
  padding: 15px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  position: relative;
}
.support-tab.active { color: var(--blue, #2f6bff); }
/* 选中后文字换成图标（放大并可延伸到卡片外） */
.support-tab { overflow: visible; }
.support-tab .stab-icon {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  height: 50px;
  width: auto;
  pointer-events: none;
}
.support-tab.active .stab-text { display: none; }
.support-tab.active .stab-icon { display: block; }
.support-tab.active:after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: var(--blue, #2f6bff);
}
.support-panes { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.support-pane { display: none; padding: 16px; }
.support-pane.active { display: block; }
.support-empty { text-align: center; color: #999; padding: 40px 0; font-size: 14px; }

/* 选择支持：每日额度提示 */
.support-quota {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-bottom: 14px;
}
.support-quota b { color: var(--blue, #2f6bff); font-size: 16px; }

/* 选择支持：一排两个，队徽在上、队名在下 */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.support-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  background: #fafbfe;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.support-team:active { transform: scale(.97); }
.support-team:not([disabled]):hover { border-color: var(--blue, #2f6bff); box-shadow: 0 4px 14px rgba(47, 107, 255, .14); }
.support-team[disabled] { opacity: .5; cursor: not-allowed; }
.support-team { position: relative; }
.support-team.sel { border-color: var(--blue, #2f6bff); background: #eef3ff; }
.support-team-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue, #2f6bff);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
}
/* 底部操作条：已选数量 + 支持按钮 */
.support-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f1f5;
}
.support-sel-count { font-size: 14px; color: #555; white-space: nowrap; }
.support-sel-count b { color: var(--blue, #2f6bff); font-size: 16px; }
.support-submit {
  flex: 1 1 auto;
  padding: 12px 0;
  border: none;
  border-radius: 999px;
  background: var(--blue, #2f6bff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.support-submit:disabled { background: #c3ccdb; cursor: not-allowed; }
.support-submit:not(:disabled):active { opacity: .88; }

/* 支持成功图片提示（覆盖在支持弹窗之上） */
.support-success {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.support-success.hidden { display: none; }
.support-success img {
  width: 240px;
  max-width: 72vw;
  height: auto;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .3));
  opacity: 0;
  transform: scale(.6);
  transition: opacity .28s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
}
.support-success.show img { opacity: 1; transform: scale(1); }
.support-team-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.support-team-logo img { width: 100%; height: 100%; object-fit: cover; }
.support-team-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 支持排名：一排一个，队徽+队名一行，下面进度条 + X支持 */
.support-rank-row {
  padding: 12px 4px;
  border-bottom: 1px solid #f2f3f6;
}
.support-rank-row:last-child { border-bottom: none; }
.support-rank-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.support-rank-no {
  flex-shrink: 0;
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  color: var(--blue, #2f6bff);
  font-size: 15px;
}
.support-rank-medal { height: 30px; width: auto; display: block; margin: 0 auto; }
.support-rank-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .1);
}
.support-rank-logo img { width: 100%; height: 100%; object-fit: cover; }
.support-rank-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.support-rank-barline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 32px;
}
.support-rank-bar {
  flex: 1 1 auto;
  height: 10px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
}
.support-rank-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d86ff, #2f6bff);
  transition: width .4s ease;
  min-width: 2px;
}
.support-rank-count {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue, #2f6bff);
  white-space: nowrap;
}
