:root {
  --ink: #142028;
  --muted: #5c6b73;
  --paper: #eef1f3;
  --card: #ffffff;
  --line: #d5dce0;
  --line-strong: #b8c4c9;
  --accent: #0b6e63;
  --accent-2: #c0392b;
  --sea: #164e63;
  --gold: #c9a227;
  --header: #0f1c22;
  --header-text: #e8eef0;
  --radius: 8px;
  --shadow: 0 1px 0 rgba(15, 28, 34, 0.04), 0 8px 24px rgba(15, 28, 34, 0.06);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --display: "Outfit", "Noto Sans TC", sans-serif;
  --text: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--text);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #08554d; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }

.site-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, #e4eaed 0%, var(--paper) 28%, #e8ecee 100%);
}

/* ——— Header: 深色资讯台 ——— */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px; position: relative;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 0.95rem;
}
.brand-text { font-weight: 700; letter-spacing: 0.02em; font-size: 1.05rem; }
.main-nav { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 0.6rem 0.85rem; border-radius: 4px;
  color: var(--header-text); font-size: 0.98rem; font-weight: 600;
}
.nav-item > a:hover, .nav-item:hover > a {
  background: rgba(255,255,255,0.08); color: #fff;
}
.nav-sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 168px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow); padding: 0.35rem; z-index: 20;
}
.nav-item.has-sub:hover .nav-sub { display: block; }
.nav-sub a { display: block; padding: 0.55rem 0.75rem; border-radius: 4px; color: var(--ink); font-weight: 500; }
.nav-sub a:hover { background: rgba(11,110,99,0.08); color: var(--accent); }
.nav-toggle { display: none; border: 0; background: transparent; font-size: 1.45rem; cursor: pointer; color: #fff; }

.site-main { padding: 1.35rem 0 2.5rem; }

/* ——— Footer + trust ——— */
.site-footer {
  border-top: 1px solid var(--line-strong);
  background: #fff;
  padding: 0 0 1.75rem;
}
.trust-bar {
  background: #f4f7f6;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.trust-bar strong { color: var(--ink); }
.trust-bar .trust-items {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem;
  padding-top: 0.25rem;
}
.footer-brand { font-weight: 700; font-family: var(--display); font-size: 1.1rem; }
.footer-note { color: var(--muted); font-size: 0.92rem; margin: 0.4rem 0 0; }
.footer-col h4 { margin: 0 0 0.6rem; font-size: 0.98rem; }
.footer-col a { display: block; margin: 0.4rem 0; color: var(--muted); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-copy {
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
}

/* ——— Page chrome ——— */
.page-hero { margin-bottom: 1rem; }
.page-hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-hero .tagline { margin: 0; color: var(--muted); font-size: 0.98rem; }

.tabs {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0 0 1.15rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--line);
}
.tabs a {
  padding: 0.5rem 0.95rem;
  border-radius: 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  background: transparent;
}
.tabs a:hover { background: rgba(11,110,99,0.08); color: var(--accent); }
.tabs a.active {
  background: var(--accent);
  color: #fff;
}
.tabs a.active:hover { color: #fff; }

.filters {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0 0 1rem;
}
.filters a {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}
.filters a:hover, .filters a.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.hero {
  display: grid; gap: 0.85rem; margin-bottom: 1.5rem;
  padding: 1.35rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero h1 {
  margin: 0; font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  letter-spacing: -0.02em; line-height: 1.15;
}
.hero p { margin: 0; color: var(--muted); max-width: 46rem; font-size: 1.02rem; }
.hero-cta { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.35rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.2rem; border-radius: 4px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer; transition: 0.15s ease; font-size: 0.95rem;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #08554d; color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.section { margin: 1.75rem 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { margin: 0; font-size: 1.28rem; font-family: var(--display); font-weight: 700; }
.section-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; }
.section-head > a { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 1.15rem 1.25rem;
}
.panel.draw-hero {
  border-left: 4px solid var(--accent);
  padding: 1.35rem 1.4rem;
}
.panel-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.85rem;
}
.panel-title h3 { margin: 0; font-size: 1.12rem; font-weight: 700; }
.meta { color: var(--muted); font-size: 0.95rem; }
.period-lg {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.empty { color: var(--muted); margin: 0.5rem 0; font-size: 0.98rem; }

/* ——— Balls: 开奖主角 ——— */
.balls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ball {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1rem; color: #fff;
  background: var(--sea);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18);
  letter-spacing: -0.02em;
}
.ball.red { background: #c62828; }
.ball.blue { background: #1565c0; }
.ball.green { background: #2e7d32; }
.ball.ball-orange, .ball-orange { background: #e67e22; }
.ball.ball-purple, .ball-purple { background: #5e35b1; }
.ball.ball-teal, .ball-teal { background: #0b6e63; }
.ball.ball-slate, .ball-slate { background: #455a64; }
.ball.ball-pink, .ball-pink { background: #c2185b; }
.ball.ball-red { background: #c62828; }
.ball.ball-blue { background: #1565c0; }
.ball.ball-green { background: #2e7d32; }
.ball.special {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18), 0 0 0 1px rgba(201,162,39,0.35);
}
.ball-md { width: 36px; height: 36px; font-size: 0.88rem; }
.ball-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.balls-digit .ball { border-radius: 6px; width: 40px; }
.balls-bingo { gap: 0.35rem; }
.balls-bingo .ball { width: 30px; height: 30px; font-size: 0.75rem; }
.balls-lg .ball { width: 48px; height: 48px; font-size: 1.08rem; }
.ball-legend {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1rem;
  margin-top: 0.85rem; padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}
.ball-legend .meta { font-size: 0.9rem; }

.hover-lift { color: inherit; display: block; transition: 0.15s ease; }
.hover-lift:hover {
  border-color: var(--accent);
  color: inherit;
  box-shadow: 0 0 0 1px var(--accent);
}

/* ——— Banner ——— */
.banner-strip {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 168px; margin-bottom: 1.25rem;
  border: 1px solid var(--line);
}
.banner-slide {
  display: none; min-height: 168px; color: #fff;
  background: linear-gradient(115deg, #0f1c22 0%, #0b6e63 55%, #164e63 100%);
  background-size: cover; background-position: center;
  text-decoration: none !important;
}
.banner-slide.active { display: flex; align-items: flex-end; }
.banner-caption {
  width: 100%; padding: 1.35rem 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  display: flex; justify-content: space-between; align-items: end; gap: 1rem;
}
.banner-caption strong { font-size: 1.4rem; font-family: var(--display); font-weight: 700; }
.banner-caption span { font-weight: 600; opacity: 0.92; }

.live-countdown { font-size: 1.1rem; margin: 0.35rem 0; }
.live-countdown strong {
  color: var(--accent-2);
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-part {
  display: inline-block; margin: 0 2px 2px 0; padding: 0.15rem 0.4rem;
  border-radius: 4px; background: rgba(15,42,46,0.06); font-size: 0.9rem;
}
.nav-part.hit { background: rgba(46,125,50,0.16); color: #1b5e20; font-weight: 700; }

.scratch-thumb {
  height: 128px; border-radius: 6px; margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #cfd8dc, #eceff1) center/cover no-repeat;
}
.pool-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem;
}
.pool-stat {
  background: #f4f7f6; border: 1px solid var(--line); border-radius: 6px; padding: 0.85rem;
  text-align: center;
}
.pool-stat b { display: block; font-size: 1.15rem; margin-top: 0.2rem; }

.module-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.65rem;
  margin: 1rem 0 1.35rem;
}
.module-chip {
  display: block; text-align: center; padding: 0.85rem 0.5rem;
  border-radius: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-weight: 700; font-size: 0.95rem; transition: 0.15s ease;
}
.module-chip:hover, .module-chip.active {
  border-color: var(--accent); color: var(--accent); background: rgba(11,110,99,0.06);
}

/* ——— Data tables ——— */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table thead th {
  background: #f0f3f4;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  border-bottom: 2px solid var(--line-strong);
  white-space: nowrap;
}
.data-table tbody tr:hover { background: #f7faf9; }
.data-table .balls { gap: 0.35rem; }
.data-table .period-cell { font-weight: 700; font-family: var(--display); white-space: nowrap; }

.recent-block { margin-top: 1.25rem; }
.recent-block .panel-title { margin-bottom: 0.65rem; }
.recent-block .panel-title h3 { font-size: 1.05rem; }

.badge {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: 4px;
  font-size: 0.78rem; font-weight: 700; background: #eceff1; color: var(--ink);
}
.badge.hot, .badge.onsale { background: rgba(192,57,43,0.12); color: var(--accent-2); }
.badge.preview { background: rgba(11,110,99,0.12); color: var(--accent); }

.pagination {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1rem;
  list-style: none; padding: 0; margin-left: 0;
}
.pagination > li { list-style: none; margin: 0; padding: 0; display: inline-flex; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.55rem;
  border: 1px solid var(--line-strong); border-radius: 4px;
  background: #fff; color: var(--ink); font-weight: 600; font-size: 0.9rem;
}
.pagination a:hover, .pagination a.active, .pagination .active,
.pagination .active > a, .pagination .active > span {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.news-item {
  display: block; padding: 0.85rem 0;
  border-bottom: 1px solid var(--line); color: inherit;
}
.news-item:last-child { border-bottom: 0; }
.news-item:hover .news-title { color: var(--accent); }
.news-title { font-weight: 700; font-size: 1.02rem; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem; }
.news-card { color: inherit; overflow: hidden; padding: 0; }
.news-cover { height: 140px; background: linear-gradient(135deg, #cfd8dc, #eceff1) center/cover no-repeat; }
.news-card-body { padding: 1rem 1.1rem 1.15rem; }
.article-cover {
  height: 240px; border-radius: 8px; margin-bottom: 1rem;
  background: linear-gradient(135deg, #cfd8dc, #eceff1) center/cover no-repeat;
  border: 1px solid var(--line);
}
.legend-row { display: flex; gap: 1rem; margin-bottom: 0.75rem; color: var(--muted); font-size: 0.92rem; }
.legend-row .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.35rem; }
.legend-row .dot.red { background: #c62828; }
.legend-row .dot.blue { background: #1565c0; }
.legend-row .dot.green { background: #2e7d32; }

/* 规则页：波色 / 生肖 / 五行 — 多列网格，禁止单列竖排 */
.rule-ball-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem 0.5rem;
  margin-top: 0.85rem;
}
.rule-ball-item {
  display: flex;
  justify-content: center;
  align-items: center;
}
.rule-map-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.rule-map-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  text-align: center;
}
.rule-map-cell .rule-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.1;
}
.rule-map-cell .rule-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 900px) {
  .rule-ball-grid,
  .rule-map-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .rule-ball-grid,
  .rule-map-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.prose { line-height: 1.75; }
.prose p { margin: 0.65rem 0; }
.map-list { list-style: none; padding: 0; margin: 0; }
.map-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.map-list a { color: var(--ink); font-weight: 500; }
.map-list a:hover { color: var(--accent); }

.scratch-card-link { color: inherit; }

/* ========== 导航预测 · 金吊桶风格 ========== */
.page-marksix-nav { max-width: 720px; margin: 0 auto; }
.page-marksix-nav .page-hero h1 {
  font-family: "Microsoft YaHei", "微软雅黑", "Noto Sans TC", sans-serif;
  font-weight: 800;
}
.crown-info-meta {
  margin: 0 auto 14px; padding: 0 4px;
  font-size: 13px; color: #666; text-align: center;
}
.crown-info-meta--mid { margin-top: 8px; font-weight: 700; color: #333; }
.crown-info-list { margin: 0; padding: 0; }
.crown-info-section.crown-jdt-box {
  margin: 8px 0 12px; border-radius: 5px; overflow: hidden;
  background-image: linear-gradient(to right, #a92be2, #ae40e1, #b75fdf, #bd7eda, #b75fdf, #ae40e1, #a92be2);
  padding: 4px; border: none; box-shadow: none;
}
.crown-info-table-title {
  background: linear-gradient(transparent, #f7f3f3);
  border-bottom: 1px solid #738e9f;
  border-top-left-radius: 5px; border-top-right-radius: 5px;
  padding: 8px 10px; text-align: center;
  font-family: "Microsoft YaHei", "微软雅黑", Helvetica, sans-serif;
  font-weight: 800; font-size: clamp(18px, 4.5vw, 26px); color: #111;
  letter-spacing: 0.02em; text-shadow: 0 0 10px #e5e5e5;
}
.crown-info-table-title a { color: inherit; text-decoration: none; }
.crown-info-table-wrap {
  border: none; margin: 0; overflow-x: auto; background: #fff;
  border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;
}
.crown-jdt-table {
  width: 100%; border-collapse: collapse; background: #fff;
  font-size: 18pt; font-family: "Microsoft YaHei", "微软雅黑", Helvetica, sans-serif;
  font-weight: 700; text-align: center; color: #111;
}
.crown-jdt-table td, .crown-jdt-table th {
  border: 1px solid #eee; padding: 10px 8px; vertical-align: middle;
  line-height: 1.55; color: #111; text-align: center;
  font-size: clamp(14px, 4vw, 18pt); font-weight: 800;
}
.crown-jdt-table .col-label {
  width: 28%; min-width: 88px; white-space: nowrap; background: #fff;
}
.crown-jdt-table .col-pred {
  width: 48%; color: #0000ff; font-size: clamp(16px, 4.8vw, 22pt);
  letter-spacing: 0.04em; font-weight: 800;
}
.crown-jdt-table .col-result {
  width: 24%; min-width: 72px; white-space: nowrap; color: #222;
}
.crown-jdt-table .col-result.is-hit { color: #d32f2f; }
.crown-jdt-table .col-result.is-miss { color: #757575; }
.crown-jdt-table .col-result.is-pending { color: #f57c00; }
.crown-jdt-table tr.is-pending-row { background: #fff8e1 !important; }
.pred-zodiac { color: #0000ff; }
.hit-mark,
.pred-zodiac.is-hit {
  background: #ffff00 !important; color: #c62828 !important;
  padding: 0 4px; border-radius: 2px; font-weight: 900;
}
.miss-mark { color: #9e9e9e; font-weight: 800; margin-left: 2px; }
.jdt-more {
  display: block; text-align: center; padding: 8px 10px 12px;
  font-weight: 800; font-size: 14pt; background: #fff; color: #0000ff;
  border-top: 1px solid #eee;
}
.jdt-more:hover { color: #a92be2; }
.crown-nav-banner {
  margin: 0 0 12px; padding: 10px 12px; text-align: center;
  background: #9448c4; color: #fff; font-weight: 800; font-size: 14px;
  border-radius: 4px;
}
.crown-nav-slogan {
  margin: 0 0 14px; padding: 10px 12px; text-align: center;
  background: linear-gradient(#f5f5f5, #e8e8e8);
  font-weight: 800; font-size: 15px; color: #111; border-radius: 4px;
}

@media (max-width: 900px) {
  .grid-3, .grid-2, .footer-grid, .pool-stats { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: #16262e; border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-direction: column; align-items: stretch; padding: 0.75rem 1rem 1rem;
    z-index: 40;
  }
  .main-nav.open { display: flex; }
  .nav-item.has-sub .nav-sub {
    position: static; display: none; box-shadow: none; border: 0; padding-left: 0.75rem;
    background: transparent;
  }
  .nav-item.has-sub.open .nav-sub { display: block; }
  .nav-sub a { color: var(--header-text); }
  .ball { width: 38px; height: 38px; font-size: 0.9rem; }
  .balls-lg .ball { width: 42px; height: 42px; }
  .data-table { font-size: 0.9rem; }
  .data-table th, .data-table td { padding: 0.65rem 0.4rem; }
}
