/* ============================================================
   OG对战中心 — 共享站点样式 /assets/site.css
   暗色电竞仪表盘 × 技术蓝图 × 复古出版索引
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --ink: #07090B;
  --panel: #11151A;
  --panel-deep: #0A0D11;
  --cream: #F2E9D8;
  --brown: #231A14;
  --lime: #B6FF3B;
  --ice: #5FD8FF;
  --orange: #FF7A2F;
  --steel: #7F8A96;
  --ember: #E8452C;
  --white: #FFFFFF;

  --line: rgba(127, 138, 150, 0.24);
  --line-soft: rgba(127, 138, 150, 0.14);
  --line-strong: rgba(95, 216, 255, 0.38);

  --rail-w: 112px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --maxw: 1400px;

  --font-display: 'Barlow Condensed', 'Oswald', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Heiti SC', sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'SFMono-Regular', 'Consolas', monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

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

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

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--cream);
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(127, 138, 150, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(127, 138, 150, 0.055) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { display: block; padding-top: clamp(24px, 4vw, 56px); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--cream);
}

h1 { font-size: clamp(40px, 6vw, 84px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: 18px; letter-spacing: 0; }

p { max-width: 40em; }

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

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

/* ---------- 4. 焦点与动效偏好 ---------- */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 1px;
}

@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;
  }
}

/* ---------- 5. 通用工具与基础组件 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(40px, 6vw, 88px); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin-block: clamp(20px, 3vw, 36px);
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice);
}
.kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ice);
  border: 1px solid currentColor;
  border-radius: 2px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.card {
  position: relative;
  padding: clamp(16px, 2vw, 26px);
  background: linear-gradient(158deg, rgba(22, 27, 33, 0.96), rgba(10, 13, 17, 0.96));
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--steel);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: rgba(127, 138, 150, 0.55); }
.breadcrumb a {
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s var(--ease);
}
.breadcrumb a:hover { border-bottom-color: var(--ice); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--panel-deep);
  background-image:
    linear-gradient(to right, rgba(127, 138, 150, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(127, 138, 150, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
}
.figure > img,
.figure > picture > img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.figure--slant { clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 100%); }
.figure-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--steel);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease),
              color 0.16s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.btn--primary:hover { background: #CBFF6B; border-color: #CBFF6B; }
.btn--ghost {
  background: transparent;
  border-color: rgba(127, 138, 150, 0.5);
  color: var(--cream);
}
.btn--ghost:hover { border-color: var(--ice); color: var(--ice); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 100;
}

/* 跳转链接 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--lime);
  border-radius: 2px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* 滚动进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 2px;
  z-index: 95;
  background: rgba(127, 138, 150, 0.16);
  pointer-events: none;
}
.scroll-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--ice), var(--lime));
}

/* 桌面侧边轨道 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0 14px;
  background: linear-gradient(180deg, rgba(17, 21, 26, 0.99), rgba(8, 11, 14, 0.99));
  border-right: 1px solid var(--line);
}
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(127, 138, 150, 0.55) 0 6px,
    transparent 6px 18px
  );
  opacity: 0.45;
  pointer-events: none;
}

/* 品牌 */
.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 12px;
  padding: 0 4px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--lime);
}
.brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cream);
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--steel);
}
.brand:hover .brand-name { color: var(--ice); }

.brand--compact {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}
.brand--compact .brand-mark { font-size: 22px; }
.brand--compact .brand-name { font-size: 13px; }
.brand--compact .brand-sub { display: none; }

/* 轨道导航 */
.rail-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rail-list { display: flex; flex-direction: column; }

.rail-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.rail-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--steel);
}
.rail-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(242, 233, 216, 0.74);
  transition: color 0.18s var(--ease);
}
.rail-link:hover {
  background: rgba(95, 216, 255, 0.07);
  border-left-color: rgba(95, 216, 255, 0.55);
}
.rail-link:hover .rail-label { color: var(--cream); }

.rail-link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(182, 255, 59, 0.16), transparent 82%);
  border-left-color: var(--lime);
}
.rail-link[aria-current="page"] .rail-label {
  color: var(--lime);
  font-weight: 700;
}
.rail-link[aria-current="page"] .rail-idx { color: var(--lime); }

/* 轨道底部 */
.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.rail-ver {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--steel);
}
.rail-ver--stable { color: var(--ice); }
.rail-ver--beta { color: var(--orange); }

/* 右上工具条 */
.topbar {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(11, 15, 19, 0.9);
  border: 1px solid var(--line);
  border-radius: 3px;
  backdrop-filter: blur(10px);
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease),
              color 0.16s var(--ease);
}
.tool-link--export {
  color: var(--ice);
  border-color: rgba(95, 216, 255, 0.45);
}
.tool-link--export:hover {
  background: rgba(95, 216, 255, 0.12);
  border-color: var(--ice);
}
.tool-link--help {
  color: var(--orange);
  border-color: rgba(255, 122, 47, 0.45);
}
.tool-link--help::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}
.tool-link--help:hover {
  background: rgba(255, 122, 47, 0.14);
  border-color: var(--orange);
}
.tool-link--icon { padding: 7px 10px; }
.topbar-cta { margin-left: 2px; }

/* 移动端顶栏（桌面隐藏） */
.mobile-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  background: rgba(8, 11, 14, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.mobile-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mobile-actions .btn { min-height: 36px; }

/* 抽屉开关 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  color: var(--cream);
  background: rgba(95, 216, 255, 0.07);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.nav-toggle:hover { background: rgba(95, 216, 255, 0.16); }
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.site-header[data-open] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  background: rgba(3, 5, 7, 0.74);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 104px);
  background: linear-gradient(180deg, #0A0D11 0%, #07090B 100%);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 240px;
  max-width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), rgba(182, 255, 59, 0));
}

.footer-inner { padding-block: clamp(32px, 5vw, 60px) 26px; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 1fr) minmax(260px, 1.5fr);
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(24px, 3.4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.footer-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--cream);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}
.footer-logo:hover { color: var(--lime); }

.footer-tagline {
  margin-top: 10px;
  max-width: 22em;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(242, 233, 216, 0.66);
}

.footer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.chip--stable {
  color: var(--lime);
  background: rgba(182, 255, 59, 0.08);
  border-color: rgba(182, 255, 59, 0.42);
}
.chip--beta {
  color: var(--orange);
  background: rgba(255, 122, 47, 0.08);
  border-color: rgba(255, 122, 47, 0.42);
}

.footer-heading {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-links a {
  align-self: flex-start;
  padding-bottom: 1px;
  font-size: 14px;
  color: rgba(242, 233, 216, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-links a:hover {
  color: var(--ice);
  border-bottom-color: var(--ice);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-contact-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}
.footer-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--steel);
}
.footer-value {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(242, 233, 216, 0.86);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  padding-top: 20px;
}
.footer-note {
  flex: 1 1 300px;
  max-width: none;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(242, 233, 216, 0.55);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-legal a {
  font-size: 12.5px;
  color: rgba(242, 233, 216, 0.7);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-legal a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.footer-icp,
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--steel);
  max-width: none;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ice);
  background: rgba(11, 15, 19, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
              visibility 0.2s var(--ease), border-color 0.16s var(--ease),
              color 0.16s var(--ease);
}
.to-top:hover { color: var(--lime); border-color: var(--lime); }
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top-arrow { font-size: 14px; line-height: 1; }

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1200px) {
  :root { --rail-w: 96px; }
  .brand { margin: 0 10px; }
  .brand-mark { font-size: 26px; }
  .rail-foot { margin: 0 10px; }
  .footer-top { grid-template-columns: minmax(200px, 1.4fr) minmax(140px, 1fr) minmax(230px, 1.4fr); }
}

@media (max-width: 900px) {
  :root { --rail-w: 0px; }

  body { padding-left: 0; padding-top: 56px; }
  main { padding-top: 20px; }

  .scroll-progress { left: 0; top: 56px; }

  .mobile-bar { display: flex; }
  .nav-toggle { display: inline-flex; }
  .topbar { display: none; }

  .nav-scrim { display: block; }
  .site-header[data-open] .nav-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .rail {
    width: min(300px, 84vw);
    transform: translateX(-100%);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
    padding-top: 16px;
    box-shadow: none;
  }
  .site-header[data-open] .rail {
    transform: translateX(0);
    box-shadow: 22px 0 60px rgba(0, 0, 0, 0.72);
  }

  .brand { margin: 0 16px; padding: 0 2px 16px; }
  .rail-foot { margin: 0 16px; }

  .rail-link {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 14px 18px;
  }
  .rail-label { font-size: 15px; }
  .rail-idx { font-size: 11px; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom { gap: 10px 20px; }
}

@media (max-width: 560px) {
  .mobile-actions .tool-link--help { display: none; }
  .footer-inner { padding-block: 28px 22px; }
  .footer-contact-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .to-top { right: 12px; bottom: 12px; padding: 0 12px; }
  .to-top-text { display: none; }
}
