/* =========================================================
   万能棋牌 · 共享层  /assets/site.css
   霓虹夜幕 · 档案室视觉系统
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 160px;
}

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

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩体系 */
  --ink-950: #02040c;   /* 墨玉黑 */
  --ink-900: #050b1e;   /* 夜幕深蓝 */
  --ink-800: #0b1a3c;   /* 深海蓝 */
  --neon: #35f2a0;      /* 霓虹绿 */
  --cyan: #29c8ff;      /* 电光青 */
  --gold: #ffc857;      /* 暖金 */
  --magenta: #ff3ea5;   /* 品红 */
  --paper: #f2f5ff;     /* 雾白 */
  --muted: #8e9bbd;     /* 灰蓝 */

  /* 线 */
  --line: rgba(142, 155, 189, .22);
  --line-strong: rgba(142, 155, 189, .45);

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

  /* 尺度 */
  --wrap: 1240px;
  --pad: 28px;
  --radius: 0px;
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(920px 540px at 78% -6%, rgba(53, 242, 160, .16), transparent 62%),
    radial-gradient(780px 520px at 6% 2%, rgba(41, 200, 255, .13), transparent 60%),
    radial-gradient(720px 640px at 98% 86%, rgba(255, 62, 165, .11), transparent 66%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  left: 50%;
  top: -80px;
  z-index: 200;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: var(--neon);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  transition: top .2s ease;
}

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

/* ---------- 5. Header：居中刊头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(5, 11, 30, .9);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(420px, 55%);
  height: 1px;
  background: linear-gradient(90deg, var(--neon), rgba(53, 242, 160, 0));
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--cyan) 48%, var(--magenta));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.scroll-progress[data-visible] { opacity: 1; }

.header-grid {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--pad) 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* 报头 */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.masthead__line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .26em;
  color: var(--cyan);
  text-transform: uppercase;
}

.masthead__brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}

.masthead__link {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: .16em;
  color: var(--paper);
  text-shadow: 0 0 28px rgba(53, 242, 160, .28);
  transition: color .24s ease, text-shadow .24s ease;
}

.masthead__link:hover {
  color: var(--neon);
  text-shadow: 0 0 34px rgba(53, 242, 160, .6);
}

.masthead__brand-en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--muted);
}

.masthead__tagline {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--muted);
}

/* 刊头导航 */
.site-nav {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 28px;
  padding-bottom: 6px;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 14px 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .16em;
  color: rgba(242, 245, 255, .78);
  transition: color .22s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .26s cubic-bezier(.2, .7, .3, 1);
}

.site-nav__link:hover { color: var(--paper); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] {
  color: var(--neon);
}
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__cta {
  padding: 9px 20px;
  font-size: 12px;
  letter-spacing: .14em;
}

/* 刻度尺 */
.header-ruler {
  max-width: var(--wrap);
  margin: 0 auto;
  height: 9px;
  background-image: repeating-linear-gradient(90deg, rgba(142, 155, 189, .55) 0 1px, transparent 1px 14px);
  background-size: 100% 6px;
  background-repeat: repeat-x;
  background-position: top left;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: .85;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(11, 26, 60, .65);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .2em;
  transition: border-color .22s ease, color .22s ease;
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--neon);
  transition: transform .22s ease, opacity .22s ease;
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

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

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.2;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .3s ease, transform .22s ease;
}

.btn--neon {
  background: linear-gradient(96deg, var(--neon), #17d6c4);
  color: var(--ink-950);
  box-shadow: 0 0 0 1px rgba(53, 242, 160, .45), 0 16px 34px -22px rgba(53, 242, 160, .95);
}

.btn--neon:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(53, 242, 160, .95), 0 22px 46px -22px rgba(53, 242, 160, 1);
}

.btn--ghost {
  background: rgba(11, 26, 60, .5);
  color: var(--paper);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 28px -10px rgba(41, 200, 255, .8);
}

.btn--gold {
  background: rgba(255, 200, 87, .1);
  color: var(--gold);
  border-color: rgba(255, 200, 87, .5);
}

.btn--gold:hover {
  background: var(--gold);
  color: var(--ink-950);
  box-shadow: 0 0 30px -8px rgba(255, 200, 87, .9);
}

/* ---------- 7. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }
.span-12 { grid-column: span 12; }

.section { padding: 80px 0; }
.section--tight { padding: 48px 0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--paper);
}

.lede {
  max-width: 58ch;
  font-size: 17.5px;
  line-height: 1.85;
  color: rgba(242, 245, 255, .78);
}

.rule {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: linear-gradient(90deg, var(--line-strong), rgba(142, 155, 189, 0));
}

/* ---------- 8. 文本零件 ---------- */
.index-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.index-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--neon);
}

.num {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(41, 200, 255, .4);
  background: rgba(41, 200, 255, .07);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--cyan);
  white-space: nowrap;
}

.tag--neon {
  border-color: rgba(53, 242, 160, .45);
  background: rgba(53, 242, 160, .08);
  color: var(--neon);
}

.tag--magenta {
  border-color: rgba(255, 62, 165, .45);
  background: rgba(255, 62, 165, .08);
  color: var(--magenta);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--muted);
}

.breadcrumbs a:hover { color: var(--cyan); }

.breadcrumbs__sep { color: rgba(142, 155, 189, .5); }

/* ---------- 9. 面板 / 资料卡 ---------- */
.panel {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(158deg, rgba(11, 26, 60, .9), rgba(5, 11, 30, .88));
}

.panel--neon {
  border-color: rgba(53, 242, 160, .35);
  box-shadow: 0 0 0 1px rgba(53, 242, 160, .06), 0 34px 80px -60px rgba(53, 242, 160, 1);
}

.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(11, 26, 60, .74), rgba(5, 11, 30, .92));
  transition: transform .28s ease, border-color .28s ease, box-shadow .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 242, 160, .5);
  box-shadow: 0 30px 64px -46px rgba(53, 242, 160, 1);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .06em;
  color: var(--paper);
}

.card__meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- 10. 图片容器（页面阶段放置 <img>） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  background-image:
    radial-gradient(120% 90% at 18% 12%, rgba(41, 200, 255, .22), transparent 58%),
    radial-gradient(120% 120% at 86% 88%, rgba(255, 62, 165, .2), transparent 60%),
    linear-gradient(150deg, var(--ink-800), var(--ink-950));
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.media-frame::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 16px;
  height: 16px;
  border-top: 1px solid var(--neon);
  border-left: 1px solid var(--neon);
  pointer-events: none;
}

.media-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  width: 16px;
  height: 16px;
  border-bottom: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
  pointer-events: none;
}

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

.media-frame__caption {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- 11. 滚动显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

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

/* ---------- 12. 章节高亮（页面目录） ---------- */
[data-spy-link] {
  color: var(--muted);
  transition: color .22s ease;
}

[data-spy-link]:hover { color: var(--paper); }

[data-spy-link][aria-current] {
  color: var(--neon);
}

/* ---------- 13. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 104px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(760px 340px at 8% 0%, rgba(41, 200, 255, .1), transparent 62%),
    linear-gradient(180deg, rgba(11, 26, 60, .6), rgba(2, 4, 12, .95) 62%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(460px, 62%);
  height: 1px;
  background: linear-gradient(90deg, var(--neon), var(--cyan) 55%, rgba(41, 200, 255, 0));
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 64px var(--pad) 40px;
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 56px;
}

.footer-brand__line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .26em;
  color: var(--cyan);
  text-transform: uppercase;
}

.footer-brand__name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: .14em;
  color: var(--paper);
}

.footer-brand__tagline {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--muted);
}

.footer-brand__cta { margin-top: 24px; }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-col__title {
  position: relative;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--paper);
}

.footer-col__title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 26px;
  height: 1px;
  background: var(--gold);
}

.footer-col__list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__list a {
  display: inline-block;
  font-size: 14px;
  color: rgba(242, 245, 255, .74);
  transition: color .2s ease, padding-left .2s ease;
}

.footer-col__list a:hover {
  color: var(--neon);
  padding-left: 6px;
}

.footer-contact {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact__item dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}

.footer-contact__item dd {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(242, 245, 255, .82);
  word-break: break-word;
}

.footer-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--pad) 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

.footer-bottom__icp { color: rgba(242, 245, 255, .6); }

/* ---------- 14. 平板 ---------- */
@media (max-width: 1080px) {
  :root { --pad: 22px; }

  .span-3, .span-4 { grid-column: span 6; }
  .span-5, .span-7 { grid-column: span 12; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
  }
}

/* ---------- 15. 移动 ---------- */
@media (max-width: 920px) {
  html { scroll-padding-top: 110px; }

  body {
    font-size: 16.5px;
    background-attachment: scroll;
  }

  .header-grid {
    align-items: stretch;
    padding: 14px var(--pad) 10px;
    gap: 0;
  }

  .masthead {
    align-items: flex-start;
    text-align: left;
    padding-right: 76px;
  }

  .masthead__line { font-size: 10px; letter-spacing: .2em; }

  .masthead__brand { justify-content: flex-start; gap: 10px; }

  .masthead__link { font-size: 24px; letter-spacing: .1em; }

  .masthead__brand-en { display: none; }

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

  .nav-toggle {
    display: inline-flex;
    position: absolute;
    top: 16px;
    right: var(--pad);
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 14px;
    padding: 6px 0 16px;
    border-top: 1px solid var(--line);
  }

  .site-nav[data-open] { display: flex; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__item { border-bottom: 1px solid rgba(142, 155, 189, .14); }

  .site-nav__link {
    display: block;
    padding: 14px 2px 16px;
    font-size: 14px;
    letter-spacing: .14em;
  }

  .site-nav__link::after {
    left: 2px;
    right: auto;
    width: 24px;
    bottom: 10px;
  }

  .site-nav__cta {
    margin-top: 16px;
    width: 100%;
    padding: 13px 20px;
  }

  .header-ruler { display: none; }

  .section { padding: 56px 0; }
  .section--tight { padding: 36px 0; }

  .grid-12 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .grid-12 > [class*="span-"] { grid-column: 1 / -1; }

  .panel { padding: 22px; }
  .card { padding: 20px; }

  .footer-nav { grid-template-columns: 1fr; gap: 28px; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-footer { margin-top: 72px; }
}

@media (max-width: 480px) {
  .masthead__link { font-size: 22px; }
  .btn { padding: 11px 18px; font-size: 12.5px; }
}

/* ---------- 16. reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .card:hover { transform: none; }
  .btn:hover { transform: none; }
}
