/* =========================================================
   冠竞体育 · 全站共享 CSS
   文件位置：/assets/site.css
   ========================================================= */

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

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

body {
  min-height: 100vh;
  font-family: var(--gk-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gk-text);
  background: var(--gk-bg-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul, ol {
  list-style: none;
}

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

a:hover {
  color: var(--gk-orange);
}

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

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

::selection {
  background: var(--gk-orange);
  color: var(--gk-ink);
}

/* ---------- 设计变量 ---------- */
:root {
  --gk-deep-blue: #0B1B33;
  --gk-royal-blue: #1E3A8A;
  --gk-orange: #FF6B2C;
  --gk-amber: #FFA51E;
  --gk-cyan: #00D4FF;
  --gk-moon: #F5F7FA;
  --gk-slate: #94A3B8;
  --gk-ink: #0A0F1A;
  --gk-flame: #D94F1A;
  --gk-violet: #7B2FF7;

  --gk-bg-main: var(--gk-deep-blue);
  --gk-bg-panel: #102340;
  --gk-border: rgba(148, 163, 184, 0.28);
  --gk-text: var(--gk-moon);
  --gk-text-muted: var(--gk-slate);

  --gk-font-heading: Impact, "Anton", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --gk-font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, sans-serif;

  --gk-w-container: 1280px;
  --gk-gutter: clamp(16px, 4vw, 56px);
  --gk-gutter-sm: clamp(12px, 2.4vw, 28px);

  --gk-space-xs: 8px;
  --gk-space-sm: 16px;
  --gk-space-md: 32px;
  --gk-space-lg: 64px;
  --gk-space-xl: 96px;

  --gk-z-header: 100;
  --gk-z-totop: 60;
  --gk-z-skip: 1000;
}

/* ---------- 全局网格纹理 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ---------- 布局容器 ---------- */
.gk-shell {
  width: 100%;
  max-width: var(--gk-w-container);
  margin-inline: auto;
  padding-inline: var(--gk-gutter);
}

.gk-split {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (max-width: 992px) {
  .gk-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

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

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

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

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

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

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

.gk-section {
  padding-block: var(--gk-space-xl);
}

.gk-section--tight {
  padding-block: var(--gk-space-lg);
}

/* ---------- 排版系统 ---------- */
.gk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gk-orange);
}

.gk-kicker::before {
  content: "";
  flex: none;
  width: 30px;
  height: 2px;
  background: currentColor;
}

.gk-display {
  font-family: var(--gk-font-heading);
  font-size: clamp(44px, 8.6vw, 96px);
  line-height: 1.04;
  text-transform: uppercase;
}

.gk-title--xl {
  font-family: var(--gk-font-heading);
  font-size: clamp(36px, 5.6vw, 64px);
}

.gk-title--lg {
  font-family: var(--gk-font-heading);
  font-size: clamp(30px, 4.2vw, 48px);
}

.gk-title--md {
  font-family: var(--gk-font-heading);
  font-size: clamp(24px, 3vw, 32px);
}

.gk-title--sm {
  font-family: var(--gk-font-heading);
  font-size: 20px;
}

.gk-body {
  font-size: 16px;
  line-height: 1.75;
}

.gk-caption {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gk-text-muted);
}

.gk-text--orange {
  color: var(--gk-orange);
}

.gk-text--cyan {
  color: var(--gk-cyan);
}

.gk-text--muted {
  color: var(--gk-text-muted);
}

.gk-prose {
  font-size: 16px;
  line-height: 1.9;
  color: var(--gk-text-muted);
}

.gk-prose p {
  margin-bottom: 1.2em;
}

.gk-prose h2 {
  font-family: var(--gk-font-heading);
  font-size: 28px;
  color: var(--gk-text);
  margin: 1.6em 0 0.6em;
}

.gk-prose h3 {
  font-family: var(--gk-font-heading);
  font-size: 20px;
  color: var(--gk-text);
  margin: 1.4em 0 0.5em;
}

.gk-prose a {
  color: var(--gk-cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.gk-prose ul,
.gk-prose ol {
  margin: 1em 0 1.3em;
  padding-left: 1.25em;
}

.gk-prose ul {
  list-style: square;
  color: var(--gk-orange);
}

.gk-prose li {
  margin-bottom: 0.5em;
  color: var(--gk-text-muted);
}

/* ---------- 按钮系统 ---------- */
.gk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  position: relative;
  isolation: isolate;
  font-family: var(--gk-font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gk-text);
  background: transparent;
  border: 1px solid var(--gk-border);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.gk-btn__label {
  display: inline-block;
  line-height: 1.2;
}

.gk-btn--primary {
  border: none;
  color: var(--gk-ink);
  padding-inline: 30px;
}

.gk-btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gk-orange);
  transform: skewX(-8deg);
  transition: background 0.2s ease;
}

.gk-btn--primary:hover {
  color: var(--gk-ink);
}

.gk-btn--primary:hover::before {
  background: var(--gk-flame);
}

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

/* ---------- 标签系统 ---------- */
.gk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gk-text);
  background: rgba(11, 27, 51, 0.5);
  border: 1px solid var(--gk-border);
}

.gk-tag--hot {
  color: var(--gk-orange);
  border-color: rgba(255, 107, 44, 0.55);
  background: rgba(255, 107, 44, 0.1);
}

.gk-tag--data {
  color: var(--gk-cyan);
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.07);
}

.gk-tag--theme {
  color: #C4B5FD;
  border-color: rgba(123, 47, 247, 0.55);
  background: rgba(123, 47, 247, 0.12);
}

/* ---------- 卡片系统 ---------- */
.gk-card {
  position: relative;
  padding: 28px 26px;
  background: linear-gradient(160deg, #142A4D 0%, #0E2038 100%);
  border: 1px solid var(--gk-border);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.gk-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 3px;
  background: var(--gk-orange);
}

.gk-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 212, 255, 0.4) 50%);
}

.gk-card:hover {
  border-color: rgba(255, 107, 44, 0.65);
  transform: translateY(-3px);
}

/* ---------- 面包屑 ---------- */
.gk-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px 4px;
  font-size: 14px;
  color: var(--gk-text-muted);
}

.gk-breadcrumb a {
  color: var(--gk-text-muted);
}

.gk-breadcrumb a:hover {
  color: var(--gk-orange);
}

.gk-breadcrumb__sep {
  color: var(--gk-orange);
}

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

/* ---------- 图片容器 ---------- */
.gk-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gk-royal-blue), var(--gk-deep-blue));
  border: 1px solid var(--gk-border);
}

.gk-image--hero {
  aspect-ratio: 16 / 10;
}

.gk-image--card {
  aspect-ratio: 16 / 9;
}

.gk-image--portrait {
  aspect-ratio: 3 / 4;
}

.gk-image::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -18%;
  width: 55%;
  height: 55%;
  background: linear-gradient(135deg, transparent 44%, rgba(255, 107, 44, 0.6) 46% 58%, transparent 60%);
  pointer-events: none;
}

.gk-image--no-accent::after {
  display: none;
}

/* ---------- 目录与章节联动 ---------- */
.gk-toc {
  position: sticky;
  top: 110px;
  border-left: 2px solid var(--gk-border);
  padding: 4px 0 4px 8px;
}

.gk-chapter-link {
  display: block;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gk-text-muted);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.gk-chapter-link:hover {
  color: var(--gk-cyan);
}

.gk-chapter-link.is-active,
.gk-chapter-link[aria-current="true"] {
  color: var(--gk-orange);
  border-left-color: var(--gk-orange);
}

/* ---------- 跳转链接 ---------- */
.gk-skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: var(--gk-z-skip);
  padding: 12px 22px;
  background: var(--gk-orange);
  color: var(--gk-ink);
  font-weight: 700;
  transition: top 0.2s ease;
}

.gk-skip:focus {
  top: 14px;
}

/* ---------- 页头 ---------- */
.gk-header {
  position: sticky;
  top: 0;
  z-index: var(--gk-z-header);
  background: rgba(11, 27, 51, 0.96);
  border-bottom: 1px solid var(--gk-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.gk-header__edge {
  height: 4px;
  background: linear-gradient(90deg, var(--gk-orange) 0 30%, var(--gk-amber) 30% 58%, var(--gk-cyan) 58% 100%);
}

.gk-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
}

.gk-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.gk-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--gk-royal-blue);
  border: 1px solid var(--gk-border);
}

.gk-brand__svg {
  width: 34px;
  height: 34px;
}

.gk-brand__text {
  display: flex;
  flex-direction: column;
  font-family: var(--gk-font-heading);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--gk-text);
  letter-spacing: 0.02em;
}

.gk-brand__sub {
  font-family: var(--gk-font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gk-text-muted);
  margin-top: 3px;
}

@media (max-width: 1280px) {
  .gk-brand__sub {
    display: none;
  }
}

.gk-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.gk-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gk-text);
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.gk-nav__link:hover {
  color: var(--gk-orange);
  border-color: rgba(255, 107, 44, 0.5);
}

.gk-nav__link[aria-current="page"] {
  color: var(--gk-orange);
  background: rgba(255, 107, 44, 0.12);
  border-color: rgba(255, 107, 44, 0.45);
}

.gk-header__cta {
  margin-left: 12px;
}

.gk-nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--gk-border);
  color: var(--gk-text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

.gk-nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.gk-nav-toggle__bar {
  height: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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

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

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

.gk-nav-toggle__text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.gk-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gk-orange), var(--gk-amber) 55%, var(--gk-cyan));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

@keyframes gk-nav-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .gk-nav-toggle {
    display: inline-flex;
  }

  .gk-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 14px var(--gk-gutter-sm) 26px;
    background: rgba(10, 15, 26, 0.98);
    border-bottom: 1px solid var(--gk-border);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
  }

  .gk-nav[data-open] {
    display: flex;
    animation: gk-nav-in 0.22s ease-out;
  }

  .gk-nav__link {
    display: block;
    padding: 14px 12px;
    font-size: 16px;
    border: none;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  }

  .gk-nav__link:hover {
    border-left-color: var(--gk-cyan);
  }

  .gk-nav__link[aria-current="page"] {
    border-left-color: var(--gk-orange);
    background: rgba(255, 107, 44, 0.12);
  }

  .gk-header__cta {
    margin-left: 0;
    margin-top: 16px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .gk-header__inner {
    min-height: 64px;
  }

  .gk-brand__mark {
    width: 38px;
    height: 38px;
  }

  .gk-brand__svg {
    width: 30px;
    height: 30px;
  }

  .gk-brand__text {
    font-size: 21px;
  }
}

/* ---------- 页脚 ---------- */
.gk-footer {
  position: relative;
  background: var(--gk-ink);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.gk-footer::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 107, 44, 0.28) 50%);
  pointer-events: none;
}

.gk-footer__slash {
  height: 6px;
  background: repeating-linear-gradient(100deg, var(--gk-orange) 0 16px, transparent 16px 34px, var(--gk-cyan) 34px 42px, transparent 42px 60px);
}

.gk-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: clamp(32px, 5vw, 64px);
  padding-block: 56px 40px;
}

@media (max-width: 992px) {
  .gk-footer__grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-block: 44px 32px;
  }
}

.gk-footer__brand .gk-brand {
  margin-bottom: 18px;
}

.gk-brand--footer .gk-brand__mark {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.35);
}

.gk-footer__about {
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--gk-text-muted);
}

.gk-footer__trust {
  margin-top: 18px;
  padding: 12px 0 12px 16px;
  border-left: 3px solid var(--gk-orange);
  font-size: 13px;
  line-height: 1.75;
  color: var(--gk-text-muted);
}

.gk-footer__heading {
  font-family: var(--gk-font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gk-cyan);
  margin-bottom: 18px;
}

.gk-footer__list li {
  margin-bottom: 10px;
}

.gk-footer__list a {
  color: var(--gk-text-muted);
  transition: color 0.2s ease;
}

.gk-footer__list a:hover {
  color: var(--gk-orange);
}

.gk-footer__contact li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gk-text-muted);
}

.gk-footer__contact li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--gk-orange);
}

.gk-footer__note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--gk-border);
  font-size: 13px;
  line-height: 1.7;
  color: var(--gk-text-muted);
}

.gk-footer__bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-block: 14px 18px;
}

.gk-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  font-size: 13px;
  color: var(--gk-text-muted);
}

.gk-footer__copyright,
.gk-footer__icp {
  margin: 0;
}

/* ---------- 返回顶部 ---------- */
.gk-totop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--gk-z-totop);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--gk-orange);
  color: var(--gk-ink);
  border: 1px solid rgba(10, 15, 26, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
}

.gk-totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gk-totop:hover {
  background: var(--gk-flame);
}

.gk-totop svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .gk-totop {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ---------- 无障碍与降级 ---------- */
[id] {
  scroll-margin-top: 96px;
}

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

@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;
    scroll-behavior: auto !important;
  }
}
