/* ============================================================
   双色球 · 智能走势实验室
   暗夜霓虹主题 / 纯静态实现
   ============================================================ */

:root {
  --bg: #06060b;
  --bg-2: #0a0a14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f7;
  --muted: #9395aa;
  --muted-2: #6c6e83;
  --red: #ff3b52;
  --red-2: #ff6a3d;
  --red-deep: #a8071a;
  --gold: #ffc53d;
  --blue: #3b82f6;
  --blue-2: #7aa8ff;
  --green: #2fd39a;
  --radius: 20px;
  --max: 1180px;
  --font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --num: 'Oswald', 'DIN Alternate', 'Bahnschrift', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 40% at 15% 8%, rgba(255, 59, 82, 0.16), transparent 62%),
    radial-gradient(42% 38% at 86% 14%, rgba(59, 130, 246, 0.14), transparent 64%),
    radial-gradient(55% 45% at 50% 112%, rgba(255, 197, 61, 0.09), transparent 66%);
  filter: blur(24px);
  animation: aurora 20s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(62% 62% at 50% 28%, #000 0%, transparent 100%);
  mask-image: radial-gradient(62% 62% at 50% 28%, #000 0%, transparent 100%);
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

main,
.nav,
.topbar,
.footer,
.ticker {
  position: relative;
  z-index: 1;
}

/* ---------------- 顶部提示条 ---------------- */

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(255, 59, 82, 0.14), rgba(255, 197, 61, 0.08), rgba(59, 130, 246, 0.12));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  color: #b9bac9;
  letter-spacing: 0.04em;
}

.topbar-sep {
  color: rgba(255, 255, 255, 0.25);
}

/* ---------------- 导航 ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 68px;
  padding: 0 28px;
  background: rgba(6, 6, 11, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.brand-mark i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffb1b1, #ff3b52 52%, #a8071a);
  box-shadow: 0 0 10px rgba(255, 59, 82, 0.5);
}

.brand-mark i:nth-child(2) {
  width: 15px;
  height: 15px;
}

.brand-mark i:nth-child(3) {
  background: radial-gradient(circle at 32% 28%, #b7d3ff, #3b82f6 52%, #123a9e);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.55);
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-text em {
  font-family: var(--num);
  font-style: normal;
  color: var(--red);
  letter-spacing: 0.12em;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.25s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: right 0.3s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  right: 0;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}

.nav-more {
  font-size: 11.5px;
  color: var(--muted-2);
  padding: 6px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 211, 154, 0.6);
  animation: pulse 2.2s infinite;
}

/* ---------------- 首屏 ---------------- */

.hero {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 78px 24px 54px;
  text-align: center;
  overflow: hidden;
}

.hero > *:not(.hero-orbs) {
  position: relative;
  z-index: 2;
}

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.orb-red {
  width: 380px;
  height: 380px;
  left: -8%;
  top: 12%;
  background: rgba(255, 59, 82, 0.3);
  animation: float 14s ease-in-out infinite;
}

.orb-blue {
  width: 320px;
  height: 320px;
  right: -6%;
  top: 26%;
  background: rgba(59, 130, 246, 0.26);
  animation: float 17s ease-in-out infinite reverse;
}

.orb-gold {
  width: 260px;
  height: 260px;
  left: 42%;
  bottom: -10%;
  background: rgba(255, 197, 61, 0.18);
  animation: float 19s ease-in-out infinite;
}

.game-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 4px 0 30px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.game-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--num);
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.game-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.game-tab .gt-name {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.game-tab .gt-code {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  opacity: 0.55;
}

.game-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 59, 82, 0.92), rgba(255, 122, 60, 0.78));
  box-shadow: 0 10px 26px rgba(255, 59, 82, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body[data-game='dlt'] .game-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 197, 61, 0.95), rgba(255, 128, 61, 0.8));
  color: #221700;
  box-shadow: 0 10px 26px rgba(255, 197, 61, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.game-tab .tab-new {
  position: absolute;
  top: -9px;
  right: -2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #241a00;
  font-family: var(--num);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 12px rgba(255, 197, 61, 0.35);
}

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-indent: 0.42em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}

.hero h1 .grad {
  display: block;
  margin-top: 6px;
  font-size: 0.86em;
  background: linear-gradient(96deg, #ff8a8a 0%, #ff3b52 38%, #ffc53d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 59, 82, 0.28));
}

.hero-sub {
  max-width: 660px;
  margin: 24px auto 0;
  font-size: 15px;
  line-height: 1.95;
  color: var(--muted);
}

.hero-sub strong {
  color: var(--text);
  font-weight: 700;
}

.countdown-card {
  display: inline-block;
  margin-top: 36px;
  padding: 18px 36px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.cd-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.cd-label b {
  font-family: var(--num);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.cd-timer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 6px;
  font-family: var(--num);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-shadow: 0 0 22px rgba(255, 59, 82, 0.45);
}

.cd-timer span {
  min-width: 1.7ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cd-timer small {
  margin: 0 9px 0 3px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted-2);
}

.cd-timer small:last-child {
  margin-right: 0;
}

.cd-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  background: transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(100deg, #ff3b52, #ff6a3d);
  color: #fff;
  box-shadow: 0 12px 32px rgba(255, 59, 82, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(255, 59, 82, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary .arrow {
  transition: transform 0.25s ease;
}

.btn-primary:hover .arrow {
  transform: translateX(4px);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: #d9dae6;
}

.btn-ghost:hover {
  border-color: rgba(255, 59, 82, 0.45);
  background: rgba(255, 59, 82, 0.08);
  transform: translateY(-2px);
}

.btn-lg {
  width: 100%;
  padding: 17px 26px;
  font-size: 15px;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 12.5px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.latest-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 40px auto 0;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  color: var(--muted);
}

.latest-strip .strip-label {
  font-family: var(--num);
  letter-spacing: 0.08em;
  color: var(--gold);
}

.latest-strip .strip-extra {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hstat {
  padding: 0 36px;
  text-align: center;
}

.hstat + .hstat {
  border-left: 1px solid var(--line);
}

.hstat b {
  display: block;
  font-family: var(--num);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: linear-gradient(100deg, #fff, #ffc9c9 60%, #ffc53d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hstat span {
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

/* ---------------- 滚动播报 ---------------- */

.ticker {
  overflow: hidden;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 44px;
  animation: ticker 52s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.tk-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

.tk-item .tk-issue {
  font-family: var(--num);
  letter-spacing: 0.08em;
  color: #d9dae6;
}

.tk-item .tk-num {
  font-family: var(--num);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #ff97a1;
}

.tk-item .tk-blue {
  color: var(--blue-2);
}

.tk-item .tk-plus {
  color: rgba(255, 255, 255, 0.25);
}

/* ---------------- 通用区块 ---------------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 86px 24px 8px;
  scroll-margin-top: 88px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  margin-bottom: 32px;
}

.section-kicker {
  margin: 0 0 10px;
  font-family: var(--num);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--gold);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-desc {
  max-width: 470px;
  margin: 0;
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
}

.panel {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.panel-tip {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ---------------- 开奖结果 ---------------- */

.draws-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.draws-grid .draw-card .balls {
  gap: 6px;
}

.draw-card {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.draw-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.draw-card.is-latest {
  grid-column: span 3;
  border-color: rgba(255, 59, 82, 0.32);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 59, 82, 0.14), transparent 52%),
    radial-gradient(90% 120% at 100% 0%, rgba(255, 197, 61, 0.08), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 60px rgba(255, 59, 82, 0.1);
}

.draw-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.draw-issue {
  font-family: var(--num);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.draw-date {
  font-size: 11.5px;
  color: var(--muted-2);
}

.draw-badge {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid rgba(255, 59, 82, 0.4);
  border-radius: 999px;
  background: rgba(255, 59, 82, 0.14);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff9aa4;
}

.balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ball {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--num);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  background: radial-gradient(circle at 32% 26%, #ffb8b8, #ff3b52 46%, #a8071a 100%);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.38),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -3px 7px rgba(0, 0, 0, 0.35);
}

.ball::after {
  content: '';
  position: absolute;
  top: 16%;
  left: 24%;
  width: 26%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(2px);
}

.ball.blue {
  background: radial-gradient(circle at 32% 26%, #bcd8ff, #3b82f6 46%, #103a9e 100%);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(59, 130, 246, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -3px 7px rgba(0, 0, 0, 0.35);
}

.ball--sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.35),
    inset 0 1px 3px rgba(255, 255, 255, 0.35);
}

.balls-lg .ball {
  width: 48px;
  height: 48px;
  font-size: 19px;
}

.balls-xl {
  gap: 10px;
}

.balls-xl .ball {
  width: 58px;
  height: 58px;
  font-size: 23px;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.45),
    0 0 26px rgba(255, 59, 82, 0.28),
    inset 0 3px 6px rgba(255, 255, 255, 0.42),
    inset 0 -4px 9px rgba(0, 0, 0, 0.35);
}

.balls-xl .ball.blue {
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(59, 130, 246, 0.45),
    inset 0 3px 6px rgba(255, 255, 255, 0.42),
    inset 0 -4px 9px rgba(0, 0, 0, 0.35);
}

.draw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 15px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.draw-meta b {
  font-family: var(--num);
  font-size: 12.5px;
  font-weight: 500;
  color: #c9cad8;
  letter-spacing: 0.04em;
}

.jackpot-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
}

.jackpot-line strong {
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* ---------------- 热度矩阵 ---------------- */

.trend-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.heat-zone + .heat-zone {
  margin-top: 13px;
}

.hz-label {
  margin-bottom: 7px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.hz-cells {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
}

.heat-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.heat-cell:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hc-num {
  font-family: var(--num);
  font-size: 14px;
  font-weight: 500;
  color: #dadae6;
  letter-spacing: 0.03em;
}

.hc-count {
  font-size: 9.5px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.42);
}

.heat-cell[data-level='1'] {
  background: rgba(59, 130, 246, 0.17);
  border-color: rgba(59, 130, 246, 0.3);
}

.heat-cell[data-level='2'] {
  background: rgba(255, 158, 66, 0.2);
  border-color: rgba(255, 158, 66, 0.34);
}

.heat-cell[data-level='3'] {
  background: rgba(255, 59, 82, 0.28);
  border-color: rgba(255, 59, 82, 0.48);
  box-shadow: inset 0 0 20px rgba(255, 59, 82, 0.16);
}

.heat-cell[data-level='4'] {
  background: linear-gradient(150deg, rgba(255, 106, 61, 0.55), rgba(255, 59, 82, 0.32));
  border-color: rgba(255, 106, 61, 0.65);
  box-shadow: 0 0 20px rgba(255, 59, 82, 0.26), inset 0 0 20px rgba(255, 59, 82, 0.2);
}

.heat-cell[data-level='4'] .hc-num {
  color: #fff;
}

.heat-cell.is-over {
  border-style: dashed;
}

.heat-cell.is-over::after {
  content: '降';
  position: absolute;
  top: -6px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #131320;
  border: 1px solid rgba(255, 197, 61, 0.5);
  font-size: 9px;
  color: var(--gold);
}

.heat-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 16px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.lg {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.lg-1 { background: rgba(59, 130, 246, 0.35); }
.lg-2 { background: rgba(255, 158, 66, 0.4); }
.lg-3 { background: rgba(255, 59, 82, 0.5); }
.lg-4 { background: linear-gradient(150deg, #ff6a3d, #ff3b52); }

.heat-legend .lg:first-child {
  margin-left: 0;
}

.heat-legend em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted-2);
  opacity: 0.7;
}

/* ---------------- 盘面信号 ---------------- */

.signal-list {
  display: flex;
  flex-direction: column;
}

.sig-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.sig-item:first-child {
  padding-top: 2px;
}

.sig-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sig-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 59, 82, 0.12);
  border: 1px solid rgba(255, 59, 82, 0.25);
  color: #ff9aa4;
}

.sig-item[data-accent='blue'] .sig-icon {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #9dc2ff;
}

.sig-item[data-accent='gold'] .sig-icon {
  background: rgba(255, 197, 61, 0.12);
  border-color: rgba(255, 197, 61, 0.3);
  color: var(--gold);
}

.sig-title {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
  color: #e6e6ef;
}

.sig-text {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.chip {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--num);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #cfd0dd;
}

.chip--hot {
  border-color: rgba(255, 59, 82, 0.35);
  background: rgba(255, 59, 82, 0.12);
  color: #ffa3ac;
}

.chip--over {
  border-color: rgba(255, 197, 61, 0.3);
  background: rgba(255, 197, 61, 0.08);
  color: #ffd47a;
}

.chip--cold {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  color: #9dc2ff;
}

.chip--warm {
  color: #cfd0dd;
}

.chip--neighbor {
  border-color: rgba(47, 211, 154, 0.3);
  background: rgba(47, 211, 154, 0.08);
  color: #86e9c5;
}

/* ---------------- 10期走势图 ---------------- */

.panel-trend {
  margin-top: 18px;
}

.trend-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.trend-scroll::-webkit-scrollbar {
  height: 6px;
}

.trend-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
}

.trend-grid {
  display: grid;
  grid-template-columns: 52px repeat(33, minmax(18px, 1fr));
  gap: 3px 2px;
  min-width: 780px;
}

.tg-corner,
.tg-head {
  display: grid;
  place-items: center;
  font-family: var(--num);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted-2);
}

.tg-head.is-zone-end {
  color: var(--gold);
}

.tg-issue {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  white-space: nowrap;
}

.tg-cell {
  position: relative;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.024);
}

.tg-cell.zone-gap {
  margin-left: 3px;
}

.tg-cell.hit {
  background: rgba(255, 59, 82, 0.14);
}

.tg-cell.hit::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #ffb2b8, #ff3b52 60%, #b3091c);
  box-shadow: 0 0 8px rgba(255, 59, 82, 0.75);
}

.tg-row-latest .tg-cell {
  background: rgba(255, 255, 255, 0.045);
}

/* ---------------- 奇偶 / 区间图表 ---------------- */

.trend-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.bar-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bar-row {
  display: grid;
  grid-template-columns: 42px 1fr 46px;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.bar-issue {
  font-family: var(--num);
  letter-spacing: 0.04em;
  color: var(--muted-2);
  text-align: right;
}

.bar-track {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.bar-seg {
  height: 100%;
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-seg.odd {
  background: linear-gradient(90deg, #ff8a3d, #ff3b52);
}

.bar-seg.even {
  background: linear-gradient(90deg, #3b82f6, #7aa8ff);
}

.bar-seg.z1 {
  background: linear-gradient(90deg, #ffd166, #ffb02e);
}

.bar-seg.z2 {
  background: linear-gradient(90deg, #ff6a3d, #ff3b52);
}

.bar-seg.z3 {
  background: linear-gradient(90deg, #4f8cff, #2f5bff);
}

.bar-val {
  font-family: var(--num);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #c6c7d5;
  text-align: left;
}

.zone-legend {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted-2);
}

.zone-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.zone-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.zone-legend i.z1 { background: #ffb02e; }
.zone-legend i.z2 { background: #ff3b52; }
.zone-legend i.z3 { background: #2f5bff; }

/* ---------------- 蓝球 ---------------- */

.panel > .blue-history {
  margin-bottom: 18px;
}

.blue-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bh-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}

.bh-item .bh-ball {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #bcd8ff, #3b82f6 46%, #103a9e 100%);
  font-family: var(--num);
  font-size: 10.5px;
  color: #fff;
}

.bh-item.is-latest {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.1);
}

.blue-track {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 6px;
}

.bt-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
}

.bt-cell b {
  font-family: var(--num);
  font-size: 13px;
  font-weight: 500;
  color: #d6d7e3;
}

.bt-cell span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
}

.bt-cell[data-level='1'] {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.26);
}

.bt-cell[data-level='2'] {
  background: rgba(59, 130, 246, 0.26);
  border-color: rgba(59, 130, 246, 0.44);
}

.bt-cell.is-latest {
  border-color: rgba(255, 197, 61, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 197, 61, 0.25), 0 0 18px rgba(255, 197, 61, 0.16);
}

.bt-cell.is-latest b {
  color: #ffd47a;
}

/* ---------------- 预测引擎 ---------------- */

.predict-shell {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 18px;
  align-items: stretch;
}

.console {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 59, 82, 0.22);
  border-radius: 22px;
  background: #08080e;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--line);
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.console-dots {
  display: inline-flex;
  gap: 4px;
}

.console-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b52;
}

.console-dots i:nth-child(2) { background: #ffc53d; }
.console-dots i:nth-child(3) { background: #2fd39a; }

.console-title {
  margin-left: 2px;
}

.console-state {
  margin-left: auto;
  color: var(--green);
}

.console-state.is-busy {
  color: var(--gold);
}

.console-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.scan-steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.scan-step {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.055);
  font-size: 12.5px;
  color: #5f6178;
  transition: color 0.3s ease;
}

.scan-step:last-child {
  border-bottom: none;
}

.step-idx {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-family: var(--num);
  font-size: 10px;
  color: var(--muted-2);
  transition: all 0.3s ease;
}

.step-text {
  flex: 1;
}

.step-status {
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.scan-step.is-active {
  color: #fff;
}

.scan-step.is-active .step-idx {
  border-color: rgba(255, 59, 82, 0.6);
  color: #ff8a94;
  box-shadow: 0 0 0 4px rgba(255, 59, 82, 0.08), 0 0 16px rgba(255, 59, 82, 0.35);
  animation: stepPulse 1.2s ease-in-out infinite;
}

.scan-step.is-active .step-status {
  color: var(--gold);
}

.scan-step.is-done {
  color: #c9cad9;
}

.scan-step.is-done .step-idx {
  border-color: rgba(47, 211, 154, 0.45);
  background: rgba(47, 211, 154, 0.12);
  color: var(--green);
}

.scan-step.is-done .step-status {
  color: var(--green);
}

.console-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted-2);
}

.console.is-scanning::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 140px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 59, 82, 0.09), transparent);
  animation: scanline 1.9s linear infinite;
}

.result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255, 59, 82, 0.09), transparent 56%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.result-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.result-placeholder small {
  font-size: 11.5px;
  color: var(--muted-2);
}

.ph-orbit {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.ph-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  top: -5px;
  left: calc(50% - 5px);
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 59, 82, 0.7);
}

.ph-orbit span:nth-child(2) {
  top: auto;
  bottom: 6px;
  left: 8px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 197, 61, 0.6);
}

.ph-orbit span:nth-child(3) {
  top: 44%;
  left: auto;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

.result-body {
  width: 100%;
  text-align: center;
  animation: fadeUp 0.5s ease both;
}

.result-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
}

.result-label span {
  font-family: var(--num);
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-left: 6px;
}

.result-main .balls-xl {
  justify-content: center;
  margin: 18px 0 12px;
}

.resonance {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.rs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.025);
}

.rs-chip i {
  font-style: normal;
  font-family: var(--num);
  font-size: 10px;
}

.rs-chip.is-ok {
  border-color: rgba(47, 211, 154, 0.3);
  background: rgba(47, 211, 154, 0.08);
  color: #8fe8c7;
}

.result-reason {
  max-width: 520px;
  margin: 14px auto 0;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--muted-2);
}

.result-alts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  text-align: left;
}

.alt-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.alt-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.alt-label b {
  font-weight: 500;
  color: #cfd0dd;
}

.alt-card .balls {
  gap: 5px;
}

.alt-card .ball {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.alt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--num);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.result-disclaimer {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  line-height: 1.8;
  color: #6a6c80;
}

#againBtn {
  margin-top: 14px;
}

/* 号码弹出动画 */
.ball--pop {
  animation: ballPop 0.62s cubic-bezier(0.2, 1.32, 0.4, 1) both;
  animation-delay: calc(var(--i, 0) * 75ms);
}

/* ---------------- 规律卡片 ---------------- */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.rule-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.rule-card:hover {
  border-color: rgba(255, 59, 82, 0.3);
  transform: translateY(-3px);
}

.rule-no {
  position: absolute;
  top: 8px;
  right: 16px;
  font-family: var(--num);
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
}

.rule-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 59, 82, 0.25);
  background: rgba(255, 59, 82, 0.1);
  font-size: 14px;
  font-weight: 700;
  color: #ff9aa4;
}

.rule-card:nth-child(2) .rule-icon {
  border-color: rgba(255, 197, 61, 0.28);
  background: rgba(255, 197, 61, 0.09);
  color: var(--gold);
}

.rule-card:nth-child(3) .rule-icon {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #9dc2ff;
}

.rule-card:nth-child(4) .rule-icon {
  border-color: rgba(47, 211, 154, 0.28);
  background: rgba(47, 211, 154, 0.08);
  color: #86e9c5;
}

.rule-card:nth-child(5) .rule-icon {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.1);
  color: #c9b6ff;
}

.rule-card h4 {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 700;
}

.rule-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.rule-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.rule-tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  color: var(--muted-2);
}

/* ---------------- 页脚 ---------------- */

.footer {
  max-width: var(--max);
  margin: 84px auto 0;
  padding: 36px 24px 42px;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.footer-top p {
  margin: 0;
  max-width: 520px;
  text-align: right;
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted-2);
}

.footer-note {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.footer-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.95;
  color: #6f7186;
}

.footer-note strong {
  color: #b9bac9;
  font-weight: 700;
}

.copyright {
  margin-top: 12px !important;
  color: #55576b !important;
}

/* ---------------- 动画 ---------------- */

@keyframes aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(18px, -22px, 0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 211, 154, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(47, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 211, 154, 0); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

@keyframes scanline {
  from { transform: translateY(-140px); }
  to { transform: translateY(560px); }
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 59, 82, 0.06), 0 0 12px rgba(255, 59, 82, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(255, 59, 82, 0.1), 0 0 22px rgba(255, 59, 82, 0.45); }
}

@keyframes ballPop {
  0% { opacity: 0; transform: scale(0.2) rotate(-24deg); }
  60% { opacity: 1; transform: scale(1.1) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

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

/* 滚动进入 */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .nav {
    gap: 24px;
    padding: 0 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-more {
    display: none;
  }

  .predict-shell {
    grid-template-columns: 1fr;
  }

  .result {
    min-height: 360px;
  }

  .draws-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draw-card.is-latest {
    grid-column: span 2;
  }
}

@media (max-width: 940px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .section-desc {
    max-width: 620px;
  }

  .trend-top {
    grid-template-columns: 1fr;
  }

  .trend-charts {
    grid-template-columns: 1fr;
  }

  .draws-grid {
    grid-template-columns: 1fr;
  }

  .draw-card.is-latest {
    grid-column: span 1;
  }

  .heat-cell {
    aspect-ratio: auto;
    height: 46px;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .nav {
    height: 60px;
    gap: 12px;
  }

  .update-badge {
    padding: 5px 10px;
    font-size: 10.5px;
  }

  .hero {
    padding: 54px 20px 44px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .countdown-card {
    padding: 15px 22px 13px;
  }

  .cd-timer small {
    margin: 0 6px 0 2px;
  }

  .latest-strip {
    border-radius: 18px;
    padding: 12px 16px;
  }

  .latest-strip .strip-extra {
    padding-left: 0;
    border-left: none;
    flex-basis: 100%;
    text-align: center;
  }

  .hstat {
    padding: 0 20px;
  }

  .hstat b {
    font-size: 21px;
  }

  .section {
    padding: 62px 18px 4px;
  }

  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .heat-cell {
    height: 42px;
    border-radius: 8px;
  }

  .hc-num {
    font-size: 12.5px;
  }

  .hc-count {
    font-size: 8.5px;
  }

  .ball {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .balls-lg .ball {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .balls-xl .ball {
    width: 47px;
    height: 47px;
    font-size: 18px;
  }

  .result {
    padding: 20px 16px;
  }

  .result-alts {
    grid-template-columns: 1fr;
  }

  .blue-track {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .footer-top {
    flex-direction: column;
    gap: 16px;
  }

  .footer-top p {
    text-align: left;
  }

  .bar-row {
    grid-template-columns: 38px 1fr 42px;
    gap: 8px;
  }
}

/* ---------------- 推演历史 ---------------- */

.history-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: 340px;
}

.history-head-actions .section-desc {
  text-align: right;
}

.history-filter {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.hf-btn {
  padding: 6px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}

.hf-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.hf-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff7a3c);
  box-shadow: 0 8px 18px rgba(255, 59, 82, 0.28);
}

body[data-game='dlt'] .hf-btn.is-active {
  background: linear-gradient(135deg, var(--gold), #ff803d);
  color: #221700;
  box-shadow: 0 8px 18px rgba(255, 197, 61, 0.28);
}

.hf-refresh {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.25s ease, background 0.25s ease;
}

.hf-refresh:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.history-empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.h-card {
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.h-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 134, 0.35);
  box-shadow: 0 14px 40px rgba(255, 59, 82, 0.2), 0 0 0 1px rgba(255, 122, 134, 0.12) inset;
}

.h-head {
  display: flex;
  gap: 10px 14px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.h-issue {
  font-family: var(--num);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.h-draw {
  font-size: 12px;
  color: var(--muted);
}

.h-time {
  margin-left: auto;
  font-family: var(--num);
  font-size: 11px;
  color: #6a6f84;
}

.h-card .balls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.h-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ht-tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #9ea4b9;
  font-family: var(--num);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.ht-tag.is-ok {
  border-color: rgba(47, 211, 154, 0.3);
  color: #5fe1b2;
  background: rgba(47, 211, 154, 0.08);
}

.ht-tag.is-warn {
  border-color: rgba(255, 197, 61, 0.28);
  color: #f2c86a;
  background: rgba(255, 197, 61, 0.06);
}

.h-reason {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #b8becd;
}

.h-alts {
  display: flex;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.h-alt {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ha-label {
  font-family: var(--num);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.balls--sm {
  gap: 6px;
  flex-wrap: wrap;
}

.history-more {
  text-align: center;
  margin-top: 28px;
}

@media (max-width: 940px) {
  .history-head-actions {
    min-width: 0;
    align-items: flex-start;
    margin-top: 12px;
  }
  .history-head-actions .section-desc {
    text-align: left;
  }
  .history-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .h-card { padding: 16px; }
  .h-alts { flex-direction: column; gap: 10px; }
}

@media (max-width: 520px) {
  .topbar {
    font-size: 10px;
    gap: 5px;
    padding: 7px 10px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.3em;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero h1 .grad {
    font-size: 0.78em;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    padding: 13px 18px;
    font-size: 13.5px;
  }

  .hero-stats {
    margin-top: 30px;
  }

  .hstat {
    padding: 0 14px;
  }

  .hstat + .hstat {
    border-left: none;
  }

  .hstat b {
    font-size: 19px;
  }

  .heat-cell {
    height: 38px;
  }

  .hz-cells {
    gap: 4px;
  }

  .trend-grid {
    min-width: 720px;
  }

  .draw-card {
    padding: 17px;
  }

  .draw-issue {
    font-size: 17px;
  }

  .sig-item {
    grid-template-columns: 26px 1fr;
    gap: 10px;
  }

  .result-main .balls-xl {
    gap: 7px;
  }

  .balls-xl .ball {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .rule-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
