/* =========================================================
   绿茵引擎数据中心 · 网页版样式（桌面优先）
   H5 版在 index.html，本文件只服务 web.html
   字号下限 14px：正文 15px，列头/说明等次级信息也是 14px
   ========================================================= */

:root {
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --fill: #F7F8FB;
  --line: rgba(15, 23, 42, 0.07);
  --line-2: rgba(15, 23, 42, 0.13);
  --txt: #0F172A;
  --txt-2: #56667E;
  --dim: #8B99AD;
  --acc: #00A06E;
  --acc-d: #00805A;
  --blue: #2563EB;
  --red: #E5484D;
  --gold: #B0781A;
  --r: 14px;
  --fs: 15px;
  --fs-2: 14px;
  --sd-1: 0 1px 2px rgba(16, 24, 40, 0.04);
  --sd-2: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px -18px rgba(16, 24, 40, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-gutter: stable; }   /* 页面高度哪怕变一点，也不让内容横向跳 */

body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: var(--fs);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.w-shell { max-width: 1560px; margin: 0 auto; padding: 0 26px 60px; }

/* ---------- 顶栏 ---------- */

.w-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(243, 245, 249, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.w-top-in { max-width: 1560px; margin: 0 auto; padding: 10px 26px; display: flex; align-items: center; gap: 16px; }

.w-brand { display: flex; align-items: center; gap: 9px; }
.w-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, #14B87F, #0E9FD8 55%, #2E6BE6);
  color: #fff; font-size: 17px; box-shadow: 0 4px 12px -4px rgba(14, 130, 190, 0.5);
}
.w-brand h1 { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.w-brand p { font-size: var(--fs-2); color: var(--dim); margin-top: -2px; white-space: nowrap; }

.w-nav { display: flex; gap: 4px; margin-left: 8px; padding: 3px; border-radius: 10px; background: rgba(15, 23, 42, 0.06); }
.w-nav button {
  font-family: inherit; font-size: var(--fs); font-weight: 600; color: var(--txt-2);
  padding: 6px 13px; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  transition: 0.16s; white-space: nowrap;
}
.w-nav button.on { background: #fff; color: var(--acc-d); box-shadow: var(--sd-1); }

.w-spacer { flex: 1; }

.w-chips { display: flex; gap: 6px; }
.w-chip {
  font-family: inherit; font-size: var(--fs-2); color: var(--txt-2); cursor: pointer;
  padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  box-shadow: var(--sd-1); transition: 0.16s; white-space: nowrap;
}
.w-chip b { font-weight: 600; color: var(--dim); margin-left: 2px; }
.w-chip.on { background: #E4F6EF; border-color: rgba(0, 160, 110, 0.32); color: var(--acc-d); box-shadow: none; }
.w-chip.on b { color: rgba(0, 128, 90, 0.62); }

.w-icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--txt-2); cursor: pointer;
  box-shadow: var(--sd-1); transition: 0.16s; flex: none;
}
.w-icon-btn:hover { color: var(--blue); border-color: rgba(37, 99, 235, 0.3); }
.w-icon-btn svg { width: 16px; height: 16px; }
.w-icon-btn.spin svg { animation: w-spin 0.7s linear infinite; }
@keyframes w-spin { to { transform: rotate(360deg); } }

.w-toh5 { font-size: var(--fs-2); color: var(--dim); text-decoration: none; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.w-toh5:hover { color: var(--blue); background: #fff; }

/* 语言切换：窄屏也不隐藏，中英互跳的入口得一直在 */
.w-lang {
  height: 30px; min-width: 30px; padding: 0 9px; border-radius: 8px;
  display: grid; place-items: center; border: 1px solid var(--line);
  background: #fff; color: var(--txt-2); text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  box-shadow: var(--sd-1); transition: 0.16s; flex: none;
}
.w-lang:hover { color: var(--blue); border-color: rgba(37, 99, 235, 0.3); }

/* ---------- 主体两栏 ---------- */

.w-grid {
  display: grid; grid-template-columns: 248px minmax(560px, 1fr) 468px;
  gap: 20px; align-items: start; margin-top: 16px;
}

/* ---------- 列表 ---------- */

.w-listbar {
  display: flex; align-items: center; gap: 12px; padding: 0 4px 9px;
  font-size: var(--fs-2); color: var(--txt-2);
}
.w-listbar .cnt b { font-size: 16px; font-weight: 700; color: var(--txt); }
.w-sort {
  margin-left: auto; font-family: inherit; font-size: var(--fs-2); color: var(--txt-2);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 11px; cursor: pointer; box-shadow: var(--sd-1); white-space: nowrap;
}
.w-sort.on { color: var(--blue); border-color: rgba(37, 99, 235, 0.3); }

.w-table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sd-2); overflow: hidden; }

.w-thead, .w-row {
  display: grid;
  grid-template-columns: 52px 98px 62px minmax(160px, 1fr) 126px 90px;
  gap: 12px; align-items: center; padding: 0 14px;
}
.w-thead {
  height: 40px; font-size: var(--fs-2); color: var(--dim); letter-spacing: 0.2px;
  background: #FCFDFE; border-bottom: 1px solid var(--line);
}
.w-thead span:nth-child(5) { text-align: center; }
.w-thead span:nth-child(6) { text-align: right; }

.w-row {
  height: 66px; cursor: pointer; position: relative;
  border-bottom: 1px solid rgba(15, 23, 42, 0.045);
  /* 高度也参与过渡：选中行比普通行高一截，突变会让整张表往下弹一下 */
  transition: background 0.14s, height 0.18s ease;
}
.w-row:last-child { border-bottom: 0; }
.w-row:hover { background: #FAFCFF; }

/* 选中行：比普通行高一截 + 左侧色条贯穿整行 + 左深右浅的绿色底 + 上下描边，
   形成"被框住的卡片"观感。高度差是刻意的，扫一眼就能定位当前看的是哪一场 */
.w-row.on {
  height: 78px;
  background: linear-gradient(90deg, #C6EBD9 0%, #E6F8F0 48%, #EDFAF4 100%);
  box-shadow:
    inset 0 1px 0 rgba(0, 150, 105, 0.28),
    inset 0 -1px 0 rgba(0, 150, 105, 0.28);
}
.w-row.on:hover {
  background: linear-gradient(90deg, #BCE7D3 0%, #DFF5EC 48%, #E7F8F1 100%);
}
.w-row.on::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #00D896, var(--acc));
  box-shadow: 3px 0 14px -3px rgba(0, 180, 124, 0.6);
}
.w-row.on .no { color: var(--acc-d); }
.w-row.on .tm { color: var(--txt); }
.w-row.on .w-vs-line .t { color: #0A3B2B; }

.w-row .no { font-size: var(--fs-2); font-weight: 600; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.w-row .lg {
  font-size: var(--fs-2); padding: 2px 6px; border-radius: 5px; justify-self: start;
  color: var(--lc); background: color-mix(in srgb, var(--lc) 9%, transparent);
  white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis;
}
.w-row .tm { font-size: var(--fs-2); color: var(--txt-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.w-vs-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.w-vs-line .t { font-size: var(--fs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-vs-line .t.home { text-align: right; flex: 1; }
.w-vs-line .t.away { text-align: left; flex: 1; }
.w-vs-line .s { font-size: var(--fs-2); color: var(--dim); flex: none; }

/* 排名 / 比分 */
.w-rk {
  font-style: normal; font-size: var(--fs-2); color: #93A1B5;
  padding: 0 4px; border-radius: 4px; background: rgba(15, 23, 42, 0.045);
  vertical-align: 1px; white-space: nowrap;
}
.w-vs-line .t.home .w-rk { margin-left: 4px; }
.w-vs-line .t.away .w-rk { margin-right: 4px; }

.w-sc {
  flex: none; font-size: 15px; font-weight: 700; letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  padding: 1px 8px; border-radius: 6px; background: rgba(15, 23, 42, 0.055);
}
.w-sc em { font-style: normal; font-weight: 500; color: var(--dim); margin: 0 2px; }

.w-live {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #E5484D; margin-right: 5px; vertical-align: 1px;
  animation: w-blink 1.1s ease-in-out infinite;
}
@keyframes w-blink { 50% { opacity: 0.25; } }
.w-done { font-size: var(--fs-2); color: var(--dim); }

.w-vs-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; }
.w-vs-score {
  font-size: 26px; font-weight: 700; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.w-vs-score em { font-style: normal; font-weight: 500; color: var(--dim); margin: 0 3px; }
.w-vs-tag { font-size: var(--fs-2); padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.w-vs-tag.live { color: #C0332F; background: rgba(229, 72, 77, 0.1); }
.w-vs-tag.post { color: var(--dim); background: rgba(15, 23, 42, 0.05); }

.w-mini { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 1.5px; background: rgba(15, 23, 42, 0.06); }
.w-mini span { height: 100%; }
.w-mini .h { background: #E5484D; }
.w-mini .d { background: #C2CBD8; }
.w-mini .a { background: #2563EB; }
.w-pcts {
  display: flex; justify-content: space-between; margin-top: 4px;
  font-size: var(--fs-2); color: var(--dim); font-variant-numeric: tabular-nums;
}

.w-tail { text-align: right; }
.w-tail b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.w-tail i { font-style: normal; display: block; font-size: var(--fs-2); color: var(--dim); }
.w-tail .pick { font-size: var(--fs); font-weight: 600; color: var(--acc-d); }
.w-tail .pick.mid { color: var(--txt-2); }

.w-empty { padding: 60px 0; text-align: center; color: var(--dim); font-size: var(--fs); }

/* ---------- 详情 ---------- */

.w-side {
  position: sticky; top: 74px;
  display: flex; flex-direction: column; gap: 12px;
  /* 高度只跟视口走：切换场次时页面总高度不变，右侧内容多长都不会把整页顶动 */
  max-height: calc(100vh - 96px);
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: 4px; margin-right: -4px;   /* 给滚动条让位，卡片不被压窄 */
  scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
  scroll-behavior: smooth;
}
.w-side::-webkit-scrollbar { width: 6px; }
.w-side::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.16); border-radius: 3px; }
.w-side::-webkit-scrollbar-track { background: transparent; }

.w-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--sd-2); padding: 14px 16px;
}
.w-card h3 {
  font-size: 16px; font-weight: 650; color: var(--txt); margin-bottom: 10px;
  display: flex; align-items: baseline; gap: 8px;
}
.w-card h3 em {
  font-style: normal; font-size: var(--fs-2); font-weight: 400; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

.w-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2); color: var(--dim); }
.w-meta .lg {
  font-size: var(--fs-2); padding: 2px 7px; border-radius: 5px; color: var(--lc);
  background: color-mix(in srgb, var(--lc) 9%, transparent);
}

.w-teams { display: flex; align-items: center; gap: 10px; margin: 12px 0 14px; }
.w-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.w-team .nm { font-size: var(--fs); font-weight: 600; text-align: center; }
.w-team .logo {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  color: #fff; font-size: 17px; font-weight: 700;
  box-shadow: 0 6px 14px -8px var(--c2);
}
.w-team .rk { font-size: var(--fs-2); color: var(--dim); }
.w-vs { font-size: var(--fs-2); font-weight: 700; color: var(--dim); letter-spacing: 1px; }

.w-cs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.w-cs-1 {
  background: var(--fill); border-radius: 10px; padding: 8px 10px; text-align: center;
}
.w-cs-1 .lbl { font-size: var(--fs-2); color: var(--dim); }
.w-cs-1 .val { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; }
.w-cs-1 .val small { font-size: 14px; font-weight: 500; color: var(--dim); margin-left: 1px; }
.w-cs-1.h .val { color: var(--red); }
.w-cs-1.a .val { color: var(--blue); }
.w-cs-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; gap: 2px; margin-top: 10px; }
.w-cs-bar .h { background: #E5484D; }
.w-cs-bar .d { background: #C2CBD8; }
.w-cs-bar .a { background: #2563EB; }
.w-cs-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--fs-2); color: var(--dim); }
.w-dv { color: var(--gold); font-weight: 600; }
.w-dv.low { color: var(--acc-d); }

/* 模型行 */
.w-src { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.w-src + .w-src { border-top: 1px solid rgba(15, 23, 42, 0.045); }
.w-src .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.w-src .id { width: 118px; flex: none; min-width: 0; }
.w-src .id .n { font-size: var(--fs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-src .id .t { font-size: var(--fs-2); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-src .bar { flex: 1; min-width: 0; }
.w-src .sc { width: 68px; flex: none; text-align: right; }
.w-src .sc b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-src .sc i { font-style: normal; display: block; font-size: var(--fs-2); color: var(--dim); white-space: nowrap; }

/* AI */
.w-ai-item { padding: 7px 0; }
.w-ai-item + .w-ai-item { border-top: 1px solid rgba(15, 23, 42, 0.045); }
.w-ai-reason { font-size: var(--fs-2); color: #47566B; padding-left: 15px; margin-top: 3px; line-height: 1.55; }
.w-ai-btn {
  width: 100%; font-family: inherit; font-size: var(--fs); font-weight: 600;
  padding: 12px; border-radius: 11px; cursor: pointer;
  background: linear-gradient(135deg, #F1F5FF, #EDF9F4);
  border: 1px dashed rgba(37, 99, 235, 0.3); color: var(--blue);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.w-ai-btn em { font-style: normal; font-size: var(--fs-2); font-weight: 400; color: var(--dim); }
.w-ai-note { font-size: var(--fs-2); color: var(--dim); text-align: center; margin-top: 8px; }
.w-ai-auto {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 9px; padding: 5px 2px;
  font-size: var(--fs-2); color: var(--dim); text-align: center;
}
.w-ai-auto i {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--blue); animation: w-blink 1.1s ease-in-out infinite;
}
@keyframes w-blink { 50% { opacity: 0.25; } }
.w-skel { height: 6px; border-radius: 3px; background: rgba(15, 23, 42, 0.08); animation: w-pulse 1.1s ease-in-out infinite; }
@keyframes w-pulse { 50% { opacity: 0.35; } }
.w-err { font-size: var(--fs-2); color: var(--red); }

/* 热力图 */
.w-heat { display: grid; grid-template-columns: 24px repeat(6, minmax(0, 1fr)); gap: 3px; }
.w-heat .lb { font-size: var(--fs-2); color: var(--dim); display: grid; place-items: center; height: 34px; }
.w-hc {
  height: 34px; border-radius: 6px; display: grid; place-items: center;
  font-size: var(--fs-2); font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden;
}
.w-hc.top { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.9); font-weight: 700; }

.w-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.w-duo-1 { background: var(--fill); border-radius: 10px; padding: 9px 11px; }
.w-duo-1 .k { font-size: var(--fs-2); color: var(--dim); }
.w-duo-1 .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; }
.w-duo-1 .v span { font-size: var(--fs-2); font-weight: 500; color: var(--dim); }
.w-duo-1 .s { font-size: var(--fs-2); color: var(--dim); margin-top: 1px; }

.w-disc { font-size: var(--fs-2); line-height: 1.6; color: var(--dim); margin-top: 10px; }

.w-hint {
  display: grid; place-items: center; min-height: 320px;
  color: var(--dim); font-size: var(--fs); text-align: center; line-height: 1.9;
}

.w-mobile-tip {
  display: none; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #FFF8E8; border: 1px solid rgba(176, 120, 26, 0.22);
  font-size: var(--fs-2); color: #8A6112;
}
.w-mobile-tip a { color: var(--blue); }

/* ---------- 骨架屏 / 入场 ---------- */

.w-sk {
  height: 10px; border-radius: 4px;
  background: linear-gradient(90deg,
    rgba(15, 23, 42, 0.05) 25%, rgba(15, 23, 42, 0.115) 50%, rgba(15, 23, 42, 0.05) 75%);
  background-size: 200% 100%;
  animation: w-sh 1.25s linear infinite;
}
@keyframes w-sh { to { background-position: -200% 0; } }

.w-sk-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.w-sk-row + .w-sk-row { border-top: 1px solid rgba(15, 23, 42, 0.045); }

.w-loading { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2); color: var(--acc-d); }
.w-loading i {
  display: block; width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(0, 160, 110, 0.22); border-top-color: var(--acc);
  animation: w-spin 0.7s linear infinite;
}

/* 切换场次：整块淡入，不做位移、不逐张错开。
   逐张错开 + 上浮看着"抖"，是因为每一行的入场时刻不同、又带动了视线重新对焦。 */
.w-side.enter .w-card { animation: w-fade 0.16s ease-out both; }
.w-side.no-anim .w-card, .w-side.no-anim .w-card * { animation: none !important; }
@keyframes w-fade {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* 顶部一条加载进度：比整屏变灰更轻，也不会遮住内容 */
.w-prog {
  height: 3px; flex: none; border-radius: 2px; margin-bottom: -6px;
  background: linear-gradient(90deg, transparent, rgba(0, 160, 110, 0.85), transparent) no-repeat;
  background-size: 38% 100%;
  animation: w-prog-run 1.05s ease-in-out infinite;
}
@keyframes w-prog-run {
  0% { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}

/* ---------- 自适应 ---------- */

/* 三栏：榜 | 表格 | 详情。
   宽度不够时先压榜和侧栏，压到 1360 就把榜横过来放到表格上方 —— 宁可窄一点，
   也不让「对阵」列被截断（截了队名这块表就没用了）。 */
@media (max-width: 1700px) {
  .w-grid { grid-template-columns: 224px minmax(0, 1fr) 440px; }
}

@media (max-width: 1500px) {
  .w-grid { grid-template-columns: 208px minmax(0, 1fr) 408px; gap: 16px; }
  .w-thead, .w-row { grid-template-columns: 44px 76px 50px minmax(160px, 1fr) 104px 78px; gap: 8px; padding: 0 10px; }
}

@media (max-width: 1360px) {
  .w-grid { grid-template-columns: minmax(0, 1fr) 392px; }
  /* 榜横过来放到表格上方、5 个模型并排 —— 规则写在文件末尾，
     因为 .w-rkf 的基础样式在下面定义，写这里会被覆盖（同权重后者胜）。 */
}

@media (max-width: 1270px) {
  .w-grid { grid-template-columns: 1fr; }
  .w-side { position: static; max-width: 820px; max-height: none; overflow: visible; }
  .w-thead, .w-row { grid-template-columns: 52px 98px 62px minmax(170px, 1fr) 126px 90px; gap: 12px; padding: 0 14px; }
}

@media (max-width: 820px) {
  .w-shell { padding: 0 12px 40px; }
  .w-top-in { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .w-spacer { display: none; }
  .w-thead { display: none; }
  .w-row {
    grid-template-columns: 50px minmax(0, 1fr); grid-auto-rows: auto;
    height: auto; padding: 11px 12px; gap: 5px 10px;
  }
  .w-row .lg, .w-row .tm { display: none; }
  .w-row .no { grid-column: 1; grid-row: 1; }
  .w-vs-line { grid-column: 2; grid-row: 1; }
  .w-row .w-mini-wrap { grid-column: 2; grid-row: 2; }
  .w-row .w-tail { grid-column: 2; grid-row: 3; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .w-mobile-tip { display: block; }
  .w-toh5 { display: none; }
}

/* ---------- 国际模型配置（两版共用同一套类名） ---------- */

.ai-cfg { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ai-cfg-tg {
  width: 100%; display: flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 14px; color: var(--txt-2);
  background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: left;
}
.ai-cfg-tg em { font-style: normal; font-size: 14px; color: var(--dim); }
.ai-cfg-tg::after { content: '＋'; margin-left: auto; color: var(--dim); }
.ai-cfg-tg.open::after { content: '－'; }
.ai-cfg-body { display: flex; flex-direction: column; gap: 9px; margin-top: 9px; }
.ai-cfg-body[hidden] { display: none; }   /* 收起时不留空档 */
.ai-cfg-row { display: flex; flex-direction: column; gap: 4px; }
.ai-cfg-row .k { font-size: 14px; color: var(--txt-2); }
.ai-cfg-row .k a { color: var(--blue); text-decoration: none; border-bottom: 1px dashed rgba(37, 99, 235, 0.4); }
.ai-cfg-row .v { font-size: 14px; color: var(--dim); }
.ai-cfg-in {
  font-family: inherit; font-size: 14px; color: var(--txt);
  padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
  min-width: 0;
}
.ai-cfg-in:focus { outline: none; border-color: rgba(37, 99, 235, 0.45); }
.ai-cfg-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; color: var(--dim); flex-wrap: wrap;
}
.ai-cfg-save {
  font-family: inherit; font-size: 14px; font-weight: 600; padding: 7px 13px;
  border-radius: 8px; border: 1px solid rgba(37, 99, 235, 0.3);
  background: #EEF4FF; color: var(--blue); cursor: pointer;
}
.ai-cfg-save:active { transform: scale(0.97); }


/* ---------- 英文版：第 2 列（赛事）单独加宽 ----------
   中文「欧国联」三个字，英文「Nations League」要 90px，共用列宽会被截断。
   三处断点都要覆盖，否则某个视口宽度下表头和表身会错位 */
html[lang="en"] .w-thead,
html[lang="en"] .w-vs-line .t { font-size: 12.5px; }
html[lang="en"] .w-row { grid-template-columns: 48px 122px 56px minmax(150px, 1fr) 104px 102px; }

/* 三栏布局占掉 216px 后，英文表格在 1361–1700 最挤，列宽再收一档 */
@media (max-width: 1700px) {
  html[lang="en"] .w-thead,
  html[lang="en"] .w-row {
    grid-template-columns: 44px 112px 50px minmax(140px, 1fr) 96px 100px;
    gap: 10px;
  }
}

@media (max-width: 1300px) {
  html[lang="en"] .w-thead,
  html[lang="en"] .w-row {
    grid-template-columns: 46px 122px 52px minmax(140px, 1fr) 98px 92px;
    gap: 10px; padding: 0 12px;
  }
}

@media (max-width: 1270px) {
  html[lang="en"] .w-thead,
  html[lang="en"] .w-row {
    grid-template-columns: 48px 122px 56px minmax(160px, 1fr) 104px 102px;
    gap: 12px; padding: 0 14px;
  }
}

.w-stale {
  margin-top: 10px; padding: 8px 12px; border-radius: 9px;
  font-size: var(--fs-2); line-height: 1.5;
  background: #FDF4E3; color: #8A5A12;
  border: 1px solid rgba(176, 120, 26, 0.25);
}
.w-stale[hidden] { display: none; }

/* ---------- 首屏骨架 ----------
   数据在本地快照里，通常几十到几百毫秒就渲染完；
   网慢时（尤其还要等 CDN 上的 SDK）这一段就是纯白屏。
   骨架行直接复用 .w-row 的栅格，列宽行高与真实行完全一致，
   渲染完成时 innerHTML 整块替换，位置一点不跳。
   ------------------------------------ */

.w-sk-row { pointer-events: none; cursor: default; }
.w-sk-row:hover { background: transparent; }

.sk {
  position: relative; overflow: hidden;
  display: block; height: 14px; border-radius: 5px;
  background: #E6EAF1;
}
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.92) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: sk-shine 1.3s ease-in-out infinite;
}
@keyframes sk-shine { to { transform: translateX(100%); } }

.w-sk-row .sk-no   { width: 26px; height: 16px; justify-self: start; }
.w-sk-row .sk-pill { width: 46px; height: 19px; justify-self: start; }
.w-sk-row .sk-time { width: 34px; justify-self: start; }
.w-sk-row .sk-vs   { width: 84%; max-width: 190px; justify-self: start; }
.w-sk-row .sk-tail { width: 44px; justify-self: end; }

/* 概率列：三条不同长度的灰条，模拟真实行的红/灰/蓝比例条 */
.w-sk-bar { display: flex; gap: 2px; align-items: center; justify-self: start; width: 100%; }
.w-sk-bar i {
  display: block; height: 8px; border-radius: 3px; background: #ECEFF3;
  position: relative; overflow: hidden;
}
.w-sk-bar i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.92) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: sk-shine 1.3s ease-in-out infinite;
}

/* 让骨架别整齐得像复制粘贴 */
.w-sk-row:nth-child(3n)   .sk-vs { width: 64%; }
.w-sk-row:nth-child(3n+1) .sk-vs { width: 92%; }
.w-sk-row:nth-child(4n)   .sk-pill { width: 38px; }
.w-sk-row:nth-child(5n)   .sk-tail { width: 36px; }

/* 侧栏骨架卡片 */
.w-sk-side .sk { margin-bottom: 11px; }
.w-sk-side .sk-h  { height: 16px; width: 46%; }
.w-sk-side .sk-p  { height: 12px; width: 100%; }
.w-sk-side .sk-p2 { height: 12px; width: 72%; margin-bottom: 20px; }
.w-sk-side .sk-box { height: 62px; border-radius: 10px; }
.w-sk-side .sk-box.sm { height: 42px; }

@media (prefers-reduced-motion: reduce) {
  .sk::after, .w-sk-bar i::after { animation: none; }
}

/* ---------- AI 模型战绩榜（表格下方） ---------- */
.w-rank { margin-top: 14px; }
.w-lb-card { padding: 14px 16px 12px; }
.w-lb-card h3 { margin-bottom: 6px; }

.w-lb {
  display: grid;
  grid-template-columns: 26px minmax(150px, 182px) minmax(90px, 1fr) 124px;
  align-items: center; gap: 12px;
  padding: 9px 0;
}
.w-lb + .w-lb { border-top: 1px solid rgba(15, 23, 42, 0.045); }
.w-lb.top { background: linear-gradient(90deg, rgba(0, 200, 138, 0.07), rgba(0, 200, 138, 0) 70%);
            border-radius: 8px; margin: 0 -6px; padding: 9px 6px; }

.w-lb .no {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--dim); background: var(--fill);
}
.w-lb .no.r1 { color: #fff; background: linear-gradient(135deg, #00D896, #00A06E); }
.w-lb .no.r2 { color: #0C6A4C; background: #D6F2E6; }
.w-lb .no.r3 { color: #8A6100; background: #FAF0D8; }

.w-lb .who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.w-lb .who .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.w-lb .who b { font-size: var(--fs); font-weight: 600; white-space: nowrap; }
.w-lb .who i {
  font-style: normal; font-size: var(--fs-2); color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.w-lb .bar { height: 7px; border-radius: 4px; background: rgba(15, 23, 42, 0.06); overflow: hidden; }
.w-lb .bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #00C48A, #12B981);
  transition: width 0.35s ease;
}
.w-lb.top .bar i { background: linear-gradient(90deg, #00D896, #00A06E); }

.w-lb .val { text-align: right; }
.w-lb .val b {
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--acc-d); white-space: nowrap;
}
.w-lb .val b em { font-style: normal; font-size: var(--fs-2); font-weight: 500; }
.w-lb .val i {
  display: block; font-style: normal; font-size: var(--fs-2); color: var(--dim);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.w-lb-foot { margin-top: 10px; font-size: var(--fs-2); color: var(--txt-2); }
.w-lb-note { margin-top: 3px; font-size: var(--fs-2); color: var(--dim); }

.w-lb-empty {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 12px; border-radius: 10px; background: var(--fill);
}
.w-lb-empty b { font-size: var(--fs); font-weight: 600; }
.w-lb-empty span { font-size: var(--fs-2); color: var(--dim); line-height: 1.55; }

/* 窄屏（单栏）时左侧列宽收一点，别把条形压没 */
@media (max-width: 820px) {
  .w-lb { grid-template-columns: 22px 1fr 92px; gap: 9px; }
  .w-lb .bar { display: none; }
}

/* ---------- 左列常驻战绩榜 ----------
   坐在 .w-grid 的第一列里，sticky 跟随滚动 —— 不点按钮就能看到各模型的水平，
   也不像 fixed 浮层那样压住表格。窄到单栏时落到列表上方（position: static）。 */
.w-rkcol { align-self: stretch; }

.w-rkf { position: sticky; top: 74px; }

.w-rkf-card {
  padding: 12px 12px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--sd-2);
}

.w-rkf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.w-rkf-head b { font-size: 15px; font-weight: 650; }
.w-rkf-head em {
  margin-left: auto; font-style: normal; font-size: var(--fs-2); color: var(--dim);
  white-space: nowrap;
}
.w-rkf-list { max-height: 62vh; overflow-y: auto; }
.w-rkf-list::-webkit-scrollbar { width: 5px; }
.w-rkf-list::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.14); border-radius: 3px; }

.w-rkf-row {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) 46px;
  align-items: center; gap: 8px; padding: 7px 0;
}
.w-rkf-row + .w-rkf-row { border-top: 1px solid rgba(15, 23, 42, 0.045); }
.w-rkf-row .no {
  width: 19px; height: 19px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--dim); background: var(--fill);
}
.w-rkf-row .no.r1 { color: #fff; background: linear-gradient(135deg, #00D896, #00A06E); }
.w-rkf-row .no.r2 { color: #0C6A4C; background: #D6F2E6; }
.w-rkf-row .no.r3 { color: #8A6100; background: #FAF0D8; }
.w-rkf-row .who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.w-rkf-row .who .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.w-rkf-row .who b { font-size: var(--fs-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-rkf-row .val { text-align: right; }
.w-rkf-row .val b {
  display: block; font-size: 15px; font-weight: 700; color: var(--acc-d);
  font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15;
}
.w-rkf-row .val b em { font-style: normal; font-size: 12px; font-weight: 500; }
.w-rkf-row .val i {
  display: block; height: 3px; border-radius: 2px; margin: 3px 0 0 auto;
  background: linear-gradient(90deg, #00C48A, #12B981);
}

.w-rkf-foot {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: var(--fs-2); color: var(--dim); line-height: 1.45;
}

.w-rkf-empty { display: flex; flex-direction: column; gap: 5px; padding: 6px 2px 2px; }
.w-rkf-empty b { font-size: var(--fs-2); font-weight: 600; }
.w-rkf-empty span { font-size: var(--fs-2); color: var(--dim); line-height: 1.5; }

/* ---------- 「看理由」按钮 + 展开的依据 ---------- */
.w-more {
  width: 100%; margin-top: 9px; padding: 8px 12px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #fff; border: 1px dashed var(--line-2); cursor: pointer;
  font-family: inherit; font-size: var(--fs-2); transition: 0.16s;
}
.w-more:hover { border-color: rgba(37, 99, 235, 0.32); background: #FBFCFE; }
.w-more span { font-weight: 600; color: var(--blue); }
.w-more em { font-style: normal; color: var(--dim); }
.w-more i {
  width: 6px; height: 6px; flex: none; margin-left: 2px;
  border-right: 1.6px solid var(--dim); border-bottom: 1.6px solid var(--dim);
  transform: rotate(45deg) translateY(-1px); transition: transform 0.18s;
}
.w-more[aria-expanded="true"] i { transform: rotate(-135deg) translateY(-1px); }

/* 依据默认收起，点按钮才出现 */
.w-src { flex-wrap: wrap; }

.w-src-why {
  display: none; flex: 1 0 100%; order: 9;
  margin: 2px 0 2px 15px; padding: 5px 0 5px 10px;
  border-left: 2px solid rgba(0, 160, 110, 0.25);
  font-size: var(--fs-2); line-height: 1.6; color: #47566B;
}
.show-why .w-src-why { display: block; }

.w-ai-reason { display: none; }
.show-why .w-ai-reason { display: block; }

/* ---------- 左列战绩榜的响应式 ----------
   必须放在 .w-rkf 基础样式之后：媒体查询不提升优先级，基础规则写在后面时
   会把它盖掉（之前 1360 的 position:static 就是这样失效的）。 */
@media (max-width: 1360px) {
  .w-rkcol { grid-column: 1 / -1; }
  .w-rkf { position: static; }
  /* 横过来：一排 5 个，一行看完，总高只多 ~90px */
  .w-rkf-card { padding: 10px 12px 9px; }
  .w-rkf-list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 8px; max-height: none; overflow: visible;
  }
  .w-rkf-row {
    display: block; padding: 7px 8px; text-align: center;
    background: var(--fill); border-radius: 9px; border: none;
  }
  .w-rkf-row + .w-rkf-row { border-top: none; }
  .w-rkf-row .no { margin: 0 auto 3px; }
  .w-rkf-row .who { justify-content: center; }
  .w-rkf-row .who b { font-size: 13px; }
  .w-rkf-row .val { margin-top: 2px; }
  .w-rkf-row .val b { font-size: 14px; }
  .w-rkf-row .val i { display: none; }
  .w-rkf-empty { grid-column: 1 / -1; }
  .w-rkf-foot { margin-top: 7px; padding-top: 7px; }
}

@media (max-width: 1270px) {
  .w-rkf-list { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); }
}

@media (max-width: 820px) {
  .w-rkf-list { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
  .w-rkf-head b { font-size: 14px; }
}
