/* ==========================================================================
   AI 体育赛事实时智能分析系统 · 官网统一样式
   纯 CSS，无外部字体 / CDN 依赖。深色科技风 + 响应式。
   ========================================================================== */

:root {
  --bg: #060a11;
  --bg-soft: #0b1220;
  --panel: #0e1626;
  --panel-2: #121d30;
  --line: #1e2c42;
  --line-strong: #2b3e5c;
  --text: #d8e3f0;
  --text-dim: #8fa3ba;
  --text-faint: #64778f;
  --accent: #2dd4bf;
  --accent-dim: #14b8a6;
  --amber: #f0b429;
  --red: #f0616d;
  --green: #3ddc97;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1160px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 12% -12%, rgba(45, 212, 191, 0.11), transparent 62%),
    radial-gradient(900px 520px at 94% 4%, rgba(96, 140, 220, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
kbd,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  /* anywhere 会参与 min-content 计算，长路径/哈希不会把父级网格项顶宽 */
  overflow-wrap: anywhere;
}

/* ---------- 布局骨架 ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

main {
  display: block;
  padding: 40px 0 72px;
}

section + section {
  margin-top: 56px;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 10, 17, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.4px;
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), #3b82f6);
  color: #04121a;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--mono);
}

.brand-text {
  font-size: 15px;
  white-space: nowrap;
}

.brand-text small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  color: var(--text-faint);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.nav-toggle:hover {
  border-color: var(--accent-dim);
}

/* ---------- 通用文本 ---------- */

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

h1 {
  font-size: clamp(26px, 4.4vw, 42px);
  font-weight: 800;
}

h2 {
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 17px;
  font-weight: 700;
}

h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0 0 14px;
}

.lead {
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--text-dim);
  max-width: 78ch;
}

.dim {
  color: var(--text-dim);
}

.faint {
  color: var(--text-faint);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.center {
  text-align: center;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 34px 0 44px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px 11px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.6px;
}

.hero h1 span {
  background: linear-gradient(96deg, var(--accent), #7dd3fc 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.btn:hover {
  border-color: var(--accent-dim);
  background: var(--panel-2);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(140deg, var(--accent), var(--accent-dim));
  color: #04121a;
}

.btn-primary:hover {
  background: linear-gradient(140deg, #4ee6d2, var(--accent));
  border-color: transparent;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

/* ---------- 卡片 ---------- */

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

/* 网格项默认 min-width:auto，会被内部宽表格顶开导致整页横向溢出 */
.grid > * {
  min-width: 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  min-width: 0;
}

.card h3 + p:last-child,
.card p:last-child {
  margin-bottom: 0;
}

.card-tight {
  padding: 16px;
}

.card-accent {
  border-color: rgba(45, 212, 191, 0.28);
  box-shadow: inset 0 1px 0 rgba(45, 212, 191, 0.14);
}

/* ---------- 指标数字 ---------- */

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.stat-label {
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 12.5px;
  letter-spacing: 0.4px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
}

.stat-value.amber {
  color: var(--amber);
}

.stat-value.neutral {
  color: var(--text);
}

.stat-note {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- 来源标注 ---------- */

.src {
  display: inline-block;
  max-width: 100%;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: normal;
  word-break: break-all;
}

.src-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.3px;
}

.badge-ok {
  background: rgba(61, 220, 151, 0.14);
  color: var(--green);
  border: 1px solid rgba(61, 220, 151, 0.3);
}

.badge-miss {
  background: rgba(240, 97, 109, 0.14);
  color: var(--red);
  border: 1px solid rgba(240, 97, 109, 0.3);
}

.badge-neutral {
  background: rgba(143, 163, 186, 0.12);
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
}

.badge-warn {
  background: rgba(240, 180, 41, 0.13);
  color: var(--amber);
  border: 1px solid rgba(240, 180, 41, 0.3);
}

/* ---------- 表格 ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 560px;
}

thead th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(45, 212, 191, 0.04);
}

td.num,
th.num {
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
}

/* ---------- 列表 ---------- */

ul.clean,
ol.clean {
  margin: 0 0 14px;
  padding-left: 20px;
}

ul.clean li,
ol.clean li {
  margin-bottom: 7px;
}

ul.tick {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

ul.tick li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 24px;
}

ul.tick li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--accent);
  font-size: 13px;
}

/* ---------- 提示框 ---------- */

.note {
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.05);
  color: var(--text-dim);
  font-size: 13.5px;
}

.note > :last-child {
  margin-bottom: 0;
}

.note-warn {
  border-left-color: var(--amber);
  background: rgba(240, 180, 41, 0.06);
}

.note-plain {
  border-left-color: var(--line-strong);
  background: var(--panel);
}

/* ---------- 示例卡片 ---------- */

.example {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  overflow: hidden;
}

.example-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.example-league {
  color: var(--accent);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.6px;
}

.example-date {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
}

.example-body {
  padding: 16px 18px 18px;
}

.example-teams {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
}

.example-score {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 16px;
}

.probs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.prob {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  text-align: center;
}

.prob-name {
  display: block;
  color: var(--text-faint);
  font-size: 11.5px;
  margin-bottom: 2px;
}

.prob-value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.prob.top {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.07);
}

.prob.top .prob-value {
  color: var(--accent);
}

.example-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.example-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--text-faint);
  font-size: 12px;
  font-family: var(--mono);
  line-height: 1.8;
  word-break: break-word;
}

/* ---------- 下载卡 ---------- */

.dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
}

.dl > * {
  min-width: 0;
}

.dl-name {
  font-size: 16px;
  font-weight: 700;
  word-break: break-all;
}

.kv {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 12px;
  margin-top: 12px;
  font-size: 13px;
}

.kv dt {
  color: var(--text-faint);
  font-size: 12.5px;
  min-width: 0;
}

.kv dd {
  margin: 0;
  font-family: var(--mono);
  word-break: break-all;
  overflow-wrap: anywhere;
  min-width: 0;
}

.hash-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* flex 项默认 min-width:auto，64 位 SHA256 会把整页顶宽 */
.hash-line > span {
  min-width: 0;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.copy-btn {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 11.5px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.copy-btn.done {
  border-color: rgba(61, 220, 151, 0.5);
  color: var(--green);
}

.dl-count {
  color: var(--text-faint);
  font-size: 12px;
  font-family: var(--mono);
}

/* ---------- 更新日志 ---------- */

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
  border-left: 1px solid var(--line-strong);
}

.timeline > li {
  position: relative;
  margin-bottom: 26px;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
}

.tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.tl-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
}

.tl-ver {
  padding: 1px 8px;
  border: 1px solid rgba(240, 180, 41, 0.32);
  border-radius: 999px;
  background: rgba(240, 180, 41, 0.1);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11.5px;
}

.tl-title {
  font-size: 16px;
  font-weight: 700;
}

/* ---------- 折叠 ---------- */

details.faq {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

details.faq > summary {
  padding: 13px 16px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

details.faq > summary::-webkit-details-marker {
  display: none;
}

details.faq > summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  color: var(--accent);
  font-family: var(--mono);
}

details.faq[open] > summary::before {
  content: "−";
}

details.faq > summary:hover {
  color: var(--accent);
}

.faq-body {
  padding: 0 16px 14px 34px;
  color: var(--text-dim);
  font-size: 13.5px;
}

.faq-body > :last-child {
  margin-bottom: 0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 30px 0 34px;
  color: var(--text-faint);
  font-size: 13px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: space-between;
}

.footer-col {
  min-width: 180px;
}

.footer-col h4 {
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 5px;
}

.footer-col a {
  color: var(--text-faint);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.8;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.96);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    margin: 6px 0 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-links a {
    padding: 10px 12px;
  }

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

  .dl .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14.5px;
  }

  main {
    padding: 26px 0 52px;
  }

  section + section {
    margin-top: 40px;
  }

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

  .prob {
    padding: 7px 4px;
  }

  .prob-value {
    font-size: 14px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 0 0;
  }

  .kv dt {
    margin-top: 8px;
  }

  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media print {
  .site-header,
  .site-footer,
  .nav-toggle {
    display: none;
  }

  body {
    background: #fff;
    color: #111;
  }
}
