/* ============================================
   非凡体育 — 全站共享样式
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  display: block;
  flex: 1;
  width: 100%;
}

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

a {
  color: var(--color-dim);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--color-neon);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

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

/* ---------- CSS 变量 ---------- */
:root {
  --color-bg: #0A1128;
  --color-bg-alt: #101E3C;
  --color-bg-deep: #1A2332;
  --color-bg-black: #060B1C;
  --color-neon: #00FF87;
  --color-orange: #FF6B35;
  --color-text: #FFFFFF;
  --color-dim: #B0B7C3;
  --color-faint: #3A4A6B;
  --color-line: rgba(255, 255, 255, 0.06);

  --font-head: 'PingFang SC', 'Roboto Condensed', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Noto Sans CJK SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', 'SF Mono', Menlo, monospace;

  --shell-width: 1280px;
  --header-h: 64px;
  --header-h-m: 56px;
  --gap: clamp(20px, 4vw, 48px);

  --z-header: 100;
  --z-nav: 200;
  --z-skip: 1000;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.5);
  --glow-neon: 0 0 12px rgba(0, 255, 135, 0.35);
  --glow-orange: 0 0 12px rgba(255, 107, 53, 0.35);

  --t-fast: 0.15s ease;
  --t-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -52px;
  left: 16px;
  z-index: var(--z-skip);
  padding: 10px 18px;
  background: var(--color-neon);
  color: var(--color-bg);
  font-weight: 700;
  font-size: 14px;
  border-radius: 3px;
  transition: top var(--t-fast);
  box-shadow: var(--glow-neon);
}

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

/* ---------- 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(10, 17, 40, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  transition: box-shadow var(--t-base);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-neon) 0%, rgba(0, 255, 135, 0.2) 40%, transparent 70%);
  pointer-events: none;
}

.header-shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: var(--header-h);
}

.header-grid {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-right: 12px;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

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

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--color-text);
  line-height: 1.1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.32em;
  color: var(--color-dim);
  margin-top: 4px;
  text-transform: uppercase;
}

/* 主导航 */
.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 3px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-dim);
  white-space: nowrap;
  position: relative;
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-faint);
  line-height: 1;
  transition: color var(--t-fast);
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover .nav-num {
  color: var(--color-neon);
}

.nav-link[aria-current="page"] {
  color: var(--color-neon);
  background: rgba(0, 255, 135, 0.07);
}

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

/* 数据同步状态 */
.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  padding: 5px 13px;
  border: 1px solid rgba(0, 255, 135, 0.22);
  border-radius: 999px;
  background: rgba(0, 255, 135, 0.05);
  flex-shrink: 0;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-neon);
  animation: sync-pulse 2s ease-in-out infinite;
}

.sync-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-neon);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

@keyframes sync-pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 255, 135, 0.6);
  }
  50% {
    opacity: 0.45;
    box-shadow: 0 0 0 5px rgba(0, 255, 135, 0);
  }
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: 8px;
  padding: 10px;
  border-radius: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid transparent;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 255, 135, 0.3);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--t-base), opacity var(--t-base), background var(--t-fast);
}

/* 顶部阅读进度 */
.site-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  pointer-events: none;
}

.progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-neon), var(--color-orange));
  box-shadow: var(--glow-neon);
  transition: width 0.08s linear;
}

/* ---------- 响应式头部（平板） ---------- */
@media (max-width: 1024px) {
  .nav-link {
    padding: 8px 9px;
    font-size: 13px;
  }

  .nav-link .nav-num {
    display: none;
  }

  .sync-status {
    margin-left: 12px;
    padding: 4px 10px;
  }

  .sync-text {
    font-size: 10px;
  }
}

/* ---------- 响应式头部（移动端） ---------- */
@media (max-width: 768px) {
  .header-shell {
    height: var(--header-h-m);
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

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

  .brand-sub {
    font-size: 7px;
  }

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

  .sync-status {
    margin-left: auto;
    padding: 4px 9px;
  }

  .sync-text {
    display: none;
  }

  .site-header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  /* 下拉导航面板 */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: rgba(10, 17, 40, 0.98);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(0, 255, 135, 0.1);
    border-bottom: 1px solid var(--color-faint);
    padding: 12px 16px 16px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-base), opacity var(--t-base), visibility var(--t-base);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }

  .main-nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

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

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    justify-content: flex-start;
    border-radius: 4px;
  }

  .nav-link .nav-num {
    display: inline;
    font-size: 11px;
    min-width: 22px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* ---------- 页脚终端 ---------- */
.site-footer {
  background: var(--color-bg-black);
  border-top: 1px solid rgba(0, 255, 135, 0.12);
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-neon), rgba(0, 255, 135, 0));
}

.footer-shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 64px var(--gap) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-line);
}

/* 页脚品牌 */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-mark {
  display: block;
  width: 38px;
  height: 38px;
}

.footer-mark svg {
  width: 100%;
  height: 100%;
}

.footer-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 22px;
  color: var(--color-text);
  letter-spacing: 0.04em;
  line-height: 1;
}

.footer-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--color-dim);
  text-transform: uppercase;
}

.footer-desc {
  font-size: 14px;
  color: var(--color-dim);
  max-width: 380px;
  line-height: 1.9;
  margin-top: 4px;
}

/* 页脚列 */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.18em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-line);
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--color-neon);
}

.footer-line {
  font-size: 13px;
  color: var(--color-dim);
  line-height: 1.9;
}

.footer-legal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-legal-link {
  font-size: 14px;
  color: var(--color-dim);
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast), padding-left var(--t-fast);
}

.footer-legal-link:hover {
  color: var(--color-neon);
  border-bottom-color: rgba(0, 255, 135, 0.3);
  padding-left: 6px;
}

/* 页脚底栏 */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-faint);
}

.footer-copy,
.footer-icp {
  margin: 0;
}

/* ---------- 页脚响应式 ---------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

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

@media (max-width: 600px) {
  .footer-shell {
    padding-top: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 36px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 20px;
  }
}

/* ---------- 通用内容容器 ---------- */
.shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ---------- 左右分屏栅格 ---------- */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--gap);
  align-items: start;
}

@media (max-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- 框景首屏 ---------- */
.hero-frame {
  position: relative;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: clamp(24px, 4vw, 56px);
  margin-bottom: 56px;
  overflow: hidden;
}

.hero-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-neon) 0%, rgba(0, 255, 135, 0.1) 60%, transparent);
}

.hero-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 72px;
  height: 1px;
  background: var(--color-orange);
  box-shadow: var(--glow-orange);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base), border-color var(--t-base), transform var(--t-fast);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-bg);
  border-color: var(--color-orange);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-orange);
  box-shadow: var(--glow-orange);
}

.btn-neon {
  background: rgba(0, 255, 135, 0.08);
  color: var(--color-neon);
  border-color: rgba(0, 255, 135, 0.35);
}

.btn-neon:hover {
  background: var(--color-neon);
  color: var(--color-bg);
  box-shadow: var(--glow-neon);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  border-color: var(--color-neon);
  color: var(--color-neon);
}

/* ---------- 章节 ---------- */
.section {
  padding: clamp(48px, 8vw, 96px) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-num {
  font-family: var(--font-mono);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  color: rgba(0, 255, 135, 0.2);
  line-height: 0.85;
  -webkit-font-smoothing: antialiased;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  color: var(--color-text);
}

.section-sub {
  font-size: 15px;
  color: var(--color-dim);
  max-width: 640px;
}

/* ---------- 滚动章节 ---------- */
.chapter {
  padding: 56px 0;
  border-bottom: 1px solid var(--color-line);
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: border-color var(--t-base), background var(--t-base);
}

.chapter[data-active] {
  border-left: 2px solid var(--color-neon);
  padding-left: 20px;
  background: linear-gradient(90deg, rgba(0, 255, 135, 0.02), transparent 50%);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  color: rgba(0, 255, 135, 0.12);
  line-height: 0.9;
  display: block;
  margin-bottom: 8px;
}

/* 章节索引项 */
[data-chapter-toc] {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  color: var(--color-dim);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

[data-chapter-toc]:hover {
  color: var(--color-text);
}

[data-chapter-toc][data-active] {
  border-left-color: var(--color-neon);
  color: var(--color-neon);
  background: rgba(0, 255, 135, 0.04);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--color-bg-alt);
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0, 255, 135, 0.18);
}

/* ---------- 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 1px solid rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 9;
}

.img-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-neon), transparent);
  z-index: 1;
  pointer-events: none;
}

.img-frame::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 1;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-frame:hover img {
  transform: scale(1.03);
}

.img-frame[data-aspect="4/3"] {
  aspect-ratio: 4 / 3;
}

.img-frame[data-aspect="21/9"] {
  aspect-ratio: 21 / 9;
}

.img-frame[data-aspect="1/1"] {
  aspect-ratio: 1 / 1;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-faint);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

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

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-right: 8px;
  color: var(--color-faint);
}

.breadcrumb-link {
  color: var(--color-dim);
}

.breadcrumb-link:hover {
  color: var(--color-neon);
}

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

/* ---------- 小组件 ---------- */
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--color-neon);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-dim);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--color-neon);
  background: rgba(0, 255, 135, 0.08);
  border: 1px solid rgba(0, 255, 135, 0.2);
}

.divider {
  height: 1px;
  background: var(--color-line);
  border: none;
  margin: 32px 0;
}

/* ---------- 基础栅格 ---------- */
.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));
}

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal][data-revealed] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 减少动态 ---------- */
@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;
  }

  .site-progress {
    display: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sync-dot {
    animation: none;
  }
}
