/* ==========================================================================
   JND28 风格框架  —— 设计令牌源自参考站（红白主色 · 卡片式 · 圆球数字）
   目录：
   01 令牌与主题     02 基础排版      03 顶部域名栏   04 头部
   05 最新开奖卡片   06 标签导航     07 通用面板      08 表格
   09 表单控件       10 号码与徽标   11 走势/图表    12 API 卡片
   13 倍投计算器     14 页脚         15 悬浮组件     16 响应式
   ========================================================================== */

/* ---------- 01 令牌与主题 ---------- */
:root {
  --bg-gradient-start: #fafaf9;
  --bg-gradient-end: #fafaf9;
  --card-bg: #ffffff;
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --border-color: #e7e5e4;
  --shadow: rgba(28, 25, 23, 0.06);
  --table-hover: #fafaf9;
  --input-bg: #ffffff;
  --input-border: #d6d3d1;

  --accent-primary: #be123c;
  --accent-secondary: #dc2626;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --result-color: #b91c1c;
  --result-gradient: linear-gradient(145deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  --ball-shadow: 0 3px 10px rgba(185, 28, 28, 0.26);
  --ball-highlight: rgba(255, 255, 255, 0.42);

  --hot-color: #b91c1c;
  --cold-color: #0369a1;
  --big-color: #b45309;
  --small-color: #1d4ed8;
  --success: #047857;
  --warning: #b91c1c;
  --danger: #b91c1c;
  --danger-text: #b91c1c;
  --extreme-max-text: #b91c1c;
  --extreme-min-text: #1d4ed8;
  --info-bg: #f0f9ff;
  --info-border: #0369a1;
  --warn-bg: #fffbeb;
  --warn-text: #92400e;
  --interval-purple: #6d28d9;
  --shape-leopard: #be185d;

  --transition-ui: 0.2s ease;
  --font-display: 'Barlow Semi Condensed', 'Microsoft YaHei', sans-serif;
  --radius-card: 12px;
  --radius-ctl: 8px;
}

[data-mode='dark'] {
  --bg-gradient-start: #09090b;
  --bg-gradient-end: #0f0f0f;
  --card-bg: #18181b;
  --text-primary: #fafaf9;
  --text-secondary: #a8a29e;
  --border-color: #3f3f46;
  --shadow: rgba(0, 0, 0, 0.5);
  --table-hover: #27272a;
  --input-bg: #27272a;
  --input-border: #52525b;

  --accent-primary: #dc2626;
  --accent-secondary: #ef4444;
  --accent-gradient: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
  --result-color: #ef4444;
  --result-gradient: linear-gradient(145deg, #b91c1c 0%, #dc2626 55%, #991b1b 100%);
  --ball-shadow: 0 3px 14px rgba(220, 38, 38, 0.35);
  --ball-highlight: rgba(255, 255, 255, 0.16);

  --hot-color: #ef4444;
  --cold-color: #38bdf8;
  --big-color: #fb923c;
  --small-color: #60a5fa;
  --success: #34d399;
  --warning: #ef4444;
  --danger: #ef4444;
  --danger-text: #fca5a5;
  --extreme-max-text: #fca5a5;
  --extreme-min-text: #93c5fd;
  --info-bg: #1e3a5f;
  --info-border: #38bdf8;
  --warn-bg: #422006;
  --warn-text: #fecaca;
  --interval-purple: #c084fc;
  --shape-leopard: #f9a8d4;
}

/* ---------- 02 基础排版 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg-gradient-start); scroll-behavior: smooth; }

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', sans-serif;
  background: var(--bg-gradient-start);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
  transition: background var(--transition-ui), color var(--transition-ui);
  line-height: 1.55;
}

h1, h2, h3, h4 { line-height: 1.3; }
a { color: inherit; }

.container {
  position: relative;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.loading { color: var(--text-secondary); font-size: 0.9em; padding: 14px 0; }
.text-sm { font-size: 0.85em; }
.text-sm--90 { font-size: 0.9em; }
.text-secondary { color: var(--text-secondary); }
.accent-text { color: var(--accent-primary); }
.fw-bold { font-weight: 700; }
.mb-8 { margin-bottom: 8px; }
.mb-15 { margin-bottom: 15px; }
.mt-8 { margin-top: 8px; }
.ml-15 { margin-left: 15px; }
.section-spacer { margin: 20px 0; }

.status-success { color: var(--success); font-size: 0.85em; }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 0.78em; font-weight: 600;
  color: var(--accent-primary);
  background: rgba(190, 18, 60, 0.08);
  border: 1px solid rgba(190, 18, 60, 0.25);
}

/* ---------- 03 顶部域名栏 ---------- */
.top-bar {
  margin: -20px -20px 20px;
  font-family: -apple-system, 'SF Pro Text', 'Microsoft YaHei', sans-serif;
}
.top-bar-row1 {
  background: #09090b;
  border-bottom: 1px solid rgba(185, 28, 28, 0.12);
}
.top-bar-r1-inner {
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 20px; font-size: 0.72em;
}
.top-bar-notice { color: rgba(148, 163, 184, 0.7); letter-spacing: 0.5px; }
.top-bar-email { color: rgba(148, 163, 184, 0.6); }
.top-bar-email a {
  color: #ef4444; text-decoration: none;
  font-family: 'Consolas', 'SF Mono', monospace;
}
.top-bar-email a:hover { text-decoration: underline; }

.top-bar-row2 {
  background: linear-gradient(90deg, #09090b, #18181b 50%, #09090b);
  border-bottom: 1px solid rgba(185, 28, 28, 0.15);
  position: relative; overflow: hidden;
}
.top-bar-row2::after {
  content: ''; position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(185, 28, 28, 0.05), transparent);
  animation: barSweep 10s linear infinite; pointer-events: none;
}
@keyframes barSweep { to { left: 120%; } }

.top-bar-r2-inner {
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 5px 20px; gap: 6px; flex-wrap: wrap;
}
.top-bar-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.top-bar-tag {
  font-size: 0.62em; font-weight: 600; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 3px; margin-right: 2px; flex-shrink: 0;
}
.top-bar-tag.vip {
  color: #ef4444; background: rgba(185, 28, 28, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.35);
}
.top-bar-tag.backup {
  color: rgba(148, 163, 184, 0.8); background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
}
.tb-link {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  text-decoration: none; font-size: 0.7em; font-weight: 500;
  font-family: 'Consolas', 'SF Mono', monospace; letter-spacing: 0.2px;
  white-space: nowrap; border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.tb-link.vip { color: #ef4444; }
.tb-link.vip:hover { color: #fff; background: rgba(185, 28, 28, 0.2); border-color: rgba(185, 28, 28, 0.35); }
.tb-link.net { color: #6ee7b7; }
.tb-link.net:hover { color: #fff; background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); }
.tb-link.com { color: #ef4444; }
.tb-link.com:hover { color: #fff; background: rgba(220, 38, 38, 0.15); border-color: rgba(220, 38, 38, 0.3); }
.tb-link.active {
  color: #fff !important;
  background: var(--accent-gradient) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.35);
  pointer-events: none;
}
.tb-sep { width: 1px; height: 14px; background: rgba(148, 163, 184, 0.25); margin: 0 4px; }
.top-bar-mobile-ticker { display: none; }

/* ---------- 04 头部 ---------- */
header.site-header {
  position: relative;
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px var(--shadow);
  margin-bottom: 20px;
  text-align: center;
  transition: background var(--transition-ui), border-color var(--transition-ui);
}
header.site-header h1 {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--result-color) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.5em; font-weight: 700; margin-bottom: 10px;
}
header.site-header .subtitle {
  color: var(--text-secondary); font-size: 1.02em;
  max-width: 900px; margin: 0 auto;
}
.theme-toggle {
  position: absolute; top: 20px; right: 20px;
  background: var(--accent-gradient); border: none; color: #fff;
  padding: 10px 20px; border-radius: 20px; cursor: pointer;
  font-size: 14px; line-height: 1.3; max-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.28);
  transition: box-shadow var(--transition-ui), filter var(--transition-ui);
}
.theme-toggle:hover { box-shadow: 0 6px 18px rgba(185, 28, 28, 0.35); filter: brightness(1.05); }
.theme-icon { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; }
.theme-icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
[data-mode='light'] .theme-icon-sun { display: none; }
[data-mode='dark'] .theme-icon-moon { display: none; }

/* ---------- 05 最新开奖卡片 ---------- */
.latest-draw-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow), 0 8px 24px rgba(28, 25, 23, 0.04), 0 4px 16px rgba(185, 28, 28, 0.04);
  margin-bottom: 20px;
  transition: background var(--transition-ui), border-color var(--transition-ui);
}
.latest-draw-layout {
  display: grid; grid-template-columns: 1fr 400px;
  gap: 30px; align-items: start;
}
.latest-draw-title { font-size: 1.2em; color: var(--text-secondary); margin-bottom: 18px; }
.latest-draw-period { text-align: center; }
.draw-period-label { color: var(--text-secondary); font-size: 0.9em; margin-bottom: 5px; }
.latest-draw-period .stat-value { font-size: 2em; font-weight: 700; color: var(--accent-primary); margin: 10px 0 4px; }
.latest-draw-result-row {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; margin-top: 22px; flex-wrap: wrap;
}
.latest-three-nums-wrap { display: inline-flex; gap: 18px; }
.latest-draw-equal { font-size: 2em; color: var(--result-color); }
#latestResult {
  font-family: var(--font-display); font-size: 4em; font-weight: 800;
  letter-spacing: 0.02em; color: var(--result-color);
  text-shadow: 0 2px 12px rgba(185, 28, 28, 0.18);
}
.latest-draw-meta {
  display: flex; justify-content: center; gap: 26px;
  margin-top: 18px; color: var(--text-secondary); font-size: 0.9em;
}
.latest-draw-meta strong { color: var(--accent-primary); font-weight: 700; }

.countdown-box {
  padding: 12px; margin-bottom: 15px;
  background: var(--accent-gradient); color: #fff;
  border-radius: var(--radius-ctl); text-align: center;
}
.countdown-label { font-size: 0.85em; opacity: 0.9; margin-bottom: 5px; }
#countdown { font-family: var(--font-display); font-size: 1.9em; font-weight: 700; letter-spacing: 0.04em; }
.countdown-info { font-size: 0.75em; opacity: 0.85; margin-top: 5px; }

.sidebar-section-title {
  font-size: 0.85em; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 600;
}
.recent-five-wrap { max-height: 320px; overflow-y: auto; font-size: 0.9em; }
.recent-five-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; margin-bottom: 6px;
  background: var(--table-hover);
  border-radius: 6px; border-left: 3px solid var(--border-color);
}
.recent-five-item--first { background: var(--result-gradient); border-left-color: var(--result-color); }
.recent-five-item--first .recent-five-draw,
.recent-five-item--first .recent-five-result,
.recent-five-item--first .recent-five-num { color: #fff; }
.recent-five-item--second { border-left-color: var(--result-color); }
.recent-five-item--second .recent-five-result { color: var(--result-color); }
.recent-five-nums { display: inline-flex; gap: 5px; }
.recent-five-num {
  display: inline-block; width: 20px; height: 20px; line-height: 20px;
  text-align: center; border-radius: 50%;
  background: var(--result-gradient); color: #fff;
  font-size: 0.75em; font-weight: 700;
}
.recent-five-item--first .recent-five-num {
  background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.45);
}
.recent-five-result { font-weight: 700; }

.draw-footer-bar {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--border-color);
}
.visitor-stats-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px; margin-top: 4px;
}
.vs-card {
  position: relative; padding: 10px 6px 8px; border-radius: 8px; text-align: center;
  background: var(--table-hover); border: 1px solid var(--border-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vs-card:hover { border-color: var(--accent-primary); box-shadow: 0 2px 12px rgba(185, 28, 28, 0.1); }
.vs-card.vs-live {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.06), rgba(234, 88, 12, 0.06));
}
.vs-val {
  font-size: 1.3em; font-weight: 700;
  font-family: 'Consolas', 'SF Mono', monospace; line-height: 1.2;
}
.vs-card.vs-live .vs-val { color: var(--accent-primary); }
.vs-label { font-size: 0.7em; color: var(--text-secondary); letter-spacing: 0.3px; }

/* ---------- 06 标签导航 ---------- */
nav.tabs {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  padding: 10px; margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 10px;
  box-shadow: 0 5px 15px var(--shadow);
  transition: background var(--transition-ui);
}
.tab-button {
  flex: 1 1 auto;
  padding: 15px;
  border: 1px solid var(--border-color);
  background: var(--table-hover);
  border-radius: var(--radius-ctl);
  cursor: pointer; font-size: 1em; font-weight: 500;
  color: var(--text-primary); font-family: inherit;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: background var(--transition-ui), box-shadow var(--transition-ui), border-color var(--transition-ui);
}
.tab-button:hover { background: var(--border-color); box-shadow: 0 4px 12px rgba(185, 28, 28, 0.18); }
.tab-button.active {
  background: var(--accent-gradient); color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(185, 28, 28, 0.35);
}
.tab-button.nav-ai-plan {
  position: relative; flex-grow: 1.25;
  color: #fff7ed; font-weight: 800; white-space: nowrap;
  border-color: rgba(248, 113, 22, 0.85);
  background: linear-gradient(135deg, #b91c1c 0%, #c2410c 52%, #92400e 100%);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.32);
}
.tab-button.nav-ai-plan::after {
  content: 'HOT'; display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 18px; margin-left: 8px; padding: 0 6px;
  border-radius: 999px; color: #7f1d1d; background: #fff7ed;
  font-size: 0.68em; font-weight: 900; line-height: 1;
}
.tab-button.nav-new {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  color: #0f172a; font-weight: 800;
  border-color: rgba(14, 165, 233, 0.42);
  background: linear-gradient(180deg, #f8fdff 0%, #eef9ff 100%);
  box-shadow: 0 5px 16px rgba(14, 165, 233, 0.16);
}
.tab-button.nav-new::after {
  content: 'NEW'; display: inline-flex; align-items: center; justify-content: center;
  height: 18px; min-width: 32px; padding: 0 6px; border-radius: 999px;
  color: #fff; background: linear-gradient(135deg, #0369a1 0%, #047857 100%);
  font-size: 0.66em; font-weight: 900; line-height: 1;
}
.tab-button.nav-new:hover, .tab-button.nav-new.active {
  color: #fff; border-color: rgba(34, 197, 94, 0.82);
  background: linear-gradient(135deg, #075985 0%, #0e7490 44%, #047857 100%);
}
[data-mode='dark'] .tab-button.nav-new {
  color: #e0f2fe; border-color: rgba(34, 211, 238, 0.5);
  background: linear-gradient(180deg, rgba(12, 74, 110, 0.92), rgba(15, 118, 110, 0.78));
}

/* ---------- 07 通用面板 ---------- */
.tab-content {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 30px;
  box-shadow: 0 5px 15px var(--shadow);
  color: var(--text-primary);
}
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tab-content h2 {
  font-size: 1.5em; font-weight: 600;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}
.tab-content h3 { font-size: 1.05em; font-weight: 600; margin-bottom: 12px; }
.section-lead { color: var(--text-secondary); font-size: 0.92em; margin-bottom: 15px; }

.chart-container {
  margin: 20px 0; padding: 20px;
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-ctl);
}
.chart-title { font-weight: 600; margin-bottom: 14px; }

.form-panel { padding: 15px; border-radius: var(--radius-ctl); margin-bottom: 15px; }
.form-panel--muted { background: var(--table-hover); }
.form-panel--info { background: var(--info-bg); border: 1px solid var(--info-border); }
.form-panel--warn { background: var(--warn-bg); padding: 12px; border-radius: 6px; color: var(--warn-text); }
.form-panel h3 { margin: 0 0 12px; color: var(--accent-primary); }

.skeleton {
  border-radius: var(--radius-ctl);
  border: 1px dashed var(--border-color);
  background: var(--table-hover);
  padding: 26px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9em;
}
.skeleton b { color: var(--accent-primary); }

/* ---------- 08 表格 ---------- */
.table-container { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
thead th {
  background: var(--table-hover);
  color: var(--text-secondary);
  font-weight: 700; font-size: 0.85em;
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}
tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Courier New', monospace;
  color: var(--text-primary);
  white-space: nowrap;
}
tbody tr:hover { background: var(--table-hover); }
.cell-issue { font-weight: 700; color: var(--accent-primary); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.78em; font-weight: 700; font-family: inherit;
}
.tag-big { color: #b45309; background: rgba(180, 83, 9, 0.1); }
.tag-small { color: #1d4ed8; background: rgba(29, 78, 216, 0.1); }
.tag-odd { color: #be185d; background: rgba(190, 24, 93, 0.1); }
.tag-even { color: #047857; background: rgba(4, 120, 87, 0.1); }
.tag-shape { color: #6d28d9; background: rgba(109, 40, 217, 0.1); }
[data-mode='dark'] .tag-big { color: #fb923c; background: rgba(251, 146, 60, 0.14); }
[data-mode='dark'] .tag-small { color: #60a5fa; background: rgba(96, 165, 250, 0.14); }
[data-mode='dark'] .tag-odd { color: #f9a8d4; background: rgba(249, 168, 212, 0.14); }
[data-mode='dark'] .tag-even { color: #34d399; background: rgba(52, 211, 153, 0.14); }
[data-mode='dark'] .tag-shape { color: #c084fc; background: rgba(192, 132, 252, 0.14); }

/* ---------- 09 表单控件 ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85em; color: var(--text-secondary); font-weight: 600; }
.form-group--narrow { max-width: 200px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-row--center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

input[type='text'], input[type='number'], input[type='password'], input[type='email'], input[type='url'], input[type='tel'], input[type='search'], select {
  font-family: inherit; font-size: 0.95em;
  padding: 8px 10px;
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.12);
}
.input-narrow { max-width: 90px; }
input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--accent-primary); cursor: pointer; }
label.form-inline-group { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9em; }
.radio-option { cursor: pointer; }
.label-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85em; cursor: pointer; }

.btn {
  font-family: inherit; font-size: 0.92em; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-ctl);
  border: 1px solid var(--border-color);
  background: var(--table-hover); color: var(--text-primary);
  cursor: pointer; transition: filter 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { filter: brightness(0.97); box-shadow: 0 4px 12px rgba(185, 28, 28, 0.12); }
.btn-primary { background: var(--accent-gradient); color: #fff; border-color: var(--accent-primary); }
.btn-purple { background: var(--interval-purple); color: #fff; border-color: transparent; }
.btn-blue { background: var(--cold-color); color: #fff; border-color: transparent; }

/* ---------- 10 号码与徽标 ---------- */
.num-badge {
  display: inline-block; width: 28px; height: 28px; line-height: 28px;
  text-align: center; border-radius: 50%;
  background: var(--result-gradient); color: #fff;
  font-weight: 700; font-size: 0.9em;
  box-shadow: var(--ball-shadow), inset 0 -2px 4px rgba(0, 0, 0, 0.15), inset 0 1px 0 var(--ball-highlight);
}
.num-badge-lg { width: 88px; height: 88px; line-height: 88px; font-size: 2em; }

.number-buttons-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.number-btn {
  width: 44px; height: 40px; border-radius: 8px;
  border: 1px solid var(--border-color); background: var(--table-hover);
  color: var(--text-primary); font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all 0.2s;
}
.number-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.number-btn.active { background: var(--accent-gradient); color: #fff; border-color: var(--accent-primary); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.82em; color: var(--text-secondary); }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.legend-dot--danger { background: var(--danger); }
.legend-dot--success { background: var(--success); }
.legend-dot--primary { background: var(--accent-primary); }
.legend-dot--accent { background: var(--interval-purple); }
.legend-dot--info { background: var(--info-border); }

/* ---------- 11 走势 / 图表 ---------- */
.trend-toolbar {
  display: flex; gap: 16px; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  padding: 14px; border-radius: var(--radius-ctl);
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}
.trend-period-radio { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85em; margin-right: 10px; cursor: pointer; }
.trend-dimension-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.trend-dimension {
  padding: 6px 12px; border-radius: 999px; font-family: inherit; font-size: 0.82em;
  border: 1px solid var(--border-color); background: var(--card-bg);
  color: var(--text-secondary); cursor: pointer;
}
.trend-dimension.active { background: var(--accent-gradient); color: #fff; border-color: var(--accent-primary); }
.trend-view-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.trend-view-tab {
  padding: 7px 14px; border-radius: 6px; font-family: inherit; font-size: 0.85em;
  border: 1px solid var(--border-color); background: var(--table-hover);
  color: var(--text-primary); cursor: pointer;
}
.trend-view-tab.active { background: var(--accent-gradient); color: #fff; border-color: var(--accent-primary); }

.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; align-items: center; font-size: 0.85em; }
.bar-track { height: 18px; border-radius: 999px; background: var(--border-color); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent-gradient); }
.bar-fill.is-cold { background: linear-gradient(90deg, #0369a1, #38bdf8); }
.bar-val { text-align: right; font-family: 'Consolas', monospace; color: var(--text-secondary); }

.matrix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.matrix-cell {
  height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-color); border-radius: 4px;
  font-size: 0.8em; font-family: 'Consolas', monospace;
  color: var(--text-secondary); background: var(--card-bg);
}
.matrix-cell.hit { background: var(--accent-gradient); color: #fff; border-color: var(--accent-primary); font-weight: 700; }
.matrix-cell.hot { color: var(--hot-color); font-weight: 700; }
.matrix-cell.cold { color: var(--cold-color); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
  padding: 14px; border-radius: var(--radius-ctl);
  background: var(--table-hover); border: 1px solid var(--border-color);
}
.stat-card .k { font-size: 0.78em; color: var(--text-secondary); }
.stat-card .v { font-size: 1.5em; font-weight: 700; color: var(--accent-primary); font-family: var(--font-display); }

/* ---------- 12 API 卡片 ---------- */
.public-api-hero {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 20px; border-radius: var(--radius-ctl);
  background: var(--accent-gradient); color: #fff; margin-bottom: 18px;
}
.public-api-kicker { font-size: 0.75em; letter-spacing: 0.14em; opacity: 0.85; }
.public-api-hero h2 { border: 0; padding: 0; margin: 8px 0 10px; font-size: 1.6em; color: #fff; }
.public-api-hero p { font-size: 0.9em; opacity: 0.92; max-width: 640px; }
.public-api-status {
  align-self: center; text-align: center; font-size: 0.8em;
  background: rgba(0, 0, 0, 0.22); padding: 12px 18px; border-radius: var(--radius-ctl);
}
.public-api-status strong { display: block; font-size: 1.5em; font-family: var(--font-display); }
.public-api-connect {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.public-api-connect > div {
  padding: 12px; border-radius: var(--radius-ctl);
  border: 1px solid var(--border-color); background: var(--table-hover);
}
.public-api-label { display: block; font-size: 0.75em; color: var(--text-secondary); margin-bottom: 4px; }
.public-api-connect code { font-family: 'Consolas', monospace; font-size: 0.85em; color: var(--accent-primary); }
.public-api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.api-card {
  padding: 14px; border-radius: var(--radius-ctl);
  border: 1px solid var(--border-color); background: var(--card-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.api-card:hover { border-color: var(--accent-primary); box-shadow: 0 4px 16px rgba(185, 28, 28, 0.08); }
.api-card .method {
  display: inline-block; font-size: 0.7em; font-weight: 800; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px; color: #fff; background: var(--success); margin-right: 6px;
}
.api-card .path { font-family: 'Consolas', monospace; font-size: 0.85em; color: var(--accent-primary); }
.api-card .desc { font-size: 0.82em; color: var(--text-secondary); margin-top: 8px; }
.public-api-flow ol { padding-left: 20px; font-size: 0.9em; color: var(--text-secondary); }
.public-api-flow li { margin: 6px 0; }

/* ---------- 13 倍投计算器 ---------- */
.bet-calc-header { margin-bottom: 20px; }
.bet-calc-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 4px; }
.bet-calc-subtitle { color: var(--text-secondary); font-size: 0.9em; }
.bet-calc-formula-intro { color: var(--text-secondary); font-size: 0.82em; margin-top: 6px; }
.bet-calc-panel {
  margin-bottom: 20px; padding: 16px 18px;
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: var(--radius-ctl);
}
.bet-calc-panel-title {
  margin: 0 0 14px; font-size: 0.95rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.bet-calc-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.bet-calc-guide-btn {
  text-align: left; padding: 12px 14px; border-radius: var(--radius-ctl);
  border: 1px solid var(--border-color); background: var(--table-hover);
  color: var(--text-primary); font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; transition: all 0.2s;
}
.bet-calc-guide-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.bet-calc-guide-btn span { font-weight: 700; font-size: 0.95em; }
.bet-calc-guide-btn small { color: var(--text-secondary); font-size: 0.78em; }
.bet-calc-risk { margin-top: 12px; font-size: 0.85em; color: var(--text-secondary); }
.bet-calc-risk strong { color: var(--accent-primary); }
.bet-calc-params-table { width: 100%; font-size: 0.88em; }
.bet-calc-params-table th {
  text-align: right; padding: 6px 10px 6px 0; font-weight: 500;
  color: var(--text-secondary); white-space: nowrap; background: none;
  border: 0; width: 1%;
}
.bet-calc-params-table td { padding: 6px 8px; width: 1%; border: 0; }
.bet-calc-params-table td input { width: 100%; min-width: 72px; max-width: 120px; padding: 6px 8px; }
.bet-calc-schemes { display: flex; flex-wrap: wrap; gap: 8px; }
.bet-calc-schemes .tab-button { flex: 1 1 calc(25% - 8px); padding: 10px; font-size: 0.88em; }
.bet-calc-display {
  padding: 16px; border-radius: var(--radius-ctl);
  background: var(--table-hover); border: 1px solid var(--border-color);
  font-size: 0.9em;
}
.bet-calc-output { margin-top: 12px; }
.bet-calc-dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 0.88em; }
.bet-calc-dl dt { color: var(--text-secondary); font-weight: 600; }
.bet-calc-formula {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  background: var(--table-hover); border: 1px solid var(--border-color);
  font-family: 'Consolas', monospace; font-size: 0.85em; color: var(--accent-primary);
}

/* ---------- 14 页脚 ---------- */
.footer-wrap {
  text-align: center; margin-top: 30px; padding: 30px 20px;
  color: var(--text-secondary); font-size: 0.9em;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--border-color);
  border-radius: var(--radius-card);
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-block { margin-bottom: 20px; }
.footer-block h3 { color: var(--text-primary); font-size: 1em; margin-bottom: 10px; }
.footer-group { margin-bottom: 14px; }
.footer-group-label { font-size: 0.8em; color: var(--text-secondary); margin-bottom: 6px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.footer-link {
  color: var(--accent-primary); text-decoration: none;
  padding: 6px 12px; border-radius: 6px;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.08), rgba(220, 38, 38, 0.06));
  border: 1px solid var(--accent-primary);
  transition: filter 0.2s;
}
.footer-link:hover { filter: brightness(1.05); }
.footer-link--success {
  color: var(--success); background: rgba(4, 120, 87, 0.08); border-color: rgba(4, 120, 87, 0.3);
}
.footer-link--warn {
  color: var(--warning); background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3);
}
.footer-copy { font-size: 0.85em; margin-bottom: 12px; }
.footer-meta-item { margin: 0 8px; }
.footer-seo {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.78em; line-height: 2; color: var(--text-secondary);
}
.footer-seo-link { color: var(--text-secondary); text-decoration: none; margin: 0 4px; }
.footer-seo-link:hover { color: var(--accent-primary); }

/* ---------- 15 悬浮组件 ---------- */
.bet-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 999;
  width: 280px; max-height: 75vh; overflow-y: auto;
  background: var(--card-bg);
  border: 2px solid var(--result-color);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 40px var(--shadow);
  transition: all 0.3s;
}
.bet-panel.minimized { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; }
.bet-panel.minimized .bet-panel-content { display: none; }
.bet-panel.minimized .bet-panel-header {
  width: 60px; height: 60px; border-radius: 50%;
  padding: 0; justify-content: center;
}
.bet-panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; cursor: pointer;
  background: var(--result-gradient); color: #fff;
  border-radius: 10px 10px 0 0; font-size: 0.95em;
}
.bet-panel-content { padding: 12px; }
.bet-panel-desc { font-size: 0.85em; color: var(--text-secondary); margin-bottom: 10px; }
.bet-numbers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bet-number-btn {
  width: 32px; height: 32px; border-radius: 6px; font-family: inherit; font-size: 0.85em;
  border: 1px solid var(--border-color); background: var(--table-hover);
  color: var(--text-primary); cursor: pointer; transition: all 0.15s;
}
.bet-number-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.bet-number-btn.selected { background: var(--accent-gradient); color: #fff; border-color: var(--accent-primary); }
.bet-selected-box {
  font-size: 0.82em; color: var(--text-secondary);
  padding: 8px; border-radius: 6px; background: var(--table-hover);
  margin-bottom: 8px; min-height: 34px;
}
.bet-selected-box .accent { color: var(--accent-primary); font-weight: 700; }

/* v4.4：实时聊天（登录可用） */
.chat-fab {
  position: fixed; right: 18px; bottom: 96px; z-index: 998;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3em; cursor: pointer;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(185, 28, 28, 0.42); }
.chat-fab.open { transform: scale(.92); }
.chat-dot {
  position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: #fbbf24; border: 2px solid var(--card-bg);
}
.chat-panel[hidden], .chat-gate[hidden], .chat-foot[hidden], .chat-dot[hidden] { display: none; }
.chat-panel {
  position: fixed; right: 18px; bottom: 156px; z-index: 999;
  width: 340px; max-width: calc(100vw - 24px); height: 460px; max-height: 72vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card-bg); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: 12px;
  box-shadow: 0 18px 50px var(--shadow);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--border-color);
  background: var(--table-hover);
}
.chat-head-txt { display: flex; flex-direction: column; line-height: 1.3; }
.chat-head-txt b { font-size: .95em; }
.chat-head-txt span { font-size: .72em; color: var(--text-secondary); }
.chat-x { border: 0; background: transparent; color: var(--text-secondary); font-size: 1.3em; cursor: pointer; line-height: 1; padding: 2px 6px; }
.chat-x:hover { color: var(--accent-primary); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-empty { margin: auto; color: var(--text-secondary); font-size: .84em; text-align: center; padding: 20px 6px; }
.chat-item { display: flex; flex-direction: column; gap: 3px; max-width: 88%; }
.chat-item.mine { align-self: flex-end; align-items: flex-end; }
.chat-meta { display: flex; gap: 6px; font-size: .68em; color: var(--text-secondary); }
.chat-meta b { font-weight: 600; }
.chat-text {
  padding: 7px 10px; border-radius: 10px; font-size: .84em; line-height: 1.45;
  background: var(--table-hover); border: 1px solid var(--border-color); word-break: break-word;
}
.chat-item.mine .chat-text { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.chat-item.chat-share { max-width: 100%; align-self: stretch; }
.chat-share-box {
  border: 1px solid var(--border-color); border-radius: 10px; padding: 10px;
  background: var(--table-hover); display: flex; flex-direction: column; gap: 4px;
}
.chat-share-title { font-weight: 700; font-size: .85em; color: var(--accent-primary); }
.chat-share-row { font-size: .76em; color: var(--text-secondary); line-height: 1.45; }
.chat-share-btn { margin-top: 6px; align-self: flex-start; }
.chat-gate { padding: 14px; text-align: center; border-top: 1px solid var(--border-color); }
.chat-gate p { margin: 0 0 10px; font-size: .82em; color: var(--text-secondary); }
.chat-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border-color); }
.chat-foot input[type="text"] { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--table-hover); color: var(--text-primary); font-size: .84em; }
.chat-img-btn {
  flex: none; width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border-color); background: var(--table-hover);
  font-size: 1em; line-height: 1; padding: 0; color: var(--text-primary);
}
.chat-img-btn:hover { border-color: var(--accent-primary); }
.chat-img-wrap { display: inline-block; max-width: 200px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); cursor: zoom-in; }
.chat-img { display: block; width: 100%; max-width: 200px; max-height: 200px; object-fit: cover; }
.chat-viewer { position: fixed; inset: 0; z-index: 1300; background: rgba(0, 0, 0, .82); display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 20px; }
.chat-viewer[hidden] { display: none; }
.chat-viewer img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.chat-foot input:focus { outline: none; border-color: var(--accent-primary); }
@media (max-width: 600px) {
  .chat-panel { right: 8px; left: 8px; width: auto; bottom: 148px; height: 68vh; }
  .chat-fab { right: 12px; bottom: 88px; width: 44px; height: 44px; }
}
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  z-index: 1200; padding: 10px 20px; border-radius: 999px;
  background: rgba(24, 24, 27, 0.94); color: #fff; font-size: 0.85em;
  opacity: 0; pointer-events: none; transition: all 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 16 响应式 ---------- */
@media (max-width: 1200px) {
  .latest-draw-layout { grid-template-columns: 1fr 320px; gap: 20px; }
}
@media (max-width: 900px) {
  .latest-draw-layout { grid-template-columns: 1fr; }
  .visitor-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .bet-calc-schemes .tab-button { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 768px) {
  body { padding: 10px; }
  .top-bar { margin: -10px -10px 14px; }
  .top-bar-row1, .top-bar-row2 { display: none; }
  .top-bar-mobile-ticker {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 7px 12px; background: linear-gradient(90deg, #070b19, #0e1230 50%, #070b19);
    border-bottom: 1px solid rgba(185, 28, 28, 0.12); overflow: hidden;
  }
  .ticker-item {
    font-family: 'Consolas', monospace; font-size: 0.78em; font-weight: 600;
    letter-spacing: 0.5px; text-decoration: none; white-space: nowrap; color: #a5b4fc;
  }
  header.site-header { padding: 20px; }
  header.site-header h1 { font-size: 1.6em; }
  .theme-toggle { position: static; margin: 0 auto 14px; }
  .latest-draw-card { padding: 18px; }
  .num-badge-lg { width: 54px; height: 54px; line-height: 54px; font-size: 1.4em; }
  #latestResult { font-size: 2.6em; }
  .tab-content { padding: 18px; }
  .tab-content h2 { font-size: 1.25em; }
  .bet-panel { width: calc(100% - 24px); max-width: 340px; }
  .bet-calc-params-table, .bet-calc-params-table tbody,
  .bet-calc-params-table tr, .bet-calc-params-table th, .bet-calc-params-table td { display: block; width: 100%; }
  .bet-calc-params-table th { text-align: left; padding: 4px 0; }
  .bet-calc-params-table td { padding: 0 0 8px; }
  .bet-calc-params-table td input { max-width: none; }
  .bet-calc-dl { grid-template-columns: 1fr; gap: 4px 0; }
}
@media (max-width: 560px) {
  .visitor-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .latest-draw-result-row { gap: 10px; }
  .latest-three-nums-wrap { gap: 10px; }
  #latestResult { font-size: 2.2em; }
  .tab-button { padding: 11px 12px; font-size: 0.85em; min-width: 70px; }
  .tab-content h2 { font-size: 1.15em; }
  .number-btn { width: 38px; height: 36px; }
}

/* ==========================================================================
   附：v1.3 新增（广告位横幅 / 走势图 / 期数选择）
   ========================================================================== */

/* ---------- 广告位横幅（占位与原统计卡同宽同高） ---------- */
.ad-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 62px;
  padding: 0 16px;
  border-radius: 8px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(190, 18, 60, 0.07), rgba(234, 88, 12, 0.07));
  border: 1px dashed rgba(190, 18, 60, 0.45);
  color: var(--accent-primary);
  font-size: 0.92em;
  font-weight: 700;
  overflow: hidden;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ad-banner:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-style: solid;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(185, 28, 28, 0.25);
}
.ad-banner-tag {
  font-size: 0.72em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(190, 18, 60, 0.12);
  border: 1px solid rgba(190, 18, 60, 0.3);
  white-space: nowrap;
}
.ad-banner:hover .ad-banner-tag {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.ad-banner-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-banner-cta { white-space: nowrap; font-size: 0.85em; opacity: 0.85; }

[data-mode='dark'] .ad-banner {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(234, 88, 12, 0.1));
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
[data-mode='dark'] .ad-banner-tag {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
}

@media (max-width: 640px) {
  .ad-banner { height: 56px; gap: 8px; font-size: 0.82em; padding: 0 10px; }
  .ad-banner-cta { display: none; }
}

/* ---------- 走势图 ---------- */
.trend-page-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tp-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.9em;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s;
}
.tp-radio input { display: none; }
.tp-radio:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.tp-radio.is-active {
  border-color: #0ea5e9;
  color: #0ea5e9;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14), inset 0 0 0 1px rgba(14, 165, 233, 0.35);
}
[data-mode='dark'] .tp-radio.is-active {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(14, 165, 233, 0.1);
}

.trend-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.tl-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.tl-odd { background: #dc2626; }
.tl-even { background: #2563eb; }
.tl-mid { background: #7c3aed; }
.tl-edge { background: #ea580c; }
.tl-big { background: #dc2626; }
.tl-small { background: #16a34a; }

.trend-scroll {
  position: relative;
  overflow: auto;
  max-height: min(76vh, 880px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  -webkit-overflow-scrolling: touch;
}
.trend-canvas { position: relative; width: max-content; min-width: 100%; }

table.trend-grid {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: max-content;
  font-size: 12px;
}
.trend-grid th,
.trend-grid td {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
  padding: 0;
  height: 30px;
  font-family: 'Consolas', 'SF Mono', monospace;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--card-bg);
  white-space: nowrap;
}
.trend-grid th { font-weight: 600; }
.trend-grid td:last-child,
.trend-grid th:last-child { border-right: 0; }

/* 表头 4 行，逐行吸顶 */
.trend-grid thead th {
  position: sticky;
  z-index: 5;
  height: 28px;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--table-hover);
  border-bottom: 1px solid var(--border-color);
}
.trend-grid tr.th1 th { top: 0; }
.trend-grid tr.th2 th { top: 28px; }
.trend-grid tr.th3 th { top: 56px; }
.trend-grid tr.th4 th { top: 84px; }
.trend-grid tr.th4 th { color: var(--text-primary); font-weight: 700; }

/* 期号列左侧吸顶 */
.trend-grid th.tg-issue {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 88px;
  min-width: 88px;
  background: var(--table-hover);
  font-weight: 600;
  color: var(--accent-primary);
}
.trend-grid thead th.th-corner { z-index: 8; }
.trend-grid tbody th.tg-issue { background: var(--card-bg); }

/* 列宽 */
.trend-grid th.tg-h,
.trend-grid td.tg-cell { width: 26px; min-width: 26px; }
.trend-grid th.tg-attr-head,
.trend-grid td.tg-col-oe,
.trend-grid td.tg-col-mb,
.trend-grid td.tg-col-bs { width: 26px; min-width: 26px; }
.trend-grid th.tg-side,
.trend-grid td.tg-side { width: 42px; min-width: 42px; }

/* 两侧高亮区 */
.trend-grid .zone { background: rgba(16, 185, 129, 0.055); }
[data-mode='dark'] .trend-grid .zone { background: rgba(16, 185, 129, 0.09); }
.trend-grid thead th.zone { background: rgba(16, 185, 129, 0.11); }
[data-mode='dark'] .trend-grid thead th.zone { background: rgba(16, 185, 129, 0.15); }

/* 号码球 */
.tg-ball {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
}
.tg-ball.odd { background: #dc2626; box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35); }
.tg-ball.even { background: #2563eb; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35); }

/* 属性小圆点 */
.tg-attr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.tg-attr.odd { background: #dc2626; }
.tg-attr.even { background: #2563eb; }
.tg-attr.mid { background: #7c3aed; }
.tg-attr.edge { background: #ea580c; }
.tg-attr.big { background: #dc2626; }
.tg-attr.small { background: #16a34a; }

/* 连号折线 */
svg.trend-lines {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .tp-radio { min-width: 72px; padding: 8px 12px; font-size: 0.82em; }
  .trend-grid th.tg-issue,
  .trend-grid tbody th.tg-issue { width: 74px; min-width: 74px; }
  .trend-scroll { max-height: 70vh; }
}

/* ==========================================================================
   附：v1.4 新增（右下角新开奖弹窗 / 版本提示条）
   ========================================================================== */

/* 新开奖右下角弹窗（纯色，参考图1） */
.draw-popup {
  position: fixed;
  right: 18px;
  bottom: 172px;
  z-index: 1100;
  width: 322px;
  padding: 16px 18px 14px;
  background: #b91c1c;
  color: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  cursor: pointer;
  user-select: none;
}
.draw-popup.show { opacity: 1; transform: none; }
.draw-popup[hidden] { display: none; }

.dp-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.dp-close:hover { color: #fff; }

.dp-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  margin-bottom: 10px;
}
.dp-issue {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
.dp-balls { display: flex; justify-content: center; gap: 14px; margin-bottom: 14px; }
.dp-ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: transparent;
}
.dp-sum {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}
.dp-foot { font-size: 12px; color: rgba(255, 255, 255, 0.72); }

@media (max-width: 768px) {
  .draw-popup { right: 10px; left: 10px; width: auto; padding: 14px 16px 12px; }
  .dp-ball { width: 30px; height: 30px; font-size: 14px; }
  .dp-sum { font-size: 28px; }
}

/* ---------- 页脚三栏：左右各 3 个广告位 ---------- */
.footer-ad-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 460px) 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}
.footer-ad-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-ad-slot {
  flex: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(190, 18, 60, 0.5);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--accent-primary);
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.footer-ad-slot:hover {
  background: rgba(190, 18, 60, 0.06);
  border-color: var(--accent-primary);
  box-shadow: 0 6px 18px rgba(190, 18, 60, 0.12);
}
[data-mode='dark'] .footer-ad-slot {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
[data-mode='dark'] .footer-ad-slot:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.85);
}

@media (max-width: 900px) {
  .footer-ad-layout { grid-template-columns: 1fr; }
  .footer-ad-col { display: none; }
}

/* 版本不一致提示条 */
.build-warn {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2000;
  background: #7f1d1d;
  color: #fecaca;
  font-size: 12.5px;
  line-height: 1.55;
  padding: 10px 14px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
}
.build-warn[hidden] { display: none; }

/* ==========================================================================
   附：v1.6 新增（算法预测 / 遗漏分析 / 最近开奖粗体）
   ========================================================================== */

/* 最近开奖表格：粗字体 */
#recentTable th,
#recentTable td { font-weight: 700; }
#recentTable td.cell-issue { font-weight: 800; }

/* ---------- 算法预测 ---------- */
.algo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.algo-head h2 { margin: 0; padding: 0; border: 0; }
.algo-type-box { display: flex; align-items: center; gap: 8px; }
.algo-type-box label { font-size: 0.85em; color: var(--text-secondary); }
.algo-type-box select { min-width: 132px; }

.algo-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 16px;
  align-items: start;
}
.algo-list-wrap {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg);
}
.algo-list { max-height: min(72vh, 780px); overflow-y: auto; }

.algo-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}
.algo-item:hover { background: var(--table-hover); }
.algo-item.active {
  background: rgba(190, 18, 60, 0.07);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}
.algo-item .idx {
  color: var(--text-secondary);
  font-family: 'Consolas', monospace;
  font-size: 0.85em;
}
.algo-item .main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.algo-item .pred {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.algo-item .meta {
  display: flex;
  gap: 9px;
  font-size: 0.76em;
  color: var(--text-secondary);
  white-space: nowrap;
}
.algo-item .meta b { color: var(--accent-primary); font-weight: 700; }
.algo-item .meta .win b { color: var(--success); }
.algo-item .rate { color: var(--warning); font-weight: 700; }

.algo-detail {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 16px 18px;
  min-height: 340px;
}
.algo-empty {
  color: var(--text-secondary);
  font-size: 0.9em;
  text-align: center;
  padding: 90px 10px;
}
.algo-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 14px;
}
.algo-title { font-size: 1.05em; font-weight: 700; }
.algo-title .tag-idx { color: var(--accent-primary); }
.algo-next { font-size: 0.82em; color: var(--text-secondary); text-align: right; }
.algo-next b { color: var(--accent-primary); font-weight: 700; }

.algo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.algo-stat {
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
}
.algo-stat .k { font-size: 0.72em; color: var(--text-secondary); margin-bottom: 3px; }
.algo-stat .v {
  font-size: 1.4em;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
}
.algo-stat .s { font-size: 0.72em; color: var(--text-secondary); margin-top: 2px; }

.algo-hist {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.algo-hist table { width: 100%; border-collapse: collapse; font-size: 0.86em; }
.algo-hist thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-hover);
  color: var(--text-secondary);
  font-size: 0.82em;
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
}
.algo-hist td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Consolas', monospace;
}
.algo-hist .hit { color: var(--success); font-weight: 700; }
.algo-hist .miss { color: var(--danger); font-weight: 700; }
.algo-foot-note { margin-top: 10px; font-size: 0.75em; color: var(--text-secondary); }

@media (max-width: 900px) {
  .algo-layout { grid-template-columns: 1fr; }
  .algo-list { max-height: 46vh; }
  .algo-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 遗漏分析 ---------- */
.miss-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.miss-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.miss-label { font-size: 0.82em; color: var(--text-secondary); min-width: 56px; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn {
  font-family: inherit;
  font-size: 0.82em;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.pill-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.pill-btn.is-active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}
.miss-sample { font-size: 0.8em; color: var(--text-secondary); }
.miss-sample b { color: var(--accent-primary); font-weight: 700; }

.miss-table-wrap {
  max-height: 74vh;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 6px;
}
.miss-table { width: 100%; border-collapse: collapse; font-size: 0.86em; }
.miss-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-hover);
  color: var(--text-secondary);
  font-size: 0.82em;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.miss-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Consolas', monospace;
  white-space: nowrap;
}
.miss-table td.item { font-weight: 700; color: var(--text-primary); }
.miss-table td.over { color: var(--danger); font-weight: 800; }
.miss-table tbody tr:hover { background: var(--table-hover); }
.miss-table tr.group-row td {
  background: var(--table-hover);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.86em;
  letter-spacing: 0.02em;
}
.miss-table .muted { color: var(--text-secondary); }

@media (max-width: 768px) {
  .miss-table-wrap { max-height: 66vh; }
  .miss-table td, .miss-table th { padding: 8px 9px; }
}

/* ==========================================================================
   附：v1.7 新增（用户登录 / 算法筛选 / 自定义算法 / 预测弹窗）
   ========================================================================== */

/* ---------- 头部用户区 ---------- */
.user-bar {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  z-index: 2;
}
.user-btn {
  font-family: inherit;
  font-size: 0.95em;
  padding: 7px 14px;
  border-radius: 18px;
  border: 1px solid var(--accent-primary);
  background: rgba(190, 18, 60, 0.06);
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.user-btn:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.user-name { color: var(--text-secondary); }
.user-name b { color: var(--accent-primary); }
.user-logout {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}

/* ---------- 通用弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(9, 9, 11, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-mask[hidden] { display: none; }

/* ---------- 登录 / 注册 ---------- */
.auth-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px 22px 20px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}
.auth-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--table-hover);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.92em;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.auth-label input {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
}
.auth-submit { width: 100%; padding: 11px; margin-top: 4px; }
.auth-msg {
  min-height: 18px;
  margin-top: 10px;
  font-size: 0.8em;
  color: var(--danger);
  text-align: center;
}
.auth-msg.ok { color: var(--success); }
.auth-tip {
  margin-top: 10px;
  font-size: 0.72em;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

/* ---------- 算法筛选 ---------- */
.filter-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
}
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item label { font-size: 0.78em; color: var(--text-secondary); font-weight: 600; }
.filter-item select { min-width: 132px; }
.filter-count { font-size: 0.8em; color: var(--text-secondary); margin-left: auto; }

.filter-table-wrap {
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 4px;
}
table.filter-table { width: 100%; border-collapse: collapse; font-size: 0.86em; }
.filter-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-hover);
  color: var(--text-secondary);
  font-size: 0.82em;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.filter-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Consolas', monospace;
  white-space: nowrap;
}
.filter-table tbody tr:hover { background: var(--table-hover); }
.filter-table .algo-link {
  color: var(--accent-primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline dotted;
}
.filter-table .algo-link:hover { text-decoration: underline; }
.filter-table .hit { color: var(--success); font-weight: 700; }
.filter-table .miss { color: var(--danger); font-weight: 700; }

/* ---------- 自定义算法 ---------- */
.custom-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(190, 18, 60, 0.08);
  border: 1px solid rgba(190, 18, 60, 0.32);
  color: var(--accent-primary);
  font-size: 0.88em;
  margin-bottom: 16px;
}
.custom-warn b { background: var(--accent-primary); color: #fff; padding: 1px 6px; border-radius: 4px; }
.custom-warn .cw-icon { font-size: 1.1em; }
.custom-warn .cw-text { flex: 1; min-width: 220px; }
.cw-btn {
  font-family: inherit;
  font-size: 0.9em;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--accent-primary);
  background: var(--accent-primary);
  color: #fff;
  cursor: pointer;
}
.cw-btn:hover { filter: brightness(1.08); }
.custom-warn.ok {
  background: rgba(4, 120, 87, 0.08);
  border-color: rgba(4, 120, 87, 0.3);
  color: var(--success);
}
.custom-warn.ok b { background: var(--success); }
.custom-warn.ok .cw-btn { border-color: var(--success); background: transparent; color: var(--success); }

.custom-form {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
  background: var(--card-bg);
}
.custom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.custom-formula-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.82em;
  color: var(--text-secondary);
  font-weight: 600;
}
.custom-formula-label textarea {
  font-family: 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.custom-vars { font-size: 0.76em; color: var(--text-secondary); margin-top: 8px; line-height: 1.9; }
.custom-vars code {
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-primary);
  font-family: 'Consolas', monospace;
}

.custom-list { display: flex; flex-direction: column; gap: 10px; }
.custom-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88em;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
}
.custom-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  flex-wrap: wrap;
}
.ci-name { font-weight: 700; margin-bottom: 3px; }
.ci-name .ci-tag {
  font-size: 0.7em;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.ci-formula {
  font-family: 'Consolas', monospace;
  font-size: 0.78em;
  color: var(--text-secondary);
  word-break: break-all;
}
.ci-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ci-actions .btn { padding: 7px 12px; font-size: 0.82em; }

/* ---------- 自定义算法预测弹窗 ---------- */
.pred-box {
  position: relative;
  width: fit-content;
  min-width: min(700px, 94vw);
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px 14px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}
.pred-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.pred-title { font-size: 1.05em; font-weight: 700; }
.pred-formula {
  font-family: 'Consolas', monospace;
  font-size: 0.78em;
  color: var(--text-secondary);
  word-break: break-all;
  max-width: 74vw;
  margin-top: 3px;
}
.pred-close {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}
.pred-close:hover { color: var(--accent-primary); }

.pred-types { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pred-type-btn {
  font-family: inherit;
  font-size: 0.84em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.pred-type-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.pred-type-btn.is-active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.pred-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.pred-stat {
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 9px 12px;
}
.pred-stat .k { font-size: 0.72em; color: var(--text-secondary); margin-bottom: 2px; }
.pred-stat .v {
  font-size: 1.3em;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1.15;
}
.pred-stat .v.accent { color: var(--accent-primary); }
.pred-stat .s { font-size: 0.7em; color: var(--text-secondary); }

.pred-table-wrap {
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 42vh;
}
.pred-table { width: 100%; border-collapse: collapse; font-size: 0.86em; }
.pred-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-hover);
  color: var(--text-secondary);
  font-size: 0.82em;
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.pred-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Consolas', monospace;
  white-space: nowrap;
}
.pred-table .hit { color: var(--success); font-weight: 700; }
.pred-table .miss { color: var(--danger); font-weight: 700; }

.pred-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78em;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.pred-foot .live { color: var(--success); }

@media (max-width: 768px) {
  .user-bar { top: 12px; left: 12px; }
  .custom-grid { grid-template-columns: 1fr; }
  .pred-box { min-width: 94vw; padding: 14px 14px 12px; }
  .pred-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pred-table-wrap { max-height: 38vh; }
  .filter-count { margin-left: 0; }
}

/* ==========================================================================
   附：v1.8 新增（多彩种切换 / 数据回测 / 文字转公式）
   ========================================================================== */

/* ---------- 彩种切换 ---------- */
.lot-switch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  z-index: 2;
}
.lot-switch[hidden] { display: none; }
.lot-btn {
  font-family: inherit;
  font-size: 0.82em;
  padding: 6px 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.lot-btn:hover { color: var(--accent-primary); }
.lot-btn.is-active {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(185, 28, 28, 0.28);
}

/* ---------- 数据回测 ---------- */
.bt-periods { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bt-label { font-size: 0.82em; color: var(--text-secondary); min-width: 56px; }

.bt-textarea {
  width: 100%;
  font-family: 'Consolas', 'Microsoft YaHei', monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 88px;
}
.bt-textarea:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1); }

.bt-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 14px; }
.bt-hint { font-size: 0.8em; color: var(--text-secondary); }
.bt-hint code {
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'Consolas', monospace;
}

.bt-table-wrap { border: 1px solid var(--border-color); border-radius: 8px; overflow: auto; }
table.bt-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 0.86em; }
.bt-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-hover);
  color: var(--text-secondary);
  font-size: 0.82em;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.bt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Consolas', monospace;
  white-space: nowrap;
}
.bt-table td.cell-nums {
  white-space: normal;
  word-break: normal;
  min-width: 220px;
  max-width: 520px;
  line-height: 1.7;
}
.bt-table td.cell-nums span { display: inline-block; margin-right: 2px; }
.bt-table td.win { color: var(--success); font-weight: 700; }
.bt-table td.lose { color: var(--danger); font-weight: 700; }
.bt-table td.cur-danger { color: var(--danger); font-weight: 800; }
.bt-foot { margin-top: 10px; font-size: 0.8em; color: var(--text-secondary); line-height: 1.7; }

@media (max-width: 768px) {
  .lot-switch { position: static; transform: none; margin: 0 auto 12px; width: fit-content; }
  .bt-table td.cell-nums { max-width: 240px; }
}

/* ==========================================================================
   附：v1.9（多主题 / 彩种切换 UI / 反馈）
   ========================================================================== */

/* ---------- 候选配色模板（4 套，选定后可保留一套） ---------- */

/* A. 暗夜蓝 */
[data-theme='midnight'] {
  --bg-gradient-start: #070b14;
  --bg-gradient-end: #0b1120;
  --card-bg: #111a2b;
  --text-primary: #e8effc;
  --text-secondary: #8fa3c4;
  --border-color: #22304a;
  --shadow: rgba(0, 0, 0, 0.55);
  --table-hover: #16202f;
  --input-bg: #16202f;
  --input-border: #34456a;
  --accent-primary: #2563eb;
  --accent-secondary: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --result-color: #38bdf8;
  --result-gradient: linear-gradient(145deg, #0ea5e9 0%, #2563eb 100%);
  --ball-shadow: 0 3px 14px rgba(56, 189, 248, 0.35);
  --ball-highlight: rgba(255, 255, 255, 0.2);
  --hot-color: #38bdf8;
  --cold-color: #60a5fa;
  --big-color: #f59e0b;
  --small-color: #60a5fa;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --danger-text: #fca5a5;
  --extreme-max-text: #fca5a5;
  --extreme-min-text: #93c5fd;
  --info-bg: #0f2643;
  --info-border: #38bdf8;
  --warn-bg: #3b2a06;
  --warn-text: #fcd34d;
  --interval-purple: #a78bfa;
  --shape-leopard: #f0abfc;
}

/* B. 墨玉绿 */
[data-theme='jade'] {
  --bg-gradient-start: #07120f;
  --bg-gradient-end: #0a1714;
  --card-bg: #0f201b;
  --text-primary: #e6f6ef;
  --text-secondary: #8fb3a6;
  --border-color: #1e3a32;
  --shadow: rgba(0, 0, 0, 0.5);
  --table-hover: #142a23;
  --input-bg: #142a23;
  --input-border: #2a4a3f;
  --accent-primary: #059669;
  --accent-secondary: #10b981;
  --accent-gradient: linear-gradient(135deg, #047857 0%, #10b981 100%);
  --result-color: #34d399;
  --result-gradient: linear-gradient(145deg, #059669 0%, #10b981 100%);
  --ball-shadow: 0 3px 14px rgba(16, 185, 129, 0.35);
  --ball-highlight: rgba(255, 255, 255, 0.18);
  --hot-color: #34d399;
  --cold-color: #22d3ee;
  --big-color: #fbbf24;
  --small-color: #7dd3fc;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --danger-text: #fda4af;
  --extreme-max-text: #fda4af;
  --extreme-min-text: #93c5fd;
  --info-bg: #0d2b26;
  --info-border: #22d3ee;
  --warn-bg: #3b2f0a;
  --warn-text: #fcd34d;
  --interval-purple: #a78bfa;
  --shape-leopard: #f9a8d4;
}

/* C. 琥珀暖 */
[data-theme='amber'] {
  --bg-gradient-start: #14100a;
  --bg-gradient-end: #1a130a;
  --card-bg: #221a10;
  --text-primary: #fdf3e3;
  --text-secondary: #b9a184;
  --border-color: #3b2c18;
  --shadow: rgba(0, 0, 0, 0.5);
  --table-hover: #2a2013;
  --input-bg: #2a2013;
  --input-border: #4a3820;
  --accent-primary: #d97706;
  --accent-secondary: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  --result-color: #fbbf24;
  --result-gradient: linear-gradient(145deg, #b45309 0%, #f59e0b 100%);
  --ball-shadow: 0 3px 14px rgba(245, 158, 11, 0.35);
  --ball-highlight: rgba(255, 255, 255, 0.2);
  --hot-color: #fbbf24;
  --cold-color: #60a5fa;
  --big-color: #fb923c;
  --small-color: #93c5fd;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --danger-text: #fda4af;
  --extreme-max-text: #fda4af;
  --extreme-min-text: #93c5fd;
  --info-bg: #3a2a12;
  --info-border: #f59e0b;
  --warn-bg: #4a2f0a;
  --warn-text: #fde68a;
  --interval-purple: #c084fc;
  --shape-leopard: #f9a8d4;
}

/* D. 宣纸暖白（亮色） */
[data-theme='ivory'] {
  --bg-gradient-start: #f7f1e6;
  --bg-gradient-end: #f7f1e6;
  --card-bg: #fffdf8;
  --text-primary: #2b2418;
  --text-secondary: #7a6a52;
  --border-color: #e3d7c2;
  --shadow: rgba(60, 44, 20, 0.08);
  --table-hover: #faf5ec;
  --input-bg: #fffdf8;
  --input-border: #d8c9ae;
  --accent-primary: #b45309;
  --accent-secondary: #d97706;
  --accent-gradient: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  --result-color: #c2410c;
  --result-gradient: linear-gradient(145deg, #d97706 0%, #b45309 100%);
  --ball-shadow: 0 3px 10px rgba(194, 65, 12, 0.28);
  --ball-highlight: rgba(255, 255, 255, 0.45);
  --hot-color: #c2410c;
  --cold-color: #0369a1;
  --big-color: #b45309;
  --small-color: #1d4ed8;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
  --danger-text: #b91c1c;
  --extreme-max-text: #b91c1c;
  --extreme-min-text: #1d4ed8;
  --info-bg: #eef6ff;
  --info-border: #0369a1;
  --warn-bg: #fef3c7;
  --warn-text: #92400e;
  --interval-purple: #6d28d9;
  --shape-leopard: #be185d;
}

/* html 背景跟随主题 */
html { background: var(--bg-gradient-start); }

/* ---------- 彩种切换（重新设计） ---------- */
.lot-switch {
  position: static;
  transform: none;
  top: auto;
  left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 6px 18px var(--shadow);
}
.lot-switch::before {
  content: '彩种';
  font-size: 0.78em;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0 4px 0 6px;
}
.lot-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--table-hover);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.18s;
}
.lot-btn::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}
.lot-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.lot-btn.is-active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.lot-btn.is-active::before { background: #fff; opacity: 0.95; }

/* ---------- 主题选择 ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.theme-card {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 9px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.theme-card:hover { transform: translateY(-1px); border-color: var(--accent-primary); }
.theme-card.is-active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.14);
}
.theme-swatch {
  display: flex;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.theme-swatch i { flex: 1; }
.theme-name { font-size: 0.85em; font-weight: 700; }
.theme-mode { font-size: 0.72em; color: var(--text-secondary); }

/* ---------- 建议反馈 ---------- */
.fb-float-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 998;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15em;
  background: var(--accent-gradient);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s, filter 0.18s;
}
.fb-float-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

.fb-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}
.fb-title { font-size: 1.05em; font-weight: 700; margin-bottom: 4px; }
.fb-sub { font-size: 0.78em; color: var(--text-secondary); margin-bottom: 14px; }
.fb-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8em;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}
.fb-label select,
.fb-label input,
.fb-label textarea {
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
}
.fb-label textarea { min-height: 110px; resize: vertical; font-family: 'Microsoft YaHei', sans-serif; }
.fb-label select:focus,
.fb-label input:focus,
.fb-label textarea:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1); }
.fb-actions { display: flex; align-items: center; gap: 10px; }
.fb-msg { font-size: 0.8em; color: var(--danger); min-height: 16px; }
.fb-msg.ok { color: var(--success); }

@media (max-width: 768px) {
  .lot-switch { padding: 6px 8px; gap: 8px; }
  .lot-btn { padding: 7px 14px; font-size: 0.85em; }
  .fb-float-btn { left: 12px; bottom: 12px; width: 42px; height: 42px; }
  .fb-box { padding: 18px 16px 14px; }
}

/* ==========================================================================
   附：v2.2（跑马灯 / 平台适配专区）
   ========================================================================== */

/* ---------- 跑马灯 ---------- */
.marquee {
  --mq-size: 14px;
  --mq-color: var(--accent-primary);
  --mq-dur: 24s;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 0;
  margin-bottom: 14px;
  position: relative;
}
.marquee[hidden] { display: none; }
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: mqScroll var(--mq-dur) linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  padding-right: 80px;
  font-size: var(--mq-size);
  color: var(--mq-color);
  font-weight: 600;
}
@keyframes mqScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 平台适配专区 ---------- */
.pf-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pf-sel { display: flex; align-items: center; gap: 8px; font-size: 0.85em; color: var(--text-secondary); }
.pf-note { font-size: 0.8em; color: var(--text-secondary); }

.pf-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--card-bg);
}
.pf-card h3 { font-size: 1em; margin-bottom: 10px; }
.pf-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.pf-card-head h3 { margin: 0; }
.pf-tip { font-size: 0.78em; color: var(--text-secondary); margin-bottom: 12px; }
.pf-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pf-idx { width: 74px; }

.pf-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pf-item {
  background: var(--table-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
}
.pf-item .k { font-size: 0.74em; color: var(--text-secondary); }
.pf-item .v {
  font-size: 1.15em; font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent-primary);
  word-break: break-all;
}

.pf-pred {
  padding: 12px;
  border-radius: 8px;
  background: var(--table-hover);
  border: 1px dashed var(--border-color);
  font-size: 0.9em;
  line-height: 1.8;
}
.pf-pred b { color: var(--accent-primary); font-size: 1.1em; }
.pf-pred .sub { color: var(--text-secondary); font-size: 0.85em; }

.pf-msg { font-size: 0.8em; color: var(--text-secondary); }
.pf-msg.ok { color: var(--success); }
.pf-msg.err { color: var(--danger); }

.pf-log {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  font-size: 0.76em;
  color: var(--text-secondary);
  font-family: 'Consolas', monospace;
  line-height: 1.7;
}
.pf-log div { padding: 3px 0; border-bottom: 1px dashed var(--border-color); word-break: break-all; }

/* v2.4：投注结果明细 */
#pfBetDetail { margin-top: 12px; }
#pfBetDetail .sub { margin: 2px 0; word-break: break-all; }
#pfBetDetail .sub b { font-size: 1em; }

/* v2.5：平台专区登录门禁 */
.pf-gate {
  max-width: 560px;
  margin: 6px auto 0;
  padding: 30px 24px 22px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .06);
}
.pf-gate-icon { font-size: 2.2em; line-height: 1; margin-bottom: 10px; }
.pf-gate h3 { font-size: 1.08em; margin: 0 0 8px; }
.pf-gate-text { color: var(--text-secondary); font-size: .92em; margin: 0 0 12px; }
.pf-gate-text b { color: var(--accent-primary); }
.pf-gate-list {
  text-align: left;
  margin: 0 auto 18px;
  padding: 0 0 0 1.1em;
  max-width: 420px;
  color: var(--text-secondary);
  font-size: .86em;
  line-height: 1.9;
}
.pf-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pf-gate-actions .btn { min-width: 128px; }
.pf-gate-tip { color: var(--text-secondary); font-size: .78em; margin: 14px 0 0; }
@media (max-width: 768px) {
  .pf-gate { padding: 24px 16px 18px; }
  .pf-gate-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 768px) {
  .pf-card { padding: 13px; }
  .marquee-track span { padding-right: 50px; }
}

/* v2.7：一键投注确认弹窗 */
.pf-modal-box {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 20px 16px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45);
}
.pf-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pf-modal-head h3 { margin: 0; font-size: 1.05em; }
.pf-modal-close {
  background: none; border: 0; padding: 0 2px; cursor: pointer;
  font-size: 1.5em; line-height: 1; color: var(--text-secondary);
}
.pf-modal-close:hover { color: var(--accent-primary); }
.pf-modal-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px dashed var(--border-color); font-size: .9em;
}
.pf-modal-row:last-child { border-bottom: 0; }
.pf-modal-row .k { color: var(--text-secondary); flex: 0 0 auto; }
.pf-modal-row .v { font-weight: 700; text-align: right; word-break: break-all; }
.pf-modal-tip { color: var(--text-secondary); font-size: .76em; line-height: 1.6; margin: 12px 0 16px; }
.pf-modal-actions { display: flex; gap: 10px; }
.pf-modal-actions .btn { flex: 1; }

/* v3.0：平台验证码 / 盈亏 */
.pf-captcha-box { display: flex; gap: 8px; align-items: center; }
.pf-captcha-box input { flex: 1 1 auto; min-width: 0; }
.pf-captcha-box img {
  height: 40px; max-width: 140px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-color); background: #fff; object-fit: contain;
}
.pf-item .v.pos { color: var(--success); }
.pf-item .v.neg { color: var(--danger); }

/* v3.5：算法类型汇总 + 自动挂机 */
.algo-type-stats { margin-top: 8px; font-size: .82em; color: var(--text-secondary); }
.bot-table { width: 100%; }
.bot-table td { vertical-align: top; font-size: .84em; }
.bot-editor { margin-top: 14px; padding: 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--table-hover); }
.bot-editor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bot-sec-title { font-weight: 700; margin: 14px 0 6px; font-size: .9em; }
.bot-types { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 6px; }
.bot-types label { display: flex; align-items: center; gap: 5px; font-size: .86em; color: var(--text-secondary); }
.bot-rounds input { width: 92px; }
.bot-state.on { color: var(--success); font-weight: 700; }
.bot-state.off { color: var(--text-secondary); }

/* v4.0：全局止盈止损 */
.bot-global { margin: 10px 0 14px; padding: 12px; border: 1px dashed var(--border-color); border-radius: 10px; background: var(--table-hover); }
.bot-global-info { font-weight: 600; color: var(--text-primary, inherit); }
.bot-global .row-actions { margin-top: 8px; }

.bot-win-pos { color: var(--success); }
.bot-win-neg { color: var(--danger); }

/* v4.2：盈利回头开关 */
.bot-switch { display: flex; align-items: center; gap: 8px; font-size: .84em; color: var(--text-secondary); cursor: pointer; }
.bot-switch input[type="checkbox"] { width: 16px; height: 16px; flex: none; cursor: pointer; accent-color: var(--accent-primary); }
.bot-switch span { line-height: 1.45; }

/* v4.3：赔率改为按类型自动计算 */
.bot-odds-note { margin: 6px 0 2px; font-size: .8em; color: var(--text-secondary); line-height: 1.5; }
.bot-odds-warn { margin: 0; font-size: .76em; line-height: 1.55; color: var(--accent-primary); opacity: .9; }

/* ---------- v4.6：左右悬浮广告位（2+2） ---------- */
:root { --ad-rail-w: 180px; --ads-container-max: 1400px; }
.ad-rail {
  position: fixed; top: 50%; transform: translateY(-50%);
  display: none; flex-direction: column; gap: 14px;
  width: var(--ad-rail-w); z-index: 55;
}
body.ads-on .ad-rail { display: flex; }
.ad-rail--left { left: 14px; }
.ad-rail--right { right: 14px; }
body.ads-on .container { max-width: var(--ads-container-max); }

.ad-slot {
  position: relative; width: 100%; overflow: hidden;
  border: 1px solid var(--border-color); border-radius: 10px;
  background: var(--card-bg);
}
.ad-slot--rail { max-height: none; }
.ad-slot img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ad-slot-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 6px; text-align: center;
  background: linear-gradient(160deg, rgba(190, 18, 60, .07), transparent 62%);
  color: var(--text-secondary);
}
.ad-slot-empty b { color: var(--accent-primary); font-size: .86em; line-height: 1.3; }
.ad-slot-badge { font-size: .6em; border: 1px solid var(--border-color); border-radius: 4px; padding: 0 5px; color: var(--text-secondary); }
.ad-slot-size { font-size: .66em; letter-spacing: .02em; color: var(--text-secondary); }
.ad-slot-empty a {
  font-size: .68em; color: var(--accent-primary); border: 1px solid currentColor;
  border-radius: 999px; padding: 1px 8px; text-decoration: none;
}
.ad-slot-empty a:hover { background: rgba(190, 18, 60, .08); }

/* 移动端：页面内 2×2，不悬浮 */
.ad-mobile {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  max-width: 720px; margin: 18px auto; padding: 0 12px;
}
.ad-mobile[hidden] { display: none; }
.ad-mobile .ad-slot--mobile { max-height: none; }
@media (max-width: 380px) {
  .ad-mobile { grid-template-columns: 1fr; }
}
/* ---------- v4.7：广告位尺寸可配置 / 中间横幅 / 窄屏悬浮 ---------- */
.ad-banner--slot {
  display: block; height: auto; min-height: 62px; padding: 0;
  background: transparent; border: 0; font-weight: inherit;
}
.ad-banner--slot:hover { background: transparent; box-shadow: none; }
.ad-slot--mid {
  width: 100%; border: 1px dashed rgba(190, 18, 60, 0.45); border-radius: 8px;
  background: linear-gradient(135deg, rgba(190, 18, 60, 0.06), rgba(234, 88, 12, 0.06));
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.ad-slot--mid img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ad-slot-empty--mid {
  flex-direction: row; gap: 10px; padding: 0 14px; width: 100%; height: 100%;
  background: transparent; flex-wrap: wrap;
}
.ad-slot-empty--mid .ad-slot-size { font-size: .74em; }
.ad-slot--rail { max-height: none; }

/* 窄屏：贴边悬浮，尺寸由后台「窄屏缩放」控制 */
body.ads-narrow .ad-rail { z-index: 54; }
body.ads-narrow .ad-rail--left { left: 6px; }
body.ads-narrow .ad-rail--right { right: 6px; }
body.ads-slim .ad-rail { opacity: .95; }
body.ads-slim .ad-rail:hover { opacity: 1; }
body.ads-pad .container { padding-left: var(--ad-pad); padding-right: var(--ad-pad); }
/* v4.7：广告格在轨道内居中，宽高按后台逐格生效 */
.ad-rail { align-items: center; }
.ad-rail .ad-slot { margin: 0 auto; }
body.ads-pad .container { box-sizing: border-box; }
/* v4.9：挂机合计运行/时均 */
.bot-sum { font-size: .78em; color: var(--text-secondary); margin-right: 4px; }
.bot-sum b { font-weight: 700; }
/* v5.0：聊天未读数徽标 + 在线人数 */
.chat-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: #f43f5e; color: #fff;
  font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--card-bg); box-sizing: content-box;
}
.chat-badge[hidden] { display: none; }
.chat-online { font-size: .7em; color: var(--success, #16a34a); }
/* v5.6：高级倍投一键翻倍工具栏 */
.bot-rounds-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; font-size: .84em; color: var(--text-secondary); }
.bot-rounds-bar label { display: inline-flex; align-items: center; gap: 6px; }
.bot-rounds-bar input { width: 76px; padding: 5px 8px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--table-hover); color: var(--text-primary); font-size: .95em; }
.bot-rounds-bar .hint { font-size: .92em; }
/* v6.6：挂机策略里不适用的输入项置灰 */
.pf-grid label.dim { opacity: .45; }
.pf-grid label.dim input, .pf-grid label.dim select { cursor: not-allowed; }

/* ===== v6.9：挂机设置表单对齐 / 间距优化 ===== */
.bot-global .pf-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  align-items: end;
}
.bot-global .pf-grid > label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .84em;
  color: var(--text-secondary);
  line-height: 1.4;
}
.bot-global .pf-grid > label > input,
.bot-global .pf-grid > label > select {
  height: 34px;
  padding: 0 10px;
  font-size: .95em;
  color: var(--text-primary);
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.bot-global .pf-grid > label > input:focus,
.bot-global .pf-grid > label > select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(190, 18, 60, .08);
}
.bot-global .pf-grid > label.bot-switch {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  color: var(--text-secondary);
}
.bot-global .pf-grid > label.span-2 { grid-column: 1 / -1; }
.bot-global .pf-grid .bot-global-info {
  display: inline-block;
  margin-left: 2px;
  line-height: 1.6;
  word-break: break-all;
}
.bot-global .pf-grid .btn-sm { align-self: flex-start; margin-top: 2px; }
.bot-global .row-actions { align-items: center; gap: 10px; }
.bot-global .pf-msg { font-size: .82em; margin-left: 4px; }

/* 挂机方案编辑器：标签与控件垂直对齐 */
.bot-editor .pf-grid { align-items: end; }
.bot-editor .pf-grid > label { display: flex; flex-direction: column; gap: 5px; font-size: .84em; color: var(--text-secondary); }
.bot-editor .pf-grid > label > input,
.bot-editor .pf-grid > label > select { height: 34px; }

@media (max-width: 560px) {
  .bot-global .pf-grid { grid-template-columns: 1fr; }
}
/* ===== v6.12：临近最大连挂列表 ===== */
.pf-near { margin-top: 12px; }
.pf-near .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pf-near .hint.inline { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.pf-near-table { width: 100%; border-collapse: collapse; font-size: .88em; }
.pf-near-table th,
.pf-near-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.pf-near-table th { color: var(--text-secondary); font-weight: 600; white-space: nowrap; }
.pf-near-table td.mono { font-family: Consolas, Menlo, monospace; font-weight: 700; }
.pf-near-table .sub { color: var(--text-secondary); font-size: .84em; margin-top: 2px; }
.pf-near-table .algo-link { color: var(--accent-primary); font-weight: 700; text-decoration: none; }
.pf-near-table .algo-link:hover { text-decoration: underline; }
.pf-near-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: .74em;
  background: rgba(190, 18, 60, .1); color: var(--accent-primary); }
/* v6.13：临近最大连挂 分页 */
.pf-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-color); font-size: .86em; }
.pf-pager .btn[disabled] { opacity: .45; cursor: not-allowed; }
.pf-pager-info { color: var(--text-secondary); }
.pf-pager-info b { color: var(--accent-primary); }
.pf-pager-jump { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.pf-pager-jump input { width: 64px; height: 30px; padding: 0 8px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--card-bg, #fff); }
/* v6.14：快捷金额 + 列表行内读取预测 */
.pf-amount-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 2px; }
.pf-amount-quick .q-label { font-size: .84em; color: var(--text-secondary); }
.pf-amount-quick .pf-amt {
  padding: 5px 11px; font-size: .84em; line-height: 1.2; cursor: pointer;
  border: 1px solid var(--border-color); border-radius: 999px;
  background: var(--table-hover, #f6f6f6); color: var(--text-primary);
  transition: all .15s ease;
}
.pf-amount-quick .pf-amt:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.pf-amount-quick .pf-amt.active { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; font-weight: 700; }
.pf-near-table .pf-near-read { margin-left: 8px; padding: 2px 8px; font-size: .78em; vertical-align: middle; }
/* ===== v6.24：记住账号密码 ===== */
.auth-remember {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 4px;
  font-size: .84em; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.auth-remember input { width: 16px; height: 16px; accent-color: var(--accent-primary); cursor: pointer; }
/* ===== v6.25：挂机方案分组 ===== */
.bot-groups {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 10px 0 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border-color);
}
.bot-gtab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-color); background: var(--table-hover, #f6f6f6);
  color: var(--text-primary); font-size: .86em; line-height: 1.4;
  transition: all .15s ease;
}
.bot-gtab:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.bot-gtab.active { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; font-weight: 700; }
.bot-gcnt { font-size: .88em; opacity: .8; }
.bot-grun { font-style: normal; margin-left: 2px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.3); }
.bot-gtab:not(.active) .bot-grun { background: rgba(4,120,87,.12); color: #047857; }
/* ===== v6.26：模拟投注盈亏汇总 ===== */
.bot-simline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 2px 0 10px; padding: 8px 12px; border-radius: 10px;
  background: rgba(190, 18, 60, .05); border: 1px dashed rgba(190, 18, 60, .28);
  font-size: .84em; color: var(--text-secondary);
}
.bot-simline[hidden] { display: none; }
.sim-tag { padding: 1px 8px; border-radius: 999px; background: var(--accent-primary); color: #fff; font-size: .82em; font-weight: 700; }
.sim-sep { color: #d4d4d8; }
.sim-pos { color: #047857; }
.sim-neg { color: #b91c1c; }
/* ===== v6.27：挂机方案编辑器布局优化 ===== */
.bot-editor .pf-sec { margin-top: 14px; }
.bot-editor .pf-sec:first-of-type { margin-top: 0; }
.bot-editor .pf-sec-h {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
  margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
  font-size: .86em; font-weight: 700; color: var(--text-primary);
}
.bot-editor .pf-sec-h .hint { font-weight: 400; font-size: .92em; color: var(--text-secondary); }
.bot-editor .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; }
.bot-editor .pf-grid > label > input,
.bot-editor .pf-grid > label > select {
  height: 34px; padding: 0 10px; font-size: .95em; width: 100%; box-sizing: border-box;
  color: var(--text-primary); background: var(--card-bg, #fff);
  border: 1px solid var(--border-color); border-radius: 8px;
}
.bot-editor .pf-grid > label > input:focus,
.bot-editor .pf-grid > label > select:focus {
  outline: none; border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(190, 18, 60, .08);
}
/* 开关：复选框与文字同一行，整体左对齐（覆盖编辑器里竖排 label 规则） */
.bot-editor .bot-switch {
  flex-direction: row; align-items: center; justify-content: flex-start;
  gap: 8px; text-align: left; padding: 0;
}
.bot-editor .pf-grid > label.bot-switch { grid-column: 1 / -1; }
.bot-editor .bot-switch input[type="checkbox"] { margin: 0; }
.bot-editor .bot-switch span { flex: 1 1 auto; }
/* 开关行：开关 + 数值 + 说明 */
.bot-editor .pf-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 10px; padding: 8px 12px;
  border: 1px solid var(--border-color); border-radius: 8px;
  background: var(--card-bg, rgba(255, 255, 255, .6));
}
.bot-editor .pf-mini {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .84em; color: var(--text-secondary); white-space: nowrap;
}
.bot-editor .pf-mini input {
  width: 84px; height: 32px; padding: 0 10px; font-size: .95em;
  color: var(--text-primary); background: var(--table-hover, #f6f6f6);
  border: 1px solid var(--border-color); border-radius: 8px;
}
.bot-editor .pf-mini input:focus { outline: none; border-color: var(--accent-primary); }
.bot-editor .pf-tip { flex: 1 1 100%; font-size: .78em; line-height: 1.5; color: var(--text-secondary); opacity: .9; }
.bot-editor .dim { opacity: .45; }
.bot-editor .dim input, .bot-editor .dim select { cursor: not-allowed; }
@media (max-width: 900px) {
  .bot-editor .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bot-editor .pf-grid { grid-template-columns: 1fr; }
}
/* ===== v6.28：数据回测 · 号码盘 0-27 ===== */
.bt-pad-wrap {
  margin: 10px 0 2px; padding: 12px;
  border: 1px solid var(--border-color); border-radius: 10px;
  background: var(--table-hover, #fafaf9);
}
.bt-pad-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: .84em; }
.bt-pad-head b { color: var(--text-primary); }
.bt-pad-head span { color: var(--text-secondary); font-size: .94em; }
.bt-pad {
  display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px;
}
.bt-num {
  height: 38px; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .92em;
  color: var(--text-primary); background: var(--card-bg, #fff);
  border: 1px solid var(--border-color); border-radius: 8px;
  transition: all .12s ease;
}
.bt-num:hover { border-color: var(--accent-primary); color: var(--accent-primary); transform: translateY(-1px); }
.bt-num:active { transform: translateY(0); }
.bt-num.is-on {
  background: var(--accent-primary); border-color: var(--accent-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(190, 18, 60, .22);
}
.bt-pad-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bt-pad-cur { font-size: .8em; color: var(--text-secondary); word-break: break-all; }
@media (max-width: 900px) {
  .bt-pad { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .bt-pad { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* ===== v6.29：数据回测 · 赔率列 ===== */
.bt-table td.cell-odds { font-weight: 700; color: var(--accent-primary); white-space: nowrap; }
.bt-table th { white-space: nowrap; }
/* ===== v6.30：序列回测（多类型排列组合） ===== */
.seq-sec {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed var(--border-color);
}
.seq-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.seq-head b { font-size: 1em; color: var(--text-primary); }
.seq-head .hint { font-size: .82em; }
.seq-types { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.seq-types label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; font-size: .86em; cursor: pointer;
  border: 1px solid var(--border-color); border-radius: 999px;
  background: var(--table-hover, #f6f6f6); color: var(--text-secondary);
  transition: all .15s ease;
}
.seq-types label:has(input:checked) { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(190, 18, 60, .07); font-weight: 700; }
.seq-types input { width: 14px; height: 14px; accent-color: var(--accent-primary); cursor: pointer; }
.seq-form { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; align-items: end; }
.seq-form > label { display: flex; flex-direction: column; gap: 5px; font-size: .84em; color: var(--text-secondary); }
.seq-form > label > input,
.seq-form > label > select {
  height: 34px; padding: 0 10px; font-size: .95em; width: 100%; box-sizing: border-box;
  color: var(--text-primary); background: var(--card-bg, #fff);
  border: 1px solid var(--border-color); border-radius: 8px;
}
.seq-form > label > input:focus,
.seq-form > label > select:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(190, 18, 60, .08); }
.seq-sec .row-actions { margin: 12px 0 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seq-best {
  margin-bottom: 12px; padding: 12px 14px;
  border: 1px solid rgba(190, 18, 60, .35); border-radius: 10px;
  background: linear-gradient(135deg, rgba(190, 18, 60, .06), rgba(234, 88, 12, .05));
}
.seq-best[hidden] { display: none; }
.seq-best-head { font-size: .9em; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.seq-best-order { margin-left: 8px; font-weight: 600; color: var(--accent-primary); }
.seq-best-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.seq-best-grid > div { display: flex; flex-direction: column; gap: 3px; }
.seq-best-grid span { font-size: .76em; color: var(--text-secondary); }
.seq-best-grid b { font-size: .98em; }
.seq-best-grid b i { font-style: normal; font-size: .8em; opacity: .8; }
.seq-best-grid .pos { color: var(--success); }
.seq-best-grid .neg { color: var(--danger); }
.seq-table td { font-size: .82em; }
.seq-cell-order { white-space: normal !important; min-width: 220px; line-height: 1.6; color: var(--text-primary); }
.seq-sub { font-size: .82em; color: var(--text-secondary); }
.seq-row-best { background: rgba(190, 18, 60, .05); }
.seq-tag-bust { font-size: .78em; padding: 1px 6px; border-radius: 999px; background: rgba(185, 28, 28, .12); color: var(--danger); }
@media (max-width: 900px) {
  .seq-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .seq-form { grid-template-columns: 1fr; }
}
/* ===== v6.31：挂机方案 · 轮次指定投注类型 ===== */
.bot-rounds select.bot-r-t {
  width: 132px; height: 30px; padding: 0 8px; font-size: .92em;
  color: var(--text-primary); background: var(--card-bg, #fff);
  border: 1px solid var(--border-color); border-radius: 6px;
}
.bot-rounds select.bot-r-t:disabled { opacity: .45; cursor: not-allowed; }
.bot-rounds input:disabled { opacity: .45; cursor: not-allowed; }
.bot-types.dim, .bot-sec-title.dim { opacity: .45; }
.bot-types.dim label, .bot-types.dim input { cursor: not-allowed; }
/* ===== v6.33：序列回测 · 可重复类型 + 进度条 ===== */
.seq-progress { margin: 4px 0 12px; }
.seq-progress[hidden] { display: none; }
.seq-progress-track {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: var(--border-color); opacity: .9;
}
.seq-progress-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-primary), #f97316);
  transition: width .12s linear;
}
.seq-progress-text { display: block; margin-top: 6px; font-size: .8em; color: var(--text-secondary); }
/* ===== v6.35：需要登录的功能（锁屏提示） ===== */
.tab-content.gate-locked { position: relative; }
.tab-content.gate-locked > *:not(.gate-box) { display: none !important; }
.gate-box {
  max-width: 520px; margin: 44px auto; padding: 26px 24px; text-align: center;
  border: 1px dashed var(--border-color); border-radius: 12px;
  background: var(--card-bg, #fff);
}
.gate-box[hidden] { display: none; }
.gate-icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.gate-title { font-size: 1.05em; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.gate-desc { font-size: .86em; color: var(--text-secondary); line-height: 1.75; margin-bottom: 16px; }
.gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* ===== v6.37：序列回测 → 一键应用挂机方案 ===== */
.seq-best-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seq-best-head .seq-best-order { flex: 1 1 auto; min-width: 200px; }
.seq-best-head .seq-apply-bot { margin-left: auto; white-space: nowrap; }
/* ===== v6.39：序列回测「不重复」勾选 ===== */
.seq-form > label.seq-check {
  flex-direction: row; align-items: center; gap: 8px;
  color: var(--text-primary); cursor: pointer; user-select: none;
  padding-top: 18px;   /* 与输入框基线对齐 */
}
.seq-form > label.seq-check > input {
  width: 16px; height: 16px; flex: none; padding: 0; accent-color: var(--accent-primary); cursor: pointer;
}
/* ===== v6.41：新增方案按策略显隐 / 自动序列回测 ===== */
.bot-editor .pf-grid > label[hidden],
.bot-editor .pf-line[hidden] { display: none !important; }