/* ============================================================
   梦想棋牌电玩 — 共享样式 /assets/site.css
   1. 变量与重置  2. 排版  3. 头部  4. 页脚  5. 通用组件
   6. 动效协议    7. 响应式
   ============================================================ */

/* ---------- 1. 变量与重置 ---------- */
:root {
  --ink: #071022;
  --night: #0E1F3A;
  --mid: #163A63;
  --mid-line: #2A5C93;
  --ice: #6FD3FF;
  --violet: #A46BFF;
  --gold: #FFB84D;
  --coral: #FF5C7A;
  --white: #E8F4FF;
  --mute: #9FB6D4;
  --mint: #35E0B0;

  --font-display: 'Alibaba PuHuiTi 3.0', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, 'Courier New', monospace;

  --maxw: 1240px;
  --pad-l: clamp(16px, 4vw, 44px);
  --pad-r: clamp(16px, 6vw, 64px);
  --ease: cubic-bezier(.22, .8, .28, 1);
  --edge: 2px;
  --drop: 6px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(164, 107, 255, .12), transparent 44%),
    radial-gradient(circle at 92% 6%, rgba(111, 211, 255, .10), transparent 42%);
  background-repeat: no-repeat;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--ice); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--gold); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

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

::selection { background: var(--violet); color: #12061F; }

/* ---------- 2. 排版 ---------- */
.u-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.u-annot {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mute);
}

.u-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--white);
}

/* ---------- 3. 头部 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--gold);
  color: #1A1206;
  font-family: var(--font-display);
  font-weight: 700;
  border: var(--edge) solid #FFD79A;
  box-shadow: 4px 4px 0 rgba(255, 92, 122, .55);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; color: #1A1206; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink);
  color: var(--white);
}

.header-upper {
  max-height: 140px;
  overflow: hidden;
  background: var(--ink);
  opacity: 1;
  transition: max-height .3s var(--ease), opacity .22s var(--ease);
}
.site-header.is-compact .header-upper {
  max-height: 0;
  opacity: 0;
}

.header-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-l) var(--pad-r);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-upper .header-inner {
  min-height: 74px;
  padding-block: 12px;
}

.header-lower {
  position: relative;
  background: var(--night);
  border-bottom: 3px solid var(--violet);
}

.header-inner--nav {
  justify-content: flex-start;
  gap: clamp(10px, 2vw, 22px);
  min-height: 62px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--white); }

.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--violet), var(--ice));
  color: #071022;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  border: var(--edge) solid #C9A6FF;
  box-shadow: 4px 4px 0 rgba(111, 211, 255, .28);
}

.brand__text { display: block; min-width: 0; }

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--white);
}

.brand__tagline {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mute);
}

/* 客服在线牌 */
.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.header-meta__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ice);
  border: var(--edge) solid var(--mid-line);
  padding: 3px 9px;
  background: var(--night);
}

.header-meta__value {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mute);
}

.header-meta__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: var(--ice);
  border: var(--edge) solid #BDEBFF;
  box-shadow: 4px 4px 0 rgba(164, 107, 255, .45);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.header-meta__link:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 rgba(164, 107, 255, .5);
}

/* 移动栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  background: var(--mid);
  border: var(--edge) solid var(--mid-line);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
}
.nav-toggle__text { display: block; }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ice);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ice);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 主导航 */
.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__item { flex: 0 0 auto; }

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  color: var(--mute);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}
.site-nav__link:hover {
  color: var(--white);
  border-bottom-color: var(--gold);
}
.site-nav__link[aria-current="page"] {
  background: var(--violet);
  color: #0B1A2E;
  border-bottom-color: var(--gold);
}
.site-nav__link[aria-current="page"]:hover { color: #0B1A2E; }

/* 页头 CTA */
.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--gold);
  color: #1A1206;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  border: var(--edge) solid #FFD79A;
  box-shadow: 4px 4px 0 rgba(255, 92, 122, .5);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.header-cta:hover {
  color: #1A1206;
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 rgba(255, 92, 122, .55);
}

/* 滚动进度条 */
.header-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ice), var(--violet), var(--gold));
  pointer-events: none;
}

/* ---------- 4. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--ink);
  color: var(--mute);
  font-size: 14px;
}

.footer-rail {
  height: 6px;
  background: linear-gradient(90deg,
    var(--violet) 0 22%,
    var(--ice) 22% 48%,
    var(--gold) 48% 76%,
    var(--coral) 76% 100%);
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(28px, 5vw, 56px) var(--pad-r) clamp(22px, 3vw, 36px) var(--pad-l);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 16px;
  max-width: 400px;
  justify-items: start;
}

.brand--footer .brand__mark {
  box-shadow: 4px 4px 0 rgba(255, 184, 77, .35);
}
.brand--footer .brand__name { font-size: 19px; }
.brand--footer .brand__tagline { color: var(--ice); }

.footer-intro {
  font-size: 14px;
  line-height: 1.8;
  color: var(--mute);
  max-width: 34ch;
}

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

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 2px 0;
  color: var(--mute);
  font-size: 15px;
  font-weight: 500;
  border-bottom: var(--edge) solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.footer-link::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  background: var(--violet);
}
.footer-link:hover {
  color: var(--white);
  border-bottom-color: var(--gold);
}

.footer-contact {
  margin-top: clamp(28px, 4vw, 44px);
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  background: var(--night);
  border: var(--edge) solid var(--mid-line);
  box-shadow: var(--drop) var(--drop) 0 rgba(164, 107, 255, .16);
}

.footer-contact__line {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: .02em;
  color: var(--white);
  word-break: break-word;
}

.footer-contact__note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--mute);
}

.footer-legal {
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  border-top: var(--edge) solid var(--mid);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mute);
}

/* ---------- 5. 通用组件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-l) var(--pad-r);
}

.site-main { display: block; }
#main-content { scroll-margin-top: 120px; }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--mute);
}
.crumbs a { color: var(--ice); }
.crumbs a:hover { color: var(--gold); }
.crumbs__sep { color: var(--violet); }
.crumbs [aria-current="page"] { color: var(--white); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-align: center;
  border: var(--edge) solid transparent;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease),
              background-color .15s var(--ease), color .15s var(--ease),
              border-color .15s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--gold {
  background: var(--gold);
  color: #1A1206;
  border-color: #FFD79A;
  box-shadow: 5px 5px 0 rgba(255, 92, 122, .5);
}
.btn--gold:hover { color: #1A1206; box-shadow: 7px 7px 0 rgba(255, 92, 122, .55); }

.btn--violet {
  background: var(--violet);
  color: #12061F;
  border-color: #C9A6FF;
  box-shadow: 5px 5px 0 rgba(111, 211, 255, .3);
}
.btn--violet:hover { color: #12061F; box-shadow: 7px 7px 0 rgba(111, 211, 255, .38); }

.btn--ghost {
  background: transparent;
  color: var(--ice);
  border-color: var(--ice);
  box-shadow: 5px 5px 0 rgba(111, 211, 255, .18);
}
.btn--ghost:hover { background: var(--ice); color: var(--ink); }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.6;
  background: var(--mid);
  color: var(--ice);
  border: var(--edge) solid transparent;
}
.tag--gold { background: var(--gold); color: #1A1206; }
.tag--violet { background: var(--violet); color: #12061F; }
.tag--coral { background: var(--coral); color: #2A0008; }

/* 状态点 */
.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(53, 224, 176, .18);
}
.dot--pulse { animation: dot-pulse 4s ease-in-out infinite; }

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(53, 224, 176, .35); }
  50%      { box-shadow: 0 0 0 8px rgba(53, 224, 176, 0); }
}

/* 卡片 */
.panel {
  background: var(--mid);
  border: var(--edge) solid var(--mid-line);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--drop) var(--drop) 0 rgba(7, 16, 34, .85);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.panel:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--drop) var(--drop) 0 rgba(7, 16, 34, .95);
}

/* 章节抬头 */
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 20px;
  margin-bottom: 20px;
}

.sec-num {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--ice);
  background: var(--mid);
  border-left: 3px solid var(--violet);
}

.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--white);
}

/* 色带 */
.band {
  height: 3px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--violet), var(--gold));
}

/* 正文块 */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: #D3E6FA;
}
.prose > * + * { margin-top: 1em; }
.prose h2,
.prose h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--white);
  margin-top: 1.9em;
  margin-bottom: .55em;
}
.prose h2 { font-size: clamp(24px, 3.4vw, 32px); }
.prose h3 { font-size: clamp(19px, 2.4vw, 22px); }
.prose a {
  color: var(--ice);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose strong { color: var(--white); font-weight: 700; }
.prose ul,
.prose ol { display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 8px;
  background: var(--violet);
}
.prose blockquote {
  padding: 14px 18px;
  background: var(--night);
  border-left: 4px solid var(--gold);
  color: var(--white);
}

/* 图片容器 */
.figure {
  display: grid;
  gap: 10px;
  margin: 0;
}
.figure__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: var(--edge) solid var(--mid-line);
  box-shadow: var(--drop) var(--drop) 0 rgba(7, 16, 34, .8);
  background:
    radial-gradient(circle at 22% 18%, rgba(164, 107, 255, .40), transparent 46%),
    radial-gradient(circle at 78% 74%, rgba(255, 184, 77, .24), transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(111, 211, 255, .14), transparent 62%),
    linear-gradient(160deg, #0E1F3A 0%, #163A63 62%, #071022 100%);
}
.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure__media--wide { aspect-ratio: 21 / 9; }
.figure__media--square { aspect-ratio: 1 / 1; }
.figure__media--tall { aspect-ratio: 4 / 5; }
.figure__cap {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mute);
}

/* 栅格 */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* 章节索引链接（配合 data-chapter-link） */
[data-chapter-link] {
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
[data-chapter-link][aria-current="true"] {
  color: var(--ink);
  background: var(--gold);
}

/* ---------- 6. 动效协议 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .dot--pulse { animation: none; }
  .btn,
  .panel,
  .header-cta,
  .header-meta__link,
  .site-nav__link,
  .footer-link,
  .skip-link {
    transition: none !important;
  }
  .btn:hover,
  .panel:hover,
  .header-cta:hover,
  .header-meta__link:hover { transform: none; }
}

/* ---------- 7. 响应式 ---------- */
@media (max-width: 1100px) {
  .header-meta__value { display: none; }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .header-inner--nav {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-block: 9px;
    gap: 10px;
  }

  .site-nav {
    flex: 1 0 100%;
    order: 3;
    display: none;
  }
  .site-nav[data-open] { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    padding-block: 4px 10px;
    gap: 2px;
  }

  .site-nav__link {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .site-nav__link:hover { border-bottom-color: transparent; border-left-color: var(--gold); }
  .site-nav__link[aria-current="page"] { border-bottom-color: transparent; border-left-color: var(--gold); }

  .header-cta { font-size: 14px; padding: 0 14px; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-intro { max-width: none; }

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

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .header-upper .header-inner { min-height: 66px; }
  .brand__mark { width: 38px; height: 38px; font-size: 20px; }
  .brand__name { font-size: 18px; }
  .brand__tagline { font-size: 11px; letter-spacing: .12em; }
  .header-meta__label { display: none; }
  .header-meta__link { font-size: 13px; padding: 0 12px; }

  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { padding-inline: var(--pad-l); }
  .footer-legal { flex-direction: column; }

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

  .btn { width: 100%; }
  .header-cta,
  .header-meta__link,
  .skip-link { width: auto; }

  .footer-brand .btn { width: 100%; }
}
