/* ============================================================
   888棋牌电玩 · 共享外壳样式 /assets/site.css
   深墨绿棋盘底 + 电光青描边 + 纸张叠层
   ============================================================ */

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --ink: #08201C;
  --ink-soft: #0E2E28;
  --cyan: #35E8C6;
  --teal: #1A9E8C;
  --amber: #E9B44C;
  --violet: #9A6BFF;
  --paper: #F4F8F6;
  --mist: #93AEA8;
  --black: #04120F;
  --edge: #D8CFBA;

  --line: rgba(216, 207, 186, .18);
  --line-soft: rgba(147, 174, 168, .24);

  --font-display: "HarmonyOS Sans SC", "Alibaba PuHuiTi 3.0", "Noto Sans SC", sans-serif;
  --font-editorial: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Roboto Mono", monospace;

  --shell-x: 24px;
  --shell-max: 1220px;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow-island: 0 18px 44px rgba(4, 18, 15, .55);
}

/* ---------- 3. 基底与中文排版 ---------- */
body {
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(244, 248, 246, .030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 248, 246, .030) 1px, transparent 1px),
    radial-gradient(90% 60% at 8% -8%, rgba(53, 232, 198, .12), transparent 58%),
    radial-gradient(80% 55% at 102% 4%, rgba(154, 107, 255, .12), transparent 60%);
  background-size: 24px 24px, 24px 24px, auto, auto;
  background-attachment: fixed, fixed, scroll, scroll;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; letter-spacing: .005em; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(53, 232, 198, .28); color: #FFFFFF; }

:target { scroll-margin-top: 128px; }

/* ---------- 4. 布局容器与通用构件 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-x);
}

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

.chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 16px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.chapter-head__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--amber);
  padding: 3px 9px;
  border: 1px solid rgba(233, 180, 76, .45);
  border-radius: 4px;
  transform: skewX(-8deg);
}
.chapter-head__title {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: 28px;
  color: var(--paper);
}
.chapter-head__desc {
  flex: 1 1 260px;
  min-width: 0;
  font-size: 13.5px;
  color: var(--mist);
  line-height: 1.7;
}

/* 纸张叠层卡片 */
.paper-card {
  position: relative;
  background: var(--ink-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  padding: 24px;
  box-shadow: var(--shadow-island);
}
.paper-card::after {
  content: "";
  position: absolute;
  top: -7px;
  right: -7px;
  bottom: 7px;
  left: 7px;
  border-top: 1px solid var(--edge);
  border-right: 1px solid var(--edge);
  border-radius: var(--radius-m);
  opacity: .32;
  pointer-events: none;
}

/* 标签贴纸 */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  padding: 3px 9px;
  border-radius: 3px;
  transform: skewX(-10deg);
  color: var(--amber);
  background: rgba(233, 180, 76, .14);
  border: 1px solid rgba(233, 180, 76, .42);
}
.tag--cyan { color: var(--cyan); background: rgba(53, 232, 198, .12); border-color: rgba(53, 232, 198, .44); }
.tag--violet { color: #C6AEFF; background: rgba(154, 107, 255, .16); border-color: rgba(154, 107, 255, .46); }

/* 横向主题带 */
.band {
  position: relative;
  display: block;
  padding: 26px 28px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-soft);
  background: linear-gradient(118deg, rgba(26, 158, 140, .20), rgba(154, 107, 255, .12) 58%, rgba(8, 32, 28, 0));
  overflow: hidden;
}
.band__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--paper);
}
.band__text { margin-top: 8px; font-size: 14px; color: #C4D8D3; max-width: 62ch; }

/* 错位网格 */
.grid-stagger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.grid-stagger--split { grid-template-columns: 7fr 5fr; }
@media (max-width: 820px) { .grid-stagger--split { grid-template-columns: 1fr; } }

/* 对照表 */
.ledger { font-size: 14px; }
.ledger caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-editorial);
  font-size: 16px;
  color: var(--mist);
  padding-bottom: 10px;
}
.ledger th, .ledger td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.ledger thead th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--teal);
  background: rgba(14, 46, 40, .72);
  white-space: nowrap;
}
.ledger tbody tr { transition: background-color .18s ease; }
.ledger tbody tr:hover { background: rgba(53, 232, 198, .07); }
.ledger td[data-num] { font-family: var(--font-mono); color: var(--cyan); }

/* 步骤卡 */
.step-card {
  position: relative;
  padding: 22px 22px 22px 26px;
  border-left: 2px solid rgba(53, 232, 198, .5);
  background: rgba(14, 46, 40, .55);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
}
.step-card__num { font-family: var(--font-mono); font-size: 34px; line-height: 1; color: var(--cyan); opacity: .88; }
.step-card__title { margin-top: 8px; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.step-card__text { margin-top: 6px; font-size: 14px; color: #C4D8D3; }

/* 问答折页 */
.fold {
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  background: rgba(14, 46, 40, .5);
  overflow: hidden;
}
.fold__q {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--paper);
}
.fold__q::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--cyan);
  transition: transform .2s ease;
}
.fold[open] .fold__q::after { transform: rotate(45deg); }
.fold__a { padding: 0 18px 18px; font-size: 14.5px; line-height: 1.8; color: #C3D8D3; }

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-m);
  border: 1px solid var(--line-soft);
  background: linear-gradient(140deg, rgba(26, 158, 140, .24), rgba(4, 18, 15, .92));
}
.media-frame > img { width: 100%; height: 100%; object-fit: cover; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame__cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper);
  background: rgba(4, 18, 15, .74);
  padding: 4px 8px;
  border-radius: 4px;
}

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--mist); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "／"; color: var(--teal); }
.breadcrumb a { color: #BFD6D0; transition: color .18s ease; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* 长文排版 */
.prose { max-width: 72ch; font-size: 16px; line-height: 1.85; color: #D7E6E2; }
.prose p + p { margin-top: 14px; }
.prose h2 { font-family: var(--font-editorial); font-size: 24px; margin: 32px 0 12px; color: var(--paper); }
.prose h3 { font-size: 18px; margin: 24px 0 10px; color: var(--cyan); }
.prose ul { margin: 14px 0; }
.prose li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
}
.prose a { color: #CFC0FF; border-bottom: 1px solid rgba(154, 107, 255, .6); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: transform .18s ease, background-color .2s ease, color .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.btn--solid { background: var(--cyan); color: #04211C; box-shadow: 0 8px 22px rgba(53, 232, 198, .22); }
.btn--solid:hover { background: #5BF2D6; transform: translateY(-1px); }
.btn--ghost { color: var(--cyan); background: rgba(53, 232, 198, .06); border-color: rgba(53, 232, 198, .5); }
.btn--ghost:hover { background: rgba(53, 232, 198, .14); box-shadow: 0 0 0 1px rgba(53, 232, 198, .5); }
.btn--quiet { color: var(--paper); border-color: var(--line); background: rgba(244, 248, 246, .04); }
.btn--quiet:hover { border-color: rgba(53, 232, 198, .5); color: var(--cyan); }

/* 柔光与显现 */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: .5;
  pointer-events: none;
  animation: glow-drift 20s ease-in-out infinite;
}
@keyframes glow-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -2%, 0) scale(1.07); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 5. 页头 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(8, 32, 28, .97), rgba(8, 32, 28, .91));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.skip-link {
  position: absolute;
  left: var(--shell-x);
  top: -72px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04211C;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

.top-strip { border-bottom: 1px solid rgba(216, 207, 186, .1); background: rgba(4, 18, 15, .55); }
.top-strip__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 6px var(--shell-x);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mist);
}
.top-strip__meta { color: var(--teal); }

.head-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px var(--shell-x);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  padding-right: 22px;
  border-right: 1px solid var(--line);
}
.brand__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--paper);
}
.brand__mark::before { content: "◆"; font-size: .62em; color: var(--cyan); margin-right: 8px; vertical-align: 3px; }
.brand:hover .brand__mark { color: var(--cyan); }
.brand__sub { font-size: 12px; color: var(--mist); white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 248, 246, .04);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--paper);
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 3px; width: 18px; }
.nav-toggle__bars i { display: block; height: 2px; width: 100%; background: var(--cyan); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle__bars i:nth-child(2) { width: 70%; }
.site-head[data-open] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-head[data-open] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.site-head[data-open] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }

.rail { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rail__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--teal);
  text-transform: uppercase;
}
.rail__list { display: flex; align-items: center; gap: 18px; }
.rail__list a {
  position: relative;
  display: inline-block;
  padding: 4px 2px;
  font-size: 14.5px;
  color: #CFE3DE;
  transition: color .18s ease;
}
.rail__list a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 1px;
  background: var(--violet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.rail__list a:hover { color: var(--paper); }
.rail__list a:hover::after { transform: scaleX(1); }
.rail__list a[aria-current="page"] { color: var(--cyan); font-weight: 600; }
.rail__list a[aria-current="page"]::after { background: var(--cyan); transform: scaleX(1); }

.rail--util { margin-left: 6px; padding-left: 22px; border-left: 1px solid var(--line); }
.head-cta { display: flex; align-items: center; gap: 10px; }

.head-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--amber));
  opacity: .9;
}

/* ---------- 6. 页脚 ---------- */
.site-foot {
  margin-top: 40px;
  padding: 56px 0 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4, 18, 15, .34), rgba(4, 18, 15, .94));
}
.foot-stack {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr .9fr;
  gap: 28px;
}
.foot-brand__mark { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--paper); }
.foot-brand__line { margin-top: 10px; font-family: var(--font-editorial); font-size: 14.5px; line-height: 1.7; color: #C9DDD8; }
.foot-brand__note { margin-top: 10px; max-width: 34ch; font-size: 13px; line-height: 1.75; color: var(--mist); }

.foot-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--teal);
  text-transform: uppercase;
}
.foot-col__list { display: flex; flex-direction: column; gap: 9px; }
.foot-col__list a {
  font-size: 14px;
  color: #BFD6D0;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.foot-col__list a:hover { color: var(--cyan); border-bottom-color: rgba(53, 232, 198, .5); }

.foot-contact {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
  padding-top: 26px;
  border-top: 1px dashed var(--line-soft);
}
.foot-contact__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--ink-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
}
.foot-contact__k {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--teal);
}
.foot-contact__v {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper);
  word-break: break-all;
}
.copy-btn {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--cyan);
  border: 1px solid rgba(53, 232, 198, .45);
  border-radius: 999px;
  transition: background-color .18s ease, color .18s ease;
}
.copy-btn:hover { background: rgba(53, 232, 198, .14); }
.copy-btn[data-copied] { background: var(--cyan); color: #04211C; }

.foot-base {
  margin-top: 34px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.foot-legal { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; color: var(--paper); }
.foot-meta { font-size: 12.5px; color: var(--mist); }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  padding: 10px 15px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: #04211C;
  background: var(--cyan);
  box-shadow: 0 10px 26px rgba(4, 18, 15, .6), 0 0 0 1px rgba(53, 232, 198, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }

/* ---------- 7. 响应式 ---------- */
@media (max-width: 1140px) {
  .head-inner { gap: 18px; }
  .rail__list { gap: 12px; }
  .rail__list a { font-size: 13.5px; }
  .brand__sub { display: none; }
  .rail--util { padding-left: 16px; }
}

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .brand { border-right: 0; padding-right: 0; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 18px;
    margin: 0;
    padding: 22px var(--shell-x) 28px;
    background: rgba(8, 32, 28, .985);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-island);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .site-head[data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .rail__list { flex-wrap: wrap; gap: 14px; }
  .rail--util {
    grid-column: 1 / -1;
    margin-left: 0;
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .head-cta { flex-wrap: wrap; }

  .foot-stack { grid-template-columns: 1fr 1fr; }
  .foot-contact { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --shell-x: 16px; }
  .brand__mark { font-size: 19px; }
  .rail__label { font-size: 9.5px; }
  .site-nav { grid-template-columns: 1fr; }
  .head-cta { width: 100%; }
  .head-cta .btn { flex: 1 1 auto; }
  .chapter-head__title { font-size: 22px; }
  .band { padding: 20px; }
  .foot-stack { grid-template-columns: 1fr; }
  .to-top { right: 14px; bottom: 14px; }
}

/* ---------- 8. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .glow { animation: none; }
}
