/* 球智先锋网站 — 公共样式（手机优先，基准宽度 390px）
   深色专业版：深海军蓝底 + 金色推荐强调 + 蓝色操作 */
:root {
  --brand: #3b82f6;
  --brand-dark: #2563eb;
  --gold: #e8b62a;
  --gold-soft: rgba(232,182,42,.13);
  --bg: #0b1220;
  --card: #141d31;
  --card-2: #1a2540;
  --inset: #0e1628;
  --text: #eef2f7;
  --text-2: #93a0b4;
  --border: #243049;
  --win: #22c55e;
  --draw: #f59e0b;
  --loss: #f87171;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
.container { max-width: 720px; margin: 0 auto; padding: 0 12px 24px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #111b33 0%, #0b1220 100%);
  border-bottom: 1px solid rgba(232,182,42,.28);
  color: #fff;
  padding: 12px;
}
.topbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.topbar .brand { font-weight: 700; font-size: 17px; }
.topbar a { color: #fff; text-decoration: none; font-size: 14px; padding: 12px 10px; display: inline-block; }
/* 顶栏导航按钮 */
.topbar a.nav-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 8px 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.topbar a.nav-btn:active { background: rgba(255,255,255,.26); }

/* 通用卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.card h3 { margin: 0 0 10px; font-size: 16px; }
.muted { color: var(--text-2); font-size: 13px; }

/* 日期切换 / 筛选 */
.date-row { display: flex; gap: 8px; margin-top: 12px; }
.date-btn {
  flex: 1; min-height: 44px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); font-size: 14px; color: var(--text);
  cursor: pointer;
}
.date-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
input[type="date"] {
  flex: 1; min-height: 44px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; padding: 0 8px; background: var(--card); color: var(--text);
  color-scheme: dark;
}
.filter-row { display: flex; gap: 8px; margin-top: 10px; }
select.league {
  width: 100%; min-height: 44px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; padding: 0 10px; background: var(--card); color: var(--text);
}

/* ---------- 今日焦点（首页重心推荐大卡片） ---------- */
.focus-card {
  display: block; text-decoration: none; color: inherit;
  margin-top: 12px; padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d2a4d 0%, #141d31 55%, #191430 100%);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(232,182,42,.22), 0 8px 26px rgba(0,0,0,.4);
  position: relative; overflow: hidden;
}
.focus-card:active { transform: scale(.99); }
.focus-card::after {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,182,42,.22) 0%, transparent 70%);
  pointer-events: none;
}
.focus-tag {
  display: inline-block;
  background: linear-gradient(135deg, #f5c542, #d99a16);
  color: #231a04; font-size: 12px; font-weight: 800;
  border-radius: 20px; padding: 4px 12px; margin-bottom: 8px;
}
.focus-teams { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.focus-teams .vs { color: var(--text-2); font-weight: 400; margin: 0 8px; font-size: 13px; }
.focus-meta { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.zhuren-big {
  font-size: 30px; font-weight: 800; color: var(--gold);
  line-height: 1.3; margin: 4px 0 8px;
  text-shadow: 0 2px 12px rgba(232,182,42,.25);
}
.focus-sub { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.focus-go { font-size: 13px; color: var(--gold); font-weight: 700; }

/* 比赛行 */
.match-row {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-top: 10px;
  min-height: 44px;
}
.match-row:active { background: var(--card-2); }
.match-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; flex-wrap: wrap; }
.order-cn { font-weight: 700; color: var(--gold); }
.rq-badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  background: rgba(139,92,246,.16); color: #a78bfa; font-size: 12px; font-weight: 600;
}
.rq-badge.rq-neg { background: rgba(248,113,113,.14); color: #fca5a5; }
.rq-badge.rq-pos { background: rgba(34,197,94,.14); color: #4ade80; }
.match-teams { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.match-teams .vs { color: var(--text-2); font-weight: 400; margin: 0 8px; font-size: 13px; }
.odds-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; }
.odds-grid .cell {
  background: var(--inset); border-radius: 8px; padding: 8px 4px;
  border: 1px solid transparent;
}
.odds-grid .cell .label { font-size: 12px; color: var(--text-2); }
.odds-grid .cell .value { font-size: 16px; font-weight: 700; }
.odds-grid .cell.win .value { color: var(--win); }
.odds-grid .cell.draw .value { color: var(--draw); }
.odds-grid .cell.loss .value { color: var(--loss); }
.odds-grid .cell.best { border-color: var(--gold); background: var(--gold-soft); }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #f87171; margin-right: 4px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(248,113,113,.5); }
  50% { opacity: .6; box-shadow: 0 0 0 5px rgba(248,113,113,0); }
}
.empty { text-align: center; color: var(--text-2); padding: 40px 0; }

/* 表格（赔率对比） */
table.odds-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.odds-table th, table.odds-table td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--border); }
table.odds-table th { color: var(--text-2); font-weight: 500; font-size: 13px; }
table.odds-table td.num { font-weight: 700; }
td.min-odds { color: var(--gold); }

/* canvas 图 */
.chart-wrap { position: relative; }
canvas.chart { width: 100%; height: 240px; display: block; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 13px; margin-top: 8px; }
.legend .dot { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* 预测板块 */
.pred-bar { display: flex; height: 36px; border-radius: 8px; overflow: hidden; margin: 10px 0; }
.pred-bar .seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
.pred-bar .seg.win { background: var(--win); }
.pred-bar .seg.draw { background: var(--draw); }
.pred-bar .seg.loss { background: var(--loss); }
.pred-kv { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.pred-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--inset); }
.pred-card .title { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.pred-card .big { font-size: 17px; font-weight: 700; }
.score-list { margin: 0; padding: 0; list-style: none; }
.score-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.score-list li:last-child { border-bottom: none; }
.score-list .prob { color: var(--gold); font-weight: 700; }
.warn-box {
  background: rgba(245,158,11,.12); border: 1px solid #b45309; color: #fbbf24;
  border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 600; margin-top: 10px;
}
.disclaimer {
  background: rgba(147,160,180,.07); border: 1px dashed var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; color: var(--text-2); margin-top: 10px;
}
.disclaimer-top {
  font-size: 13px; color: #f5c542; background: rgba(232,182,42,.09);
  border: 1px solid rgba(232,182,42,.4); border-radius: 10px;
  padding: 10px 12px; margin: 10px 0; line-height: 1.6;
}

/* 表单 */
.form-card { max-width: 420px; margin: 32px auto 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 44px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 16px; padding: 0 12px;
  background: var(--inset); color: var(--text);
  color-scheme: dark;
}
.btn-primary {
  width: 100%; min-height: 48px;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-primary:active { background: var(--brand-dark); }
.btn-danger {
  width: 100%; min-height: 48px;
  background: transparent; color: var(--loss); border: 1px solid #7f2d2d; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.form-error {
  display: none; background: rgba(248,113,113,.1); border: 1px solid #7f2d2d; color: #fca5a5;
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.form-error.show { display: block; }
.form-link { text-align: center; margin-top: 14px; font-size: 14px; }
.form-link a { color: var(--brand); }

/* 个人中心 */
.profile-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.profile-row:last-child { border-bottom: none; }
.profile-row .k { color: var(--text-2); }

/* 页脚 */
.footer { text-align: center; color: var(--text-2); font-size: 12px; padding: 24px 12px 32px; line-height: 1.8; }

.loading { text-align: center; color: var(--text-2); padding: 24px 0; }

/* logo */
.topbar .brand{display:inline-flex;align-items:center;gap:8px}
.topbar .brand .logo{height:26px;width:26px;border-radius:6px;flex:none}

/* 页脚合规链接（点击区 ≥44px） */
.footer a { color: var(--brand); text-decoration: none; display: inline-block; padding: 12px 10px; }

/* 数据新鲜度条 */
.fresh-bar { font-size: 12px; color: var(--text-2); text-align: center; margin-top: 10px; }
.fresh-bar.stale {
  background: rgba(248,113,113,.1); border: 1px solid #7f2d2d; color: #fca5a5;
  border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; min-height: 44px;
}

/* 复盘 */
.review-line { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.review-score { font-size: 20px; font-weight: 800; }
.badge { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.badge-hit { background: rgba(34,197,94,.16); color: #4ade80; }
.badge-miss { background: rgba(147,160,180,.16); color: var(--text-2); }

/* 注册协议勾选（点击区 ≥44px） */
.agree-row { margin-bottom: 14px; }
.agree-row label {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; font-size: 14px; cursor: pointer; line-height: 1.6;
}
.agree-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; cursor: pointer; accent-color: var(--brand); }
.agree-row a { color: var(--brand); text-decoration: none; }

/* 合规页面 */
.legal h4 { margin: 18px 0 8px; font-size: 15px; }
.legal h4:first-child { margin-top: 4px; }
.legal p { margin: 0 0 10px; font-size: 14px; line-height: 1.8; color: var(--text); }
.legal ul { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.8; }

/* 比赛列表网格（JS 加 .list-grid 后，仅 ≥768px 时双列；手机保持单列） */
#matchList.list-grid .empty, #matchList.list-grid .loading { margin-top: 10px; }

/* 预测玩法卡片网格（桌面时由 JS 加 .pred-grid） */
.pred-grid { display: grid; gap: 10px; margin-top: 10px; }
.pred-grid .pred-card { margin-top: 0; }

/* ---------- 桌面断点 ---------- */
@media (min-width: 768px) {
  .container, .topbar-inner { max-width: 1100px; }
  .container { padding: 0 20px 32px; }
  /* 比赛列表双列卡片 */
  #matchList.list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
  #matchList.list-grid .match-row { margin-top: 0; }
  #matchList.list-grid .empty, #matchList.list-grid .loading { grid-column: 1 / -1; }
  .pred-grid { grid-template-columns: 1fr 1fr; }
  /* 详情页信息区多列 */
  .detail-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; align-items: center; }
  .detail-card .match-teams { grid-column: 1 / -1; margin-bottom: 0; }
  .date-row { max-width: 560px; }
  .form-card { max-width: 480px; }
}
@media (min-width: 1024px) {
  .pred-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-card { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- 球智推荐卡片（picks.html / match.html 共用） ---------- */
.pick-card {
  display: block; color: inherit; text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  margin: 10px 0; box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.pick-card:active { background: var(--card-2); }
.pick-card.zx { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(232,182,42,.3), 0 4px 14px rgba(0,0,0,.28); }
.pick-head { display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.pick-head .order { font-weight: 700; color: var(--gold); }
.pick-teams { font-size: 16px; font-weight: 700; margin: 4px 0 8px; }
.pick-teams .vs { color: var(--text-2); font-weight: 400; margin: 0 6px; font-size: 13px; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; font-size: 13px; margin-top: 8px; }
.pick-grid .k { color: var(--text-2); display: block; font-size: 12px; margin-bottom: 2px; }
.pick-grid .v { font-weight: 600; font-size: 14px; }
.pick-zhuren { color: var(--gold); font-size: 15px; }
.pick-reason { margin-top: 10px; font-size: 13px; color: var(--text-2);
  border-top: 1px dashed var(--border); padding-top: 8px; line-height: 1.6; }
.pick-result { margin-top: 6px; font-size: 13px; font-weight: 700; }
.zhongxin { color: var(--gold); font-weight: 700; }
.stat-line { font-size: 13px; color: var(--text-2); margin: 8px 2px 2px; }
.pending { text-align: center; color: var(--text-2); padding: 24px 0; font-size: 14px; }

/* ===== 2026-09-29 P1：底部五 Tab + 比赛三态 ===== */
.container { padding-bottom: 84px; }  /* 给 tabbar 留位 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: rgba(11,18,32,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 6px; color: var(--text-2); text-decoration: none; font-size: 11px;
}
.tab-ico { font-size: 20px; line-height: 1.2; }
.tab-txt { margin-top: 2px; }
.tab-item.active { color: var(--gold); font-weight: 700; }

/* 进行中徽章 + 脉冲红点 */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(248,113,113,.14); color: #f87171;
  border: 1px solid rgba(248,113,113,.4);
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #f87171;
  animation: pulse-ring 1.6s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(248,113,113,.55); }
  70% { box-shadow: 0 0 0 7px rgba(248,113,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
}
.live-banner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35);
  color: #fca5a5; border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 12px; font-size: 13px; font-weight: 600;
}

/* 即将上线占位页 */
.soon-wrap { text-align: center; padding: 72px 24px; }
.soon-ico { font-size: 56px; }
.soon-wrap h2 { margin: 16px 0 8px; font-size: 20px; }
.soon-wrap p { color: var(--text-2); font-size: 14px; line-height: 1.8; }
.soon-list { text-align: left; display: inline-block; margin-top: 12px;
  color: var(--text-2); font-size: 13px; line-height: 2; }

/* 历史战绩页（2026-09-30） */
.rec-title { font-size: 20px; font-weight: 700; margin: 16px 2px 10px; }
.rec-sec { font-size: 16px; font-weight: 700; margin: 18px 2px 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rec-sub { font-size: 12px; color: var(--text-2); font-weight: 400; }
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px; }
.rec-card-t { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.rec-big { font-size: 30px; font-weight: 800; color: var(--gold); }
.rec-card-s { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.rec-day { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.rec-day-d { font-weight: 700; }
.rec-day-r { display: flex; gap: 12px; font-size: 13px; color: var(--text-2); }
.rec-bt { margin-bottom: 10px; }
.rec-desc { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.rec-bt-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.rec-bt-row .gold { color: var(--gold); }
.rec-note { font-size: 12px; color: var(--text-2); margin: 8px 2px; }
.rec-empty { color: var(--text-2); font-size: 14px; padding: 16px 4px; }
.rec-entry { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid rgba(232,182,42,.35); border-radius: var(--radius); padding: 13px 14px; margin: 12px 0; color: var(--text); text-decoration: none; font-weight: 700; }
.rec-entry:active { background: var(--card-2); }
.rec-entry .go { color: var(--gold); font-size: 13px; font-weight: 400; }
