/* ============================================================
   PG电子游 — /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 基础组件
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg, video { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

/* ---------- 变量 ---------- */
:root {
  --ink: #0B0910;
  --ink-2: #14101C;
  --ink-3: #1F1830;
  --violet: #7A3BFF;
  --cyan: #00E5FF;
  --gold: #FFB020;
  --mint: #35E0B0;
  --fg: #F4F1FF;
  --fg-2: #A79FC0;
  --line: #2E2740;
  --grad: linear-gradient(135deg, #7A3BFF, #00E5FF);

  --font-display: "Archivo Black", "Source Han Sans Heavy", "Noto Sans SC",
                  "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Inter", "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
               "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
               Menlo, Consolas, monospace;

  --fs-1: 56px;
  --fs-2: 40px;
  --fs-3: 28px;
  --fs-4: 20px;
  --fs-5: 17px;
  --fs-6: 14px;

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --r-pill: 999px;

  --shell: 1320px;
  --gutter: 32px;
  --header-h: 116px;
}

/* ---------- 中文排版与通用文本 ---------- */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 120px 0; }
.section--tight { padding: 72px 0; }

.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--grad); flex: 0 0 auto;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-3);
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--fg);
}
.lede {
  max-width: 34em;
  color: var(--fg-2);
  font-size: var(--fs-5);
  line-height: 1.8;
}
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.divider { height: 1px; background: var(--line); border: 0; }
.band { background: var(--ink-2); }
.band--indigo { background: var(--ink-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 展签标签 */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(122, 59, 255, .14);
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: .04em;
  white-space: nowrap;
}
.tag--cyan { background: rgba(0, 229, 255, .12); color: var(--cyan); }
.tag--gold { background: rgba(255, 176, 32, .14); color: var(--gold); }
.tag--mint { background: rgba(53, 224, 176, .14); color: var(--mint); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--ink-3);
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  position: relative;
  transition: background .25s ease, box-shadow .25s ease, transform .2s ease,
              border-color .25s ease, color .25s ease;
}
.btn::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 9px;
  height: 1px; background: var(--grad);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.btn:hover { transform: translateY(-2px); border-color: rgba(122, 59, 255, .6); }
.btn:hover::after { transform: scaleX(1); }
.btn--primary {
  background: var(--violet);
  border-color: transparent;
  color: var(--fg);
  box-shadow: 0 0 0 1px rgba(122, 59, 255, .5), 0 0 28px rgba(122, 59, 255, .34);
}
.btn--primary:hover { background: #8A52FF; box-shadow: 0 0 0 1px rgba(122,59,255,.7), 0 0 36px rgba(122,59,255,.5); }
.btn--ghost { background: transparent; color: var(--cyan); border-color: rgba(0, 229, 255, .38); }
.btn--ghost:hover { background: rgba(0, 229, 255, .08); border-color: var(--cyan); }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: .06em;
  color: var(--fg-2);
  padding: 22px 0 0;
}
.crumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.crumbs__item + .crumbs__item::before { content: "/"; color: var(--line); }
.crumbs__item a { color: var(--fg-2); transition: color .2s ease; }
.crumbs__item a:hover { color: var(--cyan); }
.crumbs__item[aria-current="page"] { color: var(--fg); }

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 74% 18%, rgba(122, 59, 255, .38), transparent 58%),
    radial-gradient(circle at 12% 88%, rgba(0, 229, 255, .22), transparent 62%),
    linear-gradient(160deg, #1F1830, #0B0910);
  isolation: isolate;
}
.media-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(122, 59, 255, .18);
  border-radius: inherit;
}
.media-frame img,
.media-frame picture,
.media-frame picture img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--band { aspect-ratio: 21 / 9; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame__label {
  position: absolute; left: 18px; bottom: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: rgba(11, 9, 16, .72);
  border: 1px solid rgba(0, 229, 255, .3);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .08em;
  color: var(--cyan);
  backdrop-filter: blur(6px);
}

/* ---------- 显现协议 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s ease, transform .42s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }

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

/* ============================================================
   头部
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 9, 16, .9);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--violet);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(122, 59, 255, .5);
  transition: top .22s ease;
}
.skip-link:focus { top: 12px; }

/* 上层：品牌条 */
.header-bar { position: relative; }
.header-bar__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: padding .3s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}
.brand__mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--grad);
  color: #0B0910;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 0 18px rgba(122, 59, 255, .45);
}
.brand__text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--fg);
}

.brand-note {
  max-width: 380px;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 13.5px;
  letter-spacing: .04em;
  transition: max-width .32s ease, opacity .25s ease, padding .32s ease;
}

.header-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}
.header-meta__section {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--fg);
}
.header-meta__refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--fg-2);
}
.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(255, 176, 32, .8);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--ink-3);
  cursor: pointer;
  place-items: center;
  transition: border-color .2s ease, background .2s ease;
}
.nav-toggle:hover { border-color: rgba(122, 59, 255, .65); }
.nav-toggle__bar {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform .25s ease;
}
.nav-toggle__bar + .nav-toggle__bar { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* 下层：栏目胶囊轨 */
.nav-rail {
  border-top: 1px solid var(--line);
  background: rgba(20, 16, 28, .74);
}
.nav-rail__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-2);
  font-size: 14px;
  letter-spacing: .02em;
  white-space: nowrap;
  position: relative;
  transition: color .2s ease, background .25s ease, box-shadow .25s ease,
              border-color .25s ease;
}
.pill__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--cyan);
  opacity: .85;
}
.pill:hover {
  color: var(--fg);
  background: rgba(122, 59, 255, .15);
  border-color: rgba(122, 59, 255, .35);
}
.pill[aria-current="page"] {
  background: var(--violet);
  border-color: rgba(122, 59, 255, .9);
  color: var(--fg);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(122, 59, 255, .55), 0 0 24px rgba(122, 59, 255, .42);
}
.pill[aria-current="page"] .pill__idx { color: rgba(244, 241, 255, .78); opacity: 1; }

/* 滚动进度 */
.header-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px; width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 229, 255, .55);
  transition: width .12s linear;
  z-index: 5;
}

/* 紧凑态 */
.site-header.is-compact .header-bar__inner { padding-top: 8px; padding-bottom: 8px; }
.site-header.is-compact .brand-note {
  max-width: 0;
  padding-left: 0;
  border-left-color: transparent;
  opacity: 0;
}
.site-header.is-compact .nav-pills { padding: 7px 0; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: 140px;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: .55;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 56px;
  padding: 88px 0 64px;
}
.footer-col { min-width: 0; }
.footer-col--brand { display: flex; flex-direction: column; gap: 20px; }

.footer-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--fg-2);
  margin-bottom: 22px;
}
.footer-heading::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, .7);
  flex: 0 0 auto;
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a {
  position: relative;
  display: inline-block;
  color: var(--fg-2);
  font-size: 15px;
  transition: color .22s ease, transform .22s ease;
}
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.footer-links a:hover { color: var(--fg); }
.footer-links a:hover::after { transform: scaleX(1); }

.footer-contact { display: flex; flex-direction: column; gap: 14px; }
.footer-contact li { display: flex; flex-direction: column; gap: 4px; }
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--fg-2);
}
.footer-contact__val {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  word-break: break-word;
}

.footer-note {
  max-width: 32em;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.8;
}
.footer-note--small { font-size: 12.5px; line-height: 1.75; margin-top: 20px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-base__copy {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--fg-2);
}
.footer-base__links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-base__links a {
  font-size: 13px;
  color: var(--fg-2);
  transition: color .2s ease;
}
.footer-base__links a:hover { color: var(--cyan); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1120px) {
  :root { --gutter: 28px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; }
  .footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root {
    --fs-1: 32px;
    --fs-2: 28px;
    --fs-3: 24px;
    --fs-4: 18px;
    --gutter: 22px;
  }
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .section--tight { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }

  .brand-note { display: none; }
  .header-meta { display: none; }
  .nav-toggle { display: grid; }

  .nav-rail__inner {
    max-height: 0;
    overflow: hidden;
    transition: max-height .34s ease;
  }
  .nav-rail[data-open] .nav-rail__inner {
    max-height: 72vh;
    overflow-y: auto;
    padding-bottom: 12px;
  }
  .nav-pills {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 0 4px;
  }
  .pill {
    justify-content: flex-start;
    padding: 13px 18px;
    border-radius: var(--r-sm);
    font-size: 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 64px 0 48px;
  }
  .footer-base { padding: 22px 0 34px; }
}

@media (max-width: 560px) {
  :root { --fs-1: 30px; --fs-2: 26px; --fs-3: 22px; }
  .footer-base { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-base__links { gap: 18px; }
  .btn { padding: 12px 22px; font-size: 14px; }
}

/* ---------- 无障碍降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .pulse-dot { animation: none; opacity: 1; }
  .header-progress { transition: none; }
}
