/* ============================================================================
   be2_assets.css — Betting Engine v2.0 样式
   ============================================================================
   说明：
   - 主卡片样式以内联形式写在 be2_render_html 里，缺 CSS 也能用
   - 本文件提供更精致的视觉与暗色模式适配
   - 类名前缀 be2- 避免冲突
   ============================================================================ */

.be2-card {
  font-family: -apple-system, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  position: relative;
}

.be2-card.be2-tier-high   { box-shadow: 0 1px 4px rgba(211,47,47,.08); }
.be2-card.be2-tier-midhigh{ box-shadow: 0 1px 4px rgba(245,124,0,.08); }
.be2-card.be2-tier-mid    { box-shadow: 0 1px 4px rgba(251,192,45,.08); }
.be2-card.be2-tier-low    { box-shadow: 0 1px 3px rgba(144,164,174,.08); }
.be2-card.be2-tier-skip   { background: #fafafa !important; color: #6b7280; }

.be2-card .be2-head { gap: 8px; }
.be2-card .be2-title { font-size: 13px; }
.be2-card .be2-signals { font-feature-settings: "tnum"; }

.be2-card .be2-play {
  transition: background .12s ease;
}
.be2-card .be2-play:hover {
  background: #eef4fb !important;
}

.be2-card .be2-redflags { font-weight: 500; color: #b45309; }

.be2-card .be2-foot { font-feature-settings: "tnum"; }


/* 当被嵌套在已有的 prediction-result-box 兄弟节点之后时的间距 */
.prediction-result-box + .be2-card {
  margin-top: 8px;
}


/* 紧凑模式（适合 mobile） */
@media (max-width: 640px) {
  .be2-card {
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
  .be2-card .be2-play {
    padding: 4px 6px !important;
  }
  .be2-card .be2-tier-badge {
    font-size: 11px;
  }
}


/* 管理员页表格 */
table.be2-stat tbody td {
  vertical-align: middle;
}


/* 兼容暗色主题（若 index.php 启用） */
@media (prefers-color-scheme: dark) {
  .be2-card {
    background: #1f2937 !important;
    color: #e5e7eb;
    border-color: #374151;
  }
  .be2-card .be2-play {
    background: #2d3748 !important;
  }
  .be2-card .be2-redflags {
    background: #3a2c1a !important;
  }
}


/* ============================================================================
   v2.1.0 - 比分映射高亮 + inline 卡片样式
   ============================================================================ */

/* be2 推荐高亮（v2.1.3 - 覆盖所有盘口：crsOdds/hafuOdds/ttgOdds/hadOdds/hhadOdds） */
table.crsOdds td.be2-rec-hit,
table.hafuOdds td.be2-rec-hit,
table.ttgOdds td.be2-rec-hit,
div.hadOdds .oddsCell.be2-rec-hit,
div.hhadOdds .oddsCell.be2-rec-hit {
  outline: 2px solid #1976d2;
  outline-offset: -2px;
  background: #e3f2fd !important;
  position: relative;
}

/* 近况倒推预测模块：禁止撑开详情页宽度 */
.be2-report-prediction-card,
.be2-report-prediction-card * {
  box-sizing: border-box;
}
.be2-report-prediction-card {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.be2-report-prediction-card div,
.be2-report-prediction-card span {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
table.crsOdds td.be2-rec-final,
table.hafuOdds td.be2-rec-final,
table.ttgOdds td.be2-rec-final,
div.hadOdds .oddsCell.be2-rec-final,
div.hhadOdds .oddsCell.be2-rec-final {
  outline-color: #15803d !important;
  background: #d4edda !important;
  font-weight: bold;
}
table.crsOdds td.be2-rec-hit::after,
table.hafuOdds td.be2-rec-hit::after,
table.ttgOdds td.be2-rec-hit::after,
div.hadOdds .oddsCell.be2-rec-hit::after,
div.hhadOdds .oddsCell.be2-rec-hit::after {
  content: "Ⓑ";
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 11px;
  color: #1976d2;
  font-weight: bold;
  pointer-events: none;
}
table.crsOdds td.be2-rec-final::after,
table.hafuOdds td.be2-rec-final::after,
table.ttgOdds td.be2-rec-final::after,
div.hadOdds .oddsCell.be2-rec-final::after,
div.hhadOdds .oddsCell.be2-rec-final::after {
  content: "✓Ⓑ";
  color: #15803d;
}


/* inline 卡片紧凑样式（嵌入 detail_<mid> 行内时） */
.be2-inline-wrap {
  margin: 8px 0 4px;
  padding: 0;
}
.be2-inline-wrap .be2-card {
  border-radius: 4px;
  margin: 0;
}


/* 更新日志页样式 */
.be2-changelog {
  font-family: -apple-system, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 24px 60px;
  font-size: 14px;
  line-height: 1.7;
  color: #222;
}
.be2-changelog h1 {
  font-size: 22px;
  margin: 0 0 6px;
  color: #111;
}
.be2-changelog h2 {
  font-size: 17px;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}
.be2-changelog .ver-tag {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 13px;
  margin-right: 8px;
}
.be2-changelog .ver-date {
  color: #6b7280;
  font-size: 13px;
  font-weight: normal;
}
.be2-changelog ul {
  margin: 6px 0 6px 16px;
  padding-left: 12px;
}
.be2-changelog li {
  margin: 4px 0;
}
.be2-changelog code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #c2410c;
  word-break: break-all;
}

/* v2.1.8: 相似历史映射 — 仿原"映射比分盘"，只显示角标，无背景无边框 */
table.hafuOdds td.be2-sim-hit,
table.ttgOdds td.be2-sim-hit,
table.crsOdds td.be2-sim-hit {
  position: relative;
}
.be2-sim-count {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 10px;
  line-height: 14px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #f59e0b;
  color: #fff;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  pointer-events: none;
  z-index: 5;
}
/* 比赛近况 .rf-score 上的角标（只显示角标，不改背景） */
.rf-score.be2-sim-rf-hit {
  position: relative;
}
.be2-sim-rf-count {
  position: absolute;
  top: -4px;
  right: -8px;
  display: inline-block;
  padding: 0 5px;
  height: 14px;
  line-height: 14px;
  font-size: 10px;
  font-weight: bold;
  background: #f59e0b;
  color: #fff;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  pointer-events: none;
  z-index: 5;
}
.be2-changelog table {
  max-width: 100%;
  border-collapse: collapse;
}
.be2-changelog pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 移动端兼容 */
@media (max-width: 640px) {
  .be2-changelog-header {
    padding: 12px 14px !important;
  }
  .be2-changelog-header h1 {
    font-size: 16px !important;
  }
  .be2-changelog-header a {
    display: inline-block;
    margin: 4px 8px 0 0 !important;
    font-size: 12px !important;
  }
  .be2-changelog {
    padding: 12px 14px 40px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
  }
  .be2-changelog h1 {
    font-size: 18px !important;
  }
  .be2-changelog h2 {
    font-size: 15px !important;
    margin-top: 22px !important;
    word-wrap: break-word;
  }
  .be2-changelog .ver-tag {
    font-size: 12px !important;
    padding: 1px 6px !important;
    display: inline-block;
    margin-bottom: 2px;
  }
  .be2-changelog .ver-date {
    font-size: 12px !important;
    display: inline-block;
  }
  .be2-changelog ul {
    margin-left: 8px !important;
    padding-left: 10px !important;
  }
  .be2-changelog ul ul {
    padding-left: 14px !important;
  }
  .be2-changelog li {
    font-size: 12px !important;
    line-height: 1.5;
  }
  .be2-changelog table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 11px !important;
  }
  .be2-changelog table th,
  .be2-changelog table td {
    padding: 3px 5px !important;
    white-space: nowrap;
  }
  .be2-changelog code {
    font-size: 11px !important;
  }
  .be2-changelog pre {
    font-size: 11px !important;
    padding: 4px !important;
  }
}
