/* ============================================================
   免费体育 / BAPP — 共享 Site Kit
   一方看台：比分牌命令栏 + 看台下层页脚
   ============================================================ */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; }

a { color: inherit; }

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --night: #0B1424;
  --green-deep: #0E3B2A;
  --grass: #1F7A4D;
  --concrete: #7C817E;
  --warm: #D8D3C7;
  --lime: #D7FF3F;
  --flame: #FF5A36;
  --chalk: #F4F1E6;
  --card: #16233A;

  /* 派生 */
  --line-dark: rgba(124, 129, 126, 0.34);
  --line-light: rgba(11, 20, 36, 0.14);
  --veil: rgba(244, 241, 230, 0.07);

  /* 字体 */
  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Barlow Condensed", "Oswald", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* 尺度 */
  --wrap: 1280px;
  --gutter: 24px;
  --gap: 24px;
  --header-h: 74px;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 0.22s;
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--night);
  background-color: var(--warm);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(40px, 7vw, 88px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }

p { line-height: 1.7; }

strong, b { font-weight: 700; }

::selection {
  background: var(--lime);
  color: var(--night);
}

/* ---------- 4. 可见性工具 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -72px;
  left: 16px;
  z-index: 300;
  display: inline-block;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  background: var(--lime);
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* ---------- 5. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.section--night {
  background: var(--night);
  color: var(--chalk);
}

.section--warm {
  background: var(--warm);
  color: var(--night);
}

.section--grass {
  background: var(--grass);
  color: var(--chalk);
}

.layout-stand {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stack > * + * {
  margin-top: var(--stack-gap, 16px);
}

/* ---------- 6. 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.72;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--lime);
  flex: 0 0 auto;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel {
  background: var(--card);
  color: var(--chalk);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-m);
  padding: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(31, 122, 77, 0.14);
  color: var(--grass);
}

.tag--lime {
  background: var(--lime);
  color: var(--night);
}

.tag--flame {
  background: rgba(255, 90, 54, 0.16);
  color: var(--flame);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--lime);
  color: var(--night);
}

.btn--primary:hover {
  background: #e6ff78;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border-color: rgba(244, 241, 230, 0.36);
}

.btn--ghost:hover {
  color: var(--lime);
  border-color: var(--lime);
  transform: translateY(-2px);
}

.btn--flame {
  background: var(--flame);
  color: #fff;
}

.btn--flame:hover {
  background: #ff7355;
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

/* 面包屑 */
.breadcrumb {
  padding-block: 18px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--concrete);
}

.breadcrumb-link {
  color: var(--grass);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.breadcrumb-link:hover {
  color: var(--night);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.breadcrumb-current {
  color: var(--concrete);
}

/* 图片容器基础规则 */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(112deg, rgba(215, 255, 63, 0.06) 0 3px, transparent 3px 44px),
    linear-gradient(160deg, var(--green-deep) 0%, var(--night) 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(11, 20, 36, 0.76);
  color: var(--chalk);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* ---------- 7. 头部：比分牌命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--night);
  color: var(--chalk);
  border-bottom: 1px solid var(--line-dark);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header[data-stuck="true"] {
  box-shadow: 0 20px 36px -28px rgba(0, 0, 0, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  transition: min-height var(--dur) var(--ease);
}

.site-header[data-stuck="true"] .header-inner {
  min-height: 60px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--chalk);
}

.brand-mark {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--grass);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(244, 241, 230, 0.18);
  transition: border-radius var(--dur) var(--ease);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(244, 241, 230, 0.6) 47%, rgba(244, 241, 230, 0.6) 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(244, 241, 230, 0.4) 47%, rgba(244, 241, 230, 0.4) 53%, transparent 53%);
  border-radius: 3px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
}

.brand:hover .brand-mark {
  border-radius: 16px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.16;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--concrete);
}

/* 移动按钮 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 15px 9px 12px;
  border: 1px solid rgba(124, 129, 126, 0.55);
  border-radius: var(--radius-pill);
  color: var(--chalk);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 12px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}

.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after { bottom: 1px; }

.nav-toggle[aria-expanded="true"] {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(215, 255, 63, 0.08);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-4px) rotate(-45deg);
}

.nav-toggle-text {
  display: inline-block;
}

/* 导航容器 */
.site-nav {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.site-nav[data-open="true"] {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 12px var(--gutter) 22px;
  background: var(--night);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  box-shadow: 0 26px 44px -30px rgba(0, 0, 0, 0.95);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

.nav-item {
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 6px;
  border-radius: var(--radius-s);
  color: var(--chalk);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              padding-left var(--dur) var(--ease);
}

.nav-index {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--concrete);
  transition: color var(--dur) var(--ease);
}

.nav-link:hover {
  color: #fff;
  background: var(--veil);
  padding-left: 12px;
}

.nav-link:hover .nav-index {
  color: var(--chalk);
}

.nav-link[aria-current="page"] {
  color: var(--lime);
  background: rgba(215, 255, 63, 0.09);
  font-weight: 700;
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--lime);
}

.nav-link[aria-current="page"]::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--lime);
  flex: 0 0 auto;
}

/* 快入口与 CTA */
.nav-utility {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 129, 126, 0.3);
}

.util-link {
  position: relative;
  align-self: flex-start;
  padding: 8px 2px;
  color: var(--warm);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.util-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}

.util-link:hover {
  color: var(--chalk);
}

.util-link:hover::after {
  transform: scaleX(1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  box-shadow: 0 8px 18px -12px rgba(215, 255, 63, 0.9);
}

.header-cta:hover {
  background: #e6ff78;
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -14px rgba(215, 255, 63, 0.95);
}

/* 阅读进度带 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(124, 129, 126, 0.22);
  overflow: hidden;
}

.scroll-meter-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--grass) 0%, var(--lime) 68%, var(--flame) 100%);
}

/* ---------- 8. 页脚：看台下层 ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--green-deep) 0%, #081a14 100%);
  color: var(--chalk);
  border-top: 1px solid rgba(215, 255, 63, 0.2);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(102deg, rgba(215, 255, 63, 0.055) 0 2px, transparent 2px 52px);
  pointer-events: none;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 32px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 56px var(--gutter) 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.brand--footer .brand-name {
  font-size: 24px;
}

.brand--footer .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.footer-summary {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(244, 241, 230, 0.78);
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--lime);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.footer-contact-link::after {
  content: "→";
  font-size: 14px;
  transition: transform var(--dur) var(--ease);
}

.footer-contact-link:hover {
  color: #e6ff78;
  border-bottom-color: var(--lime);
}

.footer-contact-link:hover::after {
  transform: translateX(3px);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 28px 20px;
}

.footer-col {
  min-width: 0;
}

.footer-col-title {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  line-height: 1.4;
}

.footer-list {
  display: grid;
  gap: 11px;
  list-style: none;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--warm);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer-link::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--concrete);
  transition: width var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.footer-link:hover {
  color: var(--lime);
}

.footer-link:hover::before {
  width: 24px;
  background: var(--lime);
}

/* 联系面板 */
.footer-contact {
  padding: 22px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-m);
  background: rgba(11, 20, 36, 0.55);
}

.contact-list {
  display: grid;
  gap: 14px;
  list-style: none;
}

.contact-item {
  display: grid;
  gap: 2px;
}

.contact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--concrete);
}

.contact-value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--chalk);
  word-break: break-word;
}

.contact-value.num,
.contact-item .contact-value {
  font-variant-numeric: tabular-nums;
}

.contact-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(124, 129, 126, 0.45);
  font-size: 12px;
  line-height: 1.75;
  color: rgba(244, 241, 230, 0.6);
}

/* 底部索引条 */
.footer-base {
  border-top: 1px solid rgba(124, 129, 126, 0.3);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  font-size: 12px;
  color: var(--concrete);
}

.footer-copy {
  color: rgba(244, 241, 230, 0.72);
}

.footer-icp {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.footer-legal {
  margin-left: auto;
  color: rgba(244, 241, 230, 0.5);
}

/* ---------- 9. 焦点与动效偏好 ---------- */
:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-footer :focus-visible {
  outline-color: var(--lime);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 520px) {
  .site-header .brand-tag {
    display: none;
  }

  .header-inner {
    gap: 10px;
  }

  .brand-name {
    font-size: 18px;
  }

  .footer-base-inner {
    padding-bottom: 22px;
  }

  .footer-legal {
    margin-left: 0;
  }
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 940px) {
  .header-inner {
    gap: 20px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav[data-open="true"] {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    gap: 2px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: var(--radius-s);
  }

  .nav-link:hover {
    padding-left: 12px;
  }

  .nav-link[aria-current="page"]::after {
    margin-left: 2px;
  }

  .nav-utility {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
  }

  .util-link {
    align-self: center;
    padding: 6px 0;
    font-size: 13px;
  }

  .header-cta {
    padding: 11px 18px;
    font-size: 13px;
  }
}

@media (min-width: 940px) and (max-width: 1179px) {
  .util-link {
    display: none;
  }

  .nav-link {
    padding: 10px 8px;
    font-size: 13px;
  }

  .nav-index {
    display: none;
  }
}

@media (min-width: 1024px) {
  .layout-stand {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 32px;
  }
}

@media (min-width: 1040px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.9fr) minmax(0, 1.2fr);
    gap: 32px 40px;
    padding-top: 64px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
