/* ==========================================================================
   爱游戏主站 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 品牌轨道头部 / 窄页脚 / 基础组件
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

button { font: inherit; color: inherit; }

table { border-collapse: collapse; }

/* ---------- 2. Tokens ---------- */
:root {
  --pitch: #06110E;
  --turf: #0D211A;
  --stand: #16332A;
  --neon: #35F2C8;
  --neon-soft: #8DFBE0;
  --orange: #FF8A3D;
  --chalk: #F2F7F4;
  --grey: #9DB3AA;
  --line: #1E4034;
  --lime: #D7FF63;

  --rail-w: 248px;
  --header-h: 60px;
  --gap: 20px;

  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Helvetica Neue", Inter, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 1360px) {
  :root { --rail-w: 272px; }
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--pitch);
  background-image:
    linear-gradient(to right, rgba(30, 64, 52, .42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 64, 52, .2) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px;
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .002em;
}

main {
  display: block;
  margin-left: var(--rail-w);
  min-height: 70vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--chalk);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.375rem, 2.2vw, 1.875rem); }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.0625rem; }

p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.05em;
}

p:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; color: var(--chalk); }

small { font-size: .8125rem; color: var(--grey); }

a {
  color: var(--neon);
  text-decoration: none;
  transition: color .18s var(--ease);
}

a:hover { color: var(--neon-soft); }

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

a:focus-visible,
button:focus-visible { outline-offset: 3px; }

/* ---------- 4. 容器与节奏 ---------- */
.wrap {
  width: min(100% - 48px, 1180px);
  margin-inline: auto;
}

.section { padding: clamp(38px, 5vw, 72px) 0; }

.section + .section { border-top: 1px solid var(--line); }

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

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

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

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.btn:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.btn--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: #04120f;
}

.btn--primary:hover {
  background: var(--neon-soft);
  border-color: var(--neon-soft);
  color: #04120f;
}

.btn--accent {
  background: var(--orange);
  border-color: var(--orange);
  color: #1a0d04;
}

.btn--accent:hover {
  background: #ffa267;
  border-color: #ffa267;
  color: #1a0d04;
}

/* ---------- 6. 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--grey);
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.crumbs li { display: inline-flex; align-items: center; }

.crumbs li:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--line);
}

.crumbs a { color: var(--grey); }
.crumbs a:hover { color: var(--neon); }
.crumbs [aria-current="page"] { color: var(--chalk); }

/* ---------- 7. 网格与图片容器 ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: linear-gradient(155deg, var(--stand), var(--turf) 62%, var(--pitch));
}

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

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

.media--skew { clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%); }

.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 5px 9px;
  background: rgba(6, 17, 14, .84);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
}

/* ---------- 8. 对照面板与比分条 ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: var(--turf);
  border-radius: 2px;
}

.duo__cell { padding: 20px 22px; }

.duo__cell + .duo__cell { border-left: 1px solid var(--line); }

.duo__cell--new { box-shadow: inset 3px 0 0 var(--neon); }
.duo__cell--old { box-shadow: inset 3px 0 0 var(--orange); }

.scoreline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.scoreline__no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--lime);
  letter-spacing: .04em;
}

/* ---------- 9. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--grey);
  white-space: nowrap;
}

.tag--new { color: var(--neon); border-color: rgba(53, 242, 200, .45); }
.tag--old { color: var(--orange); border-color: rgba(255, 138, 61, .45); }
.tag--rank { color: var(--lime); border-color: rgba(215, 255, 99, .4); }

/* ---------- 10. 显现（由 JS 施加） ---------- */
[data-reveal] {
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(10px);
}

/* ---------- 11. 头部：品牌轨道 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -88px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: 2px;
  background: var(--neon);
  color: #04120f;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  transition: top .18s var(--ease);
}

.skip-link:focus { top: 12px; color: #04120f; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  background: var(--turf);
  border-right: 1px solid var(--line);
  z-index: 80;
  overflow: hidden;
}

.rail-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(30, 64, 52, .9);
}

.rail-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--lime));
  transition: width .15s linear;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--chalk);
}

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

.brand-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--neon) 0 46%, #0a1a15 46% 54%, var(--orange) 54% 100%);
  box-shadow: 0 0 0 1px rgba(53, 242, 200, .28), 0 4px 12px rgba(0, 0, 0, .35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--chalk);
  white-space: nowrap;
}

.brand-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .03em;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--chalk);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}

.site-header[data-open="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.rail-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.rail-body::-webkit-scrollbar { width: 6px; }
.rail-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.site-nav { flex: 0 0 auto; }

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

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 12px;
  border-left: 2px solid transparent;
  border-radius: 2px;
  color: var(--grey);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.nav-link:hover {
  color: var(--chalk);
  background: rgba(53, 242, 200, .07);
}

.nav-link[aria-current="page"] {
  color: var(--neon);
  font-weight: 700;
  border-left-color: var(--neon);
  background: linear-gradient(90deg, rgba(53, 242, 200, .15), rgba(53, 242, 200, 0));
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--grey);
  opacity: .7;
}

.nav-link[aria-current="page"] .nav-idx { color: var(--neon); opacity: 1; }

.nav-label { min-width: 0; }

.rail-shorts {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.short-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--chalk);
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.short-link:hover { transform: translateX(2px); }

.short-link--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: #04120f;
}

.short-link--primary:hover {
  background: var(--neon-soft);
  border-color: var(--neon-soft);
  color: #04120f;
}

.short-link--ghost {
  border-color: rgba(255, 138, 61, .42);
  color: var(--orange);
}

.short-link--ghost:hover {
  background: rgba(255, 138, 61, .12);
  border-color: var(--orange);
  color: var(--orange);
}

.short-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
}

.rail-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .05em;
  line-height: 1.5;
  color: var(--grey);
  margin: 0;
}

.to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}

.to-top:hover {
  color: var(--neon);
  border-color: var(--neon);
}

.rail-foot .to-top {
  opacity: 0;
  pointer-events: none;
}

.rail-foot .to-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  margin-left: var(--rail-w);
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: var(--turf);
  color: var(--grey);
  font-size: 14px;
  padding: 40px 0 0;
}

.footer-inner {
  width: min(100% - 48px, 1180px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr 1.3fr;
  gap: 32px 28px;
  padding-bottom: 34px;
}

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

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

.brand--footer { gap: 9px; }

.brand--footer .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 2px;
}

.brand--footer .brand-name { font-size: 15px; }

.footer-tag {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--grey);
  margin: 0;
  max-width: 26ch;
}

.footer-title {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.footer-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--neon);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-links a {
  color: var(--grey);
  font-size: 14px;
}

.footer-links a:hover { color: var(--neon); }

.footer-log {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.6;
}

.footer-log li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: baseline;
}

.log-date {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--lime);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
}

.footer-contact > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: baseline;
}

.footer-contact dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--grey);
  opacity: .8;
}

.footer-contact dd {
  margin: 0;
  color: var(--chalk);
  word-break: break-word;
}

.footer-icp {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--grey);
}

.footer-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--grey);
  opacity: .85;
}

.footer-bar {
  width: min(100% - 48px, 1180px);
  margin-inline: auto;
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--grey);
}

.footer-copy { margin: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}

.footer-legal a { color: var(--grey); }
.footer-legal a:hover { color: var(--neon); }

.site-footer .to-top {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 13. 移动端：顶栏 + 抽屉 ---------- */
@media (max-width: 1023px) {
  :root { --rail-w: 0px; }

  body { padding-top: var(--header-h); }

  main { margin-left: 0; }

  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--header-h);
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .rail-head {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
  }

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

  .brand-mark { width: 28px; height: 28px; }

  .brand-name { font-size: 15px; }

  .brand-meta { font-size: 10px; }

  .rail-body {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    max-height: calc(100dvh - var(--header-h));
    padding: 16px 16px 22px;
    background: var(--stand);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
    overscroll-behavior: contain;
    z-index: 70;
  }

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

  .nav-link {
    padding: 12px 12px 12px 14px;
    font-size: 16px;
  }

  .nav-idx { font-size: 12px; }

  .rail-shorts {
    flex-direction: row;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(30, 64, 52, .8);
  }

  .short-link {
    flex: 1 1 0;
    justify-content: center;
    padding: 11px 12px;
    font-size: 14px;
  }

  .short-arrow { display: none; }

  .rail-foot {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .rail-note { display: none; }

  .rail-foot .to-top {
    position: fixed;
    right: 14px;
    bottom: 16px;
    z-index: 65;
    background: var(--stand);
    border-color: var(--line);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  }

  .site-header[data-open="true"] .rail-foot .to-top {
    opacity: 0;
    pointer-events: none;
  }

  .site-footer { margin-left: 0; padding-top: 32px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 26px 22px;
    padding-bottom: 28px;
  }

  .footer-tag { max-width: none; }
}

@media (max-width: 680px) {
  .wrap { width: min(100% - 32px, 1180px); }

  .footer-inner {
    width: min(100% - 32px, 1180px);
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-bar {
    width: min(100% - 32px, 1180px);
    gap: 10px 16px;
  }

  .footer-legal { margin-left: 0; }

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

  .duo { grid-template-columns: 1fr; }

  .duo__cell + .duo__cell {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .scoreline { grid-template-columns: auto 1fr; }

  .scoreline > :last-child { grid-column: 2; }
}

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

  html { scroll-behavior: auto; }

  [data-reveal].is-pending {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
