/* ============================================================
   竞博体育中国站 — 全站共享样式 /assets/site.css
   数据竞技场 · 粗野主义数据面板
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --ink: #0B0F19;
  --paper: #F5F0E8;
  --red: #E63946;
  --blue: #00B4D8;
  --gold: #FFB703;
  --border: #3A4160;
  --card: #1E2433;
  --muted: #8D99AE;

  --font-display: "Impact", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, "Courier New", monospace;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 20px;
  --text-lg: 28px;
  --text-xl: 40px;
  --text-2xl: 58px;
  --text-3xl: 80px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --border-thin: 1px;
  --border-thick: 3px;
  --border-thicker: 5px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-pill: 999px;
  --shadow-hard: 6px 6px 0 0 rgba(0, 0, 0, 0.45);
  --shadow-strong: 10px 10px 0 0 rgba(0, 0, 0, 0.6);

  --content-w: 1440px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--ink);
  background-image: radial-gradient(ellipse at 80% -10%, rgba(0, 180, 216, 0.06) 0%, transparent 55%);
  color: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--gold); }

ul, ol { list-style: none; }

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

input {
  font: inherit;
  border: none;
  outline: none;
  color: inherit;
}

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

/* ---------- 工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 2000;
  padding: 10px 20px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- 容器 ---------- */
.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------- 区块 ---------- */
.section {
  padding: var(--space-5) 0;
}
.section--tight {
  padding: var(--space-3) 0;
}
.section__heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  line-height: 1.15;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
}
.section__sub {
  font-size: var(--text-base);
  color: var(--muted);
  max-width: 640px;
  margin-bottom: var(--space-4);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: var(--space-4);
}
.grid--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4col { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  border-radius: var(--border-radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn--primary {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
.btn--primary:hover {
  background: #d32f3c;
  color: var(--paper);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}
.btn--compact {
  padding: 9px 18px;
  font-size: var(--text-xs);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumb__link {
  color: var(--blue);
}
.breadcrumb__link:hover {
  color: var(--gold);
  text-decoration: underline;
}
.breadcrumb__separator {
  color: var(--border);
  font-family: var(--font-mono);
}
.breadcrumb__item[aria-current="page"] {
  color: var(--paper);
  font-weight: 700;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  padding: var(--space-2) 0 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.site-header__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--space-3) var(--space-2);
}

/* ---------- 悬浮胶囊导航 ---------- */
.nav-capsule {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: var(--card);
  border: var(--border-thick) solid var(--border);
  border-radius: var(--border-radius-pill);
  box-shadow: var(--shadow-hard);
}

.nav-capsule__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-capsule__list {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-capsule__link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-capsule__link:hover {
  background: rgba(245, 240, 232, 0.08);
  color: var(--blue);
}
.nav-capsule__link[aria-current="page"] {
  background: var(--red);
  color: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
}
.nav-capsule__link[aria-current="page"]:hover {
  color: var(--paper);
  background: #d32f3c;
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  border: 2px solid var(--paper);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: skew(-6deg);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.brand__china {
  color: var(--gold);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- 头部操作区 ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ---------- 搜索框 ---------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  border: 2px solid var(--border);
  border-radius: var(--border-radius-pill);
  padding: 0 14px;
  height: 38px;
  transition: border-color 0.2s ease;
}
.search-box:focus-within {
  border-color: var(--blue);
}
.search-box__icon {
  font-size: 16px;
  color: var(--muted);
  line-height: 1;
}
.search-box__input {
  width: 120px;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--paper);
}
.search-box__input::placeholder {
  color: var(--muted);
}
.search-box__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
@media (min-width: 1200px) {
  .search-box__input { width: 150px; }
}

/* ---------- 实时指示器 ---------- */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.live-indicator__dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(230, 57, 70, 0); }
}

/* ---------- 移动导航开关 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--ink);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0;
  transition: border-color 0.2s ease;
}
.nav-toggle:hover {
  border-color: var(--red);
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.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);
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 10;
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 0.1s linear;
}

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  background: var(--card);
  border: var(--border-thick) solid var(--border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}
.media-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.14) 0%, transparent 50%),
    linear-gradient(45deg, transparent 70%, rgba(0, 180, 216, 0.08) 100%);
  z-index: 1;
}
.media-frame::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 2px;
  z-index: 2;
  opacity: 0.7;
}
.media-frame--hero { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 数据卡片 ---------- */
.data-card {
  background: var(--card);
  border: var(--border-thick) solid var(--border);
  border-radius: var(--border-radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-hard);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.data-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}
.data-card__title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}
.data-card__value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--ink);
  border-top: var(--border-thicker) solid var(--red);
  margin-top: var(--space-6);
  overflow: hidden;
}
.site-footer::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.site-footer__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3) var(--space-3);
  position: relative;
  z-index: 1;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: var(--space-5);
}
.site-footer__about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.site-footer__summary {
  font-size: var(--text-sm);
  color: var(--muted);
  max-width: 360px;
  line-height: 1.7;
}
.site-footer__trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-pill);
  padding: 6px 14px;
}
.site-footer__trust-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
.site-footer__heading {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--paper);
  margin-bottom: var(--space-2);
  position: relative;
  padding-bottom: 8px;
}
.site-footer__heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--red);
}
.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer__list a {
  color: var(--muted);
  font-size: var(--text-sm);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.site-footer__list a:hover {
  color: var(--gold);
  padding-left: 4px;
}
.site-footer__list--contact {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: var(--border-thin) solid var(--border);
}
.site-footer__copyright {
  font-size: var(--text-xs);
  color: var(--muted);
}
.site-footer__legal {
  display: flex;
  gap: var(--space-3);
}
.site-footer__legal a {
  font-size: var(--text-xs);
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.site-footer__legal a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
  .search-box { display: none; }
  .nav-capsule__link { padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 991px) {
  .live-indicator__text { display: none; }
  .live-indicator {
    width: 10px;
    overflow: visible;
  }
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

@media (max-width: 767px) {
  .site-header {
    padding-top: var(--space-1);
  }
  .nav-capsule {
    flex-wrap: wrap;
    border-radius: 16px;
    padding: 10px 14px;
    gap: var(--space-1);
  }
  .header-actions {
    margin-left: auto;
    gap: var(--space-1);
  }
  .search-box { display: none; }
  .live-indicator { display: none; }
  .btn--compact {
    padding: 8px 14px;
    font-size: var(--text-xs);
  }
  .nav-toggle { display: flex; }

  .nav-capsule__nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }
  .nav-capsule__nav[data-open="true"] {
    max-height: 420px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-capsule__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 4px 0;
  }
  .nav-capsule__link {
    display: block;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: var(--text-base);
  }

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

  .section__heading { font-size: var(--text-lg); }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer__legal {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
}

@media (min-width: 768px) {
  .nav-capsule__nav {
    display: flex !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}

/* ---------- 数据显现动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 无障碍 · 减少动效 ---------- */
@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;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
