/* ============================================================
   乐竞体育入口 · 共享样式 /assets/site.css
   夜间赛场 × 数据控制台
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- tokens ---------- */
:root {
  --void: #060B18;
  --split: #0E1A33;
  --arena: #17356F;
  --neon: #3D7BFF;
  --signal: #B8FF3C;
  --ember: #FF7A2F;
  --data-bg: #E4EAF4;
  --data-ink: #0E1A33;
  --steel: #A9B6CC;
  --paper: #F4F7FC;
  --rule: #22304E;

  --font-display: "Haettenschweiler", "Arial Narrow", "Helvetica Neue Condensed",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    system-ui, sans-serif;
  --font-heading: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    system-ui, -apple-system, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --wrap: 1280px;
  --gutter: 24px;
  --ease: 160ms cubic-bezier(.4, 0, .2, 1);
  --bar-h: 58px;
}

/* ---------- base ---------- */
body {
  background: var(--void);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .45;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(244, 247, 252, .045) 0 1px,
    transparent 1px 4px
  );
}

::selection { background: var(--signal); color: #08101f; }

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

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 96px);
  line-height: .95;
  letter-spacing: -.02em;
}

.h1 { font-size: clamp(30px, 4vw, 54px); line-height: 1.1; font-weight: 800; }
.h2 { font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2; }
.h3 { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.3; }

.u-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.u-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.u-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--steel);
}

.u-anno {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--steel);
}

.u-vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--steel);
}

.link,
.prose a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--neon);
  padding-bottom: 1px;
  transition: color var(--ease), border-color var(--ease);
}

.link:hover,
.link:focus-visible,
.prose a:hover,
.prose a:focus-visible {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

/* ---------- layout containers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 840px; }
.wrap--wide { max-width: 1440px; }

.grid { display: grid; gap: var(--gutter); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ---------- prose ---------- */
.prose {
  max-width: 38em;
  color: var(--steel);
  font-size: 16px;
  line-height: 1.75;
}

.prose > * + * { margin-top: 1.2em; }
.prose h2, .prose h3 { color: var(--paper); }
.prose strong { color: var(--paper); font-weight: 700; }
.prose ul, .prose ol { padding-left: 0; }
.prose li { position: relative; padding-left: 1.5em; }
.prose li + li { margin-top: .5em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 8px;
  height: 1px;
  background: var(--signal);
}
.prose ol { counter-reset: proseitem; }
.prose ol li::before {
  counter-increment: proseitem;
  content: counter(proseitem, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .12em;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}

.btn:hover,
.btn:focus-visible { border-color: var(--neon); color: var(--paper); }

.btn--ghost { color: var(--steel); }
.btn--ghost:hover,
.btn--ghost:focus-visible { color: var(--signal); border-color: var(--signal); }

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: #08101f;
}
.btn--signal:hover,
.btn--signal:focus-visible {
  background: transparent;
  color: var(--signal);
  border-color: var(--signal);
}

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.5;
  color: var(--steel);
  background: rgba(14, 26, 51, .65);
  border: 1px solid var(--rule);
}

.tag--signal { color: var(--signal); border-color: rgba(184, 255, 60, .5); }
.tag--ember { color: var(--ember); border-color: rgba(255, 122, 47, .5); }
.tag--live {
  color: #08101f;
  background: var(--signal);
  border-color: var(--signal);
  font-weight: 700;
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--rule); }
.breadcrumb a {
  color: var(--steel);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--signal); border-bottom-color: var(--signal); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ---------- media foundations ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--split);
  border: 1px solid var(--rule);
}

.media > img,
.media > svg,
.media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }

.media--diag {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), 0 100%);
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 12px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--paper);
  background: linear-gradient(0deg, rgba(6, 11, 24, .92), rgba(6, 11, 24, 0));
}

.media__tag {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #0A0F1C;
  background: var(--ember);
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  color: #08101f;
  background: var(--signal);
  text-decoration: none;
  border-radius: 0 0 2px 2px;
  transition: top var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  z-index: 120;
  pointer-events: none;
  background: rgba(34, 48, 78, .6);
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--neon), var(--signal));
}

/* ---------- header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background:
    radial-gradient(120% 150% at 50% -50%, rgba(61, 123, 255, .26), transparent 62%),
    linear-gradient(180deg, var(--split) 0%, #08101F 100%);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(61, 123, 255, .22);
}

.header-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 0;
}

.masthead {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 16px;
  text-align: center;
}

.masthead::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 48px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--signal);
}

.masthead-note {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0;
}

.masthead-meta {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--rule);
  margin: 0;
}

.masthead-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--paper);
  text-decoration: none;
  transition: color var(--ease);
}
.masthead-brand:hover,
.masthead-brand:focus-visible { color: var(--signal); }

.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--steel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}
.nav-toggle:hover,
.nav-toggle:focus-visible { color: var(--signal); border-color: var(--signal); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform var(--ease), top var(--ease), bottom var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.site-header[data-open="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after { bottom: 4px; transform: rotate(-45deg); }

.site-nav { grid-column: 2; display: flex; justify-content: center; }

.nav-list { display: flex; flex-wrap: wrap; gap: 2px; }

.nav-list a {
  position: relative;
  display: block;
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--steel);
  text-decoration: none;
  transition: color var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 1px;
  background: var(--neon);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible { color: var(--paper); }
.nav-list a:hover::after,
.nav-list a:focus-visible::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] { color: var(--signal); }
.nav-list a[aria-current="page"]::after {
  background: var(--signal);
  transform: scaleX(1);
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 8px;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 0;
  background:
    linear-gradient(180deg, #0A1424 0%, var(--void) 100%);
  border-top: 1px solid var(--rule);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: .6;
}

.footer-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 56px var(--gutter) 36px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 48px;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }

.footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--paper);
  text-decoration: none;
  transition: color var(--ease);
}
.footer-logo:hover,
.footer-logo:focus-visible { color: var(--signal); }

.footer-tag {
  font-size: 13px;
  color: var(--steel);
  line-height: 1.6;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rule);
}

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

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

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.footer-col__title::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--signal);
  flex: none;
}

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

.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: var(--steel);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

.footer-contact {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter) 22px;
}

.footer-contact__line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--steel);
  padding: 14px 16px;
  background: rgba(14, 26, 51, .7);
  border-left: 2px solid var(--neon);
}

.footer-legal {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px var(--gutter) 30px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: center;
}

.footer-legal__icp,
.footer-legal__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--steel);
}
.footer-legal__icp { color: var(--rule); color: #6D7C97; }

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  color: var(--signal);
  background: rgba(6, 11, 24, .92);
  border: 1px solid var(--signal);
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease),
    background-color var(--ease), color var(--ease);
}
.back-to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--signal);
  color: #08101f;
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .masthead-meta { display: none; }
  .footer-inner { gap: 36px; }
}

/* ---------- mobile / narrow ---------- */
@media (max-width: 900px) {
  :root { --gutter: 18px; }

  .header-inner { padding: 16px var(--gutter) 0; }

  .masthead { gap: 4px; padding-bottom: 14px; }
  .masthead-note {
    position: static;
    transform: none;
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: .16em;
  }

  .header-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 0;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    background: rgba(6, 11, 24, .97);
    border-top: 1px solid var(--rule);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

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

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
    z-index: 75;
    grid-column: auto;
    display: none;
    flex-direction: column;
    max-height: min(66vh, 520px);
    overflow-y: auto;
    padding: 10px 14px 16px;
    background: var(--split);
    border-top: 1px solid var(--neon);
    box-shadow: 0 -20px 48px rgba(0, 0, 0, .65);
  }

  .site-header[data-open="true"] .site-nav { display: flex; }

  .nav-list { flex-direction: column; gap: 0; width: 100%; }
  .nav-list li { width: 100%; }
  .nav-list a {
    padding: 13px 8px;
    font-size: 15px;
    border-bottom: 1px solid var(--rule);
  }
  .nav-list li:last-child a { border-bottom: 0; }
  .nav-list a::after { left: 8px; right: 8px; bottom: 7px; }

  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 8px 11px; font-size: 12px; }

  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

  .back-to-top {
    right: 14px;
    bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 44px var(--gutter) 28px;
  }
  .footer-columns { gap: 22px 16px; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 560px) {
  .header-actions .btn--ghost { display: none; }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead-brand { font-size: clamp(22px, 7vw, 30px); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
