/* ============================================================================
   DSH 足球大模型 —— 设计系统（Apple 风格）
   ---------------------------------------------------------------------------
   设计原则：
   · 大量留白，内容呼吸感
   · 大字重、紧字距的标题层级（SF Pro 风格）
   · 卡片无边框、大圆角、极轻阴影
   · 单一强调色（Apple 蓝），语义色克制使用
   · 毛玻璃导航栏
   ========================================================================== */

:root {
  /* 表面 */
  --bg: #f5f5f7;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-2: #fbfbfd;
  --card-3: #f2f2f5;

  /* 分隔线 */
  --line: rgba(0, 0, 0, .085);
  --line-2: rgba(0, 0, 0, .15);

  /* 文字 */
  --txt: #1d1d1f;
  --txt-2: #6e6e73;
  --txt-3: #86868b;
  --txt-4: #aeaeb2;

  /* 强调色 */
  --accent: #0071e3;
  --accent-2: #0077ed;
  --accent-soft: rgba(0, 113, 227, .08);

  /* 语义色（在浅底上对比度足够） */
  --green: #1d7a3e;
  --green-soft: rgba(52, 199, 89, .12);
  --amber: #a55a00;
  --amber-soft: rgba(255, 149, 0, .14);
  --red: #c4161c;
  --red-soft: rgba(255, 59, 48, .1);
  --violet: #5e5ce6;

  /* 形状 */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 980px;

  /* 阴影（极轻） */
  --shadow: 0 2px 12px rgba(0, 0, 0, .045);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, .07);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .12);

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 布局 */
  --nav-h: 52px;
  --maxw: 1120px;
  --gap: 20px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

::selection { background: rgba(0, 113, 227, .18); }

/* 滚动条（浅色细条） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .16); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .28); }

/* -------------------------------------------------------------- 布局骨架 */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 96px;
}

.section { margin-top: 72px; }

.section-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
}
.section-title span {
  font-size: 15px;
  color: var(--txt-2);
  letter-spacing: -.01em;
}
.section-title a {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

/* 页面标题区 */
.page-head { margin: 56px 0 36px; }
.page-head h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.08;
}
.page-head p {
  margin: 0;
  max-width: 780px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--txt-2);
}

/* 网格 */
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.spacer { height: 1px; background: var(--line); margin: 40px 0; border: 0; }

/* -------------------------------------------------------------- 导航栏 */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(251, 251, 253, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-in {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--txt);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--txt);
  border-radius: 8px;
  filter: grayscale(0);
}
.brand > span:last-child {
  display: flex; flex-direction: column; line-height: 1.15;
  font-size: 15px; font-weight: 600; letter-spacing: -.02em;
}
.brand small {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--txt-3);
  letter-spacing: .01em;
  margin-top: 1px;
}

.nav-links { display: flex; align-items: center; gap: 1px; flex: 1; min-width: 0; }
.nav-links a {
  padding: 7px 11px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--txt-2);
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.nav-links a:hover { background: rgba(0, 0, 0, .05); color: var(--txt); text-decoration: none; }
.nav-links a.on { color: var(--txt); font-weight: 600; }

.nav-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 13px;
  border: 0; border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .05);
  color: var(--txt);
  font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background .18s, transform .12s;
}
.nav-btn:hover { background: rgba(0, 0, 0, .085); }
.nav-btn:active { transform: scale(.97); }

.nav-burger { display: none; }

/* -------------------------------------------------------------- 首屏 */
.hero { padding: 76px 0 8px; }
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.04;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #0071e3 0%, #42a5f5 55%, #5e5ce6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero > p {
  margin: 0;
  max-width: 800px;
  font-size: 18px;
  line-height: 1.58;
  color: var(--txt-2);
  letter-spacing: -.01em;
}
.hero > p b { color: var(--txt); font-weight: 600; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-stat {
  background: var(--bg-soft);
  padding: 24px 20px 22px;
  display: flex; flex-direction: column; gap: 3px;
}
.hero-stat b {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hero-stat span { font-size: 13px; color: var(--txt-2); letter-spacing: -.005em; }

/* -------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--txt);
  font-family: inherit; font-size: 15px; font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s, color .18s;
  white-space: nowrap;
}
.btn:hover { background: rgba(0, 0, 0, .045); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { border-color: transparent; color: var(--accent); padding: 0 12px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { height: 32px; padding: 0 16px; font-size: 13.5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* -------------------------------------------------------------- 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 0;
  transition: box-shadow .25s, transform .25s;
}
a.card:hover, .card[onclick]:hover { box-shadow: var(--shadow-md); }

.card-h {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-h h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.card-h .note { font-size: 13px; }
.card-h > *:last-child:not(:only-child) { margin-left: auto; }

/* ------------------------------------------------ 文本工具类 */
.note { color: var(--txt-3); font-size: 13px; line-height: 1.5; }
.sub { color: var(--txt-2); font-size: 14px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); }
.big { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.small { font-size: 13px; }
.tk { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.tk-h { font-weight: 600; }
.tk-note { font-size: 12px; color: var(--txt-3); }

.sep { width: 1px; height: 14px; background: var(--line-2); display: inline-block; vertical-align: middle; margin: 0 9px; }
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; margin: 0 7px; vertical-align: middle; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.hot { color: #d70015; }
.cold { color: #0a84ff; }
.up { color: var(--green); }
.down { color: var(--red); }
.evpos { color: var(--green); font-weight: 600; }
.fake { color: var(--txt-3); }

/* -------------------------------------------------------------- 标签 / 芯片 */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 11px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .045);
  color: var(--txt-2);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.chip.b { background: var(--accent-soft); color: var(--accent); }
.chip.g { background: var(--green-soft); color: var(--green); }
.chip.a { background: var(--amber-soft); color: var(--amber); }
.chip.r { background: var(--red-soft); color: var(--red); }
.chip.click { cursor: pointer; transition: background .16s; }
.chip.click:hover { background: rgba(0, 0, 0, .08); }
.chip.on { background: var(--txt); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .05);
  color: var(--txt-2);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.tag.live { background: var(--red-soft); color: var(--red); }
.tag.live::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; margin-right: 5px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* 星级 */
.stars { color: #ff9f0a; font-size: 12px; letter-spacing: 1px; white-space: nowrap; }

/* 信心等级 */
.conf { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.conf.hi { color: var(--green); }
.conf.md { color: var(--amber); }
.conf.lo { color: var(--txt-3); }

/* -------------------------------------------------------------- 表格 */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.tb th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--txt-3);
  letter-spacing: .01em;
  padding: 0 12px 11px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tb td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.tb tbody tr:last-child td { border-bottom: 0; }
table.tb tbody tr { transition: background .14s; }
table.tb tbody tr:hover { background: rgba(0, 0, 0, .022); }
table.tb td.num, table.tb th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tb b { font-weight: 600; }

/* 排行榜徽章 */
.rank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .05);
  color: var(--txt-2);
  font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rank.top1 { background: #ffe8bf; color: #8a5a00; }
.rank.top2 { background: #e8e8ed; color: #5b5b60; }
.rank.top3 { background: #f7e0d0; color: #8a4b1e; }

/* -------------------------------------------------------------- 空状态 / 骨架 */
.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--txt-3);
  font-size: 15px;
  background: var(--card);
  border-radius: var(--radius);
}
.skeleton {
  background: linear-gradient(90deg, #eeeef1 25%, #f6f6f8 50%, #eeeef1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  min-height: 16px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* -------------------------------------------------------------- 比赛卡片 */
.match-list { display: grid; gap: 14px; }

.match {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .25s;
}
.match:hover { box-shadow: var(--shadow-md); }

.match-top {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--txt-3);
  padding-bottom: 13px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.match-top .lg { color: var(--txt-2); font-weight: 500; }
.match-top b { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; }
.match-top > *:last-child { margin-left: 0; }

.match-body { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.match-body .teams { flex: 1 1 300px; min-width: 0; }
.match-body > div:last-child:not(.teams) { flex: 0 0 auto; }

.teams { display: grid; gap: 10px; }
.team-line { display: flex; align-items: center; gap: 9px; min-width: 0; }

.team-line .ha {
  flex: 0 0 auto;
  width: 21px; height: 21px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(0, 0, 0, .055);
  color: var(--txt-2);
  font-size: 11px; font-weight: 600;
}
.team-line .nm {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.team-line .rank {
  flex: 0 0 auto;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .05);
  color: var(--txt-3);
  font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; justify-content: center;
}
.team-line .form { margin-left: auto; flex: 0 0 auto; display: flex; gap: 3px; }
.form i {
  width: 17px; height: 17px;
  border-radius: 5px;
  font-style: normal;
  font-size: 9.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.form i.W { background: var(--green-soft); color: var(--green); }
.form i.D { background: rgba(0, 0, 0, .06); color: var(--txt-3); }
.form i.L { background: var(--red-soft); color: var(--red); }

/* 元信息小芯片 */
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mchip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  border-radius: 7px;
  background: var(--card-3);
  font-size: 11.5px;
  color: var(--txt-2);
  white-space: nowrap;
}
.mchip .mc-k { color: var(--txt-3); }
.mchip b { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; }
.mchip em { font-style: normal; }
.mchip .mc-sep { color: var(--txt-4); }
.mchip .mc-h { color: var(--accent); }
.mchip.move .mv-arrow { font-style: normal; font-size: 10px; }

/* 概率条 */
.probbar { margin-top: 12px; }
.pb-track {
  display: flex;
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
  background: #e8e8ed;
}
.pb-track > i {
  display: block;
  position: relative;
  height: 100%;
  transition: width .55s cubic-bezier(.4, 0, .2, 1);
  font-style: normal;
}
.pb-track > i span { display: none; }
.pb-track i.h { background: #0071e3; }
.pb-track i.d { background: #c7c7cc; }
.pb-track i.a { background: #ff9f0a; }

.pb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--txt-3);
}
.pb-legend b { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; }
.pb-legend .dot { margin: 0 4px 0 0; }
.pb-legend .dot.h { background: #0071e3; }
.pb-legend .dot.d { background: #c7c7cc; }
.pb-legend .dot.a { background: #ff9f0a; }

/* 赔率 */
.odds-wrap { margin-top: 13px; }
.odds-cap { font-size: 11px; color: var(--txt-3); margin-bottom: 7px; }
.odds-cap.real { color: var(--green); }
.odds-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.odds-cell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--card-3);
}
.odds-cell span { font-size: 11.5px; color: var(--txt-3); }
.odds-cell b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.odds-cell.best { background: var(--accent-soft); }
.odds-cell.best b { color: var(--accent); }

.match-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 13px;
  border-top: 1px solid var(--line);
}

/* 实时比分 */
.live-score {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--red);
}
.live { color: var(--red); }

/* 倒计时 */
.countdown { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--txt-2); }
.cd-box {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 7px;
  border-radius: 9px;
  background: var(--card-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 14px;
}

/* -------------------------------------------------------------- 筛选栏 */
.filterbar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.fb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.fb-row + .fb-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fb-label { font-size: 12px; color: var(--txt-3); font-weight: 500; min-width: 46px; }
.fb-dates { display: flex; gap: 7px; flex-wrap: wrap; }
.fb-count { margin-left: auto; font-size: 12.5px; color: var(--txt-3); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fb-count b { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; }

.date-btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  text-align: center;
  line-height: 1.28;
  font-family: inherit;
  transition: background .16s, border-color .16s, color .16s;
}
.date-btn b { display: block; font-size: 13px; font-weight: 600; color: var(--txt); }
.date-btn span { font-size: 10.5px; color: var(--txt-3); }
.date-btn:hover { background: rgba(0, 0, 0, .04); }
.date-btn.on { background: var(--txt); border-color: var(--txt); }
.date-btn.on b { color: #fff; }
.date-btn.on span { color: rgba(255, 255, 255, .62); }

/* 联赛选择器 */
.league-picker { position: relative; }
.league-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: min(560px, 86vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
}
.league-panel.open { display: block; }
.lp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
}
.lp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
}
.lp-item:hover { background: rgba(0, 0, 0, .04); }
.lp-item input { accent-color: var(--accent); }

/* 输入框 */
input[type=text], input[type=number], input[type=password], select, textarea {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--txt);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
input[type=text]:focus, input[type=number]:focus, input[type=password]:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .14);
}
input[type=range] { accent-color: var(--accent); height: 4px; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

/* -------------------------------------------------------------- 串关 / 方案 */
.slip {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.slip-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.slip-h b, .slip-h strong { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }

.legs { display: grid; gap: 8px; }
.leg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: var(--card-3);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}
.leg > div:first-child > div:first-child { font-weight: 500; letter-spacing: -.01em; }
.leg .m { color: var(--txt-3); font-size: 11.5px; margin-top: 2px; }
.leg .p { color: var(--green); font-weight: 600; }
.leg .o { font-family: var(--mono); font-size: 12px; color: var(--amber); margin-top: 2px; }

.slip-nums {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  text-align: center;
}
.slip-nums div { background: var(--card-3); border-radius: 12px; padding: 12px 6px; }
.slip-nums span { display: block; font-size: 11.5px; color: var(--txt-3); margin-bottom: 2px; }
.slip-nums b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.slip-note { font-size: 12.5px; color: var(--txt-3); margin-top: 12px; line-height: 1.55; }

/* 计算器 */
.calc-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.calc-item:last-child { border-bottom: 0; }
.calc-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.calc-res div { background: var(--card-3); border-radius: 12px; padding: 12px; text-align: center; }
.calc-res span { display: block; font-size: 11.5px; color: var(--txt-3); }
.calc-res b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 标签页 */
.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .05);
  max-width: 100%;
  overflow-x: auto;
}
.tab {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.tab:hover { color: var(--txt); }
.tab.on { background: #fff; color: var(--txt); box-shadow: 0 1px 4px rgba(0, 0, 0, .09); }

/* -------------------------------------------------------------- 信息框 */
.infobox, .warnbox, .okbox {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  letter-spacing: -.005em;
}
.infobox { background: var(--accent-soft); color: #05508f; }
.warnbox { background: var(--amber-soft); color: #7a4200; }
.okbox { background: var(--green-soft); color: #14562c; }
.infobox b, .warnbox b, .okbox b { font-weight: 600; }

/* 键值表 */
/* 键值对：双列，标签在上、值在下（类似苹果规格表） */
.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  font-size: 14px;
}
.kv > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv > div > span {
  font-size: 12px;
  color: var(--txt-3);
  letter-spacing: 0;
  line-height: 1.35;
}
.kv > div > b {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--txt);
  letter-spacing: -.01em;
  line-height: 1.45;
  word-break: break-word;
}
@media (max-width: 640px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* -------------------------------------------------------------- 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal-mask.open { display: flex; }

.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}
.modal-h {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 2;
}
.modal-h h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.modal-h .x {
  margin-left: auto;
  cursor: pointer;
  color: var(--txt-3);
  font-size: 20px;
  line-height: 1;
  border: none;
  background: none;
  padding: 4px 8px;
  border-radius: 8px;
}
.modal-h .x:hover { color: var(--txt); background: rgba(0, 0, 0, .05); }
.modal-b { padding: 22px 24px 26px; }

/* 弹窗内放大的概率条 */
#dsh-modal .probbar { margin-top: 14px; }
#dsh-modal .pb-track {
  height: 30px;
  border-radius: 10px;
  gap: 2px;
  background: transparent;
}
#dsh-modal .pb-track i {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
#dsh-modal .pb-track i span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
#dsh-modal .pb-track i.d span { color: #4a4a4f; text-shadow: none; }
#dsh-modal .pb-legend { gap: 16px; font-size: 12.5px; }

/* -------------------------------------------------------------- 页脚 */
.footer {
  margin-top: 88px;
  padding: 40px 0 52px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.footer .wrap { padding-bottom: 0; }
.footer .cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.footer h4 {
  margin: 0 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: -.005em;
}
.footer a { display: block; color: var(--txt-2); font-size: 13px; padding: 4px 0; }
.footer a:hover { color: var(--txt); }
.footer p { margin: 0; font-size: 12.5px; color: var(--txt-3); line-height: 1.65; }

/* -------------------------------------------------------------- 模型战绩指标 */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b, .stat .v {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat span, .stat .k { font-size: 12.5px; color: var(--txt-2); }

/* 频次热力格 */
.freq { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.freq-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 9px 4px;
  border-radius: 10px;
  background: var(--card-3);
  font-size: 11.5px;
  color: var(--txt-2);
  gap: 2px;
}
.freq-cell b { font-size: 15px; font-weight: 600; color: var(--txt); font-variant-numeric: tabular-nums; }
.freq-cell.hot { background: var(--amber-soft); color: var(--amber); }
.freq-cell.hot b { color: var(--amber); }
.freq-cell.cold { background: var(--accent-soft); color: var(--accent); }
.freq-cell.cold b { color: var(--accent); }

/* 分析文字块 */
.analysis { font-size: 14px; line-height: 1.72; color: var(--txt-2); }
.analysis b { color: var(--txt); font-weight: 600; }
.reco {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #05508f;
}
.reco b { font-weight: 600; color: #033d6b; }
.risk { font-size: 12.5px; color: var(--txt-3); line-height: 1.6; }

/* 风险等级 */
.lv { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.lv.稳健 { background: var(--green-soft); color: var(--green); }
.lv.平衡 { background: var(--accent-soft); color: var(--accent); }
.lv.博高 { background: var(--amber-soft); color: var(--amber); }

/* 标签补充 */
.tag.hot { background: var(--red-soft); color: var(--red); }
.tag.cold { background: var(--accent-soft); color: var(--accent); }
.tag.warn { background: var(--amber-soft); color: var(--amber); }
.tag.info { background: rgba(0, 0, 0, .05); color: var(--txt-2); }
.tag.live-score { background: var(--red-soft); color: var(--red); font-variant-numeric: tabular-nums; }

.chip.v { background: rgba(94, 92, 230, .1); color: var(--violet); }
.rank.top { background: #ffe8bf; color: #8a5a00; }
.conf.vlo { color: var(--txt-4); }
.odds-box.model-only .odds-cell { background: rgba(0, 113, 227, .06); }
.odds-cap.fake { color: var(--txt-4); }

/* 大乐透号码球 */
.balls { display: flex; flex-wrap: wrap; gap: 7px; }
.ball {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--card-3);
  color: var(--txt);
  font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ball.b { background: var(--accent); color: #fff; }
.ball.f { background: #ff9f0a; color: #fff; }
.ball.plain { background: var(--card-3); color: var(--txt-2); }
.ball.sm { width: 27px; height: 27px; font-size: 12px; }

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  z-index: 2000;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: rgba(29, 29, 31, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13.5px;
  letter-spacing: -.005em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: var(--shadow-lg);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 今日速览卡片 */
.qv-card { cursor: pointer; }
.qv-card .card-h h3 { font-size: 15px; }

/* ============================================================ 响应式 */

/* 大屏微调 */
@media (min-width: 1280px) {
  :root { --maxw: 1180px; }
}

/* 平板 */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { gap: 0; }
  .nav-links a { padding: 7px 8px; font-size: 12px; }
}

/* 手机 */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px 72px; }

  /* 导航：单行 + 汉堡菜单 */
  .nav { position: sticky; }
  .nav-in {
    height: auto;
    min-height: 54px;
    padding: 8px 16px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .brand small { display: none; }
  .brand > span:last-child { font-size: 14.5px; }

  .nav-burger {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 32px;
    margin-left: auto;
    flex: 0 0 auto;
    border: 0;
    border-radius: 9px;
    background: rgba(0, 0, 0, .05);
    color: var(--txt);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
  }
  .nav-burger.on { background: var(--txt); color: #fff; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    padding: 8px 12px 12px;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .1);
    z-index: 90;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 12px; font-size: 15px; border-radius: 10px; }
  .nav-links a.on { background: rgba(0, 0, 0, .05); }
  .nav-btn { padding: 0; width: 36px; height: 32px; justify-content: center; }
  .nav-btn .btn-txt { display: none; }

  /* 首屏 */
  .hero { padding: 40px 0 0; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); letter-spacing: -.035em; }
  .hero > p { font-size: 15.5px; line-height: 1.62; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }
  .hero-stat { padding: 18px 16px 16px; }
  .hero-stat b { font-size: 25px; }
  .hero-stat span { font-size: 12px; }

  /* 布局 */
  .section { margin-top: 44px; }
  .section-title { margin-bottom: 16px; gap: 8px; }
  .section-title h2 { font-size: 22px; }
  .section-title span { font-size: 13px; width: 100%; }
  .page-head { margin: 34px 0 24px; }
  .page-head h1 { font-size: 28px; }
  .page-head p { font-size: 14.5px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .card { padding: 16px; border-radius: 16px; }
  .card-h h3 { font-size: 15.5px; }

  /* 今日速览：横滑 */
  #quick-view {
    display: flex !important;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 6px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    grid-template-columns: none !important;
  }
  #quick-view .qv-card { flex: 0 0 82%; scroll-snap-align: start; }

  /* 比赛卡 */
  .match { padding: 15px 16px 14px; border-radius: 16px; }
  .match-top { font-size: 11.5px; gap: 7px; padding-bottom: 11px; margin-bottom: 12px; }
  .team-line .nm { font-size: 15px; }
  .match-body { gap: 14px; }
  .match-body .teams { flex: 1 1 100%; }
  .odds-box { gap: 6px; }
  .odds-cell { padding: 8px 10px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .odds-cell b { font-size: 14px; }
  .meta-chips { gap: 5px; }
  .mchip { height: 22px; padding: 0 8px; font-size: 11px; }

  /* 筛选栏：纵向堆叠，避免重叠 */
  .filterbar { padding: 16px; border-radius: 16px; }
  .fb-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .fb-row > * { width: 100%; max-width: 100%; min-width: 0; }
  .fb-label { min-width: 0; }
  .fb-row .btn.sm { width: 100%; justify-content: center; }
  .fb-count { margin-left: 0; }
  .fb-dates { gap: 6px; }
  .date-btn { flex: 1 1 calc(33.333% - 4px); padding: 7px 4px; min-width: 0; }
  .date-btn b { font-size: 12.5px; }
  .date-btn span { font-size: 9.5px; }
  input[type="range"] { width: 100%; }
  .league-panel { width: calc(100vw - 32px); left: -8px; }

  /* 表格：给最小宽度，横向滚动而不是压扁 */
  .scroll-x { position: relative; margin: 0 -16px; padding: 0 16px; }
  .scroll-x > table.tb { min-width: 660px; }
  .scroll-x > table.tb th, .scroll-x > table.tb td { white-space: nowrap; }
  .scroll-x::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 18px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .92));
  }

  /* 串关腿部 */
  .slip { padding: 16px; border-radius: 16px; }
  .leg { padding: 9px 12px; gap: 8px; }
  .leg > div:first-child > div:first-child { font-size: 13.5px; line-height: 1.4; word-break: break-word; }
  .leg .m { font-size: 10.5px; }
  .leg .p { font-size: 13px; }
  .leg .o { font-size: 10.5px; }
  .slip-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 弹窗占满 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .modal-b { padding: 18px 18px 28px; }
  .modal-h { padding: 16px 18px; }

  /* 页脚 */
  .footer { margin-top: 56px; padding: 32px 0 40px; }
  .footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

  /* 其他 */
  .toast { bottom: 20px; max-width: calc(100vw - 32px); }
  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; padding: 7px 10px; font-size: 13px; }
  .calc-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .freq { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
}

/* 超小屏 */
@media (max-width: 380px) {
  .hero-stats { grid-template-columns: minmax(0, 1fr); }
  .date-btn { flex: 1 1 calc(50% - 4px); }
}

.slip:hover { box-shadow: var(--shadow-md); }

/* ---------- 排版微调：标题换行更均衡、奇数统计卡不留空 ---------- */
.hero h1, .page-head h1, .section-title h2 { text-wrap: balance; }
/* 首屏标题：强调行独占一行，形成苹果式的两行大标题 */
.hero h1 em { display: block; }

@media (max-width: 640px) {
  /* 手机端让强调部分独占一行，避免断在词中间 */
  .hero h1 em { display: block; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); }
  /* 2 列布局下 5 项时，最后一项占满整行 */
  .hero-stat:last-child:nth-child(odd) { grid-column: span 2; flex-direction: row; align-items: baseline; gap: 10px; }
}

/* ---------- 细节修正 ---------- */
/* 当日概览：5 个指标排成 5 列（外网竞彩页） */
#overview { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 980px) { #overview { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { #overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 单个卡片内的统计组：去掉多余留白 */
#overview .stat b { font-size: 26px; }
/* 串关腿部：右侧结果列更紧凑，避免左侧队名被挤换行 */
.leg > div:last-child { text-align: right; }
.leg .o { white-space: nowrap; }
/* 免责说明表格不再限制宽度 */
.warnbox table.tb[style*="max-width"] { max-width: none !important; }

/* 手机上筛选栏里的按钮组并排显示 */
@media (max-width: 640px) {
  .fb-row > div[style*="display:flex"] { width: 100%; }
  .fb-row > div[style*="display:flex"] .btn { flex: 1 1 0; justify-content: center; }
}
