:root {
  --bg: #f3f4f6;
  --sky: #0ea5e9;
  --sky-600: #0284c7;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-300: #7dd3fc;
  --sky-500: #0ea5e9;
  --text: #1f2937;
  --muted: #9ca3af;
  --line: #e0f2fe;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --blue: #0ea5e9;
  --green: #22c55e;
  --red: #ef4444;
  --wave-red: #ef4444;
  --wave-blue: #3b82f6;
  --wave-green: #22c55e;
  --wave-gray: #9ca3af;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --max: 72rem;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { width: min(100% - 1.5rem, var(--max)); margin: 0 auto; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 1rem 0 2.5rem; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #f3f4f6;
  overflow: visible;
}
.header-inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  overflow: visible;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}
.logo-img {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(168px, 42vw);
  object-fit: contain;
}
.logo-mark {
  font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
}
.logo-mark em {
  font-style: italic;
  font-weight: 800;
  background: linear-gradient(90deg, #1e3a8a 0%, #0284c7 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-tld {
  margin-left: 1px;
  font-size: 0.78em;
  font-weight: 700;
  color: #111827;
  vertical-align: baseline;
}
.nav { display: none; align-items: center; gap: 0.25rem; overflow: visible; }
.nav > a, .nav-drop > a, .nav-drop > .mega-trigger {
  display: inline-flex; align-items: center; gap: 0.25rem;
  border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.875rem; color: #4b5563;
  border: 0; background: transparent; font-family: inherit; cursor: pointer;
}
.nav > a:hover, .nav-drop > a:hover, .nav-drop > .mega-trigger:hover,
.nav > a.active, .nav-drop > a.active, .nav-drop > .mega-trigger.active,
.nav-drop.open > .mega-trigger {
  background: var(--orange-soft); color: var(--orange); font-weight: 500;
}
.caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #9ca3af; margin-left: 2px;
}
.nav-drop { position: relative; overflow: visible; }
.nav-drop.mega > .mega-trigger .caret,
.nav-drop.mega > a .caret {
  width: auto; height: auto; border: 0;
  display: inline-block;
  transition: transform .2s ease;
}
.nav-drop.mega.open > .mega-trigger .caret,
.nav-drop.mega:hover > .mega-trigger .caret { transform: rotate(180deg); }
.nav-drop.mega > .mega-trigger .caret::before {
  content: ""; display: block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #9ca3af;
}
.mega-panel {
  display: none;
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: 760px; max-width: min(760px, calc(100vw - 24px));
  padding-top: 10px;
  z-index: 200;
}
.mega-panel-inner {
  border-radius: 1rem; border: 1px solid #f3f4f6; background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
}
.nav-drop.mega.open .mega-panel,
.nav-drop.mega:hover .mega-panel {
  display: block;
}
.mega-grid {
  display: grid; grid-template-columns: 160px 190px 1fr;
  overflow: hidden; border-radius: 1rem;
}
.mega-col { padding: 0.75rem; max-height: 360px; overflow: auto; }
.mega-col.kinds { background: rgba(249,250,251,.95); }
.mega-col.plays { border-left: 1px solid #f3f4f6; border-right: 1px solid #f3f4f6; background: #fff; }
.mega-col.algos { background: #fff; padding: 1rem; }
.mega-label { margin-bottom: 0.5rem; padding: 0 0.5rem; font-size: 12px; font-weight: 500; color: #9ca3af; }
.mega-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  margin-bottom: 4px; border: 0; border-radius: 0.5rem; background: transparent;
  padding: 0.5rem 0.75rem; text-align: left; font-size: 0.875rem; color: #4b5563; cursor: pointer;
}
.mega-item:hover { background: #fff; color: var(--orange); }
.mega-col.kinds .mega-item.active { background: #fff; color: var(--orange); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.mega-col.plays .mega-item.active { background: var(--orange-soft); color: var(--orange); }
.mega-item .count { font-size: 11px; color: #d1d5db; }
.mega-item .chev { font-size: 12px; color: #d1d5db; }
.mega-title { font-size: 0.875rem; font-weight: 500; color: #374151; }
.mega-sub { margin-top: 2px; font-size: 12px; color: #9ca3af; }
.mega-algo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.75rem;
}
.mega-algo-grid a {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: 0.5rem; border: 1px solid #f3f4f6; background: #f9fafb;
  padding: 0.5rem; text-align: center; font-size: 12px; color: #6b7280;
}
.mega-algo-grid a:hover {
  border-color: #fed7aa; background: var(--orange-soft); color: var(--orange);
}
.page-title {
  margin: 0.75rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}
.broadcast-wrap {
  position: relative;
  display: flex;
  height: 36px;
  width: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.bell-btn {
  display: flex;
  height: 36px;
  width: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3f4f6;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  padding: 0;
  transition: color .15s ease, background .15s ease, transform .1s ease;
}
.bell-btn:hover { background: #f9fafb; }
.bell-btn:active { transform: scale(0.95); }
.bell-btn.on { color: #10b981; }
.bell-btn.off { color: #9ca3af; }
.tip-bubble {
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  white-space: nowrap;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  backdrop-filter: blur(8px);
}
.tip-bubble[hidden] { display: none !important; }

/* 右下角开奖播报栈 */
.broadcast-notices {
  pointer-events: none;
  position: fixed;
  right: 12px;
  bottom: 80px;
  z-index: 9999;
}
.notice-item {
  pointer-events: auto;
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  max-width: 260px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(17, 24, 39, 0.65);
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  backdrop-filter: blur(10px);
  transform: translate(var(--x, 0), calc(var(--y, 0px) + var(--lift, 0px)));
  transition: transform var(--dur, .45s) ease, opacity var(--dur, .45s) ease, background-color .7s ease;
  will-change: transform, opacity;
}
.notice-item:hover {
  --lift: -2px;
  background: rgba(17, 24, 39, 0.75);
}
@media (prefers-reduced-motion: reduce) {
  .notice-item { transition: none; }
}
.notice-bar {
  height: 16px;
  width: 2px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.75);
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.4);
}
.notice-body {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.notice-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  font-size: 11px;
  line-height: 16px;
  color: rgba(255,255,255,.85);
}
.notice-play {
  display: inline-block;
  border-radius: 3px;
  background: rgba(16, 185, 129, 0.85);
  padding: 0 4px;
  font-weight: 500;
  color: #fff;
}
.notice-num { font-weight: 700; color: #fcd34d; }
.notice-chevron {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
  color: rgba(255,255,255,.45);
}

.game-shell {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 0.75rem;
}
.game-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--sky-100); }
.game-tabs a {
  text-align: center; padding: 0.65rem 0.5rem; font-size: 0.8125rem;
  border-right: 1px solid #f3f4f6; color: #4b5563;
}
.game-tabs a:last-child { border-right: 0; }
.game-tabs a.active { color: var(--sky-600); font-weight: 700; background: var(--sky-50); }
.sub-tabs { display: flex; flex-wrap: wrap; gap: 0.15rem; padding: 0.45rem 0.6rem; background: #fafafa; }
.sub-tabs a { padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.8125rem; color: #6b7280; }
.sub-tabs a.active, .sub-tabs a:hover {
  background: #fff; color: var(--sky-600); font-weight: 600; box-shadow: 0 0 0 1px var(--sky-100);
}

.cd-box .drawing-pill {
  display: inline-flex; align-items: center; margin-top: 0.35rem;
  border-radius: 999px; background: #dbeafe; color: #2563eb;
  padding: 0.2rem 0.7rem; font-size: 0.8125rem; font-weight: 600;
}
.mega-empty { padding: 2.5rem 0; text-align: center; font-size: 12px; color: #9ca3af; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== lottery card (match openj-gate) ===== */
.lottery-card {
  margin-bottom: 1rem; overflow: hidden; border-radius: 1.5rem;
  background: #fff; border: 1px solid var(--sky-100); box-shadow: var(--shadow);
}
.card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--sky-50); padding: 0.75rem 1rem; border-bottom: 1px solid var(--sky-100);
}
.game-meta { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.game-icon-box {
  width: 44px; height: 44px; flex: none; overflow: hidden; border-radius: 1rem;
  background: #fff; border: 1px solid var(--sky-100); box-shadow: var(--shadow);
}
.game-icon-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-name { font-size: 1rem; font-weight: 900; color: #1f2937; truncate: true; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-issue { margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--sky-500); }
.game-progress { text-align: right; flex: none; }
.game-progress .k { font-size: 10px; color: #9ca3af; }
.game-progress .v { margin-top: 2px; font-size: 12px; font-weight: 900; color: #374151; }
.game-progress .v em { font-style: normal; color: var(--sky-500); }

.card-body {
  display: grid; grid-template-columns: 1fr 76px; gap: 0.75rem; padding: 0.875rem;
}
@media (min-width: 768px) {
  .card-body { grid-template-columns: 1fr 100px; padding: 1rem; }
}

.cd-box {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; border-radius: 1rem; background: #fff;
  border: 1px solid var(--sky-100); padding: 0.625rem 0.75rem; box-shadow: var(--shadow);
}
.cd-box .label { font-size: 11px; font-weight: 700; color: #9ca3af; }
.cd-timer { display: flex; align-items: flex-end; color: var(--sky-500); }
.cd-timer .n { font-size: 1.25rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-timer .u { margin: 0 2px; font-size: 12px; font-weight: 700; }

.result-box {
  border-radius: 1.5rem; background: var(--sky-50); border: 1px solid var(--sky-100); padding: 1rem;
}
.result-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem;
}
.result-label { font-size: 12px; font-weight: 900; color: #6b7280; }
.wave-badge {
  border-radius: 999px; padding: 0.2rem 0.75rem; font-size: 12px; font-weight: 900;
  background: #fff; border: 1px solid #e5e7eb;
}
.wave-badge.green { color: #22c55e; border-color: #dcfce7; }
.wave-badge.blue { color: #3b82f6; border-color: #dbeafe; }
.wave-badge.red { color: #ef4444; border-color: #fee2e2; }
.wave-badge.gray { color: #6b7280; border-color: #e5e7eb; }

.balls {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap;
}
.balls-ssc { gap: 0.25rem; }
.balls-pk10 { gap: 0.25rem; }
.op { color: var(--sky-300); font-weight: 900; font-size: 1rem; }
.ball {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 1rem;
  background: #fff; color: var(--sky-500); font-size: 1.125rem; font-weight: 900;
  border: 1px solid var(--sky-100); box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .ball { width: 48px; height: 48px; }
}
.ball.orange { color: #c2410c; border-color: #ffedd5; }
.ball.pk {
  width: 28px; height: 28px; border-radius: 0.5rem; font-size: 0.7rem; border: 0; color: #fff;
}
.ball-1 { background:#ef4444; } .ball-2 { background:#f97316; }
.ball-3 { background:#eab308; color:#422006 !important; } .ball-4 { background:#22c55e; }
.ball-5 { background:#14b8a6; } .ball-6 { background:#0ea5e9; }
.ball-7 { background:#3b82f6; } .ball-8 { background:#8b5cf6; }
.ball-9 { background:#ec4899; } .ball-10 { background:#64748b; }

.sum-ball {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 1rem;
  color: #fff; font-size: 1.125rem; font-weight: 900; box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
@media (min-width: 768px) {
  .sum-ball { width: 56px; height: 56px; }
}
.sum-ball.red { background: var(--wave-red); }
.sum-ball.blue { background: var(--wave-blue); }
.sum-ball.green { background: var(--wave-green); }
.sum-ball.gray { background: var(--wave-gray); }
.sum-line { text-align: center; font-size: 0.8125rem; color: #4b5563; margin-top: 0.5rem; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1rem; }
.stat-cell {
  border-radius: 1rem; background: #fff; padding: 0.625rem 0.5rem; text-align: center;
  border: 1px solid var(--sky-100); box-shadow: var(--shadow);
}
.stat-cell .k { font-size: 10px; color: #9ca3af; }
.stat-cell .v { margin-top: 0.25rem; font-size: 1rem; font-weight: 900; color: #0284c7; }
.stat-cell .v.muted { color: #374151; font-size: 0.875rem; }
.stat-cell .v.danger { color: #ef4444; font-size: 0.875rem; }

.side-actions {
  display: grid; grid-template-rows: repeat(5, 1fr); gap: 0.5rem; min-height: 220px;
}
.side-actions .live-entry {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
  border: 0; background: transparent; color: #374151; font-size: 14px; font-weight: 500; padding: 0;
  white-space: nowrap;
}
.side-actions .live-entry .live-dot {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}
.side-actions a {
  display: flex; align-items: center; justify-content: center;
  border-radius: 1rem; padding: 0 0.25rem; text-align: center;
  font-size: 12px; font-weight: 900; box-shadow: var(--shadow);
}
@media (min-width: 768px) {
  .side-actions a { font-size: 14px; }
}
.side-actions a.primary {
  background: #0ea5e9; color: #fff; border: 0;
}
.side-actions a.primary:hover { background: #0284c7; }
.side-actions a.ghost {
  background: #fff; color: #0284c7; border: 1px solid var(--sky-100);
}
.side-actions a.ghost:hover { background: var(--sky-50); }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

.info-section {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 1rem;
  box-shadow: var(--shadow); padding: 1.1rem 1rem; margin-top: 1rem;
}
.info-section h2 { margin: 0 0 0.65rem; font-size: 1rem; }
.info-section p, .info-section li { color: #4b5563; font-size: 0.875rem; line-height: 1.7; }
.info-section ul { margin: 0; padding-left: 1.1rem; }
.note { color: #9ca3af !important; font-size: 0.8rem !important; }

.play-grid, .algo-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border: 1px solid var(--sky-100); border-radius: 10px;
  overflow: hidden; margin-bottom: 0.55rem; box-shadow: var(--shadow);
}
.play-grid a, .algo-grid a {
  position: relative; text-align: center; padding: 0.42rem 0.2rem;
  border-right: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6;
  font-size: 0.75rem; color: #4b5563;
}
.play-grid a.active, .algo-grid a.active {
  background: var(--sky-50); color: var(--sky-600); font-weight: 700;
}
.badge-n {
  position: absolute; top: 1px; right: 2px;
  background: var(--orange); color: #fff; border-radius: 999px;
  font-size: 0.6rem; min-width: 12px; height: 12px; line-height: 12px;
}

.forecast-panel {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  box-shadow: var(--shadow); padding: 0.9rem; margin-bottom: 0.75rem;
}
.tag-line { text-align: center; font-size: 0.75rem; color: #4b5563; margin-bottom: 0.55rem; }
.tag {
  display: inline-block; margin: 0 0.2rem; padding: 0.12rem 0.45rem; border-radius: 4px;
  color: #fff; font-size: 0.7rem;
}
.tag.green { background: #22c55e; }
.tag.blue { background: #3b82f6; }
.tag.orange { background: #f97316; }
.countdown-xl { text-align: center; font-size: 1rem; font-weight: 700; margin: 0.4rem 0 0.7rem; }
.countdown-xl .box {
  display: inline-block; min-width: 2rem; padding: 0.15rem 0.35rem; margin: 0 0.15rem;
  background: #fee2e2; color: #dc2626; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.stats-line { text-align: center; font-size: 0.8125rem; color: #4b5563; margin: 0.55rem 0 0.75rem; }
.live-cta {
  display: block; width: min(280px, 100%); margin: 0 auto;
  background: #0ea5e9; color: #fff; border: 0; border-radius: 999px;
  padding: 0.7rem 1rem; font-size: 0.9rem; font-weight: 700;
}

.table-wrap {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  overflow: auto; box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 0.65rem 0.55rem; border-bottom: 1px solid #f3f4f6; text-align: center; font-size: 0.8125rem; }
th { background: #fafafa; color: #6b7280; font-weight: 600; }
.pred-chip {
  display: inline-block; min-width: 2rem; padding: 0.15rem 0.4rem; border-radius: 4px;
  color: #fff; font-size: 0.75rem;
}
.pred-chip.big, .pred-chip.odd, .pred-chip.dragon { background: #3b82f6; }
.pred-chip.small, .pred-chip.even, .pred-chip.tiger { background: #22c55e; }
.pred-chip.other { background: #6366f1; }
.hit-yes { color: #16a34a; font-weight: 700; }
.hit-no { color: #dc2626; font-weight: 700; }
.mini-eq { color: #6b7280; font-variant-numeric: tabular-nums; }
.mini-sum {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 0.25rem;
  border-radius: 999px; color: #fff; font-weight: 700; font-size: 0.75rem;
}

.date-bar {
  display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center;
  background: #fff; border: 1px solid var(--sky-100); border-radius: 10px;
  padding: 0.65rem; margin-bottom: 0.65rem; box-shadow: var(--shadow);
}
.date-bar input { border: 1px solid #e5e7eb; border-radius: 8px; padding: 0.4rem 0.55rem; font-size: 0.8125rem; }
.date-bar a { padding: 0.35rem 0.55rem; border-radius: 8px; background: #f9fafb; font-size: 0.75rem; color: #4b5563; }
.pager { display: flex; justify-content: center; gap: 0.35rem; margin-top: 0.75rem; flex-wrap: wrap; }
.pager button {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 8px;
  padding: 0.35rem 0.65rem; font-size: 0.8125rem;
}
.pager button.active, .pager button:hover:not(:disabled) {
  background: #0ea5e9; color: #fff; border-color: #0ea5e9;
}
.pager button:disabled { opacity: 0.45; cursor: not-allowed; }

.trend-chart {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  padding: 0.85rem; box-shadow: var(--shadow); overflow-x: auto;
}
.trend-svg { width: 100%; min-width: 640px; height: 260px; display: block; }
.luzhu-board {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  padding: 0.75rem; overflow-x: auto; box-shadow: var(--shadow);
}
.luzhu-grid { display: flex; gap: 4px; min-height: 220px; align-items: flex-start; }
.luzhu-col { display: flex; flex-direction: column; gap: 4px; }
.luzhu-cell {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  color: #fff; font-size: 0.7rem; font-weight: 700;
}
.luzhu-cell.大, .luzhu-cell.单, .luzhu-cell.大单, .luzhu-cell.大双 { background: #3b82f6; }
.luzhu-cell.小, .luzhu-cell.双, .luzhu-cell.小单, .luzhu-cell.小双 { background: #22c55e; }

.dragon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.65rem; }
.dragon-card {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  padding: 0.85rem; box-shadow: var(--shadow);
}
.dragon-card h3 { margin: 0 0 0.4rem; font-size: 0.9rem; }
.dragon-card .meta { font-size: 0.8rem; color: #6b7280; line-height: 1.6; }
.dragon-card .count { color: var(--red); font-weight: 700; font-size: 1.1rem; }

.loading, .error {
  background: #fff; border: 1px solid var(--sky-100); border-radius: 12px;
  padding: 2rem; text-align: center; color: #6b7280; box-shadow: var(--shadow);
}
.error { color: #b91c1c; }

/* ===== 图片广告位（宽度自适应，不裁切） ===== */
.ad-stack { background: #fff; }
.ad-slot {
  padding: 0.5rem 0;
  background: transparent;
}
.ad-slot .container { width: min(100% - 1.5rem, var(--max)); margin: 0 auto; }
.ad-slot .ad-link {
  display: block;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
}
.ad-slot .ad-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
.ad-top { border-bottom: 1px solid #f3f4f6; background: #fff; }
.ad-bottom { border-top: 1px solid #f3f4f6; background: #fff; padding-bottom: 0.85rem; }
@media (max-width: 640px) {
  .ad-slot { padding: 0.35rem 0; }
  .ad-slot .ad-link { border-radius: 6px; }
  .logo-img { height: 34px; max-width: min(140px, 46vw); }
}

.site-footer {
  margin-top: auto; background: #fff; border-top: 1px solid #e5e7eb;
  padding: 1.25rem 0; text-align: center; color: #6b7280; font-size: 0.8rem;
}
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--sky-600); }
.footer-note { color: #9ca3af !important; font-size: 0.72rem !important; }

@media (min-width: 768px) {
  .nav { display: flex; }
  .play-grid, .algo-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 720px) {
  .card-body { grid-template-columns: 1fr; }
  .side-actions {
    grid-template-rows: none; grid-template-columns: repeat(5, 1fr);
    min-height: 0; height: 44px;
  }
}


/* ===== 悬浮投注位 ===== */
.bet-float {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 9500;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bet-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.bet-float-inner {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #e11d48;
  border: 1.5px dotted rgba(255, 255, 255, 0.85);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #fff;
  line-height: 1.05;
  text-align: center;
}
.bet-float-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.bet-float-url {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0.95;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .bet-float {
    right: 0.75rem;
    bottom: 5rem;
    width: 68px;
    height: 68px;
  }
  .bet-float-inner {
    width: 56px;
    height: 56px;
  }
  .bet-float-title { font-size: 0.95rem; }
  .bet-float-url { font-size: 0.52rem; }
}

/* ===== live modal (match openj-gate) ===== */
.live-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 0.75rem;
}
.live-modal.hidden { display: none; }
.live-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
}
.live-panel {
  position: relative; width: min(100%, 420px); overflow: hidden;
  border-radius: 1rem; color: #fff;
  background: linear-gradient(180deg, #1d4ed8 0%, #312e81 100%);
  box-shadow: 0 25px 50px rgba(0,0,0,.45);
  padding: 0.75rem 1rem 1rem;
}
.live-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 12px;
}
.live-head-left, .live-head-right { display: flex; align-items: center; gap: 0.5rem; }
.live-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  margin-right: 0.15rem;
}
.live-brand em {
  font-style: italic;
  font-weight: 800;
  background: linear-gradient(90deg, #93c5fd 0%, #e0f2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.live-brand span { color: #fff; font-weight: 700; font-size: 0.85em; }

.live-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: #ef4444; border-radius: 4px; padding: 2px 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
}
.live-badge .live-dot {
  width: 6px; height: 6px; background: #fff; border-radius: 999px;
  animation: pulse 1.4s ease-in-out infinite;
}
.live-game { opacity: 0.9; }
.live-issue { opacity: 0.7; }
.live-icon-btn {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 0.5rem;
  background: transparent; color: #fff; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.live-icon-btn:hover { background: rgba(255,255,255,.15); }
.live-close { font-size: 20px; line-height: 1; }
.live-stage {
  position: relative; margin: 0.25rem auto 0; width: 100%;
  aspect-ratio: 5 / 4; max-height: min(46vh, 320px);
}
.live-stage canvas { width: 100%; height: 100%; display: block; }
.live-pedestals {
  position: absolute; left: 0; right: 0; bottom: 8%;
  display: flex; justify-content: center; gap: 18px; pointer-events: none;
}
.live-ped { display: flex; flex-direction: column; align-items: center; }
.live-ped-ball {
  width: 36px; height: 36px; border-radius: 999px; color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,.35), inset 0 -3px 6px rgba(0,0,0,.2);
  border: 2px solid rgba(255,255,255,.45);
}
.live-result {
  margin-top: 0.5rem; display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px;
}
.live-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 1rem;
  background: rgba(255,255,255,.15); color: #fff;
  font-size: 21px; font-weight: 900;
  backdrop-filter: blur(4px);
}
.live-num.pk { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.live-num.pk.c0{background:#ef4444}.live-num.pk.c1{background:#f97316}
.live-num.pk.c2{background:#eab308;color:#422006}.live-num.pk.c3{background:#22c55e}
.live-num.pk.c4{background:#14b8a6}.live-num.pk.c5{background:#0ea5e9}
.live-num.pk.c6{background:#3b82f6}.live-num.pk.c7{background:#8b5cf6}
.live-num.pk.c8{background:#ec4899}.live-num.pk.c9{background:#64748b}
.live-op { opacity: 0.5; font-size: 18px; font-weight: 300; }
.live-sum {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; height: 48px; padding: 0 8px; border-radius: 1rem;
  background: #fff; color: #1d4ed8; font-size: 25px; font-weight: 900;
}
.live-pk-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; }
.live-sum-line { width: 100%; text-align: center; margin-top: 4px; font-size: 12px; opacity: .9; }
.live-sum-line .live-sum { display: inline-flex; vertical-align: middle; margin-left: 4px; min-width: 40px; height: 36px; font-size: 18px; }
.live-foot {
  margin-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem; font-size: 12px;
}
.live-cd-pill {
  border-radius: 999px; padding: 2px 10px; background: rgba(255,255,255,.2); transition: background .15s;
}
.live-cd-pill b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.live-sim-btn {
  border: 0; border-radius: 999px; min-height: 32px; padding: 0 12px;
  background: rgba(255,255,255,.25); color: #fff; font-size: 12px; transition: background .15s;
}
.live-sim-btn:hover { background: rgba(255,255,255,.4); }
.live-sim-btn:disabled { opacity: 0.5; cursor: not-allowed; }
