/* =========================================================
   k1娱乐赛场 · 共享站点样式 /assets/site.css
   夜光赛场蓝图：页框、刻度、等宽索引与记分牌层级
   ========================================================= */

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

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

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

ul, ol { padding: 0; list-style: none; }

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

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

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

address { font-style: normal; }

/* ---------- 2. 变量 ---------- */
:root {
  --bg: #06120F;
  --bg-2: #0A1C17;
  --surface: #102821;
  --line: #1F3D33;
  --line-soft: rgba(31, 61, 51, 0.55);

  --accent: #3BF2C4;
  --accent-deep: #12A37F;
  --score: #F5B841;
  --text: #EDF3EF;
  --muted: #9DB2AA;
  --glass: rgba(237, 243, 239, 0.08);
  --warn: #FF7A6B;
  --ink: #04120E;

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Noto Sans SC", "Microsoft YaHei", monospace;

  --rail: 88px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --radius: 2px;
  --maxw: 1320px;
  --read-progress: 0;
}

/* ---------- 3. 基础排版 ---------- */
html { background-color: var(--bg); }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 68% at 84% -12%, rgba(59, 242, 196, 0.09), transparent 62%),
    radial-gradient(90% 58% at 2% 106%, rgba(245, 184, 65, 0.065), transparent 56%),
    repeating-linear-gradient(to right, rgba(31, 61, 51, 0.30) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to bottom, rgba(31, 61, 51, 0.30) 0 1px, transparent 1px 72px);
  background-attachment: fixed, fixed, scroll, scroll;
  -webkit-font-smoothing: antialiased;
}

/* 页框：固定 1px 细线 + 四角荧光刻度 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  border: 1px solid rgba(31, 61, 51, 0.95);
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position:
    left 0 top 0, left 0 top 0,
    right 0 top 0, right 0 top 0,
    left 0 bottom 0, left 0 bottom 0,
    right 0 bottom 0, right 0 bottom 0;
  background-size:
    18px 1px, 1px 18px,
    18px 1px, 1px 18px,
    18px 1px, 1px 18px,
    18px 1px, 1px 18px;
  opacity: 0.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

p { max-width: 34em; }

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

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

#main-content {
  display: block;
  scroll-margin-top: 108px;
}

/* ---------- 4. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.grid { display: grid; gap: clamp(16px, 2vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.btn--primary:hover {
  box-shadow: 0 0 0 3px rgba(59, 242, 196, 0.2);
}

.btn--ghost {
  background: rgba(59, 242, 196, 0.06);
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost:hover {
  background: var(--accent);
  color: var(--ink);
}

.btn--quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn--quiet:hover {
  border-color: var(--accent-deep);
  color: var(--text);
}

/* ---------- 6. 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--score);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--score);
  box-shadow: 0 0 0 1px rgba(245, 184, 65, 0.12), 0 0 18px rgba(245, 184, 65, 0.16);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

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

/* ---------- 7. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(6, 18, 15, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.status-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 6px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.status-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-strip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 242, 196, 0.18);
  animation: status-pulse 2.6s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-strip__key { color: var(--muted); }
.status-strip__val { color: var(--text); }

.status-strip__sep {
  width: 1px;
  height: 11px;
  background: var(--line);
}

.status-strip__meta {
  margin-left: auto;
  color: rgba(157, 178, 170, 0.72);
  letter-spacing: 0.12em;
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
  min-height: 64px;
  padding: 8px var(--gutter);
}

.header-cta {
  padding: 8px 15px;
  font-size: 13px;
}

/* ---------- 8. 导航 ---------- */
.site-nav { justify-self: center; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  counter-reset: navidx;
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 11px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.site-nav__link::before {
  counter-increment: navidx;
  content: "0" counter(navidx);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(157, 178, 170, 0.55);
  transition: color 0.18s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.site-nav__link:hover { color: var(--text); }
.site-nav__link:hover::before { color: var(--accent); }
.site-nav__link:focus-visible { color: var(--text); }

.site-nav__link[aria-current="page"] { color: var(--accent); }
.site-nav__link[aria-current="page"]::before { color: var(--accent); }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- 9. 移动端开合按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.18s ease, color 0.18s ease;
}

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

.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav-toggle__bar {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--accent);
  transition: background-color 0.2s ease;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle__bar::before { top: -5px; }
.nav-toggle__bar::after { top: 5px; }

.site-header[data-open="true"] .nav-toggle__bar { background: transparent; }
.site-header[data-open="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

/* ---------- 10. 头部滚动进度 ---------- */
.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  overflow: hidden;
}

.header-progress__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transform: scaleX(var(--read-progress));
  transform-origin: left center;
}

/* ---------- 11. 跳至主内容 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 28, 23, 0.94) 0%, rgba(6, 18, 15, 1) 64%);
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 64px) var(--gutter) 0;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
  padding: 34px 0;
}

.footer-col { min-width: 0; }

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--score);
}

.footer-list { display: grid; gap: 10px; }

.footer-link {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.18s ease;
}

.footer-link:hover { color: var(--accent); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
}

.footer-contact__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: none;
}

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer-contact__val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  word-break: break-word;
}

.footer-contact__note {
  grid-column: 1 / -1;
  max-width: 52em;
  font-size: 13px;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-legal__copy { max-width: none; }
.footer-legal__icp { color: var(--text); }
.footer-legal__domain { color: rgba(157, 178, 170, 0.72); }

/* ---------- 13. 返回顶部刻度 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 90;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 48px;
  padding: 11px 0;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(6, 18, 15, 0.88);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease,
              visibility 0.22s ease, background-color 0.18s ease, color 0.18s ease;
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--accent);
  color: var(--ink);
}

.to-top__icon {
  display: block;
  width: 10px;
  height: 10px;
  border-left: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}

.to-top__label { line-height: 1; }

/* ---------- 14. 复用组件 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel--glass {
  background:
    linear-gradient(180deg, var(--glass) 0%, rgba(237, 243, 239, 0.02) 100%),
    var(--surface);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.section-head__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.section-head__title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
}

.section-head__sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb { padding: 16px 0 0; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.breadcrumb__link { color: var(--muted); transition: color 0.18s ease; }
.breadcrumb__link:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--line); }
.breadcrumb__current { color: var(--text); }

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 90% at 78% 10%, rgba(59, 242, 196, 0.16), transparent 62%),
    linear-gradient(150deg, rgba(18, 163, 127, 0.18) 0%, rgba(6, 18, 15, 0.94) 68%),
    var(--surface);
  aspect-ratio: 16 / 9;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: linear-gradient(180deg, transparent 0%, rgba(6, 18, 15, 0.94) 100%);
}

/* 左侧竖向索引轨道（页面阶段使用） */
.index-rail {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 50;
  width: var(--rail);
  transform: translateY(-50%);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.index-rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.index-rail__link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.index-rail__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.index-rail__link[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.index-rail__tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.index-rail__tool {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  writing-mode: vertical-rl;
  transition: color 0.18s ease;
}

.index-rail__tool:hover { color: var(--accent); }

@media (min-width: 1200px) {
  body.has-index-rail .site-main { padding-left: var(--rail); }
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1199px) {
  .index-rail { display: none; }
}

@media (max-width: 1040px) {
  .header-main {
    grid-template-columns: auto 1fr auto;
    min-height: 58px;
    padding-block: 9px;
  }

  .header-cta { justify-self: end; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 6px var(--gutter) 20px;
    background: rgba(6, 18, 15, 0.985);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px rgba(0, 0, 0, 0.48);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    padding: 13px 2px;
    font-size: 15px;
    border-bottom: 1px solid var(--line-soft);
  }

  .site-nav__link::after {
    left: 2px;
    right: auto;
    width: 34px;
    bottom: -1px;
  }

  .site-header[data-open="true"] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-strip__meta { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }

  .brand__name { font-size: 16px; }
  .brand__badge { width: 28px; height: 28px; font-size: 14px; }

  .header-cta { padding: 8px 12px; font-size: 12px; }
  .nav-toggle { padding: 8px 10px; }
  .nav-toggle__label { font-size: 11px; }

  .status-strip { font-size: 10.5px; gap: 8px 10px; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .to-top {
    width: 44px;
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 400px) {
  .header-cta { display: none; }
}

/* ---------- 16. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .header-progress__bar { transition: none; }
}
