/* ============================================================
   /assets/site.css — 电玩城棋牌 共享外壳
   深夜机房黑底 · 霓虹紫锚点 · 街机轨道导航 · 印刷叠层
   ============================================================ */

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

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

body,
h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

ul, ol { padding: 0; }

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

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

a { color: inherit; }

/* 2. 变量 -------------------------------------------------- */
:root {
  --ink:          #0B0814;
  --panel:        #151024;
  --panel-deep:   #120D20;
  --panel-lift:   #1B1430;
  --violet:       #A855F7;
  --violet-soft:  #D8B4FE;
  --arcade:       #38BDF8;
  --gold:         #FBBF24;
  --mint:         #5EEAD4;
  --paper:        #F8F5FF;
  --muted:        #9B93B0;
  --line:         #3B2F52;

  --shell:        1200px;
  --gutter:       clamp(16px, 3vw, 40px);
  --gap:          24px;
  --radius:       10px;
  --shadow-print: 6px 6px 0 rgba(59, 47, 82, 0.5);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                  "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body:    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                  "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas,
                  "Liberation Mono", monospace;
}

/* 3. 底色与中文排版 ---------------------------------------- */
body {
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(15px, 0.55vw + 13px, 17px);
  line-height: 1.75;
  letter-spacing: 0.01em;
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 10% -6%, rgba(168, 85, 247, 0.22), transparent 62%),
    radial-gradient(820px 480px at 94% 2%, rgba(56, 189, 248, 0.14), transparent 60%),
    linear-gradient(90deg, rgba(59, 47, 82, 0.20) 1px, transparent 1px);
  background-size: 100% 120vh, 100% 120vh, 88px 100%;
  background-repeat: no-repeat, no-repeat, repeat;
}

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

h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }

main { display: block; }

#main-content { scroll-margin-top: 140px; }

/* 4. 通用工具 ---------------------------------------------- */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.content-shell {
  width: min(100% - (var(--gutter) * 2), 920px);
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--gold);
  color: #1A1206;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* 5. 按钮 -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: box-shadow 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), #7C3AED);
  border-color: rgba(216, 180, 254, 0.5);
  color: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25),
              0 6px 18px rgba(168, 85, 247, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px var(--violet-soft),
              0 8px 26px rgba(168, 85, 247, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--arcade);
  border-color: var(--arcade);
}

/* 6. 页头 -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(11, 8, 20, 0.94);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header { backdrop-filter: blur(10px); }
}

/* 6.1 状态条 */
.header-utility {
  background: rgba(21, 16, 36, 0.92);
  border-bottom: 1px dashed rgba(59, 47, 82, 0.9);
  font-size: 12px;
  color: var(--muted);
}

.header-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}

.utility-search {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.18s ease;
}

.utility-search:hover { color: var(--paper); }

.utility-search-mark {
  position: relative;
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.utility-search-mark::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.header-tagline {
  letter-spacing: 0.05em;
  color: var(--muted);
}

.chapter-status {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper);
  white-space: nowrap;
}

.chapter-status-label {
  color: var(--muted);
  letter-spacing: 0.1em;
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.9);
  animation: lampPulse 2.6s ease-in-out infinite;
}

@keyframes lampPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* 6.2 刊头 */
.masthead-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 18px;
  transition: padding 0.2s ease;
}

.masthead-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--paper);
}

.masthead-mark {
  width: 12px;
  height: 40px;
  flex: none;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--violet-soft), var(--violet) 45%, var(--arcade));
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.75);
  transform: skewX(-12deg);
}

.masthead-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.masthead-line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.55rem, 4.2vw, 2.5rem);
  letter-spacing: -0.03em;
  text-shadow: 0 0 26px rgba(168, 85, 247, 0.45);
}

.masthead-sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* 6.3 移动导航按钮 */
.nav-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(27, 20, 48, 0.9);
  color: var(--paper);
  cursor: pointer;
}

.nav-toggle-icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--violet-soft);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  background: var(--mint);
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  background: var(--mint);
  transform: translateY(-3px) rotate(-45deg);
}

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* 6.4 栏目轨道 */
.nav-rail {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #1A1230, #120D20);
}

.nav-rail-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 24px);
  min-height: 54px;
  padding-block: 4px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  list-style: none;
  margin: 0;
}

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--paper);
  border-bottom-color: var(--arcade);
}

.nav-link[aria-current="page"] {
  color: var(--paper);
  background: rgba(168, 85, 247, 0.16);
  border-bottom-color: var(--violet);
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.6);
}

.nav-cta {
  flex: none;
  padding: 8px 16px;
}

/* 6.5 阅读进度 */
.progress-track {
  height: 3px;
  background: rgba(59, 47, 82, 0.7);
  overflow: hidden;
}

.progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--arcade) 58%, var(--mint));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s linear;
}

/* 6.6 快速索引面板 */
.quick-index {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #191130, #120D20);
}

.quick-index[hidden] { display: none; }

.quick-index-inner {
  padding-block: 20px 24px;
}

.quick-index-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.quick-index-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  list-style: none;
}

.quick-index-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(11, 8, 20, 0.55);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-index-link > span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.quick-index-link:hover {
  border-color: var(--arcade);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.28);
}

/* 6.7 滚动收窄 */
.site-header[data-scrolled] .masthead-inner { padding-block: 9px; }

.site-header[data-scrolled] .masthead-sub { display: none; }

.site-header[data-scrolled] .header-tagline { display: none; }

.site-header[data-scrolled] .chapter-status { display: inline-flex; }

/* 7. 面包屑 ------------------------------------------------ */
.breadcrumb {
  padding-block: 16px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--line);
}

.breadcrumb-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.breadcrumb-link:hover { color: var(--arcade); }

.breadcrumb-current { color: var(--violet-soft); }

/* 8. 内容基础组件 ------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arcade);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--arcade));
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: var(--gap);
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.card {
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.22),
              0 0 28px rgba(168, 85, 247, 0.16);
}

.card-rule {
  border-left: 3px solid var(--violet);
}

.card-record {
  border-left: 3px solid var(--arcade);
}

.card-case {
  border-left: 3px solid var(--gold);
}

.case-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.case-compare > * {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: rgba(11, 8, 20, 0.45);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.1);
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.rule-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.stamp {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px dashed var(--line);
  border-radius: 3px;
  background: rgba(251, 191, 36, 0.07);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* 8.1 图片容器 */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-deep);
  box-shadow: var(--shadow-print);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    0deg,
    rgba(11, 8, 20, 0.22) 0 1px,
    transparent 1px 3px
  );
}

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

.media-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* 9. 页脚 -------------------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #120D20, #0B0814 70%);
}

.footer-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--arcade), var(--gold), var(--mint));
  opacity: 0.85;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 0.95fr);
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(32px, 5vw, 56px);
}

.footer-brandline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.footer-summary {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.footer-heading {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--arcade);
}

.footer-list {
  display: grid;
  gap: 2px;
  list-style: none;
}

.footer-link {
  display: inline-block;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  color: var(--paper);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-link:hover {
  color: var(--violet-soft);
  border-bottom-color: var(--violet);
}

.contact-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  list-style: none;
}

.contact-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.contact-value {
  font-size: 13px;
  line-height: 1.65;
  color: var(--paper);
}

.copy-chip {
  padding: 0 0 1px;
  border-bottom: 1px dashed rgba(216, 180, 254, 0.45);
  color: var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  word-break: break-all;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.copy-chip:hover {
  color: var(--paper);
  border-bottom-color: var(--arcade);
}

.copy-chip[data-copied] {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.contact-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--mint);
  background: rgba(94, 234, 212, 0.06);
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 16px 26px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-note { color: var(--gold); }

/* 10. 显现动画 --------------------------------------------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* 11. 响应式 ----------------------------------------------- */
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .masthead-inner { padding-block: 14px; }

  .masthead-brand { gap: 10px; }

  .masthead-mark { height: 32px; width: 10px; }

  .nav-rail { display: none; }

  .site-header[data-open] .nav-rail { display: block; }

  .site-header[data-open] .masthead-inner { padding-block: 12px; }

  .nav-rail-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-block: 12px 18px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    display: block;
    padding: 12px 14px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    border-radius: 4px;
  }

  .nav-link:hover {
    border-left-color: var(--arcade);
    background: rgba(56, 189, 248, 0.08);
  }

  .nav-link[aria-current="page"] {
    border-left-color: var(--violet);
    border-bottom-color: transparent;
  }

  .nav-cta {
    width: 100%;
    padding: 12px;
  }

  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .footer-contact { grid-column: 1 / -1; }

  .grid-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .header-tagline { display: none; }

  .chapter-status { display: inline-flex; }

  .header-utility-inner { justify-content: space-between; }
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }

  .case-compare { grid-template-columns: minmax(0, 1fr); }

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

@media (max-width: 520px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .contact-row { grid-template-columns: 40px minmax(0, 1fr); }
}

/* 12. 无障碍与打印 ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

@media print {
  .site-header { position: static; }

  .nav-toggle,
  .quick-index,
  .progress-track,
  .skip-link,
  .footer-glow { display: none !important; }

  body {
    background: #FFFFFF;
    color: #16101F;
  }

  .card,
  .footer-inner { border-color: #C9C0DA; }
}
