/* FWorld 双平台动态页 — 复刻原 templates/index.html 拜仁红主题 (Workstream E4).
   样式逐项移植自原静态单页;仅去除其从未使用的图表/版本下拉相关块。 */
:root {
  --bayern-red: #DC052D;
  --bayern-dark: #333333;
  --bayern-light: #F5F5F5;
  --bayern-white: #FFFFFF;
  --correct-bg: #d4edda;
  --marked-bg: #fff3cd;
  --marked-border: #DC052D;
}
* { box-sizing: border-box; }
body {
  background-color: var(--bayern-light);
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  padding: 12px 8px;
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  font-size: 14px;
}
.container { max-width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; margin: 0 auto; width: 100%; }
h1 {
  color: var(--bayern-red); font-weight: 700; border-bottom: 3px solid var(--bayern-red);
  padding-bottom: 8px; margin-bottom: 16px; font-size: 1.5rem;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
h2 {
  color: var(--bayern-dark); font-weight: 600; font-size: 1.2rem; margin: 16px 0 8px;
  border-left: 4px solid var(--bayern-red); padding-left: 12px; display: flex; align-items: center; gap: 8px;
}
.card { border-radius: 16px; border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.08); background: var(--bayern-white); }
.badge-arc {
  display: inline-block; padding: 0.25rem 0.6rem; border-radius: 30px; background-color: #f8f9fa;
  color: #333; font-size: 0.7rem; font-weight: 500; line-height: 1.2; white-space: nowrap; border: 1px solid #ddd;
}
.plat-tag { font-size: 0.6rem; font-weight: 700; padding: 1px 6px; border-radius: 20px; color: #fff; }
.plat-tag.sp { background-color: #0d6efd; }
.plat-tag.fa { background-color: #198754; }
.plat-tag.both { background-color: var(--bayern-red); }
.stat-group { display: flex; justify-content: center; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stat-item { text-align: center; min-width: 70px; }
.stat-label { font-size: 0.65rem; color: #6c757d; }
.stat-value { font-weight: 700; font-size: 0.85rem; }
.separator { color: #adb5bd; font-weight: normal; margin: 0 2px; }
.percent-gray { color: #6c757d !important; font-weight: 600; }
.percent-black { color: #212529 !important; font-weight: 600; }
.percent-yellow { color: #856404 !important; font-weight: 600; background-color: #fff3cd; border-radius: 20px; }
.percent-red { color: white !important; font-weight: 600; background-color: var(--bayern-red); border-radius: 20px; }
.table-container {
  background: var(--bayern-white); border-radius: 16px; padding: 12px 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08); overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%;
}
.table { width: 100%; min-width: 1100px; margin-bottom: 0; font-size: 0.7rem; border-collapse: collapse; }
.table thead th {
  background-color: var(--bayern-dark); color: white; font-weight: 600; text-align: center; vertical-align: middle;
  border-bottom: 2px solid var(--bayern-red); white-space: nowrap; padding: 10px 4px; font-size: 0.7rem; cursor: pointer;
}
.table tbody td {
  text-align: center; vertical-align: middle; padding: 8px 4px; border-bottom: 1px solid #dee2e6;
  border-left: none; border-right: none;
}
tr.row-selected { outline: 2px solid var(--bayern-red); outline-offset: -2px; background-color: rgba(220, 5, 45, 0.1); }
.candidates-container { display: flex; flex-direction: row; justify-content: space-around; gap: 4px; flex-wrap: wrap; }
.candidate-box {
  flex: 1; min-width: 80px; background: #fafafa; border-radius: 8px; padding: 4px 2px; position: relative;
  border: 1px solid #e0e0e0; transition: all 0.1s ease; cursor: pointer;
}
.candidate-box.marked { border: 2px solid var(--marked-border); background-color: var(--marked-bg); }
.candidate-box.correct-cell { background-color: var(--correct-bg) !important; }
.candidate-box .prediction-value { font-weight: 700; font-size: 0.85rem; display: inline-block; line-height: 1.3; }
.candidate-box .confidence-sub { color: #6c757d; font-size: 0.55rem; display: block; line-height: 1.2; }
.candidate-box .odds-sub { font-size: 0.55rem; color: #6c757d; margin-top: 2px; }
.candidate-box .ev-sub { font-size: 0.5rem; font-weight: 600; margin-top: 2px; }
.candidate-box .roi-sub { font-size: 0.5rem; font-weight: 600; margin-top: 2px; }
.ev-positive { color: #DC052D; }
.ev-negative { color: #28a745; }
.ev-zero { color: #6c757d; }
.bet-signal { position: absolute; top: 2px; right: 2px; display: flex; flex-direction: column; gap: 2px; z-index: 5; }
.bet-signal__light { width: 6px; height: 6px; border-radius: 50%; background-color: #E0E0E0; transition: background-color 0.2s; box-shadow: 0 0 2px rgba(0,0,0,0.1); }
.bet-signal__light--active-green { background-color: #00FF00; box-shadow: 0 0 6px #00FF00; }
.bet-signal__light--active-yellow { background-color: #FFD700; box-shadow: 0 0 6px #FFD700; }
.bet-signal__light--active-red { background-color: #FF0000; box-shadow: 0 0 6px #FF0000; }
.strategy-badge-group { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
.strategy-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  background-color: #e9ecef; color: #6c757d; font-size: 8px; font-weight: 700; border: 1px solid #dee2e6;
}
.strategy-badge.active { background-color: var(--bayern-red); color: white; border-color: var(--bayern-red); }
.hcp-number { font-size: 0.7rem; color: #6c757d; display: inline-block; margin-right: 2px; }
.hcp-row { display: flex; align-items: center; justify-content: center; gap: 3px; margin-bottom: 2px; }
.form-check-input { border-radius: 8px !important; border: 2px solid var(--bayern-dark); cursor: pointer; width: 1.3rem; height: 1.3rem; margin: 0; }
.form-check-input:checked { background-color: var(--bayern-red); border-color: var(--bayern-red); }
.btn-bayern, .btn-outline-bayern {
  border-radius: 40px; padding: 6px 14px; font-weight: 600; font-size: 0.75rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-bayern { background-color: var(--bayern-red); color: white; border: none; }
.btn-outline-bayern { border: 1.5px solid var(--bayern-red); color: var(--bayern-red); background: transparent; }
.date-cell { line-height: 1.2; }
.date-year { font-size: 0.6rem; font-weight: 500; }
.date-day { font-size: 0.75rem; font-weight: 700; }
.date-time { font-size: 0.55rem; color: #6c757d; }
.dataTables_length { display: none !important; }
.dataTables_filter input { width: 100%; padding: 8px 12px; border-radius: 30px; border: 1px solid #ccc; font-size: 0.8rem; }
.table-container::-webkit-scrollbar { height: 4px; }

body.hide-confidence .confidence-sub { display: none !important; }
body.hide-odds .odds-sub { display: none !important; }
body.hide-ev .ev-sub { display: none !important; }
body.hide-roi .roi-sub { display: none !important; }
body.hide-signal .bet-signal { display: none !important; }
body.hide-strategy-badge .strategy-badge-group { display: none !important; }
body.hide-candidate-2 .candidate-box[data-candidate-index="1"] { display: none !important; }

.form-check-label { font-size: 0.65rem !important; font-weight: 500; }
.screenshot-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.screenshot-table th, .screenshot-table td { border: 1px solid #ddd; padding: 4px; text-align: center; vertical-align: middle; }
.screenshot-table .row-selected { outline: 2px solid var(--bayern-red); background-color: rgba(220, 5, 45, 0.1); }
.screenshot-table .candidate-box.marked { border: 2px solid var(--marked-border); background-color: var(--marked-bg); }
.candidate-box[data-candidate-index="1"]:not(.marked):not(.correct-cell) { background-color: #FEEBE7; }
.goals-predict { font-size: 1.3rem; font-weight: 800; color: #333; text-align: center; margin-top: 2px; }
.did-sub { font-size: 0.75em; color: #888; font-weight: normal; vertical-align: sub; }
.gs-mae-stats { margin: 10px 0; font-size: 0.9em; color: #555; }
.gs-mae-stats span { margin-right: 20px; }

/* 机会板 + 过滤器 + 杂项 */
.board { background: var(--bayern-white); border-radius: 16px; padding: 12px 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); margin-bottom: 16px; }
.opp-empty { color: #6c757d; font-size: 0.85rem; }
.opp-card { border: 1px solid #e0e0e0; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 0.8rem; }
.opp-card.locked { border-left: 4px solid var(--bayern-red); }
.opp-card.value { border-left: 4px solid #198754; }
.meta-bar { font-size: 0.75rem; color: #6c757d; margin: 4px 0 12px; }
.empty-cell { color: #ccc; font-size: 0.7rem; }
/* 未对齐 → 缺失平台盘口占位框:不留空白,显示「无」+ 数值空,视觉与有预测的框一致 */
.candidate-box--empty { background: #f6f6f6; border: 1px dashed #d9d9d9; cursor: default; opacity: 0.85; }
.candidate-box--empty .prediction-value.pred-none { color: #9aa0a6; font-weight: 700; }
.candidate-box--empty .odds-sub, .candidate-box--empty .ev-sub, .candidate-box--empty .roi-sub, .candidate-box--empty .confidence-sub { color: #b0b3b8; }
/* 占位框即使在 Top2(index=1)槽位也保持灰色虚线外观,需与 line ~125 的粉色规则同特异性以胜出 */
.candidate-box--empty[data-candidate-index="1"]:not(.marked):not(.correct-cell) { background-color: #f6f6f6; }
.detail-link { margin-top: 4px; }
.detail-link a { font-size: 0.7rem; color: var(--bayern-red); text-decoration: none; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1px 8px; }
.detail-link a:hover { background: var(--bayern-red); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 12px; }
.filters label { display: flex; gap: 6px; align-items: center; font-size: 0.75rem; color: #444; }
.filters select, .filters input[type=date] { border: 1px solid #ccc; border-radius: 20px; padding: 4px 10px; font-size: 0.75rem; }
