/* ============================================================
   365电玩城 · 共享外壳样式 /assets/site.css
   深幕底 + 霓虹光路 + 竖轨分屏
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

ul, ol { list-style: none; }

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

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

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

/* ---------- 变量 ---------- */
:root {
  --bg: #0B0718;
  --bg-panel: #150D2B;
  --bg-deep: #070411;

  --neon: #A45CFF;
  --cyan: #2FE0FF;
  --red: #FF3B58;
  --gold: #FFC44D;
  --mint: #35F0C0;

  --ink: #F4F0FF;
  --ink-2: #B9AEDE;
  --line: #3A2E5E;

  --rail-w: 118px;
  --rail-h-sm: 60px;
  --pad: clamp(20px, 4.4vw, 56px);
  --maxw: 1280px;
  --gap: clamp(18px, 2.6vw, 34px);

  --font-body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

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

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(760px 540px at 82% -10%, rgba(164, 92, 255, .22), transparent 62%),
    radial-gradient(640px 480px at 4% 6%, rgba(47, 224, 255, .12), transparent 60%),
    radial-gradient(1000px 720px at 52% 118%, rgba(255, 59, 88, .10), transparent 66%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

/* CRT 扫描线叠层 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(164, 92, 255, .05) 0 1px,
    rgba(0, 0, 0, 0) 1px 4px
  );
  animation: scan-drift 7s linear infinite;
}

@keyframes scan-drift {
  from { transform: translateY(0); }
  to { transform: translateY(4px); }
}

@media (min-width: 1000px) {
  body { padding-left: var(--rail-w); }
}

@media (max-width: 999px) {
  body { padding-top: var(--rail-h-sm); }
}

/* ---------- 焦点与可访问 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 10px;
  top: -120px;
  z-index: 300;
  padding: 10px 20px;
  background: var(--neon);
  color: #10041f;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  border-radius: 2px;
  box-shadow: 0 0 24px rgba(164, 92, 255, .7);
  transition: top .18s var(--ease);
}

.skip-link:focus { top: 10px; }

/* ============================================================
   头部 · 竖轨导航
   ============================================================ */
.site-header { position: relative; z-index: 120; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 120;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 12px 18px;
  background: linear-gradient(180deg, #170e30 0%, #100826 52%, #0a0518 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(164, 92, 255, .9) 14%,
    rgba(47, 224, 255, .85) 50%,
    rgba(164, 92, 255, .9) 86%,
    transparent 100%);
  opacity: .45;
}

/* 品牌 */
.rail__brand {
  display: block;
  text-align: center;
  padding-bottom: 4px;
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #10041f;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  clip-path: polygon(0 0, 100% 0, 100% 76%, 76% 100%, 0 100%);
  box-shadow: 0 0 22px rgba(164, 92, 255, .6);
  transition: box-shadow .2s var(--ease);
}

.rail__brand:hover .rail__mark { box-shadow: 0 0 30px rgba(47, 224, 255, .85); }

.rail__name {
  display: inline-block;
  writing-mode: vertical-rl;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3em;
  color: var(--ink);
  text-shadow: 0 0 14px rgba(164, 92, 255, .55);
}

/* 状态徽章 */
.rail__badges {
  display: grid;
  gap: 5px;
}

.badge {
  display: block;
  padding: 4px 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  color: var(--ink-2);
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .88;
}

.badge--red { color: var(--red); }
.badge--gold { color: var(--gold); }

/* 导航 */
.rail__nav { flex: 1 1 auto; }

.rail__list {
  display: grid;
  gap: 1px;
}

.rail__link {
  position: relative;
  display: block;
  padding: 9px 6px 9px 13px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-2);
  border-radius: 2px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 9px;
  transform: translateY(-50%);
  background: var(--line);
  transition: height .22s var(--ease), background-color .22s var(--ease), box-shadow .22s var(--ease);
}

.rail__link:hover,
.rail__link:focus-visible {
  color: var(--ink);
  background: rgba(164, 92, 255, .12);
}

.rail__link:hover::before,
.rail__link:focus-visible::before {
  height: 62%;
  background: var(--cyan);
}

.rail__link[aria-current="page"] {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(164, 92, 255, .34), rgba(164, 92, 255, 0));
}

.rail__link[aria-current="page"]::before {
  height: 100%;
  background: var(--neon);
  box-shadow: 0 0 12px 1px var(--neon);
}

/* 底部动作区 */
.rail__foot {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rail__cta {
  display: block;
  padding: 10px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #06121a;
  background: linear-gradient(135deg, var(--cyan), #7ef0d5);
  border-radius: 2px;
  box-shadow: 0 0 18px rgba(47, 224, 255, .35);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}

.rail__cta:hover,
.rail__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(47, 224, 255, .75);
}

.rail__toggle { display: none; }

.rail__toggle-icon {
  display: block;
  position: relative;
  width: 15px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.rail__toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
}

.rail__toggle[aria-expanded="true"] .rail__toggle-icon {
  border-color: transparent;
  height: 14px;
}

.rail__toggle[aria-expanded="true"] .rail__toggle-icon::after {
  transform: rotate(45deg);
  transform-origin: center;
  margin-top: -1px;
  box-shadow: 0 0 0 0 transparent;
}

.rail__toggle[aria-expanded="true"] .rail__toggle-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  transform: rotate(-45deg);
}

.rail__scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 4, 17, .78);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s var(--ease), visibility .26s var(--ease);
}

.rail__scrim[data-visible] {
  opacity: 1;
  visibility: visible;
}

/* ---------- 移动端：顶栏 + 左侧抽屉 ---------- */
@media (max-width: 999px) {
  .rail {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: var(--rail-h-sm);
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .rail::after { display: none; }

  .rail__brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 0;
    text-align: left;
  }

  .rail__mark {
    width: 34px;
    height: 34px;
    margin: 0;
    font-size: 11px;
  }

  .rail__name {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: .16em;
  }

  .rail__badges { display: none; }

  .rail__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
  }

  .rail__cta {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .rail__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 2px;
    transition: border-color .2s var(--ease), color .2s var(--ease);
  }

  .rail__toggle:hover,
  .rail__toggle:focus-visible {
    border-color: var(--neon);
    color: var(--neon);
  }

  .rail__nav {
    position: fixed;
    top: var(--rail-h-sm);
    left: 0;
    z-index: 110;
    width: min(330px, 86vw);
    height: calc(100dvh - var(--rail-h-sm));
    padding: 26px 20px 40px;
    background: linear-gradient(180deg, #180f33 0%, #0b0718 100%);
    border-right: 1px solid var(--neon);
    box-shadow: 18px 0 48px rgba(7, 4, 17, .8);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-104%);
    transition: transform .28s var(--ease);
  }

  .rail__nav[data-open] { transform: translateX(0); }

  .rail__list { gap: 4px; }

  .rail__link {
    font-size: 15px;
    padding: 13px 12px 13px 17px;
  }

  .rail__link::before { height: 12px; }
}

/* ============================================================
   通用布局与组件
   ============================================================ */
.main { display: block; }

.wrap {
  width: min(var(--maxw), 100% - var(--pad) * 2);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--neon);
}

.section-title {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--ink);
}

.pixel-title {
  font-size: clamp(28px, 4.2vw, 56px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: .04em;
  color: var(--ink);
  text-shadow:
    2px 2px 0 rgba(164, 92, 255, .85),
    4px 4px 0 rgba(47, 224, 255, .3);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--neon), #7b3cff);
  box-shadow: 0 0 22px rgba(164, 92, 255, .42);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(164, 92, 255, .8);
}

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

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(47, 224, 255, .3);
}

.btn--cyan {
  color: #06121a;
  background: var(--cyan);
}

.btn--cyan:hover,
.btn--cyan:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(47, 224, 255, .7);
}

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}

.crumbs a { transition: color .18s var(--ease); }
.crumbs a:hover { color: var(--cyan); }

.crumbs__sep { color: var(--line); }

/* 正文 */
.prose {
  width: min(72ch, 100%);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-2);
}

.prose > * + * { margin-top: 1em; }

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.prose h3 {
  margin-top: 1.5em;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.prose strong { color: var(--ink); }

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .18s var(--ease);
}

.prose a:hover { color: var(--mint); }

.prose ul,
.prose ol {
  padding-left: 1.2em;
  list-style: disc;
}

.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }

.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--gold);
}

/* 图片容器基础规则 */
.frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(164, 92, 255, .18), rgba(47, 224, 255, .08)),
    #120a26;
}

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

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(11, 7, 24, .3) 0 1px,
    rgba(0, 0, 0, 0) 1px 3px
  );
  opacity: .7;
}

.frame--wide { aspect-ratio: 16 / 9; }
.frame--square { aspect-ratio: 1 / 1; }
.frame--tall { aspect-ratio: 3 / 4; }

.frame__cap {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* 滚动进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 260;
  width: var(--sp, 0%);
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--neon) 52%, var(--gold));
  box-shadow: 0 0 12px rgba(164, 92, 255, .9);
  transition: width .1s linear;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 8vw, 120px);
  background: linear-gradient(180deg, rgba(21, 13, 43, .35) 0%, #090414 62%, #070310 100%);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(280px, 42%);
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--cyan), transparent);
}

.footer__inner {
  width: min(var(--maxw), 100% - var(--pad) * 2);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) 0 26px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.35fr .75fr .75fr .75fr;
  gap: clamp(26px, 3.6vw, 56px);
}

.footer__brand { min-width: 0; }

.footer__mark {
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(47, 224, 255, .5);
}

.footer__mark-sub {
  margin-left: 10px;
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--ink);
  text-shadow: none;
}

.footer__tagline {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.footer__contact {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.footer__contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.footer__contact-key {
  flex: none;
  min-width: 62px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--neon);
}

.footer__contact-val {
  color: var(--ink-2);
  word-break: break-all;
}

.footer__copy {
  flex: none;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}

.footer__copy:hover,
.footer__copy:focus-visible {
  border-color: var(--cyan);
  background: rgba(47, 224, 255, .12);
  color: var(--ink);
}

.footer__copy[data-copied] {
  color: var(--mint);
  border-color: var(--mint);
  background: rgba(53, 240, 192, .12);
}

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 15px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--neon);
}

.footer__list { display: grid; gap: 9px; }

.footer__list a {
  position: relative;
  display: inline-block;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color .18s var(--ease);
}

.footer__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width .24s var(--ease);
}

.footer__list a:hover,
.footer__list a:focus-visible { color: var(--ink); }

.footer__list a:hover::after,
.footer__list a:focus-visible::after { width: 100%; }

.footer__note {
  margin-top: clamp(28px, 4vw, 48px);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gold);
  background: rgba(255, 196, 77, .07);
  border-left: 2px solid var(--gold);
  border-radius: 0 2px 2px 0;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 30px;
  margin-top: clamp(26px, 4vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer__legal {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}

@media (max-width: 999px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__brand { grid-column: auto; }
  .footer__bottom { flex-direction: column; }
}

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

  body::after { animation: none; }

  .scroll-progress { transition: none; }
}
