/* =========================================================
   买球官网 · 全站共享样式 /assets/site.css
   夜间球场灯光下的数据面板：深墨绿底 + 荧光青 + 暖橙
   ========================================================= */

/* ---------- 1. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--ink-900);
  color: var(--text-100);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1100px 620px at 82% -12%, rgba(53, 224, 196, .075), transparent 68%),
    radial-gradient(760px 480px at 8% 108%, rgba(255, 122, 58, .06), transparent 70%),
    linear-gradient(to right, rgba(34, 66, 58, .30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 66, 58, .30) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 96px 96px, 96px 96px;
}

main,
.mk-footer {
  position: relative;
  z-index: 1;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

ul,
ol {
  margin: 0;
}

a {
  color: var(--aqua-400);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

::selection {
  background: var(--aqua-400);
  color: var(--ink-900);
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #0A1B17;
  --ink-800: #10261F;
  --glass-700: rgba(27, 58, 49, .6);
  --cream-100: #EFE7D6;
  --cream-300: #D8CDB4;
  --aqua-400: #35E0C4;
  --ember-500: #FF7A3A;
  --amber-300: #FFC46B;
  --text-100: #F2EFE4;
  --text-400: #9FB6AC;
  --rule-600: #22423A;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --header-h: 72px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 中文排版基线 ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

/* ---------- 4. 无障碍焦点与跳转 ---------- */
:focus-visible {
  outline: 2px solid var(--aqua-400);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 140;
  padding: 11px 18px;
  background: var(--aqua-400);
  color: var(--ink-900);
  font: 700 14px/1 var(--font-mono);
  letter-spacing: .06em;
  text-decoration: none;
  border-radius: 2px;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 5. 通用容器 ---------- */
.mk-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#main-content {
  padding-top: var(--header-h);
}

/* ---------- 6. 头部 ---------- */
.mk-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(10, 27, 23, .78), rgba(10, 27, 23, 0));
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.mk-header[data-scrolled] {
  background: rgba(16, 38, 31, .95);
  border-bottom-color: var(--rule-600);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.mk-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(34, 66, 58, .55);
  overflow: hidden;
}

.mk-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--aqua-400), var(--amber-300) 78%, var(--ember-500));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.mk-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  min-height: var(--header-h);
}

/* 品牌 */
.mk-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text-100);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.mk-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 4px;
  background: var(--aqua-400);
  color: var(--ink-900);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: .06em;
  border-radius: 2px;
}

.mk-brand__name { line-height: 1; }

.mk-brand--footer .mk-brand__mark { background: var(--ember-500); }

/* 导航 */
.mk-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  margin-left: auto;
}

.mk-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.3vw, 18px);
  list-style: none;
  padding: 0;
}

.mk-nav__list a {
  position: relative;
  display: inline-block;
  padding: 9px 4px;
  color: var(--text-400);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color .2s var(--ease);
}

.mk-nav__list a::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 2px;
  background: var(--aqua-400);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease);
}

.mk-nav__list a:hover { color: var(--text-100); }
.mk-nav__list a:hover::after { transform: scaleX(1); }

.mk-nav__list a[aria-current="page"] { color: var(--aqua-400); }
.mk-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.mk-nav__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: clamp(10px, 2vw, 22px);
  border-left: 1px solid var(--rule-600);
}

.mk-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 2px;
  color: var(--text-400);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease);
}

.mk-tool::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex: 0 0 auto;
}

.mk-tool:hover { color: var(--aqua-400); }

/* 移动菜单按钮 */
.mk-nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--rule-600);
  border-radius: 2px;
  color: var(--text-100);
  font: 600 13px/1 var(--font-mono);
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.mk-nav-toggle:hover { border-color: var(--aqua-400); }

.mk-nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.mk-nav-toggle__bars::before,
.mk-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--aqua-400);
  transition: transform .2s var(--ease), top .2s var(--ease);
}

.mk-nav-toggle__bars::before { top: 0; }
.mk-nav-toggle__bars::after { top: 8px; }

.mk-header[data-open] .mk-nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.mk-header[data-open] .mk-nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }

/* ---------- 7. 按钮 ---------- */
.mk-btn {
  --btn-bg: var(--ink-800);
  --btn-fg: var(--text-100);
  --btn-bd: var(--rule-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--btn-bd);
  border-radius: 2px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 14px/1.2 var(--font-sans);
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.mk-btn:hover { transform: translateY(-1px); }

.mk-btn--ember {
  --btn-bg: var(--ember-500);
  --btn-fg: #17110A;
  --btn-bd: var(--ember-500);
}

.mk-btn--ember:hover { --btn-bg: #FF8E58; }

.mk-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--aqua-400);
  --btn-bd: rgba(53, 224, 196, .45);
}

.mk-btn--ghost:hover {
  --btn-bg: rgba(53, 224, 196, .12);
  --btn-bd: var(--aqua-400);
}

/* ---------- 8. 页脚 ---------- */
.mk-footer {
  margin-top: clamp(64px, 10vw, 140px);
  background: var(--ink-800);
  border-top: 1px solid var(--rule-600);
  color: var(--text-400);
}

.mk-footer__inner {
  padding-block: clamp(40px, 6vw, 72px) 0;
}

.mk-footer__top {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(0, 3fr);
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.mk-footer__brandcol {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mk-footer__tag {
  margin: 0;
  max-width: 30ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-400);
}

.mk-footer__mono {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--text-400);
}

.mk-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.mk-footer__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--amber-300);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
}

.mk-footer__title::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--ember-500);
  flex: 0 0 auto;
}

.mk-footer__list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.65;
}

.mk-footer__list a {
  color: var(--text-400);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.mk-footer__list a:hover {
  color: var(--aqua-400);
  border-bottom-color: rgba(53, 224, 196, .5);
}

.mk-copy {
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--rule-600);
  color: var(--text-100);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: .02em;
  text-align: left;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.mk-copy:hover {
  color: var(--aqua-400);
  border-bottom-color: var(--aqua-400);
}

.mk-copy[data-copied]::after {
  content: "已复制";
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--amber-300);
}

.mk-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 22px 28px;
  border-top: 1px solid var(--rule-600);
  font-size: 13px;
}

.mk-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

.mk-footer__legal a {
  color: var(--text-400);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.mk-footer__legal a:hover { color: var(--aqua-400); }

.mk-footer__copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--text-400);
}

/* ---------- 9. 章节组件 ---------- */
.mk-section {
  padding-block: clamp(48px, 7vw, 96px);
}

.mk-section__head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(14px, 3vw, 40px);
  align-items: end;
  padding-bottom: 20px;
  margin-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--rule-600);
}

.mk-section__num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ember-500);
}

.mk-section__title {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 800;
}

.mk-section__note {
  margin: 0;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-400);
}

/* ---------- 10. 栅格与卡片 ---------- */
.mk-grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.mk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mk-card {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--ink-800);
  border: 1px solid var(--rule-600);
  border-radius: 2px;
}

.mk-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.mk-card--link:hover {
  border-color: rgba(53, 224, 196, .5);
  transform: translateY(-2px);
}

/* ---------- 11. 材质层 ---------- */
.mk-paper {
  padding: clamp(28px, 4vw, 56px);
  background: var(--cream-100);
  color: var(--ink-900);
  border-radius: 2px;
}

.mk-paper h2,
.mk-paper h3,
.mk-paper h4 { color: var(--ink-900); }

.mk-paper a {
  color: var(--ink-900);
  text-decoration: underline;
  text-decoration-color: var(--ember-500);
  text-underline-offset: 3px;
}

.mk-glass {
  background: var(--glass-700);
  border: 1px solid var(--rule-600);
  border-radius: 2px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---------- 12. 文本与索引组件 ---------- */
.mk-mono {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.mk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--amber-300);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1;
}

.mk-tag--aqua { color: var(--aqua-400); }
.mk-tag--ember { color: var(--ember-500); }

.mk-prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-100);
}

.mk-prose p { margin-bottom: 1.4em; }
.mk-prose h2 { margin: 1.6em 0 .6em; font-size: clamp(22px, 2.6vw, 30px); }
.mk-prose h3 { margin: 1.4em 0 .5em; font-size: clamp(18px, 2vw, 22px); }
.mk-prose ul,
.mk-prose ol { padding-left: 1.3em; margin-bottom: 1.4em; }

.mk-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--text-400);
}

.mk-breadcrumb a {
  color: var(--text-400);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.mk-breadcrumb a:hover { color: var(--aqua-400); }

.mk-breadcrumb__sep { color: var(--rule-600); }

.mk-breadcrumb [aria-current="page"] { color: var(--text-100); }

/* ---------- 13. 表格与清单 ---------- */
.mk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.mk-table th,
.mk-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rule-600);
}

.mk-table th {
  background: var(--ink-800);
  color: var(--amber-300);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
}

.mk-table tbody tr:nth-child(even) { background: rgba(27, 58, 49, .35); }

.mk-checklist {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.mk-checklist li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  line-height: 1.75;
}

.mk-checklist li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ember-500);
  font-family: var(--font-mono);
}

/* ---------- 14. 目录 ---------- */
.mk-toc {
  display: grid;
  gap: 2px;
  list-style: none;
  padding: 0;
}

.mk-toc a {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid var(--rule-600);
  color: var(--text-400);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

.mk-toc a:hover { color: var(--text-100); }

.mk-toc a[aria-current] {
  color: var(--aqua-400);
  border-left-color: var(--aqua-400);
  background: rgba(53, 224, 196, .06);
}

/* ---------- 15. 图片容器 ---------- */
.mk-media {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--ink-800), #0C211B);
  border: 1px solid var(--rule-600);
  border-radius: 2px;
}

.mk-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(34, 66, 58, .6) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 66, 58, .6) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.mk-media img,
.mk-media svg,
.mk-media video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mk-media--16x9 { aspect-ratio: 16 / 9; }
.mk-media--4x3  { aspect-ratio: 4 / 3; }
.mk-media--1x1  { aspect-ratio: 1 / 1; }
.mk-media--wide { aspect-ratio: 21 / 9; }
.mk-media--tall { aspect-ratio: 3 / 4; }

.mk-media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(10, 27, 23, .88), transparent);
  color: var(--text-100);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.5;
}

/* ---------- 16. 进场动效 ---------- */
.mk-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.mk-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1100px) {
  .mk-nav__list a { font-size: 14px; }
  .mk-tool { display: none; }
}

@media (max-width: 980px) {
  :root { --header-h: 64px; }

  .mk-header {
    background: rgba(10, 27, 23, .92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .mk-nav-toggle { display: inline-flex; }

  .mk-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 10px var(--gutter) 24px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: rgba(16, 38, 31, .99);
    border-top: 1px solid var(--rule-600);
    border-bottom: 1px solid var(--rule-600);
  }

  .mk-header[data-open] .mk-nav { display: flex; }

  .mk-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .mk-nav__list li { border-bottom: 1px solid var(--rule-600); }

  .mk-nav__list a {
    padding: 14px 2px;
    font-size: 16px;
  }

  .mk-nav__list a::after { display: none; }

  .mk-nav__list a[aria-current="page"]::before {
    content: "/";
    margin-right: 8px;
    font-family: var(--font-mono);
    color: var(--ember-500);
  }

  .mk-nav__tools {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--rule-600);
  }

  .mk-nav__tools .mk-tool { display: inline-flex; }
  .mk-nav__tools .mk-btn { flex: 1 1 auto; }

  .mk-footer__top { grid-template-columns: 1fr; }
  .mk-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mk-section__head { grid-template-columns: 1fr; align-items: start; }

  .mk-grid--3,
  .mk-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }

  .mk-brand { font-size: 17px; }

  .mk-grid--2,
  .mk-grid--3,
  .mk-grid--4 { grid-template-columns: 1fr; }

  .mk-footer__cols { grid-template-columns: 1fr; }

  .mk-footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ---------- 18. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .mk-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .mk-btn:hover { transform: none; }
  .mk-card--link:hover { transform: none; }
}
