/* ===================================================================
 *  pl3 多彩种套件 · 专业数据分析平台样式 v1.9.15
 *  设计理念：数据驱动 · 专业可信 · 现代简约
 * =================================================================== */

:root {
  /* 基础色板 */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f8fafc;
  
  /* 文字系统 */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  
  /* 品牌色 - 排列3 中国红 */
  --primary: #dc2626;
  --primary-light: #fef2f2;
  --primary-dark: #991b1b;
  --primary-alpha: rgba(220, 38, 38, 0.08);
  
  /* 辅助色 */
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --info: #0891b2;
  --info-light: #ecfeff;
  
  /* 阴影系统 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.07), 0 8px 10px -6px rgba(0,0,0,0.05);
  
  /* 圆角系统 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* 主题令牌 */
  --head-grad: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  --brand-grad: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  --page-pattern: repeating-linear-gradient(0deg, rgba(220,38,38,0.02) 0 2px, transparent 2px 26px);
  --chart-1: #dc2626; --chart-2: #2563eb; --chart-3: #16a34a; --chart-4: #d97706; --chart-5: #7c3aed;
  --lot-pill: #b91c1c; --tint: #fef2f2; --tint-2: #fff5f5; --tint-bd: #fecaca;
  --hover-row: #fff6f6; --hover-row-2: #fdf7f7; --sel: #fecaca;
}

/* 福彩3D 宝蓝主题 */
body[data-theme="blue"] {
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --primary-alpha: rgba(37, 99, 235, 0.08);
  --brand-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  --page-pattern: repeating-linear-gradient(0deg, rgba(37,99,235,0.02) 0 2px, transparent 2px 26px);
  --lot-pill: #2563eb;
  --tint: #eff6ff; --tint-2: #f0f9ff; --tint-bd: #bfdbfe;
  --hover-row: #eff6ff; --hover-row-2: #f0f9ff;
}

/* ========== 全局重置与基础 ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 15px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg-primary);
  background-image: var(--page-pattern);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

/* ========== 页面容器 ========== */
.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  flex: 1;
}

@media (min-width: 768px) { .app { padding: 28px; } }

/* ========== 头部导航栏 ========== */
.main-header {
  background: var(--head-grad);
  color: var(--text-inverse);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
}

/* 品牌区 */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.brand-text p {
  font-size: 12px;
  opacity: 0.9;
  margin: 2px 0 0;
  font-weight: 400;
}

/* 头部右侧状态区 */
.header-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.status-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

.chip.stale .dot {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

.chip b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* 彩种切换器 */
.lot-switcher {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.12);
  padding: 4px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
}

.lot-switcher button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.lot-switcher button.active {
  background: rgba(255,255,255,0.25);
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lot-switcher button:hover:not(.active) {
  background: rgba(255,255,255,0.1);
}

/* 刷新按钮 */
.btn-refresh {
  background: #fff;
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-refresh:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-refresh:active {
  transform: translateY(0);
}

/* ========== Tab 导航栏 ========== */
nav.tabs {
  margin: 20px 0 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: var(--bg-secondary);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 88px;
  z-index: 50;
  backdrop-filter: blur(10px);
}

nav.tabs::-webkit-scrollbar { height: 4px; }
nav.tabs::-webkit-scrollbar-track { background: transparent; }
nav.tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

nav.tabs button {
  padding: 11px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.01em;
}

nav.tabs button:hover:not(.active) {
  background: var(--bg-primary);
  color: var(--text-primary);
}

nav.tabs button.active {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  font-weight: 600;
}

/* ========== 卡片系统 ========== */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-light);
  letter-spacing: -0.01em;
}

.card .value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.card .sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
}

.card.highlight {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--tint) 0%, var(--bg-secondary) 100%);
  box-shadow: var(--shadow-md);
}

.card.highlight::before {
  opacity: 1;
}

/* ========== 仪表盘数据卡片 ========== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity 0.2s;
}

.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.dash-card:hover::before {
  opacity: 1;
}

.dash-card .label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.dash-card .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dash-card .trend {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ========== 球号显示 ========== */
.ball-display {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 -3px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ball:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 球号颜色系统 */
.ball.c0 { background: linear-gradient(135deg, #6b7280, #4b5563); }
.ball.c1 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ball.c2 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ball.c3 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ball.c4 { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.ball.c5 { background: linear-gradient(135deg, #f97316, #ea580c); }
.ball.c6 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.ball.c7 { background: linear-gradient(135deg, #ec4899, #db2777); }
.ball.c8 { background: linear-gradient(135deg, #84cc16, #65a30d); }
.ball.c9 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* ========== 工具栏 ========== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}

.toolbar input,
.toolbar select {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.15s;
  min-height: 44px;
  box-shadow: var(--shadow-xs);
}

.toolbar input:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

.toolbar button {
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.01em;
}

.toolbar button:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ========== 表格系统 ========== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

th {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

tr:hover td {
  background: var(--hover-row);
}

tr:last-child td {
  border-bottom: none;
}

/* 斑马纹 */
table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.5);
}

table tbody tr:nth-child(even):hover td {
  background: var(--hover-row);
}

/* ========== 状态标签 ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
  letter-spacing: 0.01em;
}

.tag.best { background: var(--success-light); color: var(--success); }
.tag.ok { background: var(--info-light); color: var(--info); }
.tag.warn { background: var(--warning-light); color: var(--warning); }
.tag.bad { background: var(--danger-light); color: var(--danger); }

/* ========== 概率速率指示器 ========== */
.rate-good { color: var(--success); font-weight: 600; }
.rate-mid { color: var(--warning); font-weight: 600; }
.rate-bad { color: var(--danger); font-weight: 600; }

/* ========== 遗漏芯片 ========== */
.miss-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.miss-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all 0.15s;
  box-shadow: var(--shadow-xs);
}

.miss-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.miss-chip .d {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.miss-chip .v {
  font-size: 11px;
  margin-top: 4px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.miss-chip.hot {
  background: linear-gradient(160deg, #fef2f2, #fff);
  border-color: #fecaca;
}
.miss-chip.hot .d { color: #dc2626; }
.miss-chip.hot .v { color: #f87171; font-weight: 600; }

.miss-chip.warm {
  background: linear-gradient(160deg, #fffbeb, #fff);
  border-color: #fde68a;
}
.miss-chip.warm .d { color: #b45309; }
.miss-chip.warm .v { color: #d97706; font-weight: 600; }

.miss-chip.cold {
  background: linear-gradient(160deg, #eff6ff, #fff);
  border-color: #bfdbfe;
}
.miss-chip.cold .d { color: #2563eb; }
.miss-chip.cold .v { color: #60a5fa; font-weight: 600; }

/* ========== 图表容器 ========== */
.chart-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.chart-box h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.chart-box h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--brand-grad);
}

.chart {
  width: 100%;
  height: 320px;
}

.chart.tall { height: 380px; }

/* ========== 推荐区 ========== */
.recommend-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.recommend-card .recommend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0;
}

.recommend-list .item {
  background: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid #fde68a;
  box-shadow: var(--shadow-xs);
}

.recommend-list .item .label {
  font-size: 11px;
  color: #92400e;
  font-weight: 500;
  margin-bottom: 4px;
}

.recommend-list .item .val {
  font-size: 20px;
  font-weight: 700;
  color: #78350f;
  letter-spacing: 2px;
}

/* ========== 页脚 ========== */
.main-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.footer-col p,
.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  display: block;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 组件 ========== */
.num-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.num-btn-group .nb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.15s;
}

.num-btn-group .nb:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.num-btn-group .nb.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.num-btn-group .nb.hot { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.num-btn-group .nb.cold { background: #dbeafe; color: #2563eb; border-color: #93c5fd; }

/* 复制按钮 */
.btn-copy {
  background: #fff;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: var(--primary);
  color: #fff;
}

/* 选中文本 */
::selection { background: var(--sel); color: var(--text-primary); }

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== 动画效果 ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.card { animation: fadeIn 0.3s ease-out; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* 骨架屏加载 */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s infinite;
  border-radius: var(--radius-sm);
  color: transparent;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast 通知 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease-out;
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-muted);
  gap: 12px;
}

.loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* 小字 muted */
.small-muted {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 复盘统计 pills */
.review-stat { display: flex; flex-wrap: wrap; gap: 8px; }
.review-stat .pill {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}
.pill.good { background: #dcfce7; color: #166534; }
.pill.warn { background: #fef9c3; color: #854d0e; }
.pill.bad  { background: #fee2e2; color: #991b1b; }
.pill.gray { background: #f3f4f6; color: #6b7280; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .page-container { padding: 0 16px; }
  
  .header-inner {
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px;
  }
  
  .header-status { align-items: stretch; }
  .status-chips { justify-content: flex-start; }
  
  .brand-text h1 { font-size: 18px; }
  .brand-logo { width: 42px; height: 42px; font-size: 20px; }
  
  nav.tabs {
    flex-wrap: wrap;
    overflow: visible;
    top: 110px;
  }
  
  nav.tabs button { flex: 1 0 48%; padding: 12px; font-size: 13px; }
  
  .card { padding: 18px; }
  .card .value { font-size: 26px; }
  .dash-card .value { font-size: 24px; }
  
  .ball { width: 44px; height: 44px; font-size: 18px; }
  
  .dash-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  
  table th, table td { padding: 10px 12px; font-size: 12px; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  
  .miss-chip { min-width: 52px; padding: 8px 10px; }
  .miss-chip .d { font-size: 18px; }
}

@media (max-width: 480px) {
  .app { padding: 12px; }
  
  .dash-grid { grid-template-columns: 1fr; }
  
  nav.tabs button { flex: 1 0 100%; }
  
  .ball-display { gap: 10px; }
  .ball { width: 40px; height: 40px; font-size: 17px; }
  
  .toolbar { gap: 8px; }
  .toolbar button { width: 100%; }
}

/* ========== 暗色主题支持 ========== */
@media (prefers-color-scheme: dark) {
  body:not([data-theme]) {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border: #475569;
    --border-light: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.6);
  }
}

/* ========== 定位全包逐位命中徽章 ========== */
.badge-hit {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
  vertical-align: middle;
}

.badge-miss {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
  vertical-align: middle;
}

.opacity-50 {
  opacity: 0.5;
}
