:root {
  --bg-primary: #f7f9fc;
  --bg-secondary: #f7f9fc;
  --bg-tertiary: #eef2f7;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-glass: #e6ebf2;
  --border-glass-hover: #cfd8e6;

  --text-primary: #0f1b2d;
  --text-secondary: #3d4f66;
  --text-muted: #6b7c93;
  --text-dim: #8b9bb0;

  --neon-blue: #2563eb;
  --neon-purple: #4f46e5;
  --neon-pink: #e11d48;
  --neon-green: #16a34a;
  --neon-orange: #ea580c;
  --neon-red: #ef4444;
  --neon-cyan: #0284c7;

  --primary: #2563eb;
  --accent: #1d4ed8;
  --red: #ef4444;
  --orange: #f97316;
  --blue: #3b82f6;
  --green: #22c55e;

  --grad-hero: #ffffff;
  --grad-accent: #2563eb;
  --grad-warm: #ef4444;
  --grad-cool: #3b82f6;
  --grad-red: #ef4444;
  --grad-orange: #f97316;
  --grad-blue: #3b82f6;
  --grad-green: #22c55e;
  --grad-primary: #2563eb;

  --glow-blue: 0 8px 24px rgba(14, 116, 144, .12);
  --glow-purple: 0 8px 24px rgba(15, 118, 110, .12);
  --glow-red: 0 8px 24px rgba(220, 38, 38, .12);
  --shadow-sm: 0 1px 3px rgba(21, 32, 51, .06);
  --shadow-md: 0 4px 14px rgba(21, 32, 51, .08);
  --shadow-lg: 0 12px 32px rgba(21, 32, 51, .1);
  --shadow-card: 0 2px 12px rgba(21, 32, 51, .06), 0 1px 0 rgba(255,255,255,.8) inset;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background-color: var(--bg-primary);
  background-image: none;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 58px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(21, 32, 51, .15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(21, 32, 51, .28); }

/* ── Top Bar ── */
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff;
  color: var(--text-primary); padding: 10px 16px;
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  border-bottom: 1px solid var(--border-glass);
  box-shadow: none;
}
.top-bar + *, body { padding-top: 54px; }
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .3px;
  color: var(--text-primary);
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: #2563eb;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.header-actions { display: flex; gap: 6px; }
.header-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(15, 40, 70, .04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.header-btn:hover { background: #f3f6fb; color: var(--primary); border-color: #d5deea; }
.header-btn-auth {
  width: auto; padding: 0 10px; gap: 4px; font-size: .75rem;
  text-decoration: none;
}
.header-btn-algo {
  width: auto; padding: 0 10px; gap: 4px; font-size: .75rem;
  text-decoration: none; background: #eff6ff;
  border-color: #dbeafe; color: var(--primary);
}
.header-btn-algo:hover { background: #dbeafe; color: #1d4ed8; }
.auth-btn-text { font-weight: 600; color: inherit; }

/* ── Hero Section ── */
.hero-section {
  background: transparent;
  max-width: 1112px;
  margin: 0 auto;
  padding: 12px 16px 8px;
  box-sizing: border-box;
  position: relative;
  border-bottom: none;
}
.hero-section::before { display: none; }
.hero-inner {
  width: 100%; margin: 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 268px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}
.hero-countdown {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 8px;
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(74, 222, 128, .18), transparent 70%),
    linear-gradient(180deg, #f8fdf9 0%, #eefaf3 100%);
  border: 1px solid #d7f0e3;
  border-radius: 16px;
  padding: 12px 14px 12px;
  text-align: left;
  min-height: 128px;
  box-shadow: 0 1px 2px rgba(15, 27, 45, .04);
}
.hero-cd-top, .hero-cd-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .75rem; color: #6b8576;
}
.hero-cd-label {
  display: inline-flex; align-items: center;
  font-size: .78rem; font-weight: 700; color: #3f6b52;
}
.hero-cd-dot {
  width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}
.hero-next-issue {
  font-weight: 700; color: #14532d;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #d7f0e3;
  border-radius: 999px;
  padding: 2px 8px;
}
.hero-cd-clock {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hero-cd-unit {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 72px; height: 62px;
  background: #fff;
  border: 1px solid #e3f6eb;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(22, 163, 74, .07);
}
.hero-cd-num {
  font-size: 1.7rem; font-weight: 800; line-height: 1; color: #15803d;
  font-variant-numeric: tabular-nums;
}
.hero-cd-unit-label {
  margin-top: 3px;
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; color: #86a896;
}
.hero-cd-colon {
  font-size: 1.45rem; font-weight: 800; line-height: 1; color: #4ade80;
  margin-bottom: 12px;
}
.hero-cd-wait {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 62px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #15803d;
  letter-spacing: .04em;
}
.hero-countdown.is-waiting .hero-cd-unit,
.hero-countdown.is-waiting .hero-cd-colon { display: none; }
.hero-countdown.is-waiting .hero-cd-wait { display: flex; }
.hero-cd-track {
  flex: 1; height: 5px; min-width: 48px;
  background: #e4f6eb; border-radius: 99px; overflow: hidden;
}
.hero-cd-bar {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #4ade80, #16a34a);
}
.hero-countdown.is-urgent .hero-cd-num { color: #c2410c; }
.hero-countdown.is-urgent .hero-cd-colon { color: #fb923c; }
.hero-countdown.is-urgent .hero-cd-dot { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, .16); }
.hero-countdown.is-urgent .hero-cd-bar { background: linear-gradient(90deg, #fdba74, #ea580c); }
#hero-open-at { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-result {
  display: flex; flex-direction: column; justify-content: center;
  background: #fff;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 12px 16px 14px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 27, 45, .04);
}
.hero-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px; padding: 0;
}
.hero-title {
  font-size: .95rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap;
  flex: 1 0 auto;
}
.hero-issue { font-weight: 800; margin-right: 8px; }
.hero-open-time { font-weight: 500; color: var(--text-muted); font-size: .82rem; }
.hero-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hero-scratch-btn {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 0; padding: 5px 12px;
  background: #fff;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.hero-scratch-btn:hover { background: #f3f6fb; color: var(--primary); }
.hero-scratch-btn .active { color: var(--primary); }
.hero-scratch-btn svg.active ~ span { color: var(--primary); }

.hero-group-btn {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 0; padding: 5px 12px;
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #fff;
  font-size: .75rem; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: all .2s;
}
.hero-group-btn:hover { background: #1d4ed8; color: #fff; }

/* Hero Draw */
.hero-stage {
  position: relative;
  width: 100%;
  margin-top: 6px;
}
.hero-draw {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: 8px;
  padding: 0;
  width: 100%;
}
.hero-ball, .hero-sum, .hero-tag {
  width: 100%;
  max-width: 76px;
  aspect-ratio: 1;
  height: auto;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.85rem; font-weight: 800;
  box-shadow: none;
}
.hero-ball {
  color: var(--text-primary);
  background: #eef2f7;
  border: none;
}
.hero-plus, .hero-eq {
  flex: 0 0 auto;
  font-size: 1.45rem; font-weight: 700; color: #94a3b8;
  margin: 0;
}
.hero-sum {
  color: #fff;
  background: #2563eb;
}
.hero-tag {
  padding: 0;
  color: #fff;
}
.hero-tag-red { background: #ef4444; }
.hero-tag-blue { background: #3b82f6; }
.hero-tag-shape {
  flex: 0 0 auto;
  width: auto;
  min-width: 64px;
  max-width: none;
  padding: 0 10px;
  font-size: 1.45rem;
}
.hero-shape-leopard { background: #ef4444; }
.hero-shape-pair { background: #7c3aed; }
.hero-shape-straight { background: #0891b2; }
.hero-shape-misc { background: #6b7280; }

.hero-scratch-wrap {
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
  margin: 0;
  padding: 0;
  border: none;
  z-index: 2;
}
.hero-scratch-wrap .scratch-container {
  height: 100%;
  margin: 0;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}
.hero-scratch-wrap .scratch-result {
  height: 100%;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 12px;
}

/* Hero Skeleton */
.hero-skeleton {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 0;
}
.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(15,40,70,.06) 25%, rgba(15,40,70,.12) 50%, rgba(15,40,70,.06) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
.skeleton-line {
  height: 14px; margin-bottom: 10px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(15,40,70,.06) 25%, rgba(15,40,70,.12) 50%, rgba(15,40,70,.06) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
.skeleton-line:nth-child(2) { width: 80%; }
.skeleton-line:nth-child(3) { width: 60%; }
.skeleton-block {
  height: 120px; margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(15,40,70,.06) 25%, rgba(15,40,70,.12) 50%, rgba(15,40,70,.06) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
.skeleton-circle { width: 56px; height: 56px; border-radius: 16px; }

/* ── Info Cards Grid ── */
.info-cards-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: .65rem; padding: 8px 16px; max-width: 1112px; margin: 0 auto;
  box-sizing: border-box;
}
.info-card {
  display: flex; align-items: center; gap: .7rem;
  background: var(--bg-card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass); border-radius: 12px;
  padding: .75rem .85rem; cursor: pointer;
  transition: transform .2s, border-color .25s, box-shadow .25s;
}
.info-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-md);
}
.info-card:active { transform: translateY(0); }
.info-card-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.info-card-icon svg { width: 20px; height: 20px; }
.info-card-icon.ic-predict {
  background: linear-gradient(135deg, rgba(15,118,110,.18), rgba(3,105,161,.12));
  color: var(--primary);
}
.info-card-icon.ic-analysis {
  background: linear-gradient(135deg, rgba(14,116,144,.18), rgba(2,132,199,.12));
  color: var(--neon-blue);
}
.info-card-icon.ic-missing {
  background: linear-gradient(135deg, rgba(234,88,12,.18), rgba(249,115,22,.1));
  color: var(--neon-orange);
}
.info-card-icon.ic-streaks {
  background: linear-gradient(135deg, rgba(220,38,38,.16), rgba(239,68,68,.1));
  color: var(--neon-red);
}
.info-card-body { flex: 1; min-width: 0; }
.info-card-label {
  font-size: .7rem; color: var(--text-muted); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.info-card-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  position: relative;
}
.info-card-tags.is-masked::after {
  content: '咪牌遮掩中';
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: linear-gradient(90deg, #4b5563 0%, #6b7280 55%, #9ca3af 100%);
  color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
}
.info-card-tags.is-masked .ic-tag,
.info-card-tags.is-masked .info-card-shimmer { visibility: hidden; }
.ic-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(15, 40, 70, .04);
  border: 1px solid var(--border-glass);
  font-size: .7rem; line-height: 1.4;
  transition: border-color .2s, background .2s;
}
.info-card:hover .ic-tag {
  border-color: rgba(15, 118, 110, .2);
  background: rgba(15, 118, 110, .06);
}
.ic-tag-label {
  color: var(--text-secondary); font-weight: 500;
}
.ic-tag-value {
  color: var(--text-primary); font-weight: 700;
}
.ic-tag.tag-accent {
  background: rgba(15, 118, 110, .1);
  border-color: rgba(15, 118, 110, .2);
}
.ic-tag.tag-accent .ic-tag-value { color: #0f766e; }
.ic-tag.tag-muted {
  background: rgba(15, 40, 70, .03);
  border-color: var(--border-glass);
}
.ic-tag.tag-hot {
  background: rgba(234, 88, 12, .1);
  border-color: rgba(234, 88, 12, .2);
}
.ic-tag.tag-hot .ic-tag-value { color: #c2410c; }
.ic-tag.tag-warn {
  background: rgba(202, 138, 4, .1);
  border-color: rgba(202, 138, 4, .2);
}
.ic-tag.tag-warn .ic-tag-value { color: #a16207; }
.ic-tag.tag-fire {
  background: rgba(220, 38, 38, .1);
  border-color: rgba(220, 38, 38, .2);
}
.ic-tag.tag-fire .ic-tag-value { color: #b91c1c; }
.info-card-shimmer {
  height: 14px; width: 60%; border-radius: 6px; margin-bottom: 4px;
  background: linear-gradient(90deg, rgba(15,40,70,.06) 25%, rgba(15,40,70,.12) 50%, rgba(15,40,70,.06) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
.info-card-shimmer.short { width: 40%; height: 10px; margin-bottom: 0; }
@media (min-width: 721px) {
  .info-cards-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 8px 16px; }
}

/* ── Navigation ── */
.main-nav {
  display: flex; overflow-x: auto; justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--border-glass);
  position: sticky; top: 52px; z-index: 99;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  box-shadow: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.nav-tab {
  flex-shrink: 0; padding: 13px 18px;
  font-size: .88rem; color: var(--text-muted);
  text-decoration: none; white-space: nowrap;
  cursor: pointer; position: relative;
  transition: color .25s, background .25s;
  font-weight: 500;
}
.nav-tab::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0;
  height: 2.5px; border-radius: 2px;
  background: var(--grad-accent);
  transform: translateX(-50%); transition: width .3s cubic-bezier(.4,0,.2,1);
}
.nav-tab:hover { color: var(--text-secondary); background: #f7f9fc; }
.nav-tab.active {
  color: var(--primary); font-weight: 600;
}
.nav-tab.active::after { width: 24px; }

/* ── Content ── */
.content { max-width: 1112px; margin: 0 auto; padding: 14px 16px; box-sizing: border-box; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-loading { text-align: center; padding: 40px; color: var(--text-muted); font-size: .9rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 18px; margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-glass);
  transition: border-color .3s, box-shadow .3s, transform .3s;
  animation: fadeInUp .4s ease both;
}
.card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-sm);
}
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(4) { animation-delay: .15s; }
.card-title {
  font-size: .9rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 14px; padding-left: 12px;
  border-left: 3px solid var(--primary);
  line-height: 1;
}
.card-glow {
  border-color: rgba(15, 118, 110, .18);
  box-shadow: var(--shadow-card), 0 0 24px rgba(15, 118, 110, .06);
}
.card-glow:hover {
  border-color: rgba(15, 118, 110, .28);
  box-shadow: var(--shadow-md);
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 26px; padding: 0 8px;
  border-radius: 8px; font-size: .75rem; font-weight: 700; color: #fff;
  letter-spacing: 0;
}
.badge-big, .badge-odd, .badge-bs { background: #ef4444; }
.badge-small, .badge-even, .badge-ss { background: #3b82f6; }
.badge-be { background: #f97316; }
.badge-se { background: #22c55e; }
.badge-leopard { background: linear-gradient(135deg, #dc2626, #f87171); }
.badge-pair { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.badge-straight { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.badge-misc { background: linear-gradient(135deg, #525252, #a3a3a3); }

/* ── Number Balls ── */
.ball {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 26px; border-radius: 7px;
  font-size: .82rem; font-weight: 700;
  background: #eef2f7;
  color: var(--text-primary);
  border: none;
}
.ball-sum {
  width: 32px; height: 26px; font-size: .82rem;
  border-radius: 7px;
  background: #3b82f6; color: #fff;
  border: none;
  box-shadow: none;
}
.ball-sum-big { background: #ef4444; }
.ball-sum-small { background: #3b82f6; }
.number-group { display: inline-flex; align-items: center; gap: 3px; }
.number-plus { font-size: .65rem; color: var(--text-muted); font-weight: 600; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th {
  background: #f7f9fc;
  color: var(--text-muted);
  font-weight: 600; padding: 10px 6px; text-align: center;
  position: sticky; top: 0; font-size: .78rem;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border-glass);
}
.data-table td {
  padding: 10px 6px; text-align: center;
  border-bottom: 1px solid rgba(15, 40, 70, .05);
  color: var(--text-secondary);
}
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:nth-child(even) { background: rgba(15, 40, 70, .02); }
.data-table tbody tr:hover { background: #f3f6fb; }
.table-wrap {
  overflow-x: auto; overflow-y: auto; max-height: 65vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}
.table-wrap.table-open {
  overflow-y: visible;
  max-height: none;
}

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 14px 0; }
.pagination button, .pagination-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 20px; border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--text-secondary); font-size: .82rem; cursor: pointer;
  transition: all .25s; font-weight: 500;
}
.pagination button:disabled, .pagination-btn:disabled { opacity: .3; cursor: not-allowed; }
.pagination button:not(:disabled):hover, .pagination-btn:not(:disabled):hover {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(15, 118, 110, .25);
}
.pagination .page-info { font-size: .78rem; color: var(--text-muted); }

/* ── Range Tabs ── */
.range-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.range-tab {
  padding: 6px 16px; border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  background: #fff;
  font-size: .78rem; color: var(--text-muted); cursor: pointer;
  transition: all .25s; font-weight: 500;
}
.range-tab:hover { border-color: rgba(15, 118, 110, .28); color: var(--primary); }
.range-tab.active {
  background: var(--grad-accent); color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(15, 118, 110, .25);
}

/* ── Progress Bars ── */
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.progress-label { min-width: 28px; font-size: .82rem; font-weight: 600; text-align: right; color: var(--text-secondary); }
.progress-bar {
  flex: 1; height: 28px;
  background: rgba(15,40,70,.06);
  border-radius: var(--radius-full); overflow: hidden; position: relative;
  border: 1px solid rgba(15,40,70,.06);
}
.progress-fill {
  height: 100%; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 10px; font-size: .72rem; font-weight: 700; color: #fff;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 30px; position: relative; overflow: hidden;
  animation: fillExpand .6s ease both;
}
.progress-fill::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.12) 50%, transparent 100%);
  animation: shimmer 3s infinite;
}
.progress-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 12px rgba(239,68,68,.2); }
.progress-fill.blue { background: linear-gradient(90deg, #3b82f6, #60a5fa); box-shadow: 0 0 12px rgba(59,130,246,.2); }
.progress-fill.orange { background: linear-gradient(90deg, #f97316, #fb923c); box-shadow: 0 0 12px rgba(249,115,22,.2); }
.progress-fill.green { background: linear-gradient(90deg, #22c55e, #4ade80); box-shadow: 0 0 12px rgba(34,197,94,.2); }
.progress-value { min-width: 60px; font-size: .82rem; color: var(--text-secondary); }

/* ── Stats Big Number ── */
.big-number { text-align: center; padding: 24px 0; }
.big-number .num {
  font-size: 3rem; font-weight: 800;
  background: var(--grad-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1.1;
}
.big-number .label { font-size: .82rem; color: var(--text-muted); margin-top: 6px; }

/* ── Bead Road ── */
.bead-road { display: grid; gap: 3px; padding: 8px; overflow-x: auto; }
.bead {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: #fff; font-weight: 700; cursor: default;
  transition: transform .2s, box-shadow .2s;
}
.bead:hover { transform: scale(1.3); box-shadow: 0 0 12px rgba(255,255,255,.15); z-index: 2; }
.bead-big, .bead-odd { background: var(--grad-red); }
.bead-small, .bead-even { background: var(--grad-blue); }
.bead-bs { background: linear-gradient(135deg, #dc2626, #f87171); }
.bead-be { background: linear-gradient(135deg, #ea580c, #fb923c); }
.bead-ss { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.bead-se { background: linear-gradient(135deg, #059669, #34d399); }

/* ── Dragon Cards ── */
.dragon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dragon-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 16px; border: 1px solid var(--border-glass);
  text-align: center; transition: all .3s;
}
.dragon-card:hover { border-color: var(--border-glass-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dragon-card .type-name { font-size: .88rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.dragon-card .streak-num { font-size: 2rem; font-weight: 800; }
.dragon-card .streak-label { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.dragon-card .streak-bar { height: 4px; background: rgba(15,40,70,.06); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.dragon-card .streak-bar-fill { height: 100%; border-radius: 2px; transition: width .5s; }
.dragon-alert { display: inline-block; padding: 2px 8px; border-radius: var(--radius-full); font-size: .65rem; font-weight: 700; margin-left: 4px; }
.alert-watch { background: rgba(251,191,36,.15); color: #fbbf24; border: 1px solid rgba(251,191,36,.2); }
.alert-dragon { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.2); animation: pulseGlow 1.5s ease-in-out infinite; }

.dragon-card-watch {
  background: rgba(251,191,36,.06);
  border-color: rgba(251,191,36,.15);
}
.dragon-card-alert {
  background: rgba(239,68,68,.06);
  border-color: rgba(239,68,68,.15);
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ── Predict ── */
.predict-hero {
  text-align: center; padding: 24px 16px;
  background: rgba(56,189,248,.04);
  border-radius: var(--radius-md); margin-bottom: 12px;
}
.predict-combo {
  font-size: 2.4rem; font-weight: 800; margin-bottom: 6px;
}
.predict-combo[data-combo="大单"] { color: var(--neon-red); text-shadow: 0 0 20px rgba(248,113,113,.3); }
.predict-combo[data-combo="大双"] { color: var(--neon-orange); text-shadow: 0 0 20px rgba(251,146,60,.3); }
.predict-combo[data-combo="小单"] { color: var(--neon-blue); text-shadow: 0 0 20px rgba(56,189,248,.3); }
.predict-combo[data-combo="小双"] { color: var(--neon-green); text-shadow: 0 0 20px rgba(74,222,128,.3); }
.predict-conf { font-size: .85rem; color: var(--text-muted); }
.predict-conf strong {
  display: inline-block; padding: 3px 14px;
  background: var(--grad-accent); color: #fff;
  border-radius: var(--radius-full); font-size: .78rem;
  box-shadow: 0 2px 8px rgba(59,130,246,.2);
}
.predict-dist {
  display: flex; gap: 2px; margin: 12px 0;
  border-radius: var(--radius-full); overflow: hidden; height: 32px;
}
.predict-dist-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: #fff;
  transition: width .5s;
}
.predict-reasons { list-style: none; padding: 0; }
.predict-reasons li {
  padding: 10px 0; font-size: .82rem; color: var(--text-secondary);
  border-bottom: 1px solid rgba(15,40,70,.06);
}
.predict-reasons li::before { content: "\25B8 "; color: var(--neon-blue); font-weight: 700; }

/* ── Frequency Bars ── */
.freq-bar-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.freq-bar-label { min-width: 22px; font-size: .72rem; text-align: right; color: var(--text-muted); font-weight: 600; }
.freq-bar-track {
  flex: 1; height: 22px;
  background: rgba(15,40,70,.06);
  border-radius: var(--radius-full); overflow: hidden;
  border: 1px solid rgba(15,40,70,.06);
}
.freq-bar-fill {
  height: 100%; border-radius: var(--radius-full); transition: width .5s;
  display: flex; align-items: center; padding-left: 8px;
  font-size: .62rem; color: #fff; font-weight: 700;
  position: relative; overflow: hidden;
}
.freq-bar-fill::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.1) 50%, transparent 100%);
}
.freq-bar-fill.hot { background: linear-gradient(90deg, #ef4444, #f87171); }
.freq-bar-fill.cold { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.freq-bar-fill.normal { background: linear-gradient(90deg, #475569, #64748b); }
.freq-bar-count { min-width: 28px; font-size: .72rem; color: var(--text-muted); text-align: right; }

/* ── Missing ── */
.missing-highlight-yellow {
  background: rgba(251,191,36,.06) !important;
  border-left: 3px solid rgba(251,191,36,.5);
}
.missing-highlight-red {
  background: rgba(239,68,68,.06) !important;
  border-left: 3px solid rgba(248,113,113,.5);
}

/* ── Keno Grid ── */
.keno-list { padding: 0; overflow: hidden; }
.keno-row { padding: 12px 14px 14px; }
.keno-row.alt { background: #f4f8fc; }
.keno-row-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 8px; color: #1e3a5f; font-weight: 800; font-size: .95rem;
}
.keno-issue { font-weight: 800; }
.keno-line {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 4px; overflow-x: auto;
}
.keno-slot {
  flex: 1 1 0; min-width: 28px; max-width: 46px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.keno-pos {
  height: 14px; line-height: 14px; font-size: 11px; font-weight: 700;
}
.keno-ball {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  border: 1.5px solid transparent; box-sizing: border-box;
}
.keno-pos.t1, .keno-ball.t1 { color: #ef6c00; }
.keno-pos.t2, .keno-ball.t2 { color: #0f8f82; }
.keno-pos.t3, .keno-ball.t3 { color: #3f51b5; }
.keno-ball.t0 { color: #64748b; background: #f8fafc; border-color: #d5dee8; }
.keno-ball.t1 { background: #fff6ee; border-color: #f5b06a; }
.keno-ball.t2 { background: #eef8f6; border-color: #7dccc3; }
.keno-ball.t3 { background: #f0f2fb; border-color: #9aa6e0; }

/* ── Ad Slots ── */
.ad-slot { margin: 8px auto; max-width: 728px; padding: 0 12px; display: none; }
.ad-slot img { max-width: 100%; width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
.ad-slot-top { margin: 6px auto; }
.ad-placeholder {
  border: 1.5px dashed rgba(15, 40, 70, .12); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: .78rem;
  background: rgba(255, 255, 255, .55);
  min-height: 60px;
}
.ad-slot-top .ad-placeholder { min-height: 60px; }
.ad-slot-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 98;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -2px 16px rgba(21, 32, 51, .08);
  padding: 4px 8px;
  border-top: 1px solid var(--border-glass);
}
.ad-slot-bottom .ad-placeholder { min-height: 50px; border: none; background: transparent; }
.ad-slot-inline .ad-placeholder { min-height: 80px; }

/* ── Scratch Card ── */
.scratch-container {
  position: relative; border-radius: var(--radius-md);
  overflow: hidden; margin: 8px 0;
  box-shadow: var(--shadow-md);
}
.scratch-result {
  position: relative; z-index: 0;
  padding: 24px 16px; text-align: center;
  background: #f8fafc;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.scratch-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2;
  cursor: crosshair; touch-action: none;
  border-radius: var(--radius-md);
}
.data-table td.scratch-mask-cell { padding: 10px 6px; }
.scratch-mask-label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 26px; box-sizing: border-box;
  border-radius: 7px;
  background: linear-gradient(90deg, #4b5563 0%, #6b7280 55%, #9ca3af 100%);
  color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
}
.scratch-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: rgba(255,255,255,.85); font-size: .92rem; font-weight: 700;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
  pointer-events: none; z-index: 1;
}
.scratch-reveal-btn {
  display: block; margin: 10px auto 0; padding: 8px 24px;
  background: var(--grad-accent); color: #fff;
  border: none; border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 12px rgba(15, 118, 110, .25);
  transition: all .25s;
}
.scratch-reveal-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(15, 118, 110, .35); }
.scratch-particle {
  position: absolute; width: 6px; height: 6px;
  border-radius: 50%; pointer-events: none;
  animation: sparkleOut .8s ease-out forwards;
}

/* Hero scratch overrides */
.hero-scratch-wrap .scratch-canvas { border-radius: 0; }
.hero-scratch-wrap .scratch-result {
  height: 100%;
  box-sizing: border-box;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}
.hero-scratch-wrap .scratch-result .hero-draw {
  min-height: 0;
  width: 100%;
}
.hero-scratch-wrap .scratch-reveal-btn {
  background: var(--grad-accent);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: none;
}
.hero-scratch-wrap .scratch-reveal-btn:hover {
  background: linear-gradient(135deg, #0d9488, #0284c7);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 70px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(21, 32, 51, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 10px 24px; border-radius: var(--radius-full);
  font-size: .82rem; z-index: 200;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.1);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Module Header ── */
.module-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 0 2px; flex-wrap: wrap;
}
.module-header-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(3,105,161,.1));
  border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.module-header-text { flex: 1; min-width: 0; }
.module-title { font-size: 1.08rem; font-weight: 700; color: var(--text-primary); }
.module-subtitle { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.module-header-actions { flex-shrink: 0; }
.module-header-actions .range-tabs { margin-bottom: 0; }

/* ── Card Variants ── */
.card-flush { padding: 0; overflow: hidden; }
.card-flush .table-wrap { border: none; border-radius: 0; }
.card-flush .pagination { padding: 14px 18px; }
.card-row { display: flex; gap: 12px; margin-bottom: 12px; }
.card-half { flex: 1; min-width: 0; margin-bottom: 0; }
.card-title-row {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 14px;
}
.card-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.card-dot.hot { background: var(--neon-red); box-shadow: 0 0 8px rgba(248,113,113,.3); }
.card-dot.cold { background: var(--neon-blue); box-shadow: 0 0 8px rgba(56,189,248,.3); }
.card-dot.analysis { background: var(--neon-purple); box-shadow: 0 0 8px rgba(167,139,250,.3); }
.card-dot.stats { background: var(--neon-green); box-shadow: 0 0 8px rgba(74,222,128,.3); }
.card-dot.combo { background: var(--neon-orange); box-shadow: 0 0 8px rgba(251,146,60,.3); }

/* ── Issue Tag ── */
.issue-tag {
  display: inline-block; padding: 2px 10px;
  background: #f1f5f9;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full); font-size: .75rem;
  font-weight: 600; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.hist-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

/* ── Small Ball ── */
.ball-sm { width: 24px; height: 24px; font-size: .72rem; border-radius: 8px; }

/* ── Frequency Chart ── */
.freq-chart { max-height: 400px; overflow-y: auto; }

/* ── 20-Period Quick Stats ── */
.r20-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 4px 0;
}
.r20-item {
  background: #f8fafc;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px; text-align: center;
}
.r20-label { font-size: .72rem; color: var(--text-muted); margin-bottom: 4px; }
.r20-value { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.r20-detail { font-size: .72rem; color: var(--text-dim); margin-top: 2px; }
.r20-bar {
  height: 4px; border-radius: 2px; background: rgba(15, 40, 70, .08);
  margin-top: 8px; overflow: hidden;
}
.r20-bar-fill { height: 100%; border-radius: 2px; transition: width .6s ease; }

/* ── Settings Panel ── */
.settings-panel {
  position: fixed; top: 45px; right: 0; z-index: 101;
  width: 280px; max-width: 90vw;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 0 0 0 var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px; transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.settings-panel.show { transform: translateX(0); }
.settings-title {
  font-size: .92rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0;
}
.settings-item-info { flex: 1; min-width: 0; }
.settings-item-label { font-size: .85rem; font-weight: 600; color: var(--text-primary); }
.settings-item-desc { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ── Toggle Switch ── */
.toggle-switch {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 40, 70, .15); border-radius: 24px;
  transition: all .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: all .3s; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); box-shadow: 0 0 12px rgba(15, 118, 110, .28); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Scratch Toggle Icon Active ── */
#scratch-toggle-icon.active { color: var(--primary); }

/* ── Hero Scratch Result ── */
.hero-scratch-result { text-align: center; padding: 16px 8px; }
.hero-scratch-issue-label {
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 12px;
}
.hero-scratch-balls {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 12px;
}
.hero-scratch-ball {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: var(--text-primary);
  background: linear-gradient(160deg, #ffffff, #eef5fa);
  border: 1px solid rgba(15, 40, 70, .1);
  box-shadow: 0 2px 10px rgba(21, 32, 51, .08);
}
.hero-scratch-op {
  font-size: 1rem; font-weight: 700; color: var(--text-dim);
}
.hero-scratch-sum {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: #fff;
  box-shadow: var(--shadow-md);
}
.hero-scratch-sum.big {
  background: linear-gradient(135deg, #0891b2, #0284c7);
  box-shadow: 0 2px 14px rgba(2, 132, 199, .28);
}
.hero-scratch-sum.small {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 2px 14px rgba(15, 118, 110, .28);
}
.hero-scratch-tags {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hero-scratch-tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 12px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; color: #fff;
}
.hero-scratch-tag.tag-big { background: var(--grad-red); }
.hero-scratch-tag.tag-small { background: var(--grad-blue); }
.hero-scratch-tag.tag-odd { background: linear-gradient(135deg, #dc2626, #f87171); }
.hero-scratch-tag.tag-even { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.hero-scratch-tag.combo-bs { background: var(--grad-red); }
.hero-scratch-tag.combo-be { background: var(--grad-orange); }
.hero-scratch-tag.combo-ss { background: var(--grad-blue); }
.hero-scratch-tag.combo-se { background: var(--grad-green); }

/* ── Dragon Enhanced ── */
.dragon-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dragon-type-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 12px; border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 700; color: #fff;
}
.dragon-streak-num {
  font-size: 2.2rem; font-weight: 800; line-height: 1;
  margin-bottom: 4px;
}
.dragon-streak-unit { font-size: .82rem; font-weight: 600; opacity: .6; }
.dragon-bar {
  height: 4px; background: rgba(15,40,70,.06); border-radius: 2px;
  margin: 10px 0 8px; overflow: hidden;
}
.dragon-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.dragon-meta {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--text-muted);
}

/* ── Predict Enhanced ── */
.predict-hero-card {
  background: rgba(56,189,248,.03);
  border: 1px solid rgba(56,189,248,.08);
}
.predict-hero-card:hover {
  border-color: rgba(56,189,248,.15);
  box-shadow: var(--shadow-card), 0 0 30px rgba(56,189,248,.05);
}
.predict-hero-inner {
  text-align: center; padding: 20px 16px 12px;
}
.predict-hero-label {
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px;
}

/* ── Stats Enhanced ── */
.stats-total-card {
  background: rgba(56,189,248,.03);
  border: 1px solid rgba(56,189,248,.08);
}
.stats-total-card:hover {
  border-color: rgba(56,189,248,.15);
  box-shadow: var(--shadow-card), 0 0 30px rgba(56,189,248,.05);
}
.stats-pair {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 12px;
}
.stats-pair-item { text-align: center; }
.stats-pair-num {
  font-size: 1.6rem; font-weight: 800; line-height: 1.2;
}
.stats-pair-num.hot { color: var(--neon-red); text-shadow: 0 0 12px rgba(248,113,113,.2); }
.stats-pair-num.cold { color: var(--neon-blue); text-shadow: 0 0 12px rgba(56,189,248,.2); }
.stats-pair-label { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.stats-pair-vs {
  font-size: .72rem; font-weight: 700; color: var(--text-dim);
  padding: 4px 8px; background: rgba(15,40,70,.06);
  border-radius: var(--radius-full);
  border: 1px solid rgba(15,40,70,.06);
}
.combo-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.combo-stat-item {
  text-align: center; padding: 12px 8px;
  background: rgba(15,40,70,.06); border-radius: var(--radius-sm);
  border: 1px solid rgba(15,40,70,.06);
  transition: all .2s;
}
.combo-stat-item:hover { background: rgba(15,40,70,.06); border-color: rgba(15,40,70,.06); }
.combo-stat-badge {
  display: inline-block; padding: 3px 14px;
  border-radius: var(--radius-full); font-size: .78rem;
  font-weight: 700; color: #fff; margin-bottom: 8px;
}
.combo-stat-badge.red { background: var(--grad-red); }
.combo-stat-badge.orange { background: var(--grad-orange); }
.combo-stat-badge.blue { background: var(--grad-blue); }
.combo-stat-badge.green { background: var(--grad-green); }
.combo-stat-num { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.combo-stat-pct { font-size: .78rem; color: var(--text-muted); margin: 2px 0 8px; }

/* ── Missing Enhanced ── */
.missing-alert-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin-bottom: 12px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.15); border-radius: var(--radius-md);
  font-size: .82rem; font-weight: 600; color: var(--neon-red);
  animation: fadeInUp .4s ease both;
}
.missing-type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.missing-type-item {
  padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all .3s;
}
.missing-type-item.warn {
  background: rgba(251,191,36,.05);
  border-color: rgba(251,191,36,.15);
}
.missing-type-item.danger {
  background: rgba(239,68,68,.05);
  border-color: rgba(239,68,68,.15);
}
.missing-type-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.missing-level-tag {
  font-size: .65rem; font-weight: 700; padding: 2px 8px;
  border-radius: var(--radius-full);
}
.missing-level-tag.warn { background: rgba(251,191,36,.12); color: #fbbf24; }
.missing-level-tag.danger { background: rgba(239,68,68,.12); color: #f87171; }
.missing-type-nums {
  display: flex; align-items: baseline; gap: 4px;
  margin-bottom: 8px;
}
.missing-num-main { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.missing-num-sub { font-size: .82rem; color: var(--text-muted); }

/* ── Keno Enhanced ── */
.keno-card { margin-bottom: 12px; }
.keno-time { font-size: .95rem; font-weight: 700; color: #1e3a5f; }
.keno-calc-zones {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.keno-zone {
  font-size: .75rem; color: var(--text-muted);
  padding: 2px 8px; background: rgba(15,40,70,.06);
  border-radius: var(--radius-full);
  border: 1px solid rgba(15,40,70,.06);
}
.keno-zone strong { color: var(--neon-blue); }
.keno-zone-sep { font-size: .72rem; color: var(--text-dim); font-weight: 600; }
.keno-calc-result {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding-top: 8px;
}

/* ── Trend Enhanced ── */
.bead-legend {
  display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.bead-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-size: .72rem; color: var(--text-muted);
}
.bead-legend-dot {
  width: 10px; height: 10px; border-radius: 3px;
}

/* ── Trend Tabs & Modes ── */
.trend-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  background: rgba(15,40,70,.06);
  border: 1px solid rgba(15,40,70,.06);
  border-radius: var(--radius-full); padding: 3px;
}
.trend-tab {
  flex: 1; text-align: center; padding: 8px 12px;
  border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all .25s; white-space: nowrap;
}
.trend-tab:hover { color: var(--text-secondary); }
.trend-tab.active {
  background: var(--grad-accent); color: #fff;
  box-shadow: 0 2px 12px rgba(59,130,246,.25);
}

.trend-modes {
  display: flex; gap: 6px; margin-bottom: 12px; justify-content: center;
}
.trend-mode {
  padding: 5px 14px;
  border: 1px solid rgba(15,40,70,.06);
  border-radius: var(--radius-full);
  background: rgba(15,40,70,.06);
  font-size: .75rem; color: var(--text-muted);
  cursor: pointer; transition: all .25s; font-weight: 500;
}
.trend-mode:hover { border-color: rgba(56,189,248,.2); color: var(--neon-blue); }
.trend-mode.active {
  background: rgba(56,189,248,.1);
  border-color: rgba(56,189,248,.25);
  color: var(--neon-blue);
  box-shadow: 0 0 8px rgba(56,189,248,.1);
}

/* ── Big Road ── */
.bigroad-wrap {
  overflow-x: auto; overflow-y: auto; max-height: 60vh;
  padding: 8px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.bigroad-wrap::-webkit-scrollbar { height: 4px; width: 4px; }
.bigroad-wrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1); border-radius: 2px;
}
.bigroad-grid {
  display: grid; gap: 2px; width: max-content;
}

/* Dragon/Tiger beads */
.bead-dragon { background: linear-gradient(135deg, #e11d48, #fb7185); }
.bead-tiger  { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.bead-tie    { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

/* Text mode */
.bead-text {
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 700; border-radius: 4px;
  cursor: default; transition: transform .2s;
  border: 1px solid rgba(15,40,70,.06);
  background: rgba(15,40,70,.06);
}
.bead-text:hover { transform: scale(1.15); z-index: 2; }
.bead-text.text-big    { color: #ef4444; border-color: rgba(239,68,68,.2); background: rgba(239,68,68,.06); }
.bead-text.text-small  { color: #3b82f6; border-color: rgba(59,130,246,.2); background: rgba(59,130,246,.06); }
.bead-text.text-odd    { color: #f97316; border-color: rgba(249,115,22,.2); background: rgba(249,115,22,.06); }
.bead-text.text-even   { color: #22c55e; border-color: rgba(34,197,94,.2);  background: rgba(34,197,94,.06); }
.bead-text.text-bs     { color: #ef4444; border-color: rgba(239,68,68,.2);  background: rgba(239,68,68,.06); }
.bead-text.text-be     { color: #f97316; border-color: rgba(249,115,22,.2); background: rgba(249,115,22,.06); }
.bead-text.text-ss     { color: #3b82f6; border-color: rgba(59,130,246,.2); background: rgba(59,130,246,.06); }
.bead-text.text-se     { color: #22c55e; border-color: rgba(34,197,94,.2);  background: rgba(34,197,94,.06); }
.bead-text.text-dragon { color: #e11d48; border-color: rgba(225,29,72,.2);  background: rgba(225,29,72,.06); }
.bead-text.text-tiger  { color: #0ea5e9; border-color: rgba(14,165,233,.2); background: rgba(14,165,233,.06); }
.bead-text.text-tie    { color: #a855f7; border-color: rgba(168,85,247,.2); background: rgba(168,85,247,.06); }

/* Line chart SVG */
.bigroad-svg { display: block; min-height: 120px; }
.bigroad-svg line { stroke-width: 1.5; stroke-linecap: round; }
.bigroad-svg circle { transition: r .15s; cursor: default; }
.bigroad-svg circle:hover { r: 6; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  html { font-size: 13px; }
  .main-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); overflow-x: visible;
  }
  .nav-tab { padding: 10px 0; font-size: .8rem; text-align: center; }
  .content { padding: 8px; }
  .card { padding: 14px; border-radius: 12px; }
  .card-row { flex-direction: column; }
  .dragon-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .missing-type-grid { grid-template-columns: 1fr 1fr; }
  .combo-stats-grid { grid-template-columns: 1fr 1fr; }
  .bead { width: 18px; height: 18px; font-size: .5rem; border-radius: 5px; }
  .bead-text { font-size: .5rem; }
  .trend-tabs { gap: 2px; padding: 2px; }
  .trend-tab { padding: 6px 8px; font-size: .75rem; }
  .trend-modes { gap: 4px; }
  .trend-mode { padding: 4px 10px; font-size: .7rem; }
  .ball { width: 26px; height: 26px; font-size: .75rem; border-radius: 8px; }
  .ball-sum { width: 32px; height: 32px; font-size: .85rem; border-radius: 10px; }
  .ball-sm { width: 22px; height: 22px; font-size: .68rem; }
  .keno-line { justify-content: flex-start; }
  .keno-slot { flex: 0 0 32px; max-width: none; }
  .keno-ball { width: 28px; height: 28px; font-size: 11px; }
  .predict-combo { font-size: 2rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-section { padding-left: 10px; padding-right: 10px; }
  .hero-result { padding: 12px 10px; }
  .hero-header { flex-direction: row; flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
  .hero-title {
    display: flex; flex-direction: column; align-items: flex-start;
    white-space: normal; gap: 2px; min-width: 0;
  }
  .hero-issue { margin-right: 0; font-size: .92rem; }
  .hero-open-time { font-size: .75rem; }
  .hero-tools { margin-left: auto; }
  .hero-draw { column-gap: 4px; }
  .hero-ball, .hero-sum, .hero-tag {
    max-width: none;
    font-size: 1.2rem;
    border-radius: 10px;
  }
  .hero-draw .hero-tag.hero-tag-shape {
    max-width: none;
    padding: 0;
    font-size: .95rem;
  }
  .hero-plus, .hero-eq { font-size: 1rem; }
  .scratch-mask-label { height: 32px; }
  .hero-cd-unit { width: 64px; height: 56px; }
  .hero-cd-wait { height: 56px; font-size: .95rem; }
  .hero-cd-num { font-size: 1.45rem; }
  .hero-scratch-ball { width: 38px; height: 38px; font-size: 1.1rem; }
  .hero-scratch-sum { width: 44px; height: 44px; font-size: 1.2rem; }
  .module-header { gap: 10px; }
  .module-header-icon { width: 36px; height: 36px; }
  .settings-panel { width: 260px; }
  .ad-slot-bottom .ad-placeholder { min-height: 50px; }
}

@media (min-width: 481px) and (max-width: 720px) {
  .dragon-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

@media (min-width: 721px) {
  .dragon-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1080px) {
  .content, .hero-section, .info-cards-grid { max-width: 1112px; }
}

/* ── Auto Engine (杀组预测 ── */

.engine-hero-card { border: 1px solid rgba(56,189,248,.25); }

.engine-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); padding: 4px 0; flex-wrap: wrap; }
.engine-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.engine-status-dot.on { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }
.engine-status-dot.off { background: var(--text-muted); }
.engine-status-dot.searching { background: var(--neon-orange); animation: pulse-dot 1.2s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.engine-search-count { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.engine-error { width: 100%; font-size: 12px; color: var(--neon-red); margin-top: 4px; }

.engine-hero-inner { padding: 4px 0 0; }

.engine-predict-row { text-align: center; padding: 16px 0 12px; }
.engine-predict-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.engine-predict-main { display: flex; align-items: center; justify-content: center; gap: 8px; }
.engine-kill-label { font-size: 14px; color: var(--neon-red); font-weight: 700; padding: 4px 10px; border: 1px solid rgba(239,68,68,.3); border-radius: 6px; background: rgba(239,68,68,.1); }
.engine-kill-combo { font-size: 28px; font-weight: 800; letter-spacing: 2px; padding: 6px 20px; border-radius: 10px; }
.engine-kill-combo.combo-bs { color: #ef4444; background: rgba(239,68,68,.12); }
.engine-kill-combo.combo-be { color: #f97316; background: rgba(249,115,22,.12); }
.engine-kill-combo.combo-ss { color: #3b82f6; background: rgba(59,130,246,.12); }
.engine-kill-combo.combo-se { color: #22c55e; background: rgba(34,197,94,.12); }
.engine-predict-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

.engine-algo-info { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 0 4px; font-size: 12px; }
.engine-algo-name { color: var(--neon-cyan); background: rgba(34,211,238,.08); padding: 3px 10px; border-radius: 4px; }
.engine-algo-rate { color: var(--neon-green); font-weight: 600; }
.engine-algo-backtest { font-size: 11px; color: var(--text-muted); }
.engine-algo-backtest .bt-win { color: var(--neon-green); font-weight: 700; margin: 0 2px; }
.engine-algo-backtest .bt-lose { color: var(--neon-red); font-weight: 700; margin-left: 4px; }

.engine-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 0 8px; border-top: 1px solid var(--border-glass); margin-top: 8px; }
.engine-stat { text-align: center; }
.engine-stat-val { font-size: 20px; font-weight: 700; }
.engine-stat-val.green { color: var(--neon-green); }
.engine-stat-val.red { color: var(--neon-red); }
.engine-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.engine-recent { padding: 8px 0 4px; border-top: 1px solid var(--border-glass); margin-top: 8px; }
.engine-recent-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.engine-recent-dots { display: flex; gap: 6px; }
.engine-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.engine-dot.win { background: rgba(34,197,94,.15); color: var(--neon-green); border: 1px solid rgba(34,197,94,.3); }
.engine-dot.lose { background: rgba(239,68,68,.15); color: var(--neon-red); border: 1px solid rgba(239,68,68,.3); }

.site-footer {
  max-width: 1112px;
  margin: 8px auto 12px;
  padding: 0 16px;
  box-sizing: border-box;
}
.site-footer-inner {
  background: #fff;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 22px 22px 16px;
  color: #334155;
}
.site-footer-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: #1e3a5f;
  margin-bottom: 10px;
}
.site-footer-links, .site-footer-friends {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.site-footer-links { margin-bottom: 12px; }
.site-footer-links a {
  color: #475569;
  text-decoration: none;
  font-size: .88rem;
}
.site-footer-links a:hover { color: #2563eb; }
.site-footer-label {
  font-size: .78rem;
  color: #94a3b8;
  margin: 4px 0 8px;
}
.site-friend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: 999px;
  color: #334155;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
}
.site-friend:hover { border-color: #bfdbfe; color: #2563eb; }
.site-friend img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.site-footer-copy {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
  font-size: .75rem;
  color: #94a3b8;
}
