/* ============ 彩票开奖数据 - 样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --red: #e23131;
  --blue: #2b6cb0;
  --orange: #d97a1a;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #7b8794;
  --line: #e4e7eb;
  --accent: #c0392b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- 头部 ---------- */
.site-header {
  background: linear-gradient(135deg, #b01515, #d93838);
  color: #fff;
  padding: 20px 0 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.site-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; }
.tab {
  padding: 10px 22px;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: background .15s;
}
.tab:hover { background: rgba(255,255,255,.22); }
.tab.active { background: var(--bg); color: var(--accent); font-weight: 700; }

/* ---------- 卡片 ---------- */
main { padding: 20px 16px 40px; }
.card {
  background: var(--card);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.card-head h2 { font-size: 18px; }
.meta { color: var(--muted); font-size: 13px; }
.sub-title { font-size: 14px; margin: 14px 0 8px; color: var(--text); }

/* ---------- 最新开奖 ---------- */
.latest-balls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ball {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.18);
}
.ball.red { background: radial-gradient(circle at 35% 30%, #f26b6b, var(--red)); }
.ball.blue { background: radial-gradient(circle at 35% 30%, #5a9bd8, var(--blue)); }
.ball.plus { background: none; box-shadow: none; color: var(--muted); font-size: 22px; width: 24px; }
.latest-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.info-item {
  background: var(--bg); border-radius: 8px; padding: 10px 14px;
}
.info-item .label { font-size: 12px; color: var(--muted); }
.info-item .value { font-size: 16px; font-weight: 700; }

/* ---------- 查询 ---------- */
.query { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.query input {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; width: 180px; outline: none;
}
.query input:focus { border-color: var(--accent); }
.query button, .pager button, .seg-btn {
  padding: 7px 16px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 14px; cursor: pointer;
}
.query button:hover, .pager button:hover { border-color: var(--accent); color: var(--accent); }
.query button:disabled, .pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; }
.draw-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.draw-table th, .draw-table td {
  padding: 9px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.draw-table th { color: var(--muted); font-weight: 600; font-size: 13px; background: #fafbfc; }
.draw-table tr.highlight td { background: #fff7e6; }
.mini-ball {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; margin-right: 3px;
}
.mini-ball.red { background: var(--red); }
.mini-ball.blue { background: var(--blue); }
.pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 14px; }

/* ---------- 走势图 ---------- */
.seg { display: flex; gap: 6px; }
.seg-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chart-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 12px; }
svg { display: block; }
.chart-legend { font-size: 12px; color: var(--muted); }
.trend-grid { stroke: #eef0f3; stroke-width: 1; }
.trend-grid-bold { stroke: #d8dde3; stroke-width: 1; }
.trend-label { font-size: 11px; fill: #7b8794; }
.trend-issue { font-size: 10px; fill: #9aa5b1; }
.trend-dot { stroke-width: 1.5; }

/* ---------- 统计 ---------- */
.freq-bar { fill: #d97a1a; transition: fill .15s; }
.freq-bar.back { fill: #2b6cb0; }
.freq-bar:hover { fill: #b35c0e; }
.freq-bar.back:hover { fill: #1f5590; }
.freq-count { font-size: 10px; fill: #52606d; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px; margin-top: 16px;
}
.miss-item {
  background: var(--bg); border-radius: 8px; padding: 8px 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.miss-item .num {
  width: 24px; height: 24px; border-radius: 50%; background: #cbd2d9;
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.miss-item .num.hot { background: var(--red); }
.miss-item .num.cold { background: var(--blue); }
.miss-item .miss-val { color: var(--muted); font-size: 12px; }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0 30px; }

@media (max-width: 600px) {
  .ball { width: 38px; height: 38px; font-size: 17px; }
  .card { padding: 14px; }
  .draw-table th, .draw-table td { padding: 7px 8px; font-size: 13px; }
}
