/* ================= 3D码谈 · 浅色主题 ================= */
:root {
  --bg: #eef3fb;
  --bg2: #f5f8fd;
  --card: #ffffff;
  --card2: #f9fbff;
  --border: #e2eaf7;
  --text: #0e2038;
  --muted: #6d7f9a;
  --red: #1a56c4;          /* 主色（沿用旧变量名，站点主色为蓝） */
  --red-dark: #14419c;
  --gold: #b0761c;
  --blue: #2f7cf6;
  --green: #1f9d6b;
  --hot: #c24a3f;
  --cold: #2f7cf6;
  --shadow-sm: 0 2px 10px rgba(23, 62, 135, .05);
  --shadow: 0 12px 30px rgba(23, 62, 135, .08);
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: linear-gradient(180deg, #f9fcff 0%, #eef3fb 42%, #e8eefa 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
section[id] { scroll-margin-top: 96px; }

/* ---------- 头部 ---------- */
.header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 234, 247, .9);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 72px; min-width: 0; }

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 800; color: var(--text);
  letter-spacing: .5px; text-decoration: none; white-space: nowrap;
}
.logo span { color: var(--muted); font-size: 14px; font-weight: 600; margin-left: 2px; }
.logo .logo-name { color: var(--text); font-size: 21px; font-weight: 800; margin-left: 0; letter-spacing: .5px; }
.logo-3d { color: #5b54f2; font-weight: 800; letter-spacing: 0; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  background: url('/favicon.svg') center / contain no-repeat;
  box-shadow: 0 8px 16px rgba(76, 69, 230, .26);
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; min-width: 0; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px;
  color: #3d5273; text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 10px; transition: .18s; white-space: nowrap;
}
.nav-ic { width: 16px; height: 16px; flex: 0 0 auto; }
.nav a:hover { color: var(--red); background: #eff4fd; }
.nav a.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(140deg, #2f7cf6, #1a56c4);
  box-shadow: 0 6px 14px rgba(26, 86, 196, .22);
}
.nav a.active:hover { color: #fff; background: linear-gradient(140deg, #3d8bff, #14419c); }

/* ---------- 首页栏目入口 ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.entry-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid rgba(226, 234, 247, .95);
  border-radius: 18px; padding: 20px 22px;
  box-shadow: var(--shadow-sm); text-decoration: none;
  transition: .18s; min-width: 0;
}
.entry-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(47, 124, 246, .35); }
.entry-icon {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-style: normal; font-size: 19px; font-weight: 700;
}
.entry-icon.c-blue { background: linear-gradient(140deg, #2f7cf6, #1a56c4); }
.entry-icon.c-teal { background: linear-gradient(140deg, #2fbfa0, #148f74); }
.entry-icon.c-gold { background: linear-gradient(140deg, #f0ad3c, #c67f14); }
.entry-icon.c-purple { background: linear-gradient(140deg, #9061f2, #6234b8); }
.entry-icon.c-red { background: linear-gradient(140deg, #f4694b, #c23315); }
.entry-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.entry-body b { font-size: 15px; color: var(--text); font-weight: 700; }
.entry-body span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.entry-sub { font-size: 12px; color: #2f7cf6; font-weight: 500; margin-left: 6px; }
.entry-arrow { margin-left: auto; flex: none; font-size: 22px; color: #b6c4dd; line-height: 1; transition: .18s; }
.entry-card:hover .entry-arrow { color: #2f7cf6; transform: translateX(3px); }

/* ---------- 首屏 ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 26px; }
.hero-card {
  background: var(--card);
  border: 1px solid rgba(226, 234, 247, .9);
  border-radius: 24px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.hero-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero-title { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.hero-date { font-size: 13px; color: var(--muted); }

.latest-balls { display: flex; gap: 16px; margin: 20px 0 18px; flex-wrap: wrap; }
.ball {
  width: 96px; height: 96px; border-radius: 22px;
  background: #fff;
  border: 1px solid #dbe6f7;
  box-shadow: 0 10px 22px rgba(23, 62, 135, .09), inset 0 -2px 0 rgba(23, 62, 135, .04);
  color: #152a4a; font-size: 52px; font-weight: 800; line-height: 1;
  font-family: ui-rounded, "Helvetica Neue", "PingFang SC", sans-serif;
  display: flex; align-items: center; justify-content: center;
}
/* 参考稿的描边数字：不支持 text-stroke 时退化为实心深蓝 */
@supports (-webkit-text-stroke: 1px #000) {
  .ball { color: #fbfdff; -webkit-text-stroke: 3px #1e2f4a; paint-order: stroke fill; }
}

.latest-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }.meta-chip {
  background: #f4f8ff; border: 1px solid #e2eaf7; border-radius: 12px;
  padding: 7px 13px; color: #3d5273; font-size: 13px;
}
.meta-chip b { color: var(--red); font-size: 16px; margin-left: 2px; }
.latest-meta .meta-history { color: var(--muted); }

/* AI 预测卡 */
.predict-card { display: flex; flex-direction: column; }
.predict-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.predict-title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.predict-issue { font-size: 12px; color: var(--red); background: #eef4ff; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.pred-big { display: flex; gap: 20px; margin: 18px 0 4px; }
.pred-big span {
  font-size: 58px; font-weight: 800; line-height: 1; letter-spacing: 1px;
  color: var(--red); font-family: ui-rounded, "Helvetica Neue", "PingFang SC", sans-serif;
}
.pred-stats { display: flex; gap: 34px; margin: 12px 0 18px; }
.pred-stats .k { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.pred-stats .v { font-size: 21px; font-weight: 800; color: var(--text); }
.conf-row { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.conf-track { flex: 1; height: 8px; background: #edf2fa; border-radius: 999px; overflow: hidden; }
.conf-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #14419c, #4a8bf5);
  transition: width .7s ease;
}
.conf-val { font-size: 13px; font-weight: 700; color: #3d5273; min-width: 52px; text-align: right; }
.predict-note { font-size: 11px; color: var(--muted); margin-top: 12px; }

/* ---------- 区块 ---------- */
.section { margin-top: 40px; }
.section-title {
  font-size: 21px; font-weight: 800; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; letter-spacing: .3px;
}
.section-title::before {
  content: ""; width: 5px; height: 20px; border-radius: 4px;
  background: linear-gradient(180deg, #2f7cf6, #14419c);
}
.section-sub { font-size: 13px; color: var(--muted); font-weight: 500; }

.card {
  background: var(--card);
  border: 1px solid rgba(226, 234, 247, .95);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card h3 { font-size: 15px; color: var(--text); font-weight: 700; margin-bottom: 14px; }
.card h3 .h3-sub { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 8px; }

.pred-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.pred-side-card { display: flex; flex-direction: column; justify-content: center; gap: 26px; }
.pred-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.pred-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* ---------- 预测数字 ---------- */
.digit-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pos-label { width: 40px; font-size: 13px; color: var(--muted); font-weight: 600; flex: 0 0 auto; }
.digit-chip {
  width: 56px; height: 66px; border-radius: 15px;
  background: #f7faff; border: 1px solid #e2eaf7;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: .18s;
}
.digit-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.digit-chip .d { font-size: 23px; font-weight: 800; color: #12294a; line-height: 1.1; }
.digit-chip .p { font-size: 10px; color: var(--muted); margin-top: 2px; }
.digit-chip.top1 {
  background: linear-gradient(150deg, #2f7cf6, #14419c);
  border-color: #14419c;
  box-shadow: 0 8px 18px rgba(26, 86, 196, .22);
}
.digit-chip.top1 .d { color: #fff; }
.digit-chip.top1 .p { color: rgba(255, 255, 255, .78); }
.digit-chip.top2 { background: #eef4ff; border-color: #b9d0f7; }
.digit-chip.top2 .d { color: var(--red); }
.tip { color: var(--muted); font-size: 12px; margin-top: 12px; line-height: 1.7; }

.sum-list { display: flex; gap: 12px; flex-wrap: wrap; }
.sum-item {
  padding: 16px 22px; border-radius: 16px;
  background: #f7faff; border: 1px solid #e2eaf7; text-align: center;
  min-width: 90px; flex: 1;
}
.sum-item b { font-size: 26px; color: var(--red); font-weight: 800; display: block; }
.sum-item span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.type-tip { display: flex; flex-wrap: wrap; gap: 10px; }
.type-pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 800;
}
.type-pill small { font-size: 12px; font-weight: 600; opacity: .8; }
.type-pill.z6 { background: #e9f8f1; color: var(--green); }
.type-pill.z3 { background: #fdf3e4; color: var(--gold); }
.type-pill.bz { background: #fdecea; color: #c0392b; }

/* ---------- 推荐注 ---------- */
.comb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.comb {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #f8fbff; border: 1px solid #e8eefa;
  border-radius: 13px; padding: 9px 13px; transition: .18s;
}
.comb:hover { background: #f2f7ff; border-color: #d7e4f8; }
.comb .no { color: var(--muted); font-size: 12px; width: 26px; flex: 0 0 auto; }
.comb .nums { display: flex; gap: 6px; }
.comb .n {
  width: 30px; height: 30px; border-radius: 9px; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  background: #eef4ff; color: #12294a;
}
.comb .n.red { color: #fff; background: linear-gradient(150deg, #2f7cf6, #1a56c4); }
.comb .n.gold { color: #fff; background: linear-gradient(150deg, #e0a24a, #b0761c); }
.comb .n.blue { color: #fff; background: linear-gradient(150deg, #63c7b6, #1f9d6b); }
.comb .tag { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- 冷热/遗漏 ---------- */
.badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; display: inline-block; margin: 0 8px 8px 0; }
.badge.hot { background: #fdeeec; color: var(--hot); }
.badge.cold { background: #eaf2ff; color: var(--cold); }
.badge b { font-size: 14px; font-weight: 800; letter-spacing: 1px; }

.freq-bars { margin-top: 8px; }
.freq-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; }
.freq-bar .lbl { width: 14px; color: var(--muted); flex: 0 0 auto; }
.freq-bar .track { flex: 1; height: 8px; background: #eff3fa; border-radius: 999px; overflow: hidden; }
.freq-bar .fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #8fb8f7, #1a56c4);
  transition: width .5s ease;
}
.freq-bar .cnt { width: 26px; text-align: right; color: #3d5273; font-weight: 600; }

.omission-wrap { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 26px; }
.omission-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.omission-row .lbl { width: 26px; color: var(--muted); flex: 0 0 auto; }
.omission-row .cur { width: 62px; color: var(--muted); flex: 0 0 auto; }
.omission-row .cur b { color: var(--red); font-size: 13px; }
.omission-row .avg { width: 56px; color: var(--muted); flex: 0 0 auto; }
.omission-row .track { flex: 1; height: 7px; background: #eff3fa; border-radius: 999px; overflow: hidden; }
.omission-row .fill { height: 100%; background: linear-gradient(90deg, #a9c8f8, #2f7cf6); border-radius: 999px; }

/* ---------- 走势 ---------- */
.trend-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  background: #f5f8fd; border: 1px solid #e2eaf7; color: #3d5273;
  padding: 8px 20px; border-radius: 999px; cursor: pointer; font-size: 13px;
  font-weight: 600; transition: .18s; font-family: inherit;
}
.tab:hover { border-color: #c6d8f5; }
.tab.active {
  background: linear-gradient(140deg, #2f7cf6, #1a56c4); color: #fff;
  border-color: #1a56c4; box-shadow: 0 6px 14px rgba(26, 86, 196, .22);
}
#trend-canvas { width: 100%; height: 260px; display: block; }
.trend-table-wrap {
  margin-top: 16px; border: 1px solid #e8eefa; border-radius: 14px;
  max-height: 340px; overflow: auto;
}

/* ---------- 表格 ---------- */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
select {
  background: #fff; border: 1px solid #dfe8f6; color: var(--text);
  padding: 9px 14px; border-radius: 12px; font-size: 13px; font-family: inherit;
  cursor: pointer; transition: .18s;
}
select:hover { border-color: #c6d8f5; }
select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 124, 246, .12); }
.filter-total { color: var(--muted); font-size: 13px; margin-left: 4px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 12px;
  padding: 11px 14px; background: #f7faff;
  border-bottom: 1px solid #e8eefa; white-space: nowrap;
}
.table th:first-child { border-top-left-radius: 12px; }
.table th:last-child { border-top-right-radius: 12px; }
.table td { padding: 11px 14px; border-bottom: 1px solid #eef3fa; white-space: nowrap; color: #26374f; }
.table tbody tr { transition: .15s; }
.table tbody tr:hover td { background: #f7faff; }
.table tbody tr:last-child td { border-bottom: none; }

.table .ball-mini {
  display: inline-flex; width: 27px; height: 27px; border-radius: 9px;
  background: #eef4ff; color: #12294a; font-weight: 800; font-size: 13px;
  align-items: center; justify-content: center; margin-right: 5px;
}

.tag-type { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-type.z6 { background: #e9f8f1; color: var(--green); }
.tag-type.z3 { background: #fdf3e4; color: var(--gold); }
.tag-type.bz { background: #fdecea; color: #c0392b; }
.tag-hit { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e9f8f1; color: var(--green); }
.tag-miss { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f4f9; color: var(--muted); }
.tag-partial { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fdf3e4; color: var(--gold); }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 18px; justify-content: center; flex-wrap: wrap; }
.pager button {
  background: #fff; border: 1px solid #dfe8f6; color: #3d5273;
  padding: 7px 15px; border-radius: 10px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: .18s; min-width: 38px;
}
.pager button:hover:not(:disabled) { border-color: #b9d0f7; color: var(--red); }
.pager button.active {
  background: linear-gradient(140deg, #2f7cf6, #1a56c4); color: #fff;
  border-color: #1a56c4; box-shadow: 0 6px 14px rgba(26, 86, 196, .2);
}
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- 页脚 ---------- */
.footer {
  margin: 56px 0 32px; text-align: center; color: var(--muted);
  font-size: 12px; line-height: 2; border-top: 1px solid #e2eaf7; padding-top: 22px;
}

.empty { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .pred-grid, .pred-grid2, .pred-grid3 { grid-template-columns: minmax(0, 1fr); }
  .omission-wrap { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .header-inner { gap: 12px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}
@media (max-width: 560px) {
  .header-inner { height: auto; padding: 12px 0 4px; flex-wrap: wrap; }
  .logo { font-size: 19px; }
  .logo-mark { width: 32px; height: 32px; border-radius: 10px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; overflow: visible; gap: 2px; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .hero { margin-top: 18px; }
  .hero-card { padding: 20px; border-radius: 20px; }
  .ball { width: 74px; height: 74px; font-size: 40px; border-radius: 18px; }
  .latest-balls { gap: 12px; }
  .pred-big span { font-size: 44px; }
  .hero-title { font-size: 18px; }
  .comb-grid { grid-template-columns: minmax(0, 1fr); }
  .section-title { font-size: 18px; }
  .card { padding: 18px 16px; }
  .digit-chip { width: 50px; height: 60px; }
  .digit-chip .d { font-size: 20px; }
  .pred-stats { gap: 26px; }
}
