/* ============================================================
   云开赛事主站 — 共享样式 /assets/site.css
   夜间赛事控制台：深空蓝底 + 荧光青读数 + 印刷纸标签
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }

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

button { font: inherit; color: inherit; }

main { display: block; }

:target { scroll-margin-top: 112px; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #061525;
  --ink-2: #0B2139;
  --ink-3: #10304F;
  --grid-line: #2B3541;
  --muted: #8B9AA8;
  --paper: #F4EFE4;
  --cyan: #35F0DF;
  --green: #34D27B;
  --orange: #FF7A2E;
  --clay: #C26B4E;
  --moss: #728F5F;

  --font-sans: 'Archivo Narrow', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --shell-max: 1240px;
  --pad-x: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .3, 1);

  --grid-pattern:
    repeating-linear-gradient(0deg, rgba(53, 240, 223, .06) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(53, 240, 223, .06) 0 1px, transparent 1px 46px);
}

/* ---------- 3. 中文基础排版 ---------- */
body {
  min-height: 100vh;
  background:
    radial-gradient(940px 540px at 80% -12%, rgba(53, 240, 223, .10), transparent 62%),
    radial-gradient(720px 440px at 6% 6%, rgba(194, 107, 78, .10), transparent 60%),
    var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.015em;
  color: var(--paper);
}

h1 { font-size: clamp(32px, 5.4vw, 64px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(18px, 1.9vw, 23px); }
h4 { font-size: clamp(16px, 1.4vw, 18px); }

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

strong { font-weight: 700; color: var(--paper); }

::selection {
  background: rgba(53, 240, 223, .28);
  color: var(--paper);
}

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

/* ---------- 4. 容器与区块 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(26px, 4vw, 48px); }

.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .22em;
  color: var(--cyan);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--cyan);
  transform: skewX(-24deg);
}

.lede {
  max-width: 62ch;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.8;
  color: rgba(244, 239, 228, .82);
}

/* ---------- 5. 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--grid-line);
  background: linear-gradient(142deg, var(--ink-2), var(--ink) 72%);
}

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

.media img {
  filter: contrast(1.14) saturate(.9) brightness(.82);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-pattern);
  opacity: .5;
  pointer-events: none;
}

.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--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
}

.media--glow {
  box-shadow: 0 0 0 1px rgba(53, 240, 223, .18), 0 22px 54px rgba(0, 0, 0, .55);
}

.media__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

/* ---------- 6. 通用按钮 / 标签 / 面板 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 12px 22px;
  border: 1px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  font: 600 13px/1.1 var(--font-sans);
  letter-spacing: .1em;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.btn:hover {
  background: rgba(53, 240, 223, .12);
  box-shadow: 0 0 0 1px rgba(53, 240, 223, .32);
}

.btn--solid {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
}

.btn--solid:hover {
  background: #63f6e8;
  color: var(--ink);
}

.btn--ghost {
  border-color: var(--grid-line);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(53, 240, 223, .08);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--grid-line);
  background: rgba(43, 53, 65, .5);
  color: var(--muted);
  font: 500 11px/1.6 var(--font-mono);
  letter-spacing: .08em;
  white-space: nowrap;
}

.tag--live {
  color: var(--green);
  border-color: rgba(52, 210, 123, .5);
  background: rgba(52, 210, 123, .1);
}

.tag--warn {
  color: var(--orange);
  border-color: rgba(255, 122, 46, .5);
  background: rgba(255, 122, 46, .1);
}

.tag--clay {
  color: var(--clay);
  border-color: rgba(194, 107, 78, .55);
  background: rgba(194, 107, 78, .1);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid var(--grid-line);
  background: linear-gradient(160deg, rgba(11, 33, 57, .95), rgba(6, 21, 37, .95));
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.panel::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 14px;
  height: 14px;
  border-left: 2px solid var(--cyan);
  border-top: 2px solid var(--cyan);
  opacity: 0;
  transition: opacity .16s var(--ease);
  pointer-events: none;
}

.panel:hover {
  border-color: rgba(53, 240, 223, .55);
  box-shadow: 0 0 0 1px rgba(53, 240, 223, .12), 0 18px 42px rgba(0, 0, 0, .48);
}

.panel:hover::before { opacity: 1; }

/* ---------- 7. 网格与面包屑 ---------- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}

.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)); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5em;
  font: 400 12px/1.7 var(--font-mono);
  letter-spacing: .06em;
  color: var(--muted);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: .5em; }

.breadcrumb li + li::before {
  content: "/";
  color: var(--grid-line);
}

.breadcrumb a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}

.breadcrumb a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------- 8. Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font: 700 13px/1 var(--font-sans);
  letter-spacing: .08em;
  transition: top .16s var(--ease);
}

.skip-link:focus {
  top: 12px;
  outline-offset: 2px;
}

/* ---------- 9. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(6, 21, 37, .98), rgba(6, 21, 37, .925));
  border-bottom: 1px solid var(--grid-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: rgba(53, 240, 223, .45);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .58);
}

/* 报头 */
.masthead {
  position: relative;
  background-image: var(--grid-pattern);
}

.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px 120px at 50% 0%, rgba(53, 240, 223, .12), transparent 70%);
  pointer-events: none;
}

.masthead__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding-block: 13px;
}

/* 快速通道 */
.quick-entries {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--grid-line);
  background: rgba(11, 33, 57, .74);
  color: var(--muted);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .1em;
  text-decoration: none;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}

.quick-entry:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(53, 240, 223, .1);
}

.quick-entry__dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  transform: rotate(45deg);
  flex: none;
}

.quick-entry--warn .quick-entry__dot { background: var(--orange); }

.quick-entry--warn:hover {
  color: var(--orange);
  border-color: rgba(255, 122, 46, .8);
  background: rgba(255, 122, 46, .1);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
  color: var(--paper);
  text-decoration: none;
}

.brand__sigil {
  display: grid;
  gap: 3px;
  width: 26px;
  flex: none;
}

.brand__sigil i {
  display: block;
  height: 3px;
  background: var(--cyan);
  transform: skewX(-24deg);
  transition: width .18s var(--ease), background .18s var(--ease);
}

.brand__sigil i:nth-child(1) { width: 100%; }
.brand__sigil i:nth-child(2) { width: 72%; background: var(--green); }
.brand__sigil i:nth-child(3) { width: 46%; background: var(--orange); }

.brand:hover .brand__sigil i:nth-child(1) { width: 78%; }
.brand:hover .brand__sigil i:nth-child(2) { width: 100%; }

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--paper);
  transition: color .15s var(--ease);
}

.brand:hover .brand__name { color: var(--cyan); }

.brand__meta {
  margin-top: 3px;
  font: 400 10px/1.4 var(--font-mono);
  letter-spacing: .18em;
  color: var(--muted);
}

/* 移动端目录开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 9px 13px;
  border: 1px solid var(--grid-line);
  background: rgba(11, 33, 57, .82);
  color: var(--paper);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .14em;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}

.nav-toggle:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(53, 240, 223, .1);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: none;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform .18s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-4px) rotate(-45deg);
}

/* 导航带 */
.nav-band {
  position: relative;
  border-top: 1px solid rgba(43, 53, 65, .7);
  background: rgba(11, 33, 57, .55);
}

.nav-band__inner {
  display: flex;
  justify-content: center;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav__list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px clamp(10px, 1.6vw, 20px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color .15s var(--ease);
}

.primary-nav__list a::after {
  content: "";
  position: absolute;
  left: clamp(10px, 1.6vw, 20px);
  right: clamp(10px, 1.6vw, 20px);
  bottom: 8px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.primary-nav__list a:hover { color: var(--paper); }
.primary-nav__list a:hover::after { transform: scaleX(1); }

.primary-nav__list a[aria-current="page"] { color: var(--cyan); }
.primary-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-index {
  font: 400 10px/1 var(--font-mono);
  letter-spacing: .06em;
  color: var(--muted);
  opacity: .7;
}

.primary-nav__list a[aria-current="page"] .nav-index {
  color: var(--cyan);
  opacity: 1;
}

.nav-label { white-space: nowrap; }

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, var(--cyan), var(--green) 58%, var(--orange));
}

/* ---------- 10. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: var(--ink);
  border-top: 1px solid var(--grid-line);
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0 22%,
    var(--green) 22% 34%,
    var(--orange) 34% 40%,
    var(--clay) 40% 47%,
    var(--moss) 47% 51%,
    var(--grid-line) 51% 100%
  );
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.5fr);
  gap: clamp(24px, 3.4vw, 56px);
  padding-block: clamp(38px, 5vw, 64px) clamp(26px, 3.4vw, 44px);
}

.footer__wordmark {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--paper);
}

.footer__wordmark::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 12px;
  background: var(--cyan);
  transform: skewX(-24deg);
}

.footer__tagline {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(244, 239, 228, .78);
  max-width: 30ch;
}

.footer__note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 32ch;
}

.footer__col-title {
  margin-bottom: 14px;
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}

.footer__links {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  position: relative;
  display: inline-block;
  color: rgba(244, 239, 228, .84);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  transition: color .15s var(--ease);
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.footer__links a:hover { color: var(--cyan); }
.footer__links a:hover::after { transform: scaleX(1); }

.footer__contact {
  display: grid;
  align-content: start;
  gap: 10px;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font: 400 13px/1.65 var(--font-mono);
  color: var(--paper);
}

.contact-line__label {
  flex: none;
  min-width: 40px;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
}

.contact-line__value {
  flex: 1 1 12ch;
  min-width: 0;
  word-break: break-word;
}

.contact-line__hint {
  font: 400 12px/1.75 var(--font-mono);
  color: var(--muted);
  max-width: 34ch;
}

.copy-btn {
  flex: none;
  padding: 3px 9px;
  border: 1px solid var(--grid-line);
  background: transparent;
  color: var(--muted);
  font: 500 10px/1.5 var(--font-mono);
  letter-spacing: .1em;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}

.copy-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(53, 240, 223, .1);
}

.copy-status {
  min-height: 16px;
  font: 400 11px/1.6 var(--font-mono);
  color: var(--green);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-block: 18px 26px;
  border-top: 1px solid rgba(43, 53, 65, .85);
  font: 400 12px/1.7 var(--font-mono);
  color: var(--muted);
}

.footer__copy { margin: 0; }

.footer__base-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__base-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}

.footer__base-links a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__icp { margin: 0 0 0 auto; }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1080px) {
  .quick-entries { display: none; }
}

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(26px, 4vw, 40px);
  }
  .footer__brand,
  .footer__contact { grid-column: span 2; }
  .footer__icp { margin-left: 0; }
}

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

@media (max-width: 900px) {
  .masthead__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-block: 11px;
  }

  .brand { justify-self: start; grid-column: 1; }
  .nav-toggle { display: inline-flex; grid-column: 2; }

  .nav-band__inner {
    display: block;
    padding-inline: 0;
  }

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

  .primary-nav__list { display: block; }

  .primary-nav__list > li {
    border-top: 1px solid rgba(43, 53, 65, .85);
  }

  .primary-nav__list > li:first-child { border-top: 0; }

  .primary-nav__list a {
    width: 100%;
    padding: 14px var(--pad-x);
    justify-content: flex-start;
    font-size: 15px;
  }

  .primary-nav__list a::after { display: none; }

  .primary-nav__list a[aria-current="page"] {
    background: rgba(53, 240, 223, .09);
    box-shadow: inset 3px 0 0 var(--cyan);
  }

  .brand__meta { display: none; }
}

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

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

  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__brand,
  .footer__contact { grid-column: auto; }

  .footer__base { flex-direction: column; align-items: flex-start; gap: 8px; }

  .brand__name { font-size: 17px; }
}

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

  .primary-nav__list a:hover::after,
  .footer__links a:hover::after {
    transform: scaleX(1);
  }

  .scroll-progress span { transition: none; }
}
