/* ==========================================================================
   AI 足球竞猜分析平台 — 样式表
   深色数据终端风格，移动优先，零外部依赖
   ========================================================================== */

:root {
  --bg: #060911;
  --bg-2: #0a0f1c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eefb;
  --muted: #8798b4;
  --dim: #5b6a83;
  --accent: #1fe08f;
  --accent-2: #2fd4c8;
  --cyan: #38bdf8;
  --violet: #8b7cf6;
  --amber: #f5a524;
  --rose: #fb5b78;
  --home: #1fe08f;
  --draw: #f5a524;
  --away: #63a4ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(31, 224, 143, 0.13), transparent 60%),
    radial-gradient(800px 500px at 92% 4%, rgba(56, 189, 248, 0.11), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(139, 124, 246, 0.09), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ------------------------------ 布局 ------------------------------ */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

header.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  background: linear-gradient(180deg, rgba(6, 9, 17, 0.92), rgba(6, 9, 17, 0.72));
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }

.brand .logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 19px;
  background: linear-gradient(135deg, rgba(31,224,143,0.22), rgba(56,189,248,0.18));
  border: 1px solid rgba(31,224,143,0.35);
  box-shadow: 0 0 22px rgba(31,224,143,0.22);
}

.brand h1 { font-size: 16px; margin: 0; letter-spacing: 0.4px; font-weight: 700; }
.brand .sub { font-size: 11px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

select, .btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  transition: all 0.18s ease;
}

select:hover, .btn:hover { border-color: rgba(31, 224, 143, 0.5); background: rgba(31, 224, 143, 0.09); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04120c; font-weight: 700; border: none;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------ 卡片 ------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(8px);
}

.section { margin-top: 26px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 17px; margin: 0; font-weight: 700; letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 8px;
}
.section-head h2::before {
  content: ""; width: 3px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
}
.section-head .hint { font-size: 12px; color: var(--muted); }

/* ------------------------------ Hero 每日必推 ------------------------------ */

.hero {
  margin-top: 22px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(31,224,143,0.55), rgba(56,189,248,0.4), rgba(139,124,246,0.35));
  box-shadow: 0 18px 60px rgba(31, 224, 143, 0.12);
}
.hero-inner {
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.97), rgba(6, 9, 17, 0.99));
  padding: 20px;
}
.hero-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.hero .badge-hot {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04120c;
}
.hero h2 { margin: 0; font-size: 20px; }
.hero .hero-sub { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }

.hero-legs { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .hero-legs { grid-template-columns: 1fr 1fr; } }

.leg {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.leg .leg-main { flex: 1; min-width: 0; }
.leg .leg-teams { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg .leg-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.leg .leg-pick {
  text-align: right; font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap;
}
.leg .leg-odds { font-family: var(--mono); font-size: 16px; color: var(--text); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px;
}
.hstat { text-align: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 6px; }
.hstat .k { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--accent); }
.hstat .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ------------------------------ KPI ------------------------------ */

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; position: relative; overflow: hidden;
}
.kpi .v { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .accent { color: var(--accent); }
.kpi .cyan { color: var(--cyan); }
.kpi .amber { color: var(--amber); }
.kpi .violet { color: var(--violet); }

/* ------------------------------ Tabs ------------------------------ */

.tabs {
  display: flex; gap: 6px; margin-top: 26px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; padding: 9px 16px; border: none; background: transparent;
  color: var(--muted); border-radius: 10px; font-size: 14px; font-weight: 600;
  white-space: nowrap; transition: all 0.18s ease;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active {
  background: linear-gradient(135deg, rgba(31,224,143,0.18), rgba(56,189,248,0.14));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(31, 224, 143, 0.35);
}

/* ------------------------------ 比赛卡片 ------------------------------ */

.matches { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 780px) { .matches { grid-template-columns: 1fr 1fr; } }

.match {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.match:hover {
  border-color: rgba(31, 224, 143, 0.42);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.match.value::after {
  content: "VALUE";
  position: absolute; top: 0; right: 0;
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 9px; border-bottom-left-radius: 10px;
  background: linear-gradient(135deg, var(--amber), #ff8a3d);
  color: #1a0f00;
}

.match-head {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  color: var(--muted); margin-bottom: 10px; flex-wrap: wrap;
}
.chip {
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
}
.chip.league { color: var(--cyan); border-color: rgba(56,189,248,0.3); background: rgba(56,189,248,0.09); }

.match-teams { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.match-teams .t { font-size: 15px; font-weight: 650; line-height: 1.3; }
.match-teams .t.away { text-align: right; }
.match-teams .vs { font-size: 11px; color: var(--dim); font-family: var(--mono); }

/* 概率条 */
.probbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; font-size: 11px; font-weight: 700; }
.probbar > div {
  display: grid; place-items: center; color: #05140d;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0; overflow: hidden; white-space: nowrap;
}
.pb-h { background: linear-gradient(180deg, #34f0a4, #17c47c); }
.pb-d { background: linear-gradient(180deg, #ffc75a, #e0930f); color: #241700; }
.pb-a { background: linear-gradient(180deg, #7cb6ff, #3f83e0); color: #06152b; }

.probbar-legend {
  display: flex; justify-content: space-between; font-size: 10.5px;
  color: var(--dim); margin-top: 5px; font-family: var(--mono);
}

.match-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding-top: 11px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.pick-badge {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  padding: 5px 11px; border-radius: 9px;
  background: linear-gradient(135deg, rgba(31,224,143,0.18), rgba(56,189,248,0.1));
  border: 1px solid rgba(31, 224, 143, 0.34);
  color: var(--accent);
}
.pick-badge .odds { font-family: var(--mono); color: var(--text); }
.match-foot .spacer { margin-left: auto; }
.stars { color: var(--amber); font-size: 12px; letter-spacing: 0.5px; white-space: nowrap; }
.stars .num { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: 3px; }
.ev { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.ev.pos { color: var(--accent); }
.ev.neg { color: var(--rose); }

/* ------------------------------ 串关 ------------------------------ */

.parlay-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .parlay-grid { grid-template-columns: 1fr 1fr; } }

.parlay {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.parlay.best { border-color: rgba(31, 224, 143, 0.4); box-shadow: 0 0 0 1px rgba(31,224,143,0.12), 0 14px 40px rgba(31,224,143,0.08); }
.parlay-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.parlay-head .rank {
  font-family: var(--mono); font-size: 12px; font-weight: 800;
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.parlay-head .rank.gold { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04120c; border: none; }
.parlay-head .kind { font-weight: 700; font-size: 14px; }
.parlay-head .mult { margin-left: auto; font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--accent); }

.parlay-legs { display: grid; gap: 7px; margin-bottom: 12px; }
.parlay-leg {
  display: flex; align-items: center; gap: 9px; font-size: 13px;
  padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border);
}
.parlay-leg .pl-teams { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parlay-leg .pl-pick { color: var(--accent); font-weight: 700; white-space: nowrap; }
.parlay-leg .pl-odds { font-family: var(--mono); color: var(--muted); }
.parlay-note { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.parlay-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.parlay-stats .ps { text-align: center; padding: 8px 4px; background: var(--surface-2); border-radius: 9px; border: 1px solid var(--border); }
.parlay-stats .ps .k { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.parlay-stats .ps .l { font-size: 10.5px; color: var(--muted); }

/* ------------------------------ 图表 ------------------------------ */

.chart { width: 100%; overflow: visible; }
.chart .bar { transition: all 0.4s ease; }
.chart text { font-family: var(--mono); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------ 表格 ------------------------------ */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; background: var(--surface-2); position: sticky; top: 0; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-family: var(--mono); }
.good { color: var(--accent); }
.bad { color: var(--rose); }

/* ------------------------------ 弹层 ------------------------------ */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 6, 12, 0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 12px; overflow-y: auto;
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 860px;
  background: linear-gradient(180deg, #0b1220, #070b14);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  animation: rise 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-head {
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, rgba(31,224,143,0.07), transparent 60%);
}
.modal-head .close {
  margin-left: auto; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); width: 32px; height: 32px; border-radius: 9px; font-size: 17px; line-height: 1;
}
.modal-head .close:hover { color: var(--text); border-color: var(--border-strong); }
.modal-body { padding: 20px; }

.detail-teams { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 18px; }
.detail-teams .dt { flex: 1; text-align: center; }
.detail-teams .dt .name { font-size: 17px; font-weight: 700; }
.detail-teams .dt .rank { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.detail-teams .mid { font-size: 12px; color: var(--dim); font-family: var(--mono); text-align: center; }

.analysis {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.85; color: #c9d6ea;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-top: 4px;
}

.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.panel h4 { margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.4px; }

.scorelist { display: grid; gap: 6px; }
.scorerow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-family: var(--mono); }
.scorerow .sc { width: 46px; font-weight: 700; }
.scorerow .scbar { flex: 1; height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.scorerow .scbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.scorerow .scp { width: 48px; text-align: right; color: var(--muted); font-size: 12px; }

.form-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0; }
.form-row .fr-team { width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.form-dots { display: flex; gap: 3px; }
.dot { width: 19px; height: 19px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.dot.W { background: rgba(31, 224, 143, 0.9); color: #04120c; }
.dot.D { background: rgba(245, 165, 36, 0.85); color: #241700; }
.dot.L { background: rgba(251, 91, 120, 0.85); color: #2a0410; }
.dot.empty { background: var(--surface-2); color: var(--dim); }

/* ------------------------------ 状态 ------------------------------ */

.loading, .empty, .error {
  text-align: center; padding: 52px 20px; color: var(--muted); font-size: 14px;
}
.error { color: var(--rose); }
.spinner {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius);
  height: 150px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: rgba(12, 20, 34, 0.97); border: 1px solid var(--border-strong);
  padding: 11px 20px; border-radius: 12px; font-size: 13px; z-index: 200;
  box-shadow: var(--shadow); animation: rise 0.24s ease;
  max-width: calc(100vw - 32px); text-align: center;
}

footer {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--dim); font-size: 11.5px; line-height: 1.9; text-align: center;
}
footer strong { color: var(--muted); }

.disclaimer {
  margin-top: 26px; padding: 14px 16px; border-radius: 12px;
  background: rgba(245, 165, 36, 0.07); border: 1px solid rgba(245, 165, 36, 0.24);
  color: #d9b478; font-size: 12px; line-height: 1.8;
}

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.pill.on { background: rgba(31,224,143,0.14); border-color: rgba(31,224,143,0.35); color: var(--accent); }

/* 数据新鲜度 / 调度状态条 */
.statusbar {
  margin-top: 16px; padding: 10px 14px; border-radius: 11px;
  background: rgba(56,189,248,0.07); border: 1px solid rgba(56,189,248,0.22);
  color: #9fc7e8; font-size: 12.5px; line-height: 1.7;
}
.statusbar.warn {
  background: rgba(245,165,36,0.08); border-color: rgba(245,165,36,0.3); color: #d9b478;
}

@media (max-width: 560px) {
  .brand .sub { display: none; }
  .hero h2 { font-size: 17px; }
  .detail-teams .dt .name { font-size: 14px; }
  .kpi .v { font-size: 20px; }
}

/* 小屏下让四个标签页完整可见，无需横向滚动 */
@media (max-width: 520px) {
  .tabs { gap: 3px; padding: 4px; }
  .tab { padding: 8px 6px; font-size: 12.5px; letter-spacing: -0.2px; }
  .hero-inner { padding: 16px 14px; }
  .card, .match, .parlay { padding: 12px; }
  .match-teams .t { font-size: 14px; }
  .hero-stats { gap: 7px; }
  .hstat .k { font-size: 17px; }
  .kpis { gap: 8px; }
  .kpi { padding: 11px; }
  .kpi .v { font-size: 18px; }
  .kpi .l { font-size: 11px; }
  .filter-row, #filterRow { gap: 6px; }
  #leagueFilter { max-width: none !important; flex: 1 1 100%; }
}

/* ==========================================================================
   全部赛程
   ========================================================================== */

.filterbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 16px; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.filterbar select, .filterbar input[type="search"] {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 7px 10px; font-size: 13px; font-family: inherit;
}
.filterbar input[type="search"] { flex: 1 1 160px; min-width: 120px; }
.filterbar select:focus, .filterbar input:focus { outline: none; border-color: rgba(31,224,143,0.5); }

.league-group { margin-bottom: 18px; }
.league-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.fixture-list { display: grid; gap: 5px; }

.fixture {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px;
}
.fixture.has-pred { cursor: pointer; transition: all 0.18s ease; }
.fixture.has-pred:hover {
  border-color: rgba(31,224,143,0.4);
  background: rgba(31,224,143,0.05);
  transform: translateX(2px);
}
.fixture-time {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  min-width: 74px; white-space: nowrap;
}
.fixture-main { flex: 1; min-width: 0; }
.fixture-teams {
  display: flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fixture-teams .vs { color: var(--dim); font-size: 10.5px; font-family: var(--mono); }
.fixture-main .probbar { height: 5px; margin-top: 6px; border-radius: 3px; }
.fixture-right {
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; flex-shrink: 0;
}
.fixture-right .pick-badge { font-size: 12px; padding: 3px 9px; }

/* ==========================================================================
   超级大乐透
   ========================================================================== */

.ball {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.ball.big { width: 44px; height: 44px; font-size: 18px; }
.ball.front {
  background: linear-gradient(160deg, #ff6b6b, #d92b2b);
  color: #fff; box-shadow: 0 3px 10px rgba(217,43,43,0.35);
}
.ball.back {
  background: linear-gradient(160deg, #5aa9ff, #2b6fd9);
  color: #fff; box-shadow: 0 3px 10px rgba(43,111,217,0.35);
}
.ball-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ball-row.mini .ball { width: 23px; height: 23px; font-size: 11px; }
.ball-sep { color: var(--dim); font-weight: 700; margin: 0 3px; }

.lotto-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  background-image: radial-gradient(600px 200px at 0% 0%, rgba(217,43,43,0.10), transparent 70%);
}
.lotto-hero-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.notice {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: rgba(56,189,248,0.07); border: 1px solid rgba(56,189,248,0.25);
  color: #a8cdeb; font-size: 12.8px; line-height: 1.9;
}
.notice b { color: #d6ecff; }

.ticket-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .ticket-grid { grid-template-columns: repeat(3, 1fr); } }
.ticket {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.ticket.best {
  border-color: rgba(31,224,143,0.4);
  box-shadow: 0 0 0 1px rgba(31,224,143,0.12), 0 12px 34px rgba(31,224,143,0.07);
}
.ticket-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }

.hotcold { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .hotcold { grid-template-columns: 1fr 1fr; } }
.hc-title { font-size: 12px; font-weight: 700; margin-bottom: 9px; letter-spacing: 0.4px; }
.hc-title.warm { color: #ff8a8a; }
.hc-title.cold { color: #7cb6ff; }
.hc-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.hc-bar {
  flex: 1; height: 6px; border-radius: 3px; overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.hc-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ff8a8a, #d92b2b); }
.hc-bar.cold i { background: linear-gradient(90deg, #7cb6ff, #2b6fd9); }
.hc-val { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-width: 52px; text-align: right; }

.mono { font-family: var(--mono); font-size: 12px; }

.leg-time, .pl-time {
  color: var(--muted); font-size: 11.5px; font-family: var(--mono);
}
.leg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-info { flex: 1; min-width: 0; }
.pl-line1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 3px; }
.parlay-leg { align-items: center; }

@media (max-width: 520px) {
  .filterbar { padding: 10px; gap: 6px; }
  .filterbar select, .filterbar input[type="search"] { flex: 1 1 100%; }
  .fixture { flex-wrap: wrap; gap: 8px; padding: 9px 10px; }
  .fixture-time { min-width: 58px; }
  .fixture-main { flex: 1 1 100%; order: 3; }
  .fixture-right { margin-left: auto; }
  .ball { width: 26px; height: 26px; font-size: 12px; }
  .ball.big { width: 36px; height: 36px; font-size: 15px; }
}

.fixture-league {
  font-size: 11px; color: var(--muted); margin-bottom: 3px;
  display: flex; align-items: center; gap: 4px;
}

/* 赛事级别筛选条 */
.tierbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 16px; border-radius: 12px;
  background: rgba(139,124,246,0.06); border: 1px solid rgba(139,124,246,0.2);
}
.tierbar-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.4px; }
.tierbar-stat { margin-left: auto; font-size: 11.5px; color: var(--dim); font-family: var(--mono); }

.chip.tier1 {
  color: var(--accent); border-color: rgba(31,224,143,0.35);
  background: rgba(31,224,143,0.1);
}
.chip.tier3 { color: var(--dim); }

@media (max-width: 520px) {
  .tierbar-stat { margin-left: 0; flex: 1 1 100%; }
}

/* ==========================================================================
   模拟盘
   ========================================================================== */

.bet-list { display: grid; gap: 8px; }

.bet-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.bet-status {
  width: 42px; flex-shrink: 0; text-align: center;
  font-size: 11.5px; font-weight: 800; padding: 4px 0;
  border-radius: 8px;
}
.bet-status.win { background: rgba(31,224,143,0.16); color: var(--accent); border: 1px solid rgba(31,224,143,0.35); }
.bet-status.lose { background: rgba(251,91,120,0.14); color: var(--rose); border: 1px solid rgba(251,91,120,0.32); }
.bet-status.pending { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-strong); }

.bet-main { flex: 1; min-width: 0; }
.bet-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bet-teams { font-size: 13.5px; font-weight: 600; }
.bet-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.bet-legs { display: grid; gap: 3px; margin-top: 6px; }
.bet-leg {
  font-size: 11.5px; color: #b9c8dd;
  background: var(--surface-2); border-radius: 7px; padding: 4px 8px;
}
.bet-leg b { color: var(--accent); }

.bet-money { text-align: right; flex-shrink: 0; }
.bet-stake { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.bet-payout { font-size: 11px; color: var(--muted); margin-top: 2px; }

@media (max-width: 560px) {
  .bet-row { flex-wrap: wrap; }
  .bet-main { flex: 1 1 100%; order: 3; }
  .bet-money { margin-left: auto; }
}

/* ==========================================================================
   队徽
   ========================================================================== */

.crest {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  margin-right: 6px;
  flex-shrink: 0;
  /* 多数队徽是为浅色背景设计的，深色主题下需要浅色底衬才看得清 */
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 主客队名与队徽对齐 */
.match-teams .t { display: flex; align-items: center; gap: 0; min-width: 0; }
.match-teams .t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-teams .t.away { flex-direction: row-reverse; }
.match-teams .t.away .crest { margin-right: 0; margin-left: 6px; }

.fixture-teams .ft { display: inline-flex; align-items: center; min-width: 0; }
.leg-teams { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pl-teams { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bet-leg { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.detail-teams .name { display: flex; align-items: center; justify-content: center; gap: 0; }

@media (max-width: 520px) {
  .crest { width: 16px !important; height: 16px !important; margin-right: 4px; }
  .match-teams .t.away .crest { margin-left: 4px; }
}

/* 串关：日期区间选择 */
.daycoverage {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin-bottom: 6px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.daychip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; font-family: var(--mono);
  transition: all 0.16s ease;
}
.daychip b { color: var(--text); font-weight: 700; }
.daychip:hover { border-color: rgba(31,224,143,0.5); color: var(--text); }
.daychip.hot { border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.09); }
.daychip.hot b { color: var(--cyan); }

.filterbar input[type="date"] {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 7px 10px; font-size: 13px; font-family: var(--mono);
}
.filterbar input[type="date"]:focus { outline: none; border-color: rgba(31,224,143,0.5); }

/* 多通道分析面板 */
.channels {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.channels-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; gap: 6px;
}
.channels-head > span:first-child {
  color: var(--text); font-weight: 600; font-size: 13px; letter-spacing: 0.02em;
}
.chan-verdict { font-size: 11px; color: var(--dim); }
.chan-verdict.warn { color: var(--amber); }
.chan-row {
  display: grid; grid-template-columns: 76px 1fr 116px 82px;
  align-items: center; gap: 10px; padding: 5px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
}
.chan-row:first-of-type { border-top: none; }
.chan-name { font-size: 12px; font-weight: 600; }
.chan-nums { font-size: 11px; font-family: var(--mono); color: var(--muted); text-align: right; }
.chan-w { font-size: 11px; color: var(--dim); text-align: right; }
.minibar {
  display: flex; height: 7px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.06); width: 100%;
}
.minibar i { display: block; height: 100%; }
.chan-note { margin-top: 8px; font-size: 11px; color: var(--dim); font-family: var(--mono); }

@media (max-width: 560px) {
  .chan-row { grid-template-columns: 62px 1fr; row-gap: 2px; }
  .chan-nums, .chan-w { grid-column: 2; text-align: left; }
  .chan-nums { font-size: 10px; }
}

/* 安装到桌面提示条 */
.install-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(31,224,143,0.10), rgba(56,189,248,0.07));
  border: 1px solid rgba(31,224,143,0.28);
  font-size: 13px; color: var(--text);
}
.install-bar[hidden] { display: none; }
.install-icon { font-size: 16px; }
.install-text { flex: 1; min-width: 0; }
.install-bar .btn { padding: 5px 14px; font-size: 12px; }
.install-close {
  background: none; border: none; color: var(--dim);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.install-close:hover { color: var(--text); }

@media (max-width: 480px) {
  .install-text { font-size: 12px; }
}

/* ==========================================================================
   大乐透 · 守号专区 & 每周推荐
   ========================================================================== */

.guard-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px; margin-top: 14px;
}
.guard-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.guard-card:hover { border-color: rgba(31, 224, 143, 0.35); transform: translateY(-1px); }
.guard-card.mystic { border-color: rgba(192, 132, 252, 0.28); background: rgba(192, 132, 252, 0.04); }
.guard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.guard-head b { font-size: 14px; color: var(--text); }
.guard-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: rgba(31, 224, 143, 0.12); color: var(--accent);
  border: 1px solid rgba(31, 224, 143, 0.25); white-space: nowrap;
}
.guard-tag.myst { background: rgba(192, 132, 252, 0.12); color: #c084fc; border-color: rgba(192, 132, 252, 0.3); }
.ball-row.small .ball { width: 30px; height: 30px; font-size: 12px; }
.guard-desc {
  margin-top: 10px; font-size: 11px; line-height: 1.55;
  color: var(--muted); border-top: 1px dashed rgba(255, 255, 255, 0.06); padding-top: 8px;
}

.week-grid { display: grid; gap: 12px; margin-top: 14px; }
.week-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.week-card.current { border-color: rgba(31, 224, 143, 0.4); background: rgba(31, 224, 143, 0.035); }
.week-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.week-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  padding: 2px 10px; border-radius: 999px;
  background: rgba(31, 224, 143, 0.1); border: 1px solid rgba(31, 224, 143, 0.22);
}
.week-shape {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px;
  font-size: 11px; color: var(--muted); font-family: var(--mono);
}
.week-shape b { color: var(--text); }
.chip.tiny { font-size: 10px; padding: 1px 6px; }
.week-reasons { margin-top: 12px; border-top: 1px dashed rgba(255,255,255,0.07); padding-top: 10px; }
.reason {
  display: grid; grid-template-columns: 68px 92px 1fr;
  gap: 8px; align-items: baseline; padding: 4px 0; font-size: 11.5px;
}
.reason-dim { font-weight: 600; }
.reason-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--dim);
  border: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.reason-tag.myst { background: rgba(192, 132, 252, 0.1); color: #c084fc; border-color: rgba(192, 132, 252, 0.25); }
.reason-text { color: var(--muted); line-height: 1.5; }

@media (max-width: 560px) {
  .guard-grid { grid-template-columns: 1fr; }
  .reason { grid-template-columns: 60px 1fr; }
  .reason-text { grid-column: 1 / -1; }
}

/* 俱乐部排名徽章 */
.rank-chip {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; font-size: 10px; font-family: var(--mono);
  color: var(--muted); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border); white-space: nowrap;
}
.match-teams .t.away .rank-chip { margin-left: 0; margin-right: 6px; }
@media (max-width: 520px) {
  .rank-chip { font-size: 9px; padding: 1px 5px; margin-left: 4px; }
}

/* 3 小时内开赛 */
.pill.soon {
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--amber);
}
.pill.soon.on {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.6);
  color: var(--amber);
}

/* 排名徽章：小屏收缩，避免横向溢出 */
.rank-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
@media (max-width: 700px) {
  .rk-scope { display: none; }
  .rank-chip { font-size: 9px; padding: 0 5px; margin-left: 4px; }
}
.fixture-teams .ft { min-width: 0; overflow: hidden; }
.fixture-teams { flex-wrap: wrap; row-gap: 2px; }
.match-teams .t { min-width: 0; }

/* 宽表格在小屏内部滚动，避免撑破页面 */
@media (max-width: 760px) {
  .panel,
  .section > table,
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 表格本身保留最小宽度，宁可内部滚动也不挤压到不可读 */
  .panel > table { min-width: 460px; }
}

/* 防止 grid/flex 子项撑破容器（长表格、宽文字导致横向溢出） */
.section, .panel, .table-wrap, .grid-2, .kpis, .stat-grid, .guard-grid, .week-grid {
  min-width: 0;
  max-width: 100%;
}
.grid-2 > *, .kpis > *, .stat-grid > * {
  min-width: 0;
}
.table-wrap { overflow-x: auto; }
.table-wrap > table { min-width: 440px; }
@media (max-width: 900px) {
  .table-wrap { overflow-x: auto; }
}

/* 时区标注 */
.tz-hint {
  color: var(--cyan) !important;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
}
