body.fb-hud-page.app-shell {
  padding-left: var(--sidebar-w, 240px);
}

@media (max-width: 1024px) {
  body.fb-hud-page.app-shell {
    padding-left: 0;
  }
}

body.fb-hud-page.app-shell.sidebar-collapsed {
  padding-left: var(--sidebar-w-collapsed, 72px);
}

.matches-section-card {
  min-height: 540px;
}

/* ── 已结算 / 在售 双板块 ── */
.fb-board {
  margin: 0 0 28px;
  padding: 14px 14px 8px;
  border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.14));
  border-radius: 16px;
  background: var(--surface-2, rgba(17, 19, 30, 0.55));
}
.fb-board-settled {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.04);
}
.fb-board-head { margin: 0 0 12px; }
.fb-board-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #f8fafc);
  letter-spacing: 0.02em;
}
.fb-board-settled .fb-board-title { color: #10b981; }
.fb-board-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text3, #94a3b8);
}
.fb-board-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text3, #94a3b8);
  font-size: 13px;
}
body.light-theme .fb-board {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .fb-board-settled {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.22);
}

/* ── 顶部工具栏 ── */
.fb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface-3, rgba(17, 19, 30, 0.85));
  border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.12));
  border-radius: 14px;
}
.fb-toolbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fb-toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb-filter-label { font-size: 11px; font-weight: 700; color: var(--text-muted, #94a3b8); }
.fb-filter-btn {
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.2); background: rgba(15, 23, 42, 0.5);
  color: var(--text-secondary, #cbd5e1); cursor: pointer; transition: all 0.15s ease;
}
.fb-filter-btn:hover, .fb-filter-btn.active {
  background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.4); color: #fbbf24;
}
.fb-coverage {
  display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; font-weight: 700;
}
.fb-coverage span {
  padding: 4px 10px; border-radius: 999px; background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14); color: #94a3b8;
}
.fb-coverage span b { color: #f1f5f9; margin-left: 4px; }
.fb-coverage .ok b { color: #10b981; }
.fb-coverage .warn b { color: #f59e0b; }

/* ── 日期分组 ── */
.fb-day-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}
.fb-day-title { font-size: 15px; font-weight: 800; color: #fbbf24; }
.fb-day-count { font-size: 12px; color: #94a3b8; font-weight: 600; }

/* ── 比赛行（HUD 三 Lane：对阵/比分 · 赔率 · 信号摘要） ── */
.fb-match-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.fb-match {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(220px, 1.2fr) minmax(140px, 0.9fr);
  gap: 0;
  width: 100%;
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  background: linear-gradient(160deg, var(--border-subtle, rgba(245, 158, 11, 0.04)), var(--surface-2, rgba(17, 19, 30, 0.65)));
  border: 1px solid var(--border-soft, rgba(245, 158, 11, 0.14));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}
.fb-match:hover {
  border-color: var(--border-glow, rgba(245, 158, 11, 0.3));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}
.fb-match.fb-define { opacity: 0.88; }
.fb-match.selected {
  border-color: var(--green, #10b981);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.06), var(--surface-2, rgba(17, 19, 30, 0.65)));
}
.fb-pane {
  padding: 12px 14px;
  min-width: 0;
  border-right: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fb-pane:last-child { border-right: none; }
.fb-pane-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: var(--gold-400, #fbbf24);
  margin-bottom: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--border-subtle, rgba(245, 158, 11, 0.1)); border: 1px solid var(--border-soft, rgba(245, 158, 11, 0.2));
  letter-spacing: 0.02em;
}

/* 对阵区 - 精简版 */
.fb-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.fb-num { font-size: 11px; font-weight: 800; color: var(--gold-400, #fbbf24); }
.fb-league { font-size: 10px; color: var(--text-muted, #64748b); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-score-wrap {
  display: flex; justify-content: center; margin: 4px 0 8px;
  padding: 8px 12px; border-radius: var(--radius-sm, 8px);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), var(--border-subtle, rgba(245, 158, 11, 0.08)));
  border: 1px solid var(--border-soft, rgba(245, 158, 11, 0.18));
}
.fb-teams {
  display: flex; flex-direction: row; align-items: center;
  justify-content: center; gap: 6px; width: 100%; margin: 4px 0;
}
.fb-team {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  min-width: 0; text-align: center; gap: 4px;
}
.fb-badge-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
}
.fb-badge-img {
  width: 36px; height: 36px; border-radius: 10px; object-fit: contain;
  background: var(--surface-3, rgba(15, 23, 42, 0.45)); padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.fb-badge {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.fb-badge.away, .fb-badge-wrap.away .fb-badge-fallback {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-400));
}
.fb-team-name {
  width: 100%; max-width: 100%;
  font-size: 12px; font-weight: 700; color: var(--text-primary, #f1f5f9); line-height: 1.3;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.fb-team-name[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-4, #1f2336);
  color: var(--text-primary, #f1f5f9);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.fb-vs {
  font-size: 9px; font-weight: 800; color: var(--text-muted, #94a3b8);
  padding: 2px 6px; margin: 0;
  background: var(--surface-3, rgba(15, 23, 42, 0.5)); border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.12)); flex-shrink: 0;
}
.fb-kickoff { font-size: 10px; color: var(--text-muted, #94a3b8); text-align: center; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08)); }
.fb-kickoff b { color: var(--gold-300); }
.fb-sell-date { margin-top: 2px; opacity: 0.85; }

/* 比分 - 紧凑版 */
.score-inner { display: flex; width: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.score-box { display: flex; align-items: center; gap: 8px; }
.score-num { font-size: 24px; font-weight: 900; color: var(--text-primary, #f8fafc); font-variant-numeric: tabular-nums; line-height: 1; }
.score-colon { font-size: 16px; font-weight: 700; color: var(--gold-400, #fbbf24); }
.score-status { font-size: 9px; padding: 2px 6px; border-radius: 999px; background: var(--surface-4, rgba(148, 163, 184, 0.2)); color: var(--text-secondary, #cbd5e1); white-space: nowrap; }
.score-status.ended { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.score-status.live { background: rgba(239, 68, 68, 0.15); color: var(--red); }

/* 赔率 - 重构：主赔率大字显示 */
.odds-full { display: flex; flex-direction: column; gap: 6px; }
.odds-block { background: var(--surface-3, rgba(15, 23, 42, 0.38)); border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08)); border-radius: var(--radius-sm, 8px); padding: 8px 10px; }
.odds-block-title { font-size: 10px; font-weight: 700; color: var(--gold-400, #fbbf24); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.odds-row { display: flex; flex-wrap: wrap; gap: 4px; }
.odds-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, var(--border-subtle, rgba(245, 158, 11, 0.12)), rgba(245, 158, 11, 0.04));
  border: 1px solid var(--border-soft, rgba(245, 158, 11, 0.2)); border-radius: var(--radius-sm, 8px); padding: 4px 8px;
}
.odds-chip-label { font-size: 9px; color: var(--text-muted, #94a3b8); font-weight: 600; }
.odds-chip-val { font-size: 13px; font-weight: 900; color: var(--text-primary, #f1f5f9); font-variant-numeric: tabular-nums; }

/* 新增：主赔率大字显示区域 */
.odds-main {
  display: flex; gap: 6px; margin-bottom: 6px;
}
.odds-main .odds-chip {
  flex: 1; flex-direction: column; text-align: center; padding: 6px 4px;
  cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
.odds-main .odds-chip:hover {
  background: var(--border-glow, rgba(245, 158, 11, 0.3));
  transform: scale(1.02);
}
.odds-main .odds-chip.low {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--green, #10b981);
}
.odds-main .odds-chip-label { font-size: 10px; margin-bottom: 2px; }
.odds-main .odds-chip-val { font-size: 18px; }

/* 让球盘口内联 */
.odds-handicap-inline {
  display: flex; align-items: center; gap: 6px; padding: 4px 0;
  font-size: 10px; color: var(--text-muted, #94a3b8);
}
.handicap-value {
  font-weight: 700; color: #f59e0b; padding: 2px 6px;
  background: rgba(245, 158, 11, 0.12); border-radius: 4px;
}

/* 全量赔率 - 折叠式 */
.pool-odds-toggle-wrapper { margin-top: 4px; }
.pool-odds-toggle {
  font-size: 10px; font-weight: 600; color: var(--text-muted, #94a3b8);
  cursor: pointer; padding: 4px 0; list-style: none;
}
.pool-odds-toggle::-webkit-details-marker { display: none; }
.pool-odds-toggle::before {
  content: '▸ '; transition: transform 0.2s;
}
details[open] .pool-odds-toggle::before { content: '▾ '; }
.pool-odds-section { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.pool-odds-group { background: var(--surface-3, rgba(15, 23, 42, 0.32)); border-radius: var(--radius-sm, 8px); padding: 6px 8px; }
.pool-odds-group-title { font-size: 10px; font-weight: 700; color: var(--gold-400, #fbbf24); margin-bottom: 4px; }
.pool-odds-row { display: flex; flex-wrap: wrap; gap: 3px; }
.pool-odds-chip { font-size: 9px; background: var(--surface-4, rgba(148, 163, 184, 0.08)); border-radius: 4px; padding: 2px 5px; color: var(--text-secondary, #cbd5e1); }
.pool-odds-chip strong { color: var(--text-primary, #f1f5f9); font-weight: 800; }
.pool-odds-empty { font-size: 9px; color: var(--text-muted, #64748b); font-style: italic; }

/* 情报 - 紧凑版 */
.leisu-panel { margin-top: 0; }
.leisu-title { font-size: 11px; font-weight: 700; color: var(--gold-400, #fbbf24); margin-bottom: 6px; }
.leisu-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.leisu-team-profile {
  background: var(--surface-3, rgba(15, 23, 42, 0.45)); border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.1));
  border-radius: var(--radius-sm, 8px); padding: 8px 10px; font-size: 10px;
}

/* 查看情报按钮 */
.fb-show-intel {
  display: none; /* 默认隐藏，移动端显示 */
  width: 100%; padding: 8px; margin-top: 6px;
  background: var(--border-subtle, rgba(245, 158, 11, 0.08));
  border: 1px solid var(--border-soft, rgba(245, 158, 11, 0.2));
  border-radius: var(--radius-sm, 8px);
  color: var(--gold-400, #fbbf24); font-size: 11px; font-weight: 600;
  cursor: pointer; text-align: center;
  transition: background 0.15s ease;
}
.fb-show-intel:hover { background: var(--border-glow, rgba(245, 158, 11, 0.2)); }

/* 选场区域 */
.fb-select {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  z-index: 2;
}
.fb-select input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer;
  accent-color: var(--green, #10b981);
}

/* 底部悬浮栏 */
.fb-bet-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: none; align-items: center; justify-content: center; gap: 16px;
  padding: 12px 20px;
  background: var(--surface-4, #1f2336);
  border-top: 1px solid var(--border-soft, rgba(245, 158, 11, 0.15));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 100;
}
.fb-bet-count { font-size: 14px; color: var(--text-primary, #f1f5f9); font-weight: 600; }
.fb-bet-count b { color: var(--green, #10b981); font-size: 18px; margin: 0 4px; }
.fb-bet-clear {
  padding: 8px 16px; border-radius: var(--radius-sm, 8px);
  background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red, #ef4444); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.fb-bet-clear:hover { background: rgba(239, 68, 68, 0.25); }
.leisu-profile-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.leisu-profile-heading b { font-size: 12px; color: #f1f5f9; }
.leisu-profile-line { display: flex; gap: 6px; margin: 3px 0; color: #94a3b8; }
.leisu-profile-line span { min-width: 48px; }
.leisu-profile-line b { color: #e2e8f0; font-weight: 700; }
.leisu-star-header { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.leisu-star-name { font-size: 12px; font-weight: 800; color: #f1f5f9; }
.leisu-star-club { font-size: 10px; color: #94a3b8; }
.leisu-coach-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 13px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}
.leisu-squad-block { margin-top: 8px; }
.leisu-lineup-label { font-size: 11px; font-weight: 700; color: #fbbf24; margin-bottom: 6px; }
.leisu-lineup-players { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.leisu-player-chip {
  font-size: 10px; padding: 3px 8px; border-radius: 8px;
  background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0; display: inline-flex; align-items: center; gap: 3px;
}
.leisu-injury { font-size: 10px; color: #fca5a5; margin-bottom: 6px; padding: 6px 8px; background: rgba(239, 68, 68, 0.08); border-radius: 8px; }
.leisu-muted { font-size: 11px; color: #64748b; line-height: 1.5; padding: 10px; background: rgba(15, 23, 42, 0.3); border-radius: 10px; border: 1px dashed rgba(148, 163, 184, 0.12); }
.leisu-intel-section { margin-top: 8px; }
.leisu-intel-header { font-size: 11px; font-weight: 800; color: #f59e0b; margin-bottom: 6px; }
.leisu-intel-item { font-size: 10px; padding: 6px 8px; margin-bottom: 4px; border-radius: 8px; background: rgba(15, 23, 42, 0.4); }
.leisu-intel-item h5 { font-size: 11px; margin: 2px 0; color: #e2e8f0; }

.source-badge {
  display: inline-flex; font-size: 9px; font-weight: 700; padding: 1px 6px;
  border-radius: 999px; white-space: nowrap;
}
.source-badge.official { background: rgba(16, 185, 129, 0.16); color: #10b981; }
.source-badge.odds-src { background: rgba(245, 158, 11, 0.16); color: #f59e0b; }
.source-badge.intel-src { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.source-badge.transfermarkt { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.countdown-badge, .status-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.countdown-badge { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.status-badge.status-live { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.status-badge.status-ended { background: rgba(16, 185, 129, 0.2); color: #10b981; }

.fb-remark { grid-column: 1 / -1; font-size: 10px; color: #94a3b8; padding: 8px 18px 12px; border-top: 1px solid rgba(245, 158, 11, 0.06); }

/* 覆盖旧 grid 卡片布局 */
.day-matches, .day-matches-wrap { display: block !important; width: 100% !important; overflow: visible !important; }
.matches-section-card { background: transparent; border: none; box-shadow: none; padding: 0; }

/* 响应式 - 优化移动端体验 */
@media (max-width: 1100px) {
  .fb-match { grid-template-columns: 1fr 1fr; }
  .fb-lane.fb-lane-c, .fb-pane.intel { grid-column: 1 / -1; border-right: none; border-top: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08)); }
  .leisu-profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .fb-match {
    grid-template-columns: 1fr;
    position: relative;
    overflow-x: hidden;
  }
  .fb-lane, .fb-pane { border-right: none; border-bottom: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08)); padding: 10px 12px; }
  .fb-lane:last-child, .fb-pane:last-child { border-bottom: none; }

  .fb-lane-a, .fb-pane.match, .fb-pane.odds { border-bottom: none; }

  .fb-open-intel.mobile-only { display: block; }

  /* 移动端情报弹窗 */
  .fb-intel-sheet {
    position: fixed; bottom: 0; left: 0; right: 0;
    max-height: 70vh; overflow-y: auto;
    background: var(--surface-4, #1f2336);
    border-top-left-radius: var(--radius-lg, 20px);
    border-top-right-radius: var(--radius-lg, 20px);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
    padding: 20px;
    z-index: 200;
    animation: slideUp 0.3s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .fb-intel-sheet .close-btn {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; color: var(--text-muted, #94a3b8);
    font-size: 20px; cursor: pointer;
  }

  /* 日期Tab导航 */
  .fb-date-tabs {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 8px 0; margin-bottom: 12px;
    scrollbar-width: none;
  }
  .fb-date-tabs::-webkit-scrollbar { display: none; }
  .fb-date-tab {
    flex-shrink: 0; padding: 8px 16px;
    border-radius: var(--radius-sm, 8px);
    background: var(--surface-3, rgba(15, 23, 42, 0.5));
    border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08));
    color: var(--text-secondary, #cbd5e1); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
  }
  .fb-date-tab:hover, .fb-date-tab.active {
    background: var(--border-subtle, rgba(245, 158, 11, 0.12));
    border-color: var(--border-glow, rgba(245, 158, 11, 0.3));
    color: var(--gold-400, #fbbf24);
  }

  /* 隐藏选场checkbox（移动端不方便点击） */
  .fb-select { display: none; }

  /* 赔率更紧凑 */
  .odds-main { flex-wrap: wrap; }
  .odds-main .odds-chip { min-width: 80px; }
}

/* 底部padding - 防止悬浮栏遮挡内容 */
.container { padding-bottom: 80px; }

/* 可访问性增强 */
@media (prefers-reduced-motion: reduce) {
  .fb-match { transition: none; }
  .fb-match:hover { transform: none; }
  .fb-intel-sheet { animation: none; }
  .odds-main .odds-chip { transition: none; }
}

/* 焦点样式 */
.fb-filter-btn:focus-visible,
.fb-show-intel:focus-visible,
.fb-bet-clear:focus-visible,
.fb-date-tab:focus-visible {
  outline: 2px solid var(--gold-400, #fbbf24);
  outline-offset: 2px;
}

/* 日期Tab全端显示 */
.fb-date-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 0; margin-bottom: 12px;
  scrollbar-width: none;
}
.fb-date-tabs::-webkit-scrollbar { display: none; }
.fb-date-tab {
  flex-shrink: 0; padding: 8px 16px;
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-3, rgba(15, 23, 42, 0.5));
  border: 1px solid var(--border-subtle, rgba(245, 158, 11, 0.08));
  color: var(--text-secondary, #cbd5e1); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.fb-date-tab:hover, .fb-date-tab.active {
  background: var(--border-subtle, rgba(245, 158, 11, 0.12));
  border-color: var(--border-glow, rgba(245, 158, 11, 0.3));
  color: var(--gold-400, #fbbf24);
}

/* ── AI模块样式 ── */
.ai-badge {
  animation: fadeIn 0.3s ease;
}
.ai-badge:hover {
  background: rgba(245,158,11,0.12) !important;
}

.ai-chat-box {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-analysis-panel {
  animation: fadeIn 0.3s ease;
}

.ai-stats-panel {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* AI推荐高亮 */
.fb-match[data-ai-recommended="true"] {
  border-color: rgba(245,158,11,0.4) !important;
  box-shadow: 0 0 20px rgba(245,158,11,0.1) !important;
}

/* AI筛选按钮 */
.ai-filter-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(245,158,11,0.2);
  background: rgba(15,23,42,0.5);
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-filter-btn:hover, .ai-filter-btn.active {
  background: rgba(245,158,11,0.16);
  border-color: rgba(245,158,11,0.4);
  color: #fbbf24;
}

/* AI推荐星星动画 */
.ai-stars {
  display: inline-flex;
  gap: 2px;
}
.ai-stars span {
  animation: starPop 0.3s ease;
}
@keyframes starPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* AI对话框输入框焦点 */
.ai-chat-box input:focus {
  border-color: rgba(245,158,11,0.4) !important;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.1) !important;
}

/* AI浮动按钮hover */
#aiChatToggle:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 25px rgba(245,158,11,0.5) !important;
}

/* 浅色主题 */
body.light-theme .fb-match {
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.04), rgba(255, 255, 255, 0.95));
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
body.light-theme .fb-match:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
body.light-theme .fb-match.selected { border-color: var(--green, #10b981); background: linear-gradient(160deg, rgba(16, 185, 129, 0.04), rgba(255, 255, 255, 0.95)); }
body.light-theme .fb-team-name, body.light-theme .score-num { color: #1e293b; }
body.light-theme .fb-pane-label, body.light-theme .odds-block-title { color: #92400e; }
body.light-theme .fb-toolbar { background: rgba(255, 255, 255, 0.9); border-color: rgba(0, 0, 0, 0.06); }
body.light-theme .leisu-muted { background: rgba(241, 245, 249, 0.8); color: #64748b; }
body.light-theme .leisu-team-profile { background: rgba(241, 245, 249, 0.9); }
body.light-theme .odds-chip { background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0.02)); }
body.light-theme .fb-bet-bar { background: #fff; border-color: rgba(0, 0, 0, 0.08); box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06); }
body.light-theme .fb-intel-sheet { background: #fff; }

/* ── AI 方案生成面板 ── */
.ai-panel {
  margin-bottom: 20px; padding: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.18); border-radius: 16px;
}
.ai-panel-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.ai-panel-title { font-size: 16px; font-weight: 800; color: #a78bfa; }
.ai-panel-sub { font-size: 12px; color: var(--text-muted, #94a3b8); }
.ai-panel-body { display: flex; flex-direction: column; gap: 12px; }
.ai-budget-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ai-budget-row > label { font-size: 13px; font-weight: 700; color: var(--text-secondary); min-width: 70px; }
.ai-budget-inputs { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-budget-item { display: flex; align-items: center; gap: 6px; }
.ai-budget-item input {
  width: 80px; padding: 6px 10px; font-size: 13px; font-weight: 700;
  background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 8px; color: #f1f5f9; text-align: center;
}
.ai-budget-item input:focus { outline: none; border-color: #a78bfa; }
.ai-ver { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.ai-ver.a { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.ai-ver.b { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.ai-ver.c { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.ai-options-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-options-row > label { font-size: 13px; font-weight: 700; color: var(--text-secondary); min-width: 100px; }
.ai-options-row input {
  padding: 7px 12px; font-size: 13px;
  background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px; color: #f1f5f9;
}
.ai-options-row input:focus { outline: none; border-color: #a78bfa; }
.ai-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-ai-generate {
  padding: 10px 24px; font-size: 14px; font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4); color: #fff;
  border: none; border-radius: 10px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); transition: all 0.2s;
}
.btn-ai-generate:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); }
.btn-ai-generate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ai-status { font-size: 12px; font-weight: 600; }

/* AI 结果区 */
.ai-result { margin-top: 16px; }
.ai-plans-list { display: flex; flex-direction: column; gap: 14px; }
.ai-plan-card {
  padding: 16px; background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.15); border-radius: 12px;
}
.ai-plan-card.error { border-color: rgba(239, 68, 68, 0.3); }
.ai-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-provider { font-size: 13px; font-weight: 800; color: #a78bfa; }
.ai-model { font-size: 11px; color: #94a3b8; padding: 2px 8px; background: rgba(148, 163, 184, 0.1); border-radius: 6px; }
.ai-tokens { font-size: 11px; color: #fbbf24; margin-left: auto; }
.ai-summary { font-size: 13px; color: #e2e8f0; margin-bottom: 10px; padding: 8px 12px; background: rgba(139, 92, 246, 0.08); border-radius: 8px; }
.ai-analysis { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ai-analysis-item { font-size: 12px; color: #cbd5e1; display: flex; align-items: flex-start; gap: 6px; }
.ai-ver-tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.ai-ver-tag.a { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.ai-ver-tag.b { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.ai-ver-tag.c { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.ai-budget-plans { display: flex; flex-direction: column; gap: 10px; }
.ai-budget-tier { padding: 10px; background: rgba(0, 0, 0, 0.2); border-radius: 8px; }
.ai-tier-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-tier-head strong { font-size: 13px; color: #fbbf24; }
.ai-tier-risk { font-size: 11px; color: #fb923c; }
.ai-tickets-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.ai-tickets-table th { text-align: left; padding: 6px 8px; color: #94a3b8; border-bottom: 1px solid rgba(148, 163, 184, 0.15); font-weight: 700; }
.ai-tickets-table td { padding: 5px 8px; color: #e2e8f0; border-bottom: 1px solid rgba(148, 163, 184, 0.06); }
.ai-selection { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-overall-risk { margin-top: 10px; padding: 8px 12px; background: rgba(249, 115, 22, 0.08); border-radius: 8px; font-size: 12px; color: #fb923c; }
.ai-plan-error { font-size: 13px; color: #ef4444; padding: 8px; }
.ai-raw-content pre { font-size: 11px; color: #cbd5e1; white-space: pre-wrap; max-height: 300px; overflow-y: auto; }
.ai-plan-actions { display: flex; gap: 10px; margin-top: 14px; }
.ai-config-hint { padding: 10px 14px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.2); border-radius: 8px; font-size: 12px; color: #fbbf24; margin-bottom: 12px; }
.ai-config-hint a { color: #a78bfa; text-decoration: underline; }

/* AI 历史面板 */
.ai-history { margin-top: 16px; padding: 16px; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 14px; }
.ai-history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ai-history-title { font-size: 14px; font-weight: 800; color: #a78bfa; }
.ai-history-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.ai-tab { font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 8px; border: 1px solid rgba(139, 92, 246, 0.2); background: transparent; color: #94a3b8; cursor: pointer; }
.ai-tab.active { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border-color: rgba(139, 92, 246, 0.4); }
.ai-plan-list { display: flex; flex-direction: column; gap: 8px; }
.ai-plan-item { padding: 10px 12px; background: rgba(0, 0, 0, 0.2); border-radius: 10px; border: 1px solid rgba(139, 92, 246, 0.08); }
.ai-plan-item.expanded { border-color: rgba(139, 92, 246, 0.25); }
.ai-plan-summary { cursor: pointer; }
.ai-plan-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.ai-plan-date { font-weight: 700; color: #cbd5e1; }
.ai-plan-profit { font-weight: 800; }
.ai-plan-profit.profit { color: #4ade80; }
.ai-plan-profit.loss { color: #ef4444; }
.ai-plan-issue { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.ai-plan-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(139, 92, 246, 0.1); }
.ai-output { margin-bottom: 10px; }
.ai-output-head { font-size: 12px; font-weight: 700; color: #a78bfa; margin-bottom: 6px; }
.ai-output-summary { font-size: 12px; color: #cbd5e1; margin-bottom: 8px; }
.ai-output-tiers { display: flex; flex-direction: column; gap: 6px; }
.ai-tier { padding: 6px 10px; background: rgba(0, 0, 0, 0.15); border-radius: 6px; font-size: 11px; }
.ai-tier-tickets { list-style: none; padding: 0; margin: 4px 0 0; }
.ai-tier-tickets li { padding: 2px 0; color: #cbd5e1; font-size: 11px; }
.ai-output-error { font-size: 12px; color: #ef4444; padding: 6px; }
.ai-output-raw pre { font-size: 10px; color: #94a3b8; white-space: pre-wrap; max-height: 200px; overflow-y: auto; }
.ai-review-info { padding: 10px; background: rgba(34, 197, 94, 0.06); border-radius: 8px; margin-top: 10px; }
.ai-review-info h4 { font-size: 13px; color: #4ade80; margin: 0 0 8px; }
.ai-review-info p { font-size: 12px; color: #cbd5e1; margin: 4px 0; }
.ai-plan-detail-actions { margin-top: 10px; }
.ai-empty { text-align: center; padding: 20px; color: #94a3b8; font-size: 13px; }

/* 浅色主题 AI 面板 */
body.light-theme .ai-panel { background: linear-gradient(135deg, rgba(139, 92, 246, 0.04), rgba(6, 182, 212, 0.02)); border-color: rgba(139, 92, 246, 0.15); }
body.light-theme .ai-plan-card { background: rgba(255, 255, 255, 0.9); border-color: rgba(0, 0, 0, 0.06); }
body.light-theme .ai-summary { background: rgba(139, 92, 246, 0.06); color: #1e293b; }
body.light-theme .ai-budget-item input { background: #fff; border-color: rgba(0, 0, 0, 0.1); color: #1e293b; }
body.light-theme .ai-options-row input { background: #fff; border-color: rgba(0, 0, 0, 0.1); color: #1e293b; }
