/* =========================================================
   K1体育3915 — 共享样式表 /assets/site.css
   夜间赛场数据台 · 目录型内容地图
   ========================================================= */

:root {
  --ink: #05090B;
  --forest: #0B2420;
  --moss: #103C33;
  --paper: #F1EAD9;
  --cyan: #22F5C8;
  --orange: #FF6A2B;
  --ice: #CFE6DF;
  --idx: #6E847E;
  --amber: #F2B33D;
  --glass: rgba(18, 52, 45, 0.55);
  --line: rgba(207, 230, 223, 0.16);
  --line-soft: rgba(207, 230, 223, 0.09);

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

  --shell: 1280px;
  --rail: 240px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 基础排版工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 3.4vw, 40px);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  font-size: 0.82em;
}

.tick-line {
  position: relative;
  height: 1px;
  background: var(--line);
}
.tick-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 1px;
  background: var(--cyan);
}

.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ice);
}
.prose p + p { margin-top: 1em; }
.prose h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 1.9em 0 0.6em; }
.prose h3 { font-size: clamp(18px, 2vw, 22px); margin: 1.5em 0 0.5em; }
.prose ul, .prose ol { margin: 1em 0; }
.prose li { position: relative; padding-left: 20px; margin-bottom: 0.5em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 8px;
  height: 1px;
  background: var(--cyan);
}
.prose strong { color: var(--paper); font-weight: 700; }

/* ---------- 面板层 ---------- */
.panel-glass {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line);
}

.panel-solid {
  background: var(--moss);
  border: 1px solid var(--line-soft);
}

.panel-paper {
  background: var(--paper);
  color: #0B2420;
}
.panel-paper h1,
.panel-paper h2,
.panel-paper h3,
.panel-paper h4 { color: #08201B; }
.panel-paper .mono { color: #3C5B54; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
              border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
.btn--accent {
  background: var(--orange);
  color: #180800;
}
.btn--accent:hover { background: #FF8350; transform: translateY(-1px); }
.btn--line {
  border-color: rgba(34, 245, 200, 0.45);
  background: rgba(34, 245, 200, 0.06);
  color: var(--cyan);
}
.btn--line:hover { background: rgba(34, 245, 200, 0.15); border-color: var(--cyan); }
.btn--paper {
  background: var(--paper);
  color: #0B2420;
}
.btn--paper:hover { background: #FFFFFF; transform: translateY(-1px); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 14px;
  top: -72px;
  z-index: 120;
  padding: 10px 18px;
  background: var(--cyan);
  color: #04120F;
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* =========================================================
   页头：双层信息导航
   ========================================================= */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 9, 11, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.head-rail {
  background: linear-gradient(90deg, rgba(18, 52, 45, 0.62), rgba(5, 9, 11, 0.18) 70%);
  border-bottom: 1px solid var(--line-soft);
}

.head-rail__in {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 22px);
  min-height: 58px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  min-width: 0;
}
.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #04120F;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--idx);
  white-space: nowrap;
}

.head-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--idx);
  white-space: nowrap;
}
.head-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 245, 200, 0.16);
  animation: k1-pulse 2.6s infinite ease-in-out;
}
.head-status__label { color: var(--idx); }
.head-status__ver { color: var(--ice); font-size: 12px; }

@keyframes k1-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

.head-rail__cta { flex: 0 0 auto; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(34, 245, 200, 0.05);
  color: var(--ice);
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.2s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ice);
}
.nav-toggle[aria-expanded="true"] {
  border-color: rgba(34, 245, 200, 0.5);
  background: rgba(34, 245, 200, 0.12);
}
.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); }

.head-nav { background: rgba(11, 36, 32, 0.55); }
.head-nav__in {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.nav { width: 100%; }
.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(4px, 1.2vw, 10px);
}
.nav__list > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 15px 12px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ice);
  transition: color 0.16s var(--ease);
}
.nav__list > li > a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}
.nav__list > li > a:hover { color: var(--cyan); }
.nav__list > li > a:hover::after { transform: scaleX(1); }
.nav__list > li > a[aria-current="page"] {
  color: var(--cyan);
  font-weight: 700;
}
.nav__list > li > a[aria-current="page"]::after { transform: scaleX(1); }

.site-head.is-stuck .head-rail__in { min-height: 48px; padding-block: 5px; }
.site-head.is-stuck .brand__sub { display: none; }

/* 滚动进度条（JS 注入） */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  z-index: 90;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* =========================================================
   页脚
   ========================================================= */
.site-foot {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding: clamp(40px, 5vw, 66px) 0 24px;
  background: var(--forest);
  color: var(--ice);
}
.site-foot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -30px;
  height: 30px;
  background: var(--forest);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.site-foot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), rgba(34, 245, 200, 0) 55%);
  opacity: 0.6;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.3fr;
  gap: clamp(22px, 3vw, 44px);
  padding-bottom: clamp(28px, 4vw, 46px);
  border-bottom: 1px solid var(--line-soft);
}

.foot-col { position: relative; min-width: 0; }

.foot-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 10px;
}
.foot-lede {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(207, 230, 223, 0.74);
  max-width: 30em;
}
.foot-ver {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 9px;
  font-size: 11.5px;
  color: var(--cyan);
  border: 1px solid rgba(34, 245, 200, 0.32);
  border-radius: 2px;
}
.foot-cta { margin-top: 16px; }

.foot-col__title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.foot-list { display: flex; flex-direction: column; gap: 9px; }
.foot-list li { font-size: 14px; line-height: 1.6; }
.foot-list a {
  color: rgba(207, 230, 223, 0.8);
  transition: color 0.16s var(--ease), padding-left 0.16s var(--ease);
}
.foot-list a:hover {
  color: var(--cyan);
  padding-left: 5px;
}
.foot-list--plain li {
  color: rgba(207, 230, 223, 0.92);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}
.foot-addr {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--idx);
}
.foot-note {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--idx);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
}
.foot-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--idx);
}
.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.foot-legal a {
  font-size: 12.5px;
  color: var(--idx);
  transition: color 0.16s var(--ease);
}
.foot-legal a:hover { color: var(--cyan); }

/* =========================================================
   布局骨架
   ========================================================= */
.layout-rail {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 122px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rail__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.rail__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--idx);
}
.rail__count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
}
.rail__list { display: flex; flex-direction: column; }
.rail__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  color: rgba(207, 230, 223, 0.76);
  border-left: 2px solid transparent;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
              border-color 0.16s var(--ease);
}
.rail__list a:hover {
  background: rgba(34, 245, 200, 0.07);
  color: var(--cyan);
  border-left-color: var(--cyan);
}
.rail__list a[aria-current="page"] {
  background: rgba(34, 245, 200, 0.1);
  color: var(--cyan);
  border-left-color: var(--cyan);
}
.rail__num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--idx);
  min-width: 26px;
}
.rail__list a:hover .rail__num,
.rail__list a[aria-current="page"] .rail__num { color: var(--cyan); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }

/* ---------- 图片容器基础规则 ---------- */
.fig {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--forest), var(--ink));
  border: 1px solid var(--line-soft);
}
.fig > img,
.fig > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fig::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  opacity: 0.72;
  pointer-events: none;
}
.fig--16x9 { aspect-ratio: 16 / 9; }
.fig--4x3 { aspect-ratio: 4 / 3; }
.fig--21x9 { aspect-ratio: 21 / 9; }
.fig--1x1 { aspect-ratio: 1 / 1; }
.fig__badge {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 6px 12px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.fig__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px 16px 14px;
  background: linear-gradient(0deg, rgba(5, 9, 11, 0.94), rgba(5, 9, 11, 0));
  font-size: 13px;
  line-height: 1.6;
  color: var(--ice);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 20px 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--idx);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb li + li::before {
  content: "/";
  color: rgba(110, 132, 126, 0.7);
}
.breadcrumb a { color: var(--idx); transition: color 0.16s var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--ice); }

/* ---------- 进场显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1120px) {
  .row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .layout-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .rail {
    position: static;
    top: auto;
  }
  .rail__list {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .rail__list a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    padding: 8px 12px;
  }
  .rail__list a:hover,
  .rail__list a[aria-current="page"] {
    border-left: 0;
    border-bottom-color: var(--cyan);
  }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5 { grid-column: span 3; }
  .span-6, .span-7, .span-8, .span-9 { grid-column: span 6; }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }
}

@media (max-width: 900px) {
  .head-status { display: none; }
  .head-rail__cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .head-nav { background: rgba(11, 36, 32, 0.9); }
  .head-nav__in { display: block; min-height: 0; }

  .nav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.3s var(--ease), opacity 0.2s var(--ease),
                visibility 0.3s linear;
  }
  .nav[data-open] {
    max-height: 76vh;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
  }

  .nav__list {
    display: block;
    padding: 6px 0 16px;
  }
  .nav__list > li > a {
    display: block;
    padding: 13px 6px;
    font-size: 15.5px;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__list > li > a::after { display: none; }
  .nav__list > li > a:hover { color: var(--cyan); }
  .nav__list > li > a[aria-current="page"] {
    color: var(--cyan);
    background: rgba(34, 245, 200, 0.07);
    border-left: 3px solid var(--cyan);
    padding-left: 13px;
  }

  .site-foot::before { top: -20px; height: 20px; }
  .site-foot { padding-top: clamp(34px, 7vw, 48px); }

  .foot-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-12 {
    grid-column: span 2;
  }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .brand__sub { display: none; }
  .fig__cap { font-size: 12.5px; padding: 14px 13px 12px; }
}

/* =========================================================
   动效降级
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .nav__list > li > a::after { transition: none; }
}
