/* ============================================================
   SE 棋牌电玩中心 · 共享站点样式 /assets/site.css
   夜间电玩厅 × 精密控制台
   ============================================================ */

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

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

body { margin: 0; }

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

ul, ol { padding: 0; 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;
  padding: 0;
  cursor: pointer;
}

/* ---------- tokens ---------- */
:root {
  --ink-950: #071320;
  --ink-800: #0E2033;
  --ink-700: #13293F;
  --paper-100: #F4EEE4;
  --paper-200: #E3DACB;
  --paper-300: #CFC3B0;
  --cyan-400: #37E3D2;
  --cyan-700: #0F6F68;
  --amber-400: #F5B841;
  --coral-500: #FF6A55;
  --slate-300: #9FB3C8;

  --text: #E6EDF5;
  --text-dim: #9FB3C8;
  --text-ink: #16202B;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, "Liberation Mono", monospace;
  --font-serif: "Noto Serif SC", Spectral, Georgia, "Songti SC", "SimSun", serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
  --shell: 1200px;
}

/* ---------- base ---------- */
body {
  background-color: var(--ink-950);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
}

::selection {
  background: var(--cyan-400);
  color: #062A28;
}

/* ---------- 排版 ---------- */
.se-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 0.9em;
}
.se-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
}
.se-eyebrow--on-paper { color: var(--cyan-700); }
.se-eyebrow--amber { color: var(--amber-400); }
.se-eyebrow--coral { color: var(--coral-500); }

.se-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-align: left;
  text-wrap: balance;
}
.se-title--sm {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.24;
}

.se-prose {
  font-size: 17px;
  line-height: 1.75;
  max-width: 34em;
}
.se-prose--wide { max-width: 40em; }
.se-prose p + p { margin-top: 1em; }
.se-prose strong { font-weight: 700; }
.se-prose a {
  color: var(--cyan-400);
  border-bottom: 1px solid rgba(55, 227, 210, 0.45);
}
.se-prose a:hover { border-bottom-color: currentColor; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.num--amber { color: var(--amber-400); }

/* ---------- 容器与网格 ---------- */
.se-container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.se-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.se-col-rail { grid-column: span 4; min-width: 0; }
.se-col-main { grid-column: span 8; min-width: 0; }

@media (max-width: 960px) {
  .se-grid { grid-template-columns: 1fr; gap: 20px; }
  .se-col-rail,
  .se-col-main { grid-column: 1 / -1; }
}

/* ---------- 堆叠面板 ---------- */
.se-panel {
  position: relative;
  background: var(--paper-100);
  color: var(--text-ink);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px);
  isolation: isolate;
}
.se-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(22, 32, 43, 0.032) 0 1px,
    transparent 1px 4px
  );
}
.se-panel--ink {
  background: var(--ink-800);
  color: var(--text);
}
.se-panel--ink::after {
  background-image: repeating-linear-gradient(
    0deg,
    rgba(55, 227, 210, 0.05) 0 1px,
    transparent 1px 5px
  );
}
.se-panel--inset {
  background: var(--ink-950);
  color: var(--text);
}
.se-panel--inset::after {
  background-image: repeating-linear-gradient(
    0deg,
    rgba(159, 179, 200, 0.05) 0 1px,
    transparent 1px 5px
  );
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0.7em 1.25em;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--cyan-400);
  color: #062A28;
  font-weight: 700;
}
.btn--primary:hover { background: #62F1E3; }
.btn--coral {
  background: var(--coral-500);
  color: #2A0904;
  font-weight: 700;
}
.btn--coral:hover { background: #FF8874; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(55, 227, 210, 0.42);
}
.btn--ghost:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: rgba(55, 227, 210, 0.08);
}
.btn--paper {
  background: var(--ink-950);
  color: var(--paper-100);
  font-weight: 700;
}
.btn--paper:hover { background: var(--ink-700); }
.btn--block { width: 100%; }
.btn[data-copied="true"] {
  background: var(--cyan-700);
  color: var(--paper-100);
  border-color: transparent;
}

/* ---------- 胶囊与状态点 ---------- */
.se-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.24em 0.8em;
  border: 1px solid rgba(159, 179, 200, 0.32);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--slate-300);
  white-space: nowrap;
}
.se-capsule--cyan { color: var(--cyan-400); border-color: rgba(55, 227, 210, 0.45); }
.se-capsule--amber { color: var(--amber-400); border-color: rgba(245, 184, 65, 0.45); }
.se-capsule--coral { color: var(--coral-500); border-color: rgba(255, 106, 85, 0.45); }
.se-capsule--on-paper {
  color: var(--cyan-700);
  border-color: rgba(15, 111, 104, 0.45);
  background: rgba(15, 111, 104, 0.06);
}

.se-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  animation: se-pulse 4s ease-in-out infinite;
}
@keyframes se-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---------- 旁注 ---------- */
.se-note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--slate-300);
  border-left: 2px solid rgba(245, 184, 65, 0.6);
  padding-left: 0.9em;
  max-width: 36em;
}
.se-note--coral { border-left-color: var(--coral-500); }
.se-note--cyan { border-left-color: var(--cyan-400); }
.se-panel .se-note { color: #52606E; }

/* ---------- 面包屑 ---------- */
.se-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate-300);
}
.se-breadcrumb a {
  color: var(--slate-300);
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.se-breadcrumb a:hover {
  color: var(--cyan-400);
  border-bottom-color: currentColor;
}
.se-breadcrumb li + li::before {
  content: "／";
  margin: 0 0.5em;
  color: rgba(159, 179, 200, 0.45);
}

/* ---------- 目录 ---------- */
.se-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.6;
}
.se-toc a {
  display: block;
  padding: 0.45em 0 0.45em 1em;
  border-left: 1px solid rgba(159, 179, 200, 0.22);
  color: var(--slate-300);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.se-toc a:hover { color: var(--text); }
.se-toc a[aria-current] {
  color: var(--cyan-400);
  border-left-color: var(--cyan-400);
}

/* ---------- 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--ink-800) 0%, var(--ink-950) 100%);
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(230, 237, 245, 0.05) 0 1px,
    transparent 1px 3px
  );
}
.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(159, 179, 200, 0.55);
  text-align: center;
}

/* ---------- 显现 ---------- */
[data-reveal][data-reveal-ready="true"] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   头部
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  color: var(--text);
  background: transparent;
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(7, 19, 32, 0.86) 0%,
    rgba(7, 19, 32, 0.44) 58%,
    rgba(7, 19, 32, 0) 100%
  );
  transition: opacity 0.2s var(--ease);
}
.site-header[data-solid="true"] {
  background: var(--ink-800);
  box-shadow: 0 1px 0 rgba(55, 227, 210, 0.16), 0 22px 44px -34px #000;
}
.site-header[data-solid="true"]::before { opacity: 0; }

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 140;
  background: rgba(159, 179, 200, 0.14);
}
.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--amber-400) 100%);
  transition: width 0.1s linear;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.6em 1.1em;
  border-radius: var(--radius-sm);
  background: var(--cyan-400);
  color: #062A28;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--paper-100);
  outline-offset: 2px;
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px clamp(16px, 4vw, 40px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--cyan-400);
  border-radius: 11px;
  background: rgba(55, 227, 210, 0.08);
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.brand:hover .brand__mark {
  background: var(--cyan-400);
  color: #062A28;
}
.brand__lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand__tag {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate-300);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1px, 0.7vw, 8px);
}
.nav-item { display: block; }
.nav-link {
  display: inline-block;
  padding: 0.5em 0.66em;
  border-radius: 999px;
  font-size: clamp(13px, 1.05vw, 14.5px);
  line-height: 1.5;
  color: rgba(230, 237, 245, 0.78);
  white-space: nowrap;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.nav-link:hover {
  color: var(--cyan-400);
  background: rgba(55, 227, 210, 0.08);
}
.nav-link[aria-current="page"] {
  background: var(--cyan-400);
  color: #062A28;
  font-weight: 700;
}
.nav-mobile-actions { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.header-actions .btn {
  min-height: 40px;
  padding: 0.55em 1.05em;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0.4em 0.85em;
  border: 1px solid rgba(159, 179, 200, 0.4);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.nav-toggle__box {
  display: grid;
  gap: 5px;
  width: 18px;
  flex: none;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}
.nav-toggle__label { line-height: 1; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* 移动端底部快捷胶囊 */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 125;
  gap: 10px;
  padding: 12px clamp(14px, 4vw, 28px) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(
    180deg,
    rgba(7, 19, 32, 0) 0%,
    rgba(7, 19, 32, 0.94) 44%
  );
  pointer-events: none;
}
.mobile-dock > * { pointer-events: auto; }
.dock-pill {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1em;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.dock-pill--cyan { background: var(--cyan-400); color: #062A28; }
.dock-pill--coral { background: var(--coral-500); color: #2A0904; }

/* ---------- 头部响应式 ---------- */
@media (max-width: 1080px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    flex: none;
    padding: 8px clamp(16px, 4vw, 32px) 24px;
    background: var(--ink-800);
    border-top: 1px solid rgba(55, 227, 210, 0.18);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 34px 60px -30px rgba(0, 0, 0, 0.9);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
      visibility 0.22s linear;
  }
  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-link {
    display: block;
    padding: 0.85em 0.9em;
    border-radius: 14px;
    border-bottom: 1px solid rgba(159, 179, 200, 0.12);
    font-size: 16px;
    color: var(--text);
  }
  .nav-link:hover { background: rgba(55, 227, 210, 0.1); }
  .nav-link[aria-current="page"] {
    border-radius: 14px;
    border-bottom-color: transparent;
  }
  .nav-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  .header-actions { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .mobile-dock { display: flex; }
}

@media (max-width: 480px) {
  .brand__tag { display: none; }
  .brand__name { font-size: 14px; }
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 80px);
  background: var(--ink-800);
  color: var(--text);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cyan-400) 0 6px,
    transparent 6px 14px
  );
}
.footer-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) clamp(18px, 4vw, 40px) clamp(28px, 4vw, 40px);
}
.footer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(159, 179, 200, 0.16);
}
.brand--footer .brand__name { font-size: 16px; }
.footer-intro {
  max-width: 34em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--slate-300);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 4vw, 40px) 0 clamp(24px, 3vw, 32px);
}
.footer-col { min-width: 0; }
.footer-col__title {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 1.1em;
}
.footer-links { font-size: 15px; line-height: 1.7; }
.footer-links li + li { margin-top: 0.55em; }
.footer-links a {
  color: rgba(230, 237, 245, 0.8);
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-links a:hover {
  color: var(--cyan-400);
  border-bottom-color: currentColor;
}
.footer-contact { min-width: 0; }
.contact-list { font-size: 14px; line-height: 1.7; }
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  padding: 0.45em 0;
  border-bottom: 1px dashed rgba(159, 179, 200, 0.18);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list__k {
  flex: none;
  width: 3em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(159, 179, 200, 0.7);
  padding-top: 0.15em;
}
.contact-list span:last-child { color: rgba(230, 237, 245, 0.88); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(159, 179, 200, 0.16);
}
.footer-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate-300);
  max-width: 40em;
}
.footer-legal {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(159, 179, 200, 0.78);
  white-space: nowrap;
}
.footer-legal .num { font-size: 12.5px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .site-footer {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-legal { white-space: normal; }
}

/* ---------- 降级动效 ---------- */
@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;
  }
  [data-reveal][data-reveal-ready="true"] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .se-dot { animation: none; opacity: 1; }
  .btn:hover { transform: none; }
}
