/**
 * 英超榜单页（积分榜 /paiming、球队榜 /qiuduibang、球员榜 /sheshoubang）。
 *
 * 版式对齐「数据采集/英超/」那批静态页（积分表 + 指标页签），颜色不写死，
 * 全部走 cs06.css 的主题令牌（--cs06-* / --accent-rgb），十套主题自动跟随。
 * 只在榜单三页由视图经 $extraCss 加载，不进全站样式。
 *
 * 2026-11-24：不再自己锁 960px —— 榜单页和其他内页一样用外壳的 .wrap（1180px），
 * 表格因此在桌面上放宽；手机上表格横向滚动，不压缩列宽。
 */

.rk-page {
  padding-top: 20px;
}

/* ---------- 指标页签（进球 / 助攻 / 点球 / 射门） ---------- */
.rk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.rk-tab {
  padding: 7px 18px;
  border: 1px solid var(--cs06-line);
  border-radius: 999px;
  background: var(--cs06-card);
  color: var(--cs06-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.rk-tab:hover {
  color: var(--cs06-accent-ink);
  border-color: color-mix(in srgb, var(--cs06-accent-ink) 45%, transparent);
}

.rk-tab.is-on {
  background: rgb(var(--accent-rgb));
  border-color: transparent;
  color: var(--cs06-on-accent, #fff);
}

/* ---------- 卡片 ---------- */
.rk-card {
  background: var(--cs06-card);
  border: 1px solid var(--cs06-line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: var(--cs06-shadow);
}

.rk-sec-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--cs06-ink-title);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid rgb(var(--accent-rgb));
}

.rk-sec-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--cs06-muted);
}

/* ---------- 积分榜页顶四格总览 ---------- */
.rk-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.rk-fact {
  padding: 12px 14px;
  background: var(--cs06-card-2);
  border-radius: 10px;
}

.rk-fact-k {
  display: block;
  font-size: 12px;
  color: var(--cs06-muted);
}

.rk-fact-v {
  display: block;
  margin-top: 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--cs06-ink-title);
  font-variant-numeric: tabular-nums;
}

/* ---------- 表格 ---------- */
.rk-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rk-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

.rk-table thead th {
  padding: 11px 10px;
  background: var(--cs06-card-2);
  border-bottom: 1px solid var(--cs06-line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--cs06-muted);
  text-align: center;
  white-space: nowrap;
}

.rk-table thead th.rk-th-team { text-align: left; padding-left: 14px; }

/* 当前指标的列：表头和数据格一起高亮，切换页签时一眼能看出在比什么 */
.rk-table th.is-active {
  color: var(--cs06-accent-ink);
  background: color-mix(in srgb, var(--cs06-accent-ink) 9%, transparent);
}

.rk-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--cs06-line);
  text-align: center;
  color: var(--cs06-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rk-table tbody tr:last-child td { border-bottom: none; }
.rk-table tbody tr:hover { background: var(--cs06-soft); }

.rk-table td.rk-td-team { text-align: left; padding-left: 14px; }
.rk-table td.is-active { background: color-mix(in srgb, var(--cs06-accent-ink) 5%, transparent); font-weight: 700; color: var(--cs06-accent-ink); }

.rk-th-rank { width: 66px; }
.rk-th-pts { width: 84px; }
.rk-th-wide { width: 108px; }
.rk-th-player { min-width: 180px; }

.rk-td-pts { font-weight: 700; color: var(--cs06-accent-ink); }
.rk-td-pos { font-size: 12px; color: var(--cs06-muted); }
.rk-td-wide { letter-spacing: 0.3px; }
.rk-sep { margin: 0 1px; color: var(--cs06-line-2); font-style: normal; }

.rk-pos { color: #16a34a; }
.rk-neg { color: var(--cs06-hot-text, #dc2626); }
.rk-dash { color: var(--cs06-dim); }

/* ---------- 排名徽章（前三名金银铜） ---------- */
.rk-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--cs06-soft);
  color: var(--cs06-muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rk-num.is-top1 { background: #fff4d6; color: #9a6b00; }
.rk-num.is-top2 { background: #eef1f5; color: #5c6876; }
.rk-num.is-top3 { background: #fbeadf; color: #9c5c22; }

/* ---------- 欧战区 / 降级区色条 ----------
   积分榜每行首格左侧那道竖条（参考静态页的做法），配合底部图例。 */
.rk-tr > td:first-child { position: relative; }

.rk-tr > td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.rk-zone-ucl > td:first-child::before { background: #2b6cf0; }
.rk-zone-uel > td:first-child::before { background: #ef8f24; }
.rk-zone-rel > td:first-child::before { background: #e05252; }

.rk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--cs06-line);
  font-size: 12px;
  color: var(--cs06-muted);
}

.rk-legend span { display: inline-flex; align-items: center; gap: 6px; }

.rk-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.rk-swatch.is-ucl { background: #2b6cf0; }
.rk-swatch.is-uel { background: #ef8f24; }
.rk-swatch.is-rel { background: #e05252; }

/* ---------- 球队 / 球员单元格 ---------- */
.rk-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rk-team-logo {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--cs06-soft);
  border: 1px solid var(--cs06-line);
  flex-shrink: 0;
}

.rk-team-logo.sm { width: 20px; height: 20px; }

.rk-team-mark {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cs06-soft);
  color: var(--cs06-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.rk-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cs06-ink-title);
  white-space: nowrap;
}

.rk-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rk-player-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: var(--cs06-soft);
  border: 1px solid var(--cs06-line);
  flex-shrink: 0;
}

.rk-player-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cs06-soft);
  color: var(--cs06-muted);
  font-size: 13px;
  flex-shrink: 0;
}

.rk-player-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cs06-ink-title);
  white-space: nowrap;
}

/* ---------- 表格下方的口径说明 ---------- */
.rk-foot-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--cs06-line);
  font-size: 12px;
  line-height: 1.75;
  color: var(--cs06-muted);
}

/* ---------- 榜尾两块：热门资讯 + 推荐赛事（2026-11-18 新增） ----------
   桌面两列等宽，760 以下单列。两块都是「标题 + 列表」，外壳（.rk-card）与榜单卡同一张，
   所以间距只由 .rk-two 的 gap 承担 —— 里面的 .rk-card 不能再带 margin-bottom，
   否则两列底部会各多出 24px、看起来没对齐。 */
.rk-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.rk-two .rk-card { margin-bottom: 0; }

.rk-panel { min-width: 0; }

/* 标题右侧的「更多」：靠 margin-left:auto 顶到行尾 */
.rk-more {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--cs06-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.rk-more:hover { color: var(--cs06-accent-ink); }

/* 空态：模块不消失，只留一行说明 */
.rk-empty {
  margin: 0;
  padding: 26px 0;
  text-align: center;
  font-size: 12px;
  color: var(--cs06-muted);
}

/* ---------- 热门资讯 ---------- */
.rk-news, .rk-mlist { list-style: none; margin: 0; padding: 0; }

.rk-news > li + li,
.rk-mlist > li + li { border-top: 1px solid var(--cs06-line); }

.rk-news-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  text-decoration: none;
}

.rk-news-thumb {
  position: relative;
  flex: none;
  width: 64px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cs06-soft);
  border: 1px solid var(--cs06-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--cs06-muted);
}

/* 封面图浮在首字上面；图裂了 onerror 直接摘掉 img，露出来的就是首字 */
.rk-news-thumb i { font-style: normal; }

.rk-news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rk-news-txt { flex: 1; min-width: 0; }

.rk-news-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cs06-ink-title);
  transition: color 0.15s ease;
}

.rk-news-row:hover .rk-news-title { color: var(--cs06-accent-ink); }

.rk-news-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--cs06-dim);
}

/* ---------- 推荐赛事 ---------- */
.rk-mrow {
  display: block;
  padding: 10px 0;
  text-decoration: none;
}

.rk-mrow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.rk-mrow-time {
  font-size: 11px;
  color: var(--cs06-dim);
  font-variant-numeric: tabular-nums;
}

.rk-mrow-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.rk-mrow-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--cs06-ink-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.rk-mrow:hover .rk-mrow-name { color: var(--cs06-accent-ink); }

.rk-mrow-teams em {
  flex: none;
  font-style: normal;
  font-size: 11px;
  color: var(--cs06-muted);
}

.rk-mrow-teams em.is-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--cs06-accent-ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- 平板 ---------- */
@media (max-width: 900px) {
  .rk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  /* 「位置」这种补充列在窄屏没地方放，先藏掉 */
  .rk-hide-m { display: none; }

  .rk-card { padding: 16px 14px; border-radius: 12px; }

  .rk-table { font-size: 13px; min-width: 560px; }
  .rk-table thead th { padding: 9px 8px; }
  .rk-table tbody td { padding: 8px; }

  .rk-foot-note { font-size: 11px; }
}

@media (max-width: 600px) {
  .rk-page { padding-top: 12px; }

  .rk-tabs { gap: 6px; margin: 12px 0; }
  .rk-tab { padding: 6px 14px; font-size: 12px; }

  .rk-table { font-size: 12px; }
  .rk-team-name, .rk-player-name { font-size: 12px; }
  .rk-team-logo { width: 22px; height: 22px; }
  .rk-team-mark { width: 22px; height: 22px; font-size: 11px; }
  .rk-player-photo, .rk-player-mark { width: 30px; height: 30px; }
  .rk-fact-v { font-size: 17px; }

  .rk-news-thumb { width: 56px; height: 40px; }
  .rk-news-title { font-size: 12px; }
}

/* 平板及以下：两块从并排改上下（460px 一列里再放两列资讯，标题会被压成两字一行） */
@media (max-width: 760px) {
  .rk-two {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
