/* ==========================================================================
   浩瀚体育赛讯 Site Kit — 全站共享样式
   暗色科技竞技场：深海蓝底 + 荧光绿数据 + 炽热橙红 CTA
   ========================================================================== */

/* ---------- 变量 ---------- */
:root {
  --c-deep: #0A1E3F;
  --c-teal: #0D3B5C;
  --c-green: #00FF92;
  --c-red: #FF3D2E;
  --c-cyan: #00E5FF;
  --c-white: #FFFFFF;
  --c-mist: #E6E9ED;
  --c-gray: #7B8DA0;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
  --header-h: 72px;
  --container: 1280px;
  --gap: clamp(20px, 3.2vw, 40px);
  --motion: 0.25s ease;
  --glow: 0 0 24px rgba(0, 255, 146, 0.13);
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-white);
  background-color: var(--c-deep);
  background-image:
    radial-gradient(ellipse 70% 50% at 75% -10%, rgba(0, 255, 146, 0.06), transparent),
    linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

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

::selection {
  background: rgba(0, 255, 146, 0.28);
  color: var(--c-white);
}

[hidden] {
  display: none !important;
}

/* ---------- 无障碍跳转 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 4px;
  background: var(--c-green);
  color: var(--c-deep);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-240%);
  transition: transform var(--motion);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------- 顶部进度线 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--c-green), var(--c-cyan));
  box-shadow: 0 0 10px rgba(0, 255, 146, 0.5);
  pointer-events: none;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  height: var(--header-h);
  background: rgba(10, 30, 63, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 255, 146, 0.14);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 146, 0.7), transparent);
  opacity: 0.55;
  pointer-events: none;
}

.header-shell {
  position: relative;
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--c-green);
  color: var(--c-deep);
  font-size: 20px;
  font-weight: 800;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--c-green);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  border: 1px solid rgba(0, 255, 146, 0.32);
  border-radius: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-green);
  transition: transform var(--motion), opacity var(--motion);
}

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

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

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

.site-nav {
  display: block;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 2px;
  font-size: 15px;
  color: var(--c-mist);
  transition: color var(--motion);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  background: var(--c-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion);
}

.nav-link:hover {
  color: var(--c-white);
}

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

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

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

.nav-link--cta {
  margin-left: 10px;
  background: var(--c-red);
  color: var(--c-white);
  font-weight: 700;
}

.nav-link--cta::after {
  display: none;
}

.nav-link--cta:hover {
  background: #ff5545;
  color: var(--c-white);
  box-shadow: 0 0 16px rgba(255, 61, 46, 0.35);
}

/* ---------- 移动端头部 ---------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    padding: 14px 0 18px;
    background: rgba(10, 30, 63, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 255, 146, 0.2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  }

  .site-nav[data-open] {
    display: block;
  }

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

  .nav-link {
    display: flex;
    padding: 13px 22px;
    font-size: 16px;
    border-left: 2px solid transparent;
  }

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

  .nav-link[aria-current="page"] {
    border-left-color: var(--c-green);
    background: rgba(0, 255, 146, 0.06);
  }

  .nav-link--cta {
    margin: 10px 14px 0;
    justify-content: center;
    padding: 12px 20px;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  flex-shrink: 0;
  background:
    linear-gradient(180deg, rgba(0, 229, 255, 0.04), transparent 40%),
    var(--c-teal);
  border-top: 1px solid rgba(0, 255, 146, 0.12);
  color: var(--c-mist);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px 36px;
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--c-green);
  color: var(--c-deep);
  font-weight: 800;
  font-size: 17px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

.footer-brand-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--c-white);
}

.footer-desc {
  max-width: 360px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--c-gray);
}

.footer-statement {
  max-width: 380px;
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 2px solid var(--c-green);
  background: rgba(0, 255, 146, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--c-cyan);
}

.footer-links,
.footer-contact {
  min-width: 0;
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-gray);
  text-transform: uppercase;
}

.footer-title::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--c-green);
  flex-shrink: 0;
}

.footer-menu,
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-menu a {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  color: var(--c-mist);
  transition: color var(--motion);
}

.footer-menu a::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-family: var(--font-mono);
}

.footer-menu a:hover {
  color: var(--c-green);
}

.footer-contact-item {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-mist);
}

.footer-contact-item::before {
  content: '▹';
  flex-shrink: 0;
  color: var(--c-green);
  font-size: 12px;
  line-height: 1.9;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(230, 233, 237, 0.09);
  font-size: 12px;
  color: var(--c-gray);
}

.footer-copyright {
  margin-right: auto;
}

.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.footer-note {
  width: 100%;
  opacity: 0.8;
}

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

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

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

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

  .footer-copyright {
    margin-right: 0;
  }
}

/* ---------- 布局与页面骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}

.page-body {
  flex: 1 0 auto;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 96px;
}

#main-content {
  outline: none;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section--tight {
  padding-top: 32px;
  padding-bottom: 32px;
}

.section--alt {
  background: var(--c-teal);
  border-top: 1px solid rgba(0, 255, 146, 0.08);
  border-bottom: 1px solid rgba(0, 255, 146, 0.08);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  transition: background var(--motion), color var(--motion), box-shadow var(--motion), transform var(--motion);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--c-green);
  color: var(--c-deep);
}

.btn-primary:hover {
  background: var(--c-cyan);
  color: var(--c-deep);
  box-shadow: var(--glow);
}

.btn-cta {
  background: var(--c-red);
  color: var(--c-white);
  font-weight: 700;
}

.btn-cta:hover {
  background: #ff5545;
  box-shadow: 0 0 20px rgba(255, 61, 46, 0.35);
}

.btn-ghost {
  border: 1px solid rgba(0, 255, 146, 0.42);
  color: var(--c-green);
}

.btn-ghost:hover {
  background: rgba(0, 255, 146, 0.08);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-gray);
}

.breadcrumbs li + li::before {
  content: '/';
  margin: 0 8px 0 4px;
  color: rgba(123, 141, 160, 0.65);
}

.breadcrumbs a {
  color: var(--c-gray);
  transition: color var(--motion);
}

.breadcrumbs a:hover {
  color: var(--c-green);
}

.breadcrumbs li[aria-current="page"] {
  color: var(--c-green);
}

/* ---------- 章节标题 ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 28px;
}

.section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-white);
  letter-spacing: 0.01em;
}

.section-title--lg {
  font-size: clamp(28px, 4.2vw, 44px);
}

.section-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-gray);
}

.index-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--c-cyan);
  text-transform: uppercase;
}

.index-label::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--c-green);
}

.data-mono {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--c-green);
}

/* ---------- 首屏章节预览 ---------- */
.hero-chapter {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}

.hero-chapter::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0, 255, 146, 0.1), transparent 68%);
  pointer-events: none;
}

.hero-chapter::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 146, 0.3), transparent);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--c-white);
}

.hero-title .accent-green {
  color: var(--c-green);
}

.hero-title .accent-cyan {
  color: var(--c-cyan);
}

.hero-lead {
  max-width: 46em;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-gray);
}

/* ---------- 章节目录卡片 ---------- */
.chapter-toc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.chapter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 24px 24px 20px;
  background: var(--c-teal);
  border: 1px solid rgba(0, 229, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: border-color var(--motion), transform var(--motion), background var(--motion);
}

.chapter-card:hover {
  border-color: rgba(0, 255, 146, 0.65);
  background: rgba(13, 59, 92, 0.85);
  transform: translateY(-4px);
}

.chapter-card-index {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--c-green);
}

.chapter-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-white);
}

.chapter-card-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-gray);
}

.chapter-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-cyan);
}

.chapter-card-link::after {
  content: '→';
  font-family: var(--font-mono);
  transition: transform var(--motion);
}

.chapter-card:hover .chapter-card-link::after {
  transform: translateX(5px);
}

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  padding: 28px;
  background: var(--c-teal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.panel--cut {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.panel--ghost {
  background: transparent;
  border-color: rgba(123, 141, 160, 0.25);
}

.panel--glow {
  border-color: rgba(0, 255, 146, 0.3);
  box-shadow: var(--glow);
}

/* ---------- 数据卡片 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  padding: 20px 20px 18px;
  background: var(--c-teal);
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-left: 3px solid var(--c-green);
  border-radius: 2px;
}

.stat-card--alert {
  border-left-color: var(--c-red);
}

.stat-card-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-gray);
}

.stat-card-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-cyan);
}

.stat-card-value--green {
  color: var(--c-green);
}

.stat-card-value--red {
  color: var(--c-red);
}

/* ---------- 标签与筛选 ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.tag-button {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  border: 1px solid rgba(123, 141, 160, 0.4);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-gray);
  transition: border-color var(--motion), color var(--motion), background var(--motion);
}

.tag-button:hover {
  border-color: var(--c-green);
  color: var(--c-green);
}

.tag-button.is-active {
  background: var(--c-green);
  border-color: var(--c-green);
  color: var(--c-deep);
  font-weight: 700;
}

/* ---------- 通用卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.content-card {
  padding: 26px 24px;
  background: var(--c-teal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  transition: border-color var(--motion), transform var(--motion);
}

.content-card:hover {
  border-color: rgba(0, 255, 146, 0.4);
  transform: translateY(-3px);
}

.content-card-title {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-white);
}

.content-card-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-gray);
}

/* ---------- 图片占位 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--c-teal);
  aspect-ratio: 16 / 9;
  border-radius: 2px;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame--wide {
  aspect-ratio: 21 / 9;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(0.92);
}

.img-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 255, 146, 0.12);
  border-radius: 2px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 229, 255, 0.05) 50%, transparent 55%);
  pointer-events: none;
}

/* ---------- 斜切装饰 ---------- */
.diag-stripe {
  display: block;
  height: 4px;
  border: 0;
  background: repeating-linear-gradient(
    135deg,
    var(--c-green) 0 10px,
    transparent 10px 22px
  );
  opacity: 0.32;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--c-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--c-teal);
  border-radius: 5px;
  border: 2px solid var(--c-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-gray);
}

/* ---------- 响应式规格 ---------- */
@media (max-width: 1024px) {
  .chapter-toc {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-chapter {
    padding: 40px 0 32px;
  }

  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .page-body {
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .chapter-toc {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 动效与无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-progress {
    transition: none;
  }
}
