/* ============================================================
   银河娱乐会馆 — shared site kit
   /assets/site.css
   ============================================================ */

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

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

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

ul, ol { padding: 0; list-style: none; }

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

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

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

table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid #5FE3D6;
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- tokens ---------- */
:root {
  --void: #05070E;
  --deep: #0C1226;
  --indigo: #171A3A;
  --galaxy: #6C4BE8;
  --nebula: #E86BB0;
  --ice: #5FE3D6;
  --gold: #F0C070;
  --wine: #7A1F3D;
  --stardust: #EDEAF5;
  --mist: #9A9AB8;
  --line: #2A3050;

  --rail: 88px;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base / 中文排版 ---------- */
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  padding-left: var(--rail);
  background-color: var(--void);
  background-image:
    radial-gradient(90rem 60rem at 80% -18%, rgba(108, 75, 232, 0.20), transparent 62%),
    radial-gradient(72rem 52rem at -12% 22%, rgba(232, 107, 176, 0.10), transparent 60%),
    radial-gradient(60rem 46rem at 60% 108%, rgba(95, 227, 214, 0.07), transparent 64%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--stardust);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* ---------- 容器 ---------- */
.wrap {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 20px;
  border-radius: 2px;
  background: var(--gold);
  color: #120D02;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  transform: translateY(-240%);
  transition: transform 0.22s var(--ease);
}

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

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
}

.site-head__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px clamp(16px, 3vw, 36px);
  background: rgba(5, 7, 14, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, var(--ice), transparent 58%),
    radial-gradient(circle at 70% 74%, var(--nebula), transparent 62%),
    linear-gradient(140deg, var(--galaxy), var(--wine));
  box-shadow:
    0 0 0 1px var(--line),
    0 0 22px rgba(108, 75, 232, 0.45);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(95, 227, 214, 0.34);
  border-radius: 50%;
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-32deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  color: var(--stardust);
}

.brand__line {
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.2em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-align: center;
  transition:
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.btn--gold {
  background: linear-gradient(135deg, #F7CE8A, var(--gold) 52%, #DDA84E);
  color: #120D02;
  border-color: rgba(240, 192, 112, 0.55);
  box-shadow: 0 0 0 1px rgba(240, 192, 112, 0.16), 0 0 22px rgba(240, 192, 112, 0.18);
}

.btn--gold:hover {
  box-shadow: 0 0 0 1px rgba(240, 192, 112, 0.42), 0 0 28px rgba(240, 192, 112, 0.34);
}

.btn--ghost {
  background: rgba(23, 26, 58, 0.42);
  border-color: var(--line);
  color: var(--stardust);
}

.btn--ghost:hover {
  border-color: var(--ice);
  color: var(--ice);
  box-shadow: 0 0 20px -6px rgba(95, 227, 214, 0.4);
}

.btn--sm { padding: 9px 16px; font-size: 13px; }

.btn--block { width: 100%; }

/* nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--mist);
  transition: color 0.28s var(--ease), border-color 0.28s var(--ease);
}

.nav-toggle[aria-expanded="true"] {
  color: var(--ice);
  border-color: var(--ice);
}

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 10px;
  flex: none;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--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);
}

/* scroll progress */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--galaxy), var(--nebula) 55%, var(--ice));
  box-shadow: 0 0 10px rgba(95, 227, 214, 0.55);
  transition: width 0.1s linear;
}

/* ---------- 框架式导航（桌面端左轨） ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 55;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  padding: 24px 0;
  overflow-y: auto;
  background: linear-gradient(180deg, #0A0E1E 0%, var(--deep) 46%, #120F2A 100%);
  border-right: 1px solid var(--line);
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar { width: 0; height: 0; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.site-nav__item { width: 100%; }

.site-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 0;
  color: var(--mist);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.site-nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  transform: translateY(-50%);
  background: var(--ice);
  transition: height 0.3s var(--ease), background-color 0.3s var(--ease);
}

.site-nav__link:hover {
  color: var(--stardust);
  background: rgba(95, 227, 214, 0.06);
}

.site-nav__link:hover::before { height: 26px; }

.site-nav__link[aria-current="page"] {
  color: var(--gold);
  background: rgba(240, 192, 112, 0.08);
}

.site-nav__link[aria-current="page"]::before {
  height: 34px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(240, 192, 112, 0.75);
}

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.65;
}

.site-nav__label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: 0.2em;
}

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(60px, 8vw, 112px);
  padding-block: clamp(46px, 6vw, 78px) clamp(26px, 4vw, 40px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 18, 38, 0.72), var(--void) 62%);
}

.site-foot::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--galaxy) 24%, var(--nebula) 52%, var(--ice) 78%, transparent);
  opacity: 0.55;
}

.site-foot__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.site-foot__col { min-width: 0; }

.site-foot__mark {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--stardust);
}

.site-foot__slogan {
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  color: var(--mist);
}

.site-foot__legal {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.site-foot__copy {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
  opacity: 0.68;
}

.site-foot__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--ice);
}

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

.site-foot__links--legal {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}

.site-foot__links a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist);
  transition: color 0.28s var(--ease);
}

.site-foot__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ice);
  transition: width 0.3s var(--ease);
}

.site-foot__links a:hover { color: var(--stardust); }
.site-foot__links a:hover::after { width: 100%; }

.site-foot__links a[aria-current="page"] { color: var(--gold); }
.site-foot__links a[aria-current="page"]::after { width: 100%; background: var(--gold); }

.site-foot__coords {
  display: grid;
  gap: 12px;
}

.site-foot__coords li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.75;
}

.site-foot__k {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.site-foot__v {
  color: var(--stardust);
  overflow-wrap: anywhere;
}

/* ---------- 通用小件 ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--ice);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.lead {
  max-width: 38em;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.95;
  color: var(--mist);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 20px);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* 章节转场色带 */
.band {
  height: clamp(40px, 5vw, 80px);
  opacity: 0.42;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(108, 75, 232, 0.62) 20%,
    rgba(232, 107, 176, 0.55) 52%,
    rgba(95, 227, 214, 0.40) 78%,
    transparent 100%);
}

.band--wine {
  opacity: 0.55;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(122, 31, 61, 0.85) 28%,
    rgba(23, 26, 58, 0.9) 62%,
    rgba(12, 18, 38, 0.2) 90%,
    transparent 100%);
}

/* 章节页眉 */
.chapter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 2vw, 26px);
  align-items: start;
}

.chapter__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  align-self: stretch;
}

.chapter__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ice);
}

.chapter__rule {
  flex: 1;
  width: 1px;
  min-height: 42px;
  background: linear-gradient(180deg, var(--line), transparent);
}

.chapter__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--stardust);
}

.vertical-note {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--mist);
}

/* 面板 */
.panel {
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: linear-gradient(160deg, rgba(23, 26, 58, 0.86), rgba(12, 18, 38, 0.7));
  box-shadow: 0 18px 24px -22px rgba(0, 0, 0, 0.9);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.panel:hover {
  border-color: rgba(95, 227, 214, 0.42);
  box-shadow:
    0 18px 24px -22px rgba(0, 0, 0, 0.9),
    0 0 24px -8px rgba(95, 227, 214, 0.28);
}

/* 图片容器基础规则 */
.figure {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    radial-gradient(120% 92% at 50% 0%, rgba(108, 75, 232, 0.38), transparent 62%),
    radial-gradient(90% 70% at 82% 100%, rgba(232, 107, 176, 0.22), transparent 64%),
    linear-gradient(180deg, var(--deep), var(--void));
}

.figure > img,
.figure > svg,
.figure > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(5, 7, 14, 0.78));
}

.figure__caption {
  position: absolute;
  left: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  bottom: clamp(12px, 2vw, 20px);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.figure--wide { aspect-ratio: 21 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.crumbs a {
  color: var(--mist);
  transition: color 0.25s var(--ease);
}

.crumbs a:hover { color: var(--ice); }

.crumbs__sep { color: var(--line); }

.crumbs [aria-current="page"] { color: var(--stardust); }

/* 主题筛选 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--mist);
  transition:
    color 0.28s var(--ease),
    border-color 0.28s var(--ease),
    background-color 0.28s var(--ease);
}

.filter-btn:hover {
  color: var(--stardust);
  border-color: rgba(95, 227, 214, 0.5);
}

.filter-btn[aria-pressed="true"] {
  color: var(--gold);
  border-color: rgba(240, 192, 112, 0.6);
  background: rgba(240, 192, 112, 0.1);
}

.filter-btn[aria-pressed="true"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  vertical-align: middle;
}

/* 栅格工具 */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

/* 滚动显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.52s var(--ease), transform 0.52s var(--ease);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .site-foot__inner { grid-template-columns: 1fr 1fr; }
  .site-foot__col--contact { grid-column: 1 / -1; }
  .site-foot__coords { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
}

@media (max-width: 900px) {
  body { padding-left: 0; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    display: none;
    flex-direction: row;
    padding: 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 11, 24, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .site-nav[data-open] {
    display: flex;
    animation: navIn 0.32s var(--ease) both;
  }

  @keyframes navIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
  }

  .site-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    padding: 14px clamp(16px, 4vw, 28px) 18px;
  }

  .site-nav__item { width: auto; }

  .site-nav__link {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 2px;
  }

  .site-nav__link::before { display: none; }

  .site-nav__link:hover,
  .site-nav__link[aria-current="page"] { border-color: currentColor; }

  .site-nav__label {
    writing-mode: horizontal-tb;
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .nav-toggle { display: inline-flex; }

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

@media (max-width: 860px) {
  .site-foot__inner { grid-template-columns: 1fr; }
  .site-foot__col--contact { grid-column: auto; }
  .site-foot__coords { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.85; }

  .site-head__bar { gap: 12px; padding: 11px 16px; }

  .brand { gap: 10px; }
  .brand__mark { width: 28px; height: 28px; }
  .brand__mark::after { inset: -5px; }
  .brand__name { font-size: 15px; letter-spacing: 0.1em; }
  .brand__line { display: none; }

  .btn--sm { padding: 8px 12px; font-size: 12px; letter-spacing: 0.06em; }

  .nav-toggle { padding: 8px 10px; }
  .nav-toggle__label { display: none; }

  .site-foot__links { gap: 6px 14px; }
  .site-foot__coords li { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .chapter { grid-template-columns: 1fr; }
  .chapter__rail { flex-direction: row; align-items: center; }
  .chapter__rule { width: 40px; height: 1px; min-height: 0; flex: none; background: linear-gradient(90deg, var(--line), transparent); }
  .vertical-note { writing-mode: horizontal-tb; letter-spacing: 0.24em; }
}

/* ---------- 减少动态 ---------- */
@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;
  }

  .scroll-progress span { transition: none; }

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