/* ==========================================================================
   616游戏官 · 全站共享样式 /assets/site.css
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-0: #150F2E;
  --ink-1: #1E1840;
  --ink-2: #16333A;
  --rock: #3A3A46;
  --bone: #F4EFE4;
  --gold: #E9B23C;
  --vermil: #D8453B;
  --flag-blue: #2F7BD8;
  --flag-green: #2E8F5F;
  --clay: #B4654A;
  --moss: #6E8B58;

  --line: 3px;
  --shadow: 8px 8px 0 rgba(0, 0, 0, .5);
  --shadow-sm: 4px 4px 0 rgba(0, 0, 0, .45);

  --rail-w: 88px;
  --content-max: 1180px;
  --gutter: clamp(18px, 3.6vw, 52px);

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK SC", "Courier New", monospace;

  --flag-h: linear-gradient(90deg,
      #2F7BD8 0 20%, #F4EFE4 20% 40%, #D8453B 40% 60%,
      #2E8F5F 60% 80%, #E9B23C 80% 100%);
  --flag-v: linear-gradient(180deg,
      #2F7BD8 0 20%, #F4EFE4 20% 40%, #D8453B 40% 60%,
      #2E8F5F 60% 80%, #E9B23C 80% 100%);
}

/* ---------- 2. 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, hr { margin: 0; }

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

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

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

[hidden] { display: none !important; }

a {
  color: var(--flag-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--gold); }

/* ---------- 3. 基础排版 ---------- */
body {
  padding-left: var(--rail-w);
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1100px 520px at 8% -6%, rgba(47, 123, 216, .16), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(180, 101, 74, .14), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(110, 139, 88, .12), transparent 66%);
  background-attachment: fixed;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.16;
  color: var(--bone);
}

h1 { font-size: clamp(40px, 6vw, 88px); }
h2 { font-size: clamp(26px, 3.4vw, 44px); }
h3 { font-size: clamp(19px, 2vw, 26px); }
h4 { font-size: clamp(16px, 1.5vw, 20px); }

#main-content p { max-width: 38em; }

strong, b { font-weight: 800; color: #fff; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 3px;
  background: var(--gold);
  flex: none;
}

.rule {
  height: 5px;
  border: none;
  background: var(--flag-h);
}

/* ---------- 4. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

.stack > * + * { margin-top: var(--stack-gap, 18px); }

/* ---------- 5. 通用组件 ---------- */
.panel {
  background: var(--ink-2);
  border: var(--line) solid var(--rock);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 32px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: var(--line) solid var(--rock);
  background: var(--ink-1);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .5);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.btn:hover {
  color: var(--bone);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .55);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}

.btn--gold { background: var(--gold); color: var(--ink-0); border-color: var(--rock); }
.btn--gold:hover { color: var(--ink-0); }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--vermil); color: var(--bone); }
.btn--danger:hover { color: var(--bone); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 2px solid var(--rock);
  background: var(--ink-2);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--gold { background: var(--gold); color: var(--ink-0); border-color: var(--gold); }
.tag--clay { background: var(--clay); border-color: var(--clay); }
.tag--green { background: var(--flag-green); border-color: var(--flag-green); }
.tag--red { background: var(--vermil); border-color: var(--vermil); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(244, 239, 228, .62);
}

.breadcrumb a { color: var(--flag-blue); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb__sep { color: var(--rock); }

/* ---------- 6. 图片容器（页面阶段投放 img） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  border: var(--line) solid var(--rock);
  box-shadow: var(--shadow);
}

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

.media-frame::before,
.media-frame::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gold);
  pointer-events: none;
  z-index: 2;
}

.media-frame::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.media-frame::after { right: 8px; bottom: 8px; border-left: none; border-top: none; }

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

.media-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 6px 12px;
  background: var(--ink-0);
  border-top: 2px solid var(--rock);
  border-right: 2px solid var(--rock);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--bone);
}

/* ---------- 7. 无障碍 ---------- */
.skip-link {
  position: fixed;
  top: -140px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink-0);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  border: var(--line) solid var(--ink-0);
  transition: top .2s ease;
}

.skip-link:focus { top: 12px; color: var(--ink-0); }

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

/* ---------- 8. 头部：品牌轨道 ---------- */
.site-header { position: relative; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 18px 8px 20px;
  background: var(--ink-1);
  border-right: var(--line) solid var(--rock);
}

.rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  background: var(--flag-v);
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--bone);
}

.rail__brand:hover { color: var(--bone); }

.rail__brand-mark {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 7px;
  background: var(--gold);
  color: var(--ink-0);
  box-shadow: 3px 3px 0 var(--rock);
}

.rail__brand-text {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .34em;
  line-height: 1;
  color: var(--bone);
}

.rail__device {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rail__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(244, 239, 228, .5);
}

.device-switch {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
  background: var(--ink-0);
  border: 2px solid var(--rock);
}

.device-switch__btn {
  border: 2px solid transparent;
  background: transparent;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  padding: 7px 2px;
  opacity: .6;
  transition: opacity .18s ease, background-color .18s ease, color .18s ease;
}

.device-switch__btn:hover { opacity: 1; }

.device-switch__btn.is-active {
  opacity: 1;
  background: var(--gold);
  color: var(--ink-0);
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
}

.device-hint {
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: rgba(244, 239, 228, .58);
  text-align: center;
  overflow-wrap: anywhere;
}

.rail__account { position: relative; width: 100%; }

.account-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  background: transparent;
  border: 2px solid var(--rock);
  color: var(--bone);
  font-size: 10px;
  letter-spacing: .06em;
  transition: border-color .18s ease, color .18s ease;
}

.account-pill:hover { border-color: var(--gold); color: var(--gold); }

.account-pill__dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--flag-green);
  box-shadow: 0 0 0 2px rgba(46, 143, 95, .25);
}

.account-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  z-index: 70;
  width: 216px;
  padding: 14px;
  background: var(--ink-2);
  border: 2px solid var(--rock);
  box-shadow: var(--shadow);
}

.account-panel__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.7;
}

.account-panel__row + .account-panel__row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(244, 239, 228, .18);
}

.account-panel__k { color: rgba(244, 239, 228, .5); font-size: 11px; }
.account-panel__v { color: var(--bone); font-weight: 600; }

.rail__cta {
  margin-top: auto;
  writing-mode: vertical-rl;
  padding: 16px 8px;
  background: var(--gold);
  color: var(--ink-0);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2em;
  text-decoration: none;
  border: var(--line) solid var(--rock);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .5);
  transition: transform .18s ease, box-shadow .18s ease;
}

.rail__cta:hover {
  color: var(--ink-0);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .55);
}

.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: rgba(244, 239, 228, .08);
  overflow: hidden;
}

.rail__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--flag-v);
  transform: scaleY(0);
  transform-origin: top center;
}

/* ---------- 9. 头部：顶部边框导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  min-height: 62px;
  background: var(--ink-1);
  border-bottom: var(--line) solid var(--rock);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .34);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: var(--ink-0);
  border: none;
  border-right: 2px solid var(--rock);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
}

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 12px;
  flex: none;
}

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

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }

.nav-toggle__text::after { content: "菜单"; }
.nav-toggle[aria-expanded="true"] .nav-toggle__text::after { content: "关闭"; }

.site-nav { display: block; }

.site-nav__list {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.site-nav__list a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 clamp(12px, 1.6vw, 22px);
  color: var(--bone);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  border-right: 2px solid var(--rock);
  transition: color .18s ease, background-color .18s ease;
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s ease;
}

.site-nav__list a:hover {
  color: var(--gold);
  background: var(--ink-0);
}

.site-nav__list a:hover::after { transform: scaleX(1); }

.site-nav__list a[aria-current="page"] {
  color: var(--gold);
  font-weight: 800;
  background: var(--ink-0);
}

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

.topbar__stamp {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 0 clamp(14px, 2vw, 26px);
  font-size: 12px;
  letter-spacing: .16em;
  color: rgba(244, 239, 228, .52);
  border-left: 2px solid var(--rock);
  white-space: nowrap;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(52px, 9vw, 120px);
  background: var(--ink-1);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--flag-h);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 58px) var(--gutter) clamp(24px, 3.5vw, 40px);
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--gold);
  line-height: 1.6;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--rock);
}

.footer__list li + li { margin-top: 10px; }

.footer__list a,
.footer__list span {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(244, 239, 228, .82);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer__list a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer__list--plain span {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 18px var(--gutter);
  background: var(--ink-0);
  border-top: 2px solid var(--rock);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .22em;
  color: var(--bone);
}

.footer__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(244, 239, 228, .5);
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  padding: 10px 14px;
  background: var(--gold);
  color: var(--ink-0);
  border: var(--line) solid var(--rock);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .5);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  transition: transform .18s ease, box-shadow .18s ease;
}

.to-top:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .55);
}

/* ---------- 11. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .24s ease, transform .24s ease;
}

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

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1023.98px) {
  body { padding-left: 0; }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 70;
  }

  .rail {
    position: static;
    width: 100%;
    bottom: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-right: none;
    border-bottom: var(--line) solid var(--rock);
  }

  .rail::before {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 5px;
    background: var(--flag-h);
  }

  .rail__brand {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .rail__brand-mark { font-size: 12px; padding: 2px 6px; }

  .rail__brand-text {
    writing-mode: horizontal-tb;
    font-size: 16px;
    letter-spacing: .2em;
  }

  .rail__device,
  .rail__account,
  .rail__progress { display: none; }

  .rail__cta {
    margin-top: 0;
    writing-mode: horizontal-tb;
    padding: 8px 14px;
    font-size: 13px;
    letter-spacing: .08em;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
  }

  .topbar {
    position: static;
    min-height: 54px;
    box-shadow: none;
  }

  .nav-toggle { display: flex; }

  .topbar__stamp {
    font-size: 11px;
    letter-spacing: .12em;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    width: min(340px, 86vw);
    padding: 112px 0 24px;
    background: var(--ink-1);
    border-left: var(--line) solid var(--rock);
    box-shadow: -10px 0 0 rgba(0, 0, 0, .4);
    overflow-y: auto;
    transform: translateX(102%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  }

  .site-nav[data-open="true"] { transform: translateX(0); }

  .site-nav__list {
    flex-direction: column;
    height: auto;
  }

  .site-nav__list a {
    height: auto;
    padding: 16px 22px;
    font-size: 17px;
    border-right: none;
    border-bottom: 2px solid var(--rock);
  }

  .site-nav__list a::after { height: 3px; }

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

@media (max-width: 700px) {
  .grid--2,
  .grid--3,
  .grid--asym { grid-template-columns: 1fr; }

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

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

@media (min-width: 701px) and (max-width: 1023.98px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 13. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

  .rail__progress span { transform: scaleY(0); }
}
