/* ============================================================
   火博体育 共享 Site Kit
   暗夜蓝紫 x 荧光绿 x 橙红
   赛博朋克运动刊物：锐角、细线、精密网格、大留白
   ============================================================ */

:root {
  --bg-primary: #0A0E1A;
  --bg-secondary: #121728;
  --surface: #1A2238;
  --accent-primary: #00FF9D;
  --accent-secondary: #FF5C39;
  --text-primary: #F5F7FF;
  --text-secondary: #A7B0D6;
  --border: #2A355A;
  --focus: #FFD166;

  --font-headline: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-number: "SF Mono", "Cascadia Code", "Consolas", "Menlo", monospace;

  --header-height: 72px;
  --container-max: 1320px;
}

/* ---------- Reset ---------- */

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main {
  display: block;
}

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

ul,
ol {
  list-style: none;
}

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

a:hover {
  color: var(--accent-primary);
}

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

button {
  cursor: pointer;
}

::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

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

/* ---------- 标题与字级 ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(26px, 3.6vw, 36px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
  line-height: 1.75;
}

/* ---------- 工具类 ---------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(42, 53, 90, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 53, 90, 0.18) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ---------- 章节排版 ---------- */

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section--tight {
  padding-block: clamp(40px, 6vw, 64px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 40px;
}

.section-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
}

.section-desc {
  max-width: 48ch;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- 正文容器 ---------- */

.prose {
  max-width: 65ch;
}

.prose p {
  margin-bottom: 1.5em;
}

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

.prose a {
  color: var(--accent-primary);
  border-bottom: 1px solid rgba(0, 255, 157, 0.35);
  transition: border-color 120ms ease;
}

.prose a:hover {
  border-bottom-color: var(--accent-primary);
}

.prose ul {
  list-style: none;
  margin-bottom: 1.5em;
}

.prose li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.5em;
}

.prose li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-secondary);
}

.prose blockquote {
  border-left: 3px solid var(--accent-primary);
  background: var(--bg-secondary);
  padding: 12px 20px;
  margin-bottom: 1.5em;
  color: var(--text-secondary);
}

/* ---------- 数据高亮 ---------- */

.stat {
  font-family: var(--font-number);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-primary);
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

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

.btn--primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: 800;
}

.btn--primary:hover {
  background: transparent;
  color: var(--accent-primary);
  box-shadow: 0 0 24px rgba(0, 255, 157, 0.2);
}

.btn--ghost {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn--ghost:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 0 12px;
  font-size: 14px;
}

.breadcrumb__item {
  color: var(--text-secondary);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "›";
  margin-right: 8px;
  color: var(--border);
}

.breadcrumb__item[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

.breadcrumb__link {
  color: var(--text-secondary);
  transition: color 120ms ease;
}

.breadcrumb__link:hover {
  color: var(--accent-primary);
}

/* ---------- 网格与卡片 ---------- */

.grid {
  display: grid;
  gap: 24px;
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 16px 40px rgba(0, 255, 157, 0.06);
}

.card__title {
  font-size: 20px;
}

.card__text {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- 图片占位容器 ---------- */

.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.media-frame::before {
  content: "";
  display: block;
}

.media-frame--video::before { padding-top: 56.25%; }
.media-frame--portrait::before { padding-top: 125%; }
.media-frame--square::before { padding-top: 100%; }

.media-frame > img,
.media-frame > svg,
.media-frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--gradient {
  background:
    linear-gradient(135deg, rgba(0, 255, 157, 0.14), transparent 42%),
    linear-gradient(315deg, rgba(255, 92, 57, 0.14), transparent 42%),
    var(--surface);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 160ms ease;
}

.media-frame:hover::after {
  border-color: rgba(0, 255, 157, 0.6);
}

/* ---------- 锚点偏移 ---------- */

#main-content,
[data-section] {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

/* ---------- 跳过链接 ---------- */

.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 500;
  background: var(--focus);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: top 120ms ease;
}

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

/* ---------- 头部 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  height: 100%;
  background: rgba(10, 14, 26, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  border-bottom: 1px solid var(--border);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(280px, 26vw);
  height: 2px;
  background: var(--accent-primary);
  box-shadow: 0 0 16px rgba(0, 255, 157, 0.35);
  pointer-events: none;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1440px;
  min-height: var(--header-height);
  margin-inline: auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* ---------- 品牌 ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  color: var(--text-primary);
  text-decoration: none;
}

.brand:hover {
  color: var(--text-primary);
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.brand__text {
  font-family: var(--font-headline);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
}

/* ---------- 主导航 ---------- */

.site-nav {
  position: relative;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__item {
  display: block;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  transition: color 120ms ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav__link:hover {
  color: var(--accent-primary);
}

.site-nav__link:hover::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--accent-primary);
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav__index {
  font-family: var(--font-number);
  font-size: 11px;
  line-height: 1;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.site-nav__label {
  display: inline-block;
}

/* ---------- 阅读进度 ---------- */

.reading-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 210;
  pointer-events: none;
}

.reading-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.6);
  transition: width 80ms linear;
}

/* ---------- 移动端菜单 ---------- */

.nav-toggle {
  display: none;
  position: relative;
  z-index: 160;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[data-open] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[data-open] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[data-open] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(5, 8, 16, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.nav-backdrop[data-open] {
  opacity: 1;
  pointer-events: auto;
}

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

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(64px, 8vw, 120px);
  background-color: var(--bg-secondary);
  background-image:
    linear-gradient(rgba(42, 53, 90, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 53, 90, 0.14) 1px, transparent 1px);
  background-size: 36px 36px;
  border-top: 1px solid var(--border);
}

.site-footer::before {
  content: "火";
  position: absolute;
  right: -40px;
  bottom: -70px;
  z-index: 0;
  font-family: var(--font-headline);
  font-size: 360px;
  font-weight: 900;
  line-height: 1;
  color: rgba(42, 53, 90, 0.24);
  pointer-events: none;
  user-select: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: min(280px, 26vw);
  height: 2px;
  background: var(--accent-primary);
  box-shadow: 0 0 16px rgba(0, 255, 157, 0.35);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 56px;
  padding-block: 64px clamp(40px, 6vw, 72px);
}

.footer-brand {
  max-width: 360px;
}

.footer-trust {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

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

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

.footer-col__title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.12em;
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.footer-col__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--accent-primary);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__list--links li a {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 120ms ease, padding-left 120ms ease;
}

.footer-col__list--links li a::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 10px;
  flex-shrink: 0;
  background: var(--accent-secondary);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: transform 120ms ease;
}

.footer-col__list--links li a:hover {
  color: var(--accent-primary);
  padding-left: 4px;
}

.footer-col__list--links li a:hover::before {
  transform: translateX(3px);
}

.footer-col__list--contact {
  gap: 12px;
}

.footer-col__list--contact li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-label {
  color: var(--accent-primary);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.footer-value {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.footer-bottom__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-copyright {
  margin: 0;
}

.footer-icp {
  margin: 0;
}

/* ---------- 返回顶部 ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: border-color 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

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

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

@media (max-width: 960px) {
  :root {
    --header-height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 88vw);
    z-index: 150;
    background: rgba(18, 23, 40, 0.98);
    border-left: 1px solid var(--border);
    padding: 88px 32px 40px;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), visibility 240ms;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__link {
    padding: 16px 8px;
    font-size: 18px;
    border-bottom: 1px solid var(--border);
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: var(--accent-primary);
  }

  .site-nav__index {
    font-size: 12px;
  }

  .nav-backdrop {
    display: block;
  }
}

@media (max-width: 640px) {
  .brand__mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand__text {
    font-size: 18px;
    letter-spacing: 0.1em;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .to-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ---------- 减少动效 ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
