/**
 * 英超榜单页（排名 /paiming、球队榜 /qiuduibang、射手榜 /sheshoubang）。
 *
 * 版式对齐用户提供的静态数据页（积分表 + 卡片栅格），颜色不写死，
 * 全部走 cs06.css 的主题令牌（--cs06-* / --accent-rgb），十套主题自动跟随。
 * 只在榜单三页由视图经 $extraCss 加载，不进全站样式。
 */

.rk-page {
  max-width: 960px;
  margin: 0 auto;
  padding-top: 20px;
}

/* ---------- 页头 ---------- */
.rk-header { text-align: center; margin-bottom: 28px; }

.rk-badge {
  display: inline-block;
  background: rgb(var(--accent-rgb));
  color: var(--cs06-on-accent);
  font-size: 13px;
  padding: 5px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.rk-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--cs06-ink-title);
  margin-bottom: 6px;
}

/* .rk-subtitle（标题下那行赛季 / 数据来源说明）已随文案一起删掉（2026-11-18） */

/* ---------- 卡片分区 ---------- */
.rk-card {
  background: var(--cs06-card);
  border: 1px solid var(--cs06-line);
  border-radius: 12px;
  padding: 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;
  color: var(--cs06-muted);
  font-weight: normal;
}

/* ---------- 积分表 ---------- */
.rk-table { width: 100%; border-collapse: collapse; }

.rk-table thead th {
  background: var(--cs06-soft);
  font-size: 12px;
  font-weight: 500;
  color: var(--cs06-muted);
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--cs06-line);
}

.rk-th-rank { width: 36px; }
.rk-th-team { text-align: left; }

.rk-table tbody td {
  padding: 10px 6px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid var(--cs06-line);
  color: var(--cs06-ink);
}

.rk-table tbody tr:hover { background: var(--cs06-soft); }
.rk-table tbody tr:last-child td { border-bottom: none; }
.rk-td-team { text-align: left; }

.rk-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: var(--cs06-soft);
  color: var(--cs06-muted);
}

.rk-num.is-top3 {
  background: rgb(var(--accent-rgb));
  color: var(--cs06-on-accent);
}

.rk-team {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.rk-team-logo,
.rk-sub-logo {
  object-fit: contain;
  background: var(--cs06-soft);
  border: 1px solid var(--cs06-line);
  flex-shrink: 0;
}

.rk-team-logo {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

.rk-sub-logo { width: 14px; height: 14px; border-radius: 2px; }

/* 队徽 / 球员照取不到时的兜底方块（首字） */
.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: 500; color: var(--cs06-ink-title); }

.rk-pts { font-weight: 600; color: var(--cs06-accent-ink); }

.rk-gd-pos { color: #16a34a; }
.rk-gd-neg { color: var(--cs06-hot-text, #dc2626); }

/* ---------- 球队榜 / 射手榜卡片栅格 ---------- */
.rk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.rk-person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--cs06-soft);
  border: 1px solid var(--cs06-line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rk-person:hover {
  transform: translateY(-2px);
  box-shadow: var(--cs06-shadow);
}

.rk-num-lg {
  width: 28px;
  height: 28px;
  background: var(--cs06-card);
  border: 2px solid rgb(var(--accent-rgb));
  color: var(--cs06-accent-ink);
}

.rk-num-lg.is-top3 { border-color: rgb(var(--accent-rgb)); }

.rk-photo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cs06-card);
  border: 1px solid var(--cs06-line);
}

.rk-photo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--cs06-muted);
}

.rk-info { flex: 1; min-width: 0; }

.rk-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cs06-ink-title);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-sub {
  font-size: 12px;
  color: var(--cs06-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.rk-goals {
  font-size: 24px;
  font-weight: 700;
  color: var(--cs06-accent-ink);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.rk-goals small {
  font-size: 10px;
  font-weight: 400;
  color: var(--cs06-dim);
  margin-top: 2px;
}

/* 页脚那行「数据采集自百度体育 · 2026-2027 英超联赛」已按用户要求去掉（2026-11-18），
   `.rk-foot` 规则一并删除；三张榜页共用这个视图，改一处三页都生效。 */

/* ---------- 榜尾两块：热门资讯 + 推荐赛事（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: 600px) {
  .rk-page { padding-top: 12px; }
  .rk-title { font-size: 21px; }
  .rk-card { padding: 14px 10px; }

  .rk-table thead th,
  .rk-table tbody td { padding: 8px 3px; font-size: 11px; }
  .rk-team-name { font-size: 11px; }
  .rk-team-logo, .rk-team-mark { width: 20px; height: 20px; }
  .rk-hide-mobile { display: none; }
  .rk-grid { grid-template-columns: 1fr; }

  .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;
  }
}
