:root {
  --bg-primary: #f7f7f7;
  --bg-card: #ffffff;
  --bg-row-hover: #fafafa;
  --border-color: #e5e5e5;
  --text-primary: #222222;
  --text-muted: #888888;
  --accent: #222222;
  --waiting: #4fc3f7;
  --ball-bg: #f0f0f0;
  --sum-big: #d32f2f;
  --sum-small: #388e3c;
  --nav-accent: #e53935;
  --nav-accent-text: #c62828;
  --nav-accent-bg: #fff5f5;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  min-height: 100vh;
}

.page-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-bottom: 1.5rem;
}

.page-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.5rem -12px 0.75rem;
  padding: 0 12px 0 0;
  flex-wrap: nowrap;
}

.header-marquee {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  height: 2rem;
  position: relative;
}

.header-marquee-empty {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  height: 0;
}

.header-marquee-track {
  display: flex;
  width: max-content;
  animation: header-marquee-scroll 40s linear infinite;
  white-space: nowrap;
}

.header-marquee-text {
  display: inline-block;
  padding: 0 2rem 0 0.75rem;
  line-height: 2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

@keyframes header-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  gap: 0.35rem;
  font-size: 0.875rem;
}

@media (max-width: 576px) {
  .page-header-top {
    gap: 0.35rem;
    margin-bottom: 0.65rem;
  }

  .header-marquee {
    height: 1.85rem;
  }

  .header-marquee-text {
    font-size: 0.75rem;
    line-height: 1.85rem;
    padding: 0 1rem 0 0.5rem;
  }

  .header-marquee-track {
    animation-duration: 32s;
  }

  .lang-switcher {
    font-size: 0.8125rem;
    gap: 0.2rem;
  }

  .lang-switch-link {
    padding: 0.1rem 0.2rem;
  }

  .header-marquee-empty {
    display: none;
  }
}

.lang-switch-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}

.lang-switch-link:hover {
  color: var(--text-primary);
}

.lang-switch-link.active {
  color: var(--primary);
  font-weight: 600;
}

.lang-switch-sep {
  color: var(--border-color);
  user-select: none;
}

/* 彩种标签页 */
.game-tabs {
  display: flex;
  border-top: 1px solid var(--border-color);
  margin: 0 -12px;
  padding: 0;
  background: #fafafa;
}

.game-tabs .nav-link {
  flex: 1;
  text-align: center;
  color: var(--text-muted);
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 0.75rem 0;
  font-size: 0.85rem;
  background: transparent;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.game-tabs .nav-link:hover {
  color: var(--text-primary);
  background: #fff;
}

.game-tabs .nav-link.active {
  color: var(--nav-accent-text);
  border-bottom-color: var(--nav-accent);
  background: var(--nav-accent-bg);
  font-weight: 600;
}

/* SEO 内容区 */
.seo-intro {
  margin-bottom: 1rem;
}

.game-ad-slot {
  margin-bottom: 0.75rem;
  min-height: 0;
  text-align: center;
}

.game-ad-slot:empty {
  display: none;
  margin: 0;
}

.qishu-cell a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.qishu-cell a:hover {
  color: var(--bs-danger);
  text-decoration: underline;
}

.issue-breadcrumb {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #6c757d;
}

.issue-breadcrumb a {
  color: var(--bs-danger);
  text-decoration: none;
}

.issue-breadcrumb a:hover {
  text-decoration: underline;
}

.issue-breadcrumb span[aria-hidden="true"] {
  margin: 0 0.35rem;
}

.issue-page .issue-meta {
  color: #6c757d;
}

.issue-result-card {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.issue-intro {
  color: #495057;
  line-height: 1.7;
}

.issue-section {
  margin-top: 1.5rem;
}

.issue-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.issue-summary-table {
  max-width: 420px;
  margin-top: 1rem;
}

.issue-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  flex-wrap: wrap;
}

.issue-pager-link {
  color: var(--bs-danger);
  text-decoration: none;
  font-weight: 600;
}

.issue-pager-link:hover {
  text-decoration: underline;
}

.issue-disclaimer {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.issue-actions {
  margin-top: 1rem;
}

.game-ad-slot--mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .game-ad-slot--mobile-only:not(:empty) {
    display: block !important;
  }
}

.game-ad-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.game-ad-image {
  display: block;
  width: 100%;
  max-height: min(26vh, 220px);
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .game-ad-image {
    max-height: min(36vh, 260px);
  }
}

.seo-h1 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.seo-intro p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* 开奖状态栏 */
.draw-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #fff;
}

.draw-status-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.draw-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #f5f5f5;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.draw-status-latest {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.draw-status-latest strong {
  color: var(--nav-accent-text);
  font-weight: 700;
  margin: 0 0.1rem;
}

.btn-mipai {
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--nav-accent);
  box-shadow: 0 2px 6px rgba(229, 57, 53, 0.35);
  cursor: pointer;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-mipai:hover:not(:disabled) {
  opacity: 0.92;
}

.btn-mipai:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

.draw-status-mid {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.draw-status-label {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.countdown-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 1.75rem;
  border-radius: 3px;
  background: var(--nav-accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: "Consolas", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  flex-shrink: 0;
}

.countdown-unit {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.draw-status-right {
  flex-shrink: 0;
  min-width: 6.5rem;
  text-align: right;
}

.draw-status-right .waiting-block,
.draw-status-right .countdown-status {
  font-size: 0.85rem;
  white-space: nowrap;
}

.countdown-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.waiting-text,
.countdown-status-text {
  display: inline-block;
  min-width: 4.5em;
}

.waiting-pulse {
  animation: waitingPulse 1.6s ease-in-out infinite;
}

@keyframes waitingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* 咪牌刮刮乐弹窗 */
.mipai-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mipai-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mipai-open {
  overflow: hidden;
}

body.mipai-open #lottery-body tr:not(.row-next) td:last-child .result-balls {
  filter: blur(8px);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
}

body.mipai-open #lottery-body tr:not(.row-next) td:last-child {
  color: transparent;
}

.mipai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mipai-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.mipai-modal.show .mipai-dialog {
  transform: translateY(0) scale(1);
}

.mipai-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.mipai-close:hover {
  color: var(--text-primary);
}

.mipai-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}

.mipai-title span {
  color: var(--nav-accent-text);
}

.mipai-auto-notice {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: left;
  color: #8a5a00;
  background: #fff8e8;
  border: 1px solid #ffe0a8;
}

.mipai-auto-notice strong {
  color: var(--nav-accent-text);
  font-weight: 700;
}

.mipai-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  text-align: center;
  color: var(--text-muted);
}

.mipai-update-flash {
  margin: -0.35rem 0 0.65rem;
  min-height: 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--nav-accent-text);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mipai-update-flash.show {
  opacity: 1;
  transform: translateY(0);
}

.mipai-card {
  border-radius: 6px;
  background: linear-gradient(145deg, #fff8f0, #fff);
  border: 1px solid #f0d8c8;
  overflow: hidden;
}

.mipai-scratch-area {
  position: relative;
  min-height: 6rem;
  overflow: hidden;
  touch-action: none;
}

.mipai-result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.mipai-result .result-balls {
  flex-wrap: wrap;
  justify-content: center;
}

.mipai-canvas {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='13' fill='%23f0c040' stroke='%23c9921a' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23fff3c4' stroke-width='1.5' opacity='0.8'/%3E%3C/svg%3E") 16 16, grab;
  touch-action: none;
}

.mipai-canvas.scratching {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='13' fill='%23e8a820' stroke='%23a67a10' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23fff3c4' stroke-width='1.5' opacity='0.6'/%3E%3C/svg%3E") 16 16, grabbing;
}

.mipai-canvas.revealed {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mipai-actions {
  margin-top: 0.85rem;
  text-align: center;
}

.btn-mipai-reveal {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.4rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-mipai-reveal:hover {
  border-color: var(--nav-accent);
  color: var(--nav-accent);
}

.seo-faq {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  padding: 1rem 1.25rem;
}

.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 2rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.article-page h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.article-page h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.article-page p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 0.85rem;
}

.article-page ul {
  margin: 0 0 0.85rem;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.article-page a {
  color: var(--nav-accent-text);
}

.site-footer {
  border-top: 1px solid var(--border-color);
  background: #fafafa;
  padding: 1.25rem 0 1.5rem;
  margin-top: 0.5rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.site-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.site-footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.site-footer-stats {
  margin-top: 0.5rem;
}

.site-footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.85;
}


.seo-faq-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.seo-faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.seo-faq-item:last-child {
  border-bottom: none;
}

.seo-faq-item summary {
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.25rem 0;
}

.seo-faq-item p,
.seo-faq-item .seo-faq-answer {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0.5rem 0 0.25rem;
}

.main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.table-lottery {
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-color);
  --bs-table-hover-bg: var(--bg-row-hover);
}

.table-lottery thead th {
  background: #fafafa;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  border-bottom-width: 1px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.table-lottery tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  font-size: 0.95rem;
  text-align: center;
}

.row-next {
  background: #fafafa !important;
  border-left: 3px solid var(--text-primary);
}

.row-next td {
  font-weight: 500;
}

.qishu-cell {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
  color: var(--text-primary);
}

.qishu-cell.next {
  color: var(--text-primary);
}

.time-cell {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.waiting-block {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--waiting);
}

.alarm-icon {
  font-size: 1.15rem;
}

.loading-dots {
  display: inline-block;
  width: 1.2em;
  text-align: left;
}

.lottery-table-wrap {
  overflow: visible;
}

.table-lottery td:last-child {
  white-space: nowrap;
}

.result-balls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ball-bg);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.ball-op {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.result-racing {
  justify-content: center;
  gap: 0.2rem;
  max-width: 100%;
}

.ball-rank {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.75rem;
}

.sum-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 0.25rem;
}

.sum-badge.big {
  background: #fff5f5;
  color: var(--sum-big);
  border: 1px solid #ffcdd2;
}

.sum-badge.small {
  background: #f1f8f1;
  color: var(--sum-small);
  border: 1px solid #c8e6c9;
}

.footer-bar {
  background: #fafafa;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 右侧悬浮按钮 */
.float-btns {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.float-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  padding: 0.6rem 0.35rem;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #fff;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.65rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.float-btn:hover {
  background: var(--nav-accent-bg);
  color: var(--nav-accent-text);
  border-color: #ffcdd2;
}

.float-btn i {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
  line-height: 1;
}

.float-btn-text {
  font-weight: 500;
}

.float-btn-top {
  opacity: 0;
  visibility: hidden;
  transform: translateX(0.5rem);
  pointer-events: none;
}

.float-btn-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.error-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  display: none;
}

.error-toast.show {
  display: block;
}

/* 标签页 */
.card-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  background: #fafafa;
}

.card-tabs .nav-item {
  flex: 1;
}

.card-tabs .nav-link {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

.card-tabs .nav-link:hover {
  color: var(--text-primary);
  border-color: transparent;
}

.card-tabs .nav-link.active {
  color: var(--nav-accent-text);
  border-bottom-color: var(--nav-accent);
  background: #fff;
  font-weight: 600;
}

.tab-panel-body {
  padding: 1rem;
}

/* 走势图 */
.trend-section {
  margin-bottom: 1.5rem;
}

.trend-section:last-child {
  margin-bottom: 0;
}

.trend-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.trend-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.trend-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.trend-tag.tag-big {
  background: #fff5f5;
  color: var(--sum-big);
  border-color: #ffcdd2;
}

.trend-tag.tag-small {
  background: #f1f8f1;
  color: var(--sum-small);
  border-color: #c8e6c9;
}

.trend-table {
  font-size: 0.85rem;
}

/* 预测 */
.predict-wrap {
  padding: 0.25rem 0;
}

.predict-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.predict-period-box {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 1rem;
  border: 1px solid #ffcdd2;
  border-left: 3px solid var(--nav-accent);
  border-radius: 4px;
  background: var(--nav-accent-bg);
  flex-shrink: 0;
}

.predict-period-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.predict-period-num {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: "Consolas", "Courier New", monospace;
  color: var(--nav-accent-text);
  letter-spacing: 0.02em;
}

.predict-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: right;
}

.predict-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.predict-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.85rem 1rem 1rem;
  background: #fff;
}

.predict-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.predict-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.predict-badge {
  font-size: 0.68rem;
  color: var(--nav-accent-text);
  background: var(--nav-accent-bg);
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}

.predict-result {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.predict-result.val-big { color: var(--sum-big); }
.predict-result.val-small { color: var(--sum-small); }
.predict-result.val-odd { color: #555; }
.predict-result.val-even { color: #888; }
.predict-result.val-sum {
  font-size: 1.25rem;
  font-family: "Consolas", "Courier New", monospace;
  color: var(--text-primary);
}

.predict-desc {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.predict-stats-block {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.85rem 1rem 1rem;
  background: #fafafa;
}

.predict-stats-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.predict-stats-title span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.predict-stats-group + .predict-stats-group {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
}

.predict-stats-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.predict-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.predict-stat {
  text-align: center;
  padding: 0.6rem 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #fff;
}

.predict-stat-name {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.predict-stat-num {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .predict-top {
    flex-direction: column;
    align-items: stretch;
  }

  .predict-note {
    text-align: left;
  }

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

  .predict-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .predict-result {
    min-height: 3rem;
    font-size: 1.75rem;
  }

  .predict-result.val-sum {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .table-lottery thead th,
  .table-lottery tbody td {
    padding: 0.5rem 0.35rem;
    font-size: 0.8rem;
  }

  .table-lottery thead th:nth-child(1),
  .table-lottery tbody td:nth-child(1) {
    width: 26%;
  }

  .table-lottery thead th:nth-child(2),
  .table-lottery tbody td:nth-child(2) {
    width: 30%;
  }

  .table-lottery thead th:nth-child(3),
  .table-lottery tbody td:nth-child(3) {
    width: 44%;
  }

  .result-balls {
    gap: 0.15rem;
  }

  .ball {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .ball-op {
    font-size: 0.7rem;
    flex-shrink: 0;
  }

  .sum-badge {
    min-width: 1.4rem;
    height: 1.4rem;
    font-size: 0.72rem;
    margin-left: 0.1rem;
    flex-shrink: 0;
    padding: 0 0.25rem;
  }

  .ball-rank {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.65rem;
    flex-shrink: 0;
  }

  .result-racing {
    gap: 0.12rem;
  }

  .qishu-cell {
    font-size: 0.75rem;
  }

  .time-cell {
    font-size: 0.72rem;
  }

  .game-tabs .nav-link {
    font-size: 0.75rem;
    padding: 0.6rem 0;
  }

  .draw-status-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 0.55rem 0.65rem;
    gap: 0.45rem 0.5rem;
  }

  .draw-status-left {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
  }

  .draw-status-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.9rem;
  }

  .draw-status-latest {
    font-size: 0.8rem;
    flex-shrink: 1;
    min-width: 0;
  }

  .btn-mipai {
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }

  .draw-status-mid {
    grid-column: 1;
    justify-content: flex-start;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  .draw-status-label,
  .countdown-unit {
    font-size: 0.78rem;
  }

  .countdown-box {
    width: 2rem;
    height: 1.55rem;
    font-size: 0.85rem;
  }

  .draw-status-right {
    grid-column: 2;
    min-width: 0;
    text-align: right;
  }

  .draw-status-right .waiting-block,
  .draw-status-right .countdown-status {
    font-size: 0.78rem;
  }

  .countdown-status-text,
  .waiting-text {
    min-width: 0;
  }

  .countdown-status .countdown-status-text {
    display: none;
  }

  .countdown-status .alarm-icon {
    font-size: 1rem;
  }

  .mipai-dialog {
    max-width: 100%;
  }

  .float-btn {
    width: 2.5rem;
    padding: 0.5rem 0.3rem;
    font-size: 0.6rem;
  }

  .float-btn i {
    font-size: 1rem;
    margin-bottom: 0.15rem;
  }

  .article-page {
    padding: 1.25rem 1rem 1.5rem;
  }

  .article-page h1 {
    font-size: 1.2rem;
  }
}
