/* ============================================================
   银河娱乐 CN — 共享站点样式 /assets/site.css
   轨道体系：深空基底 + 星云面板 + 霓虹青行动色
   ============================================================ */

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

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

body { margin: 0; }

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

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

table { border-collapse: collapse; width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --void: #0A0620;
  --nebula: #150B3A;
  --orbit: #1E1250;
  --silver: #D8DEF5;
  --stardust: #FFFFFF;
  --neon: #35F2D0;
  --violet: #7C4DFF;
  --amber: #FF8A3D;
  --mist: #8A93B8;
  --edge: #2B2270;
  --edge-soft: rgba(43, 34, 112, .55);

  /* 字体 */
  --font-display: "Space Grotesk", "Archivo", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-editorial: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 节奏 */
  --pad-x: clamp(18px, 5vw, 72px);
  --radius: 3px;
  --header-h: 76px;
  --rail-w: 96px;

  /* 背景星云 */
  --nebula-bg:
    radial-gradient(1100px 620px at 10% -10%, rgba(124, 77, 255, .30), transparent 62%),
    radial-gradient(900px 520px at 98% 4%, rgba(53, 242, 208, .13), transparent 60%),
    radial-gradient(1000px 760px at 40% 118%, rgba(30, 18, 80, .95), transparent 72%);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--void);
  background-image: var(--nebula-bg);
  background-attachment: fixed;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--stardust);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 2.7vw, 2.05rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.4rem); }

p { margin: 0 0 1em; }

a { color: var(--neon); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

strong { color: var(--stardust); font-weight: 600; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--neon);
}

::selection { background: rgba(53, 242, 208, .28); color: var(--stardust); }

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

#main-content { scroll-margin-top: calc(var(--header-h) + 18px); }

/* ---------- 4. 通用工具 ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 14px;
  top: -80px;
  z-index: 200;
  padding: .65em 1.15em;
  background: var(--neon);
  color: #04140F;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: var(--radius);
  transition: top .18s ease-out;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.stack > * + * { margin-top: var(--stack, 1.25rem); }

.prose { max-width: 34em; }
.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { border-bottom: 1px solid rgba(53, 242, 208, .45); }

.lede {
  font-family: var(--font-editorial);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.72;
  color: #BFC8EA;
  max-width: 30em;
  margin: 0 0 1em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--neon);
  margin: 0 0 10px;
}

.orbital-divider {
  height: 1px;
  border: 0;
  margin: clamp(28px, 5vw, 58px) 0;
  background: linear-gradient(90deg, transparent, var(--violet) 28%, var(--neon) 72%, transparent);
  opacity: .55;
}

/* ---------- 5. 网格 ---------- */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

/* ---------- 6. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .72em 1.3em;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--silver);
  background: rgba(30, 18, 80, .62);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.btn:hover { border-color: var(--neon); color: var(--stardust); text-decoration: none; }
.btn--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: #04140F;
}
.btn--primary:hover { background: #5CF7DC; color: #04140F; }

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  background: linear-gradient(160deg, rgba(21, 11, 58, .94), rgba(10, 6, 32, .94));
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(43, 34, 112, .9), 0 20px 44px -30px rgba(0, 0, 0, .95);
}

.band {
  padding: 16px 22px;
  background: linear-gradient(90deg, rgba(30, 18, 80, .62), rgba(10, 6, 32, 0));
  border-left: 2px solid var(--neon);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin: 0 0 20px;
}
.section-head > * { margin: 0; }

.section-no {
  font-family: var(--font-editorial);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--violet);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.stat { display: flex; flex-direction: column; gap: .25rem; }
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  color: var(--stardust);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--mist);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: .25em .68em;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mist);
  background: rgba(30, 18, 80, .55);
  border: 1px solid var(--edge);
  border-radius: 999px;
}
.tag--neon {
  color: var(--neon);
  border-color: rgba(53, 242, 208, .42);
  background: rgba(53, 242, 208, .08);
}

.list-card {
  display: grid;
  gap: .35rem;
  padding: 14px 16px;
  background: rgba(21, 11, 58, .62);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--violet);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease;
}
.list-card:hover {
  border-color: var(--neon);
  border-left-color: var(--neon);
  background: rgba(30, 18, 80, .78);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--mist);
  margin: 0 0 18px;
}
.breadcrumb a { color: var(--mist); }
.breadcrumb a:hover { color: var(--neon); text-decoration: none; }
.breadcrumb__sep { color: var(--violet); }

/* ---------- 7. 图片容器（页面阶段复用） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(140deg, #1E1250, #0A0620);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--slant { clip-path: polygon(0 7%, 100% 0, 100% 93%, 0 100%); }
.media-frame__caption {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--mist);
}

/* ---------- 8. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  min-height: var(--header-h);
  background: linear-gradient(180deg, #130A32 0%, #0A0620 100%);
  border-bottom: 1px solid var(--edge);
}

.rail {
  position: relative;
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-right: 1px solid var(--edge);
}
.rail::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 24%;
  bottom: 24%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--neon), transparent);
}

.rail__brand { display: block; text-decoration: none; }
.rail__brand:hover { text-decoration: none; }
.rail__word {
  display: block;
  max-width: 66px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .1em;
  color: var(--stardust);
}

.rail__status { display: flex; gap: 5px; }
.rail__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3A3168;
}
.rail__dot--on {
  background: var(--neon);
  box-shadow: 0 0 8px rgba(53, 242, 208, .85);
}

.cmdbar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}
.cmdbar__list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cmdbar__list::-webkit-scrollbar { display: none; }

.cmdbar__link {
  display: inline-flex;
  align-items: baseline;
  gap: .42em;
  padding: 11px 12px;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--mist);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.cmdbar__link:hover {
  color: var(--stardust);
  border-bottom-color: var(--violet);
  text-decoration: none;
}
.cmdbar__link[aria-current="page"] {
  color: var(--neon);
  border-bottom-color: var(--neon);
}
.cmdbar__index {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--violet);
}
.cmdbar__link[aria-current="page"] .cmdbar__index { color: var(--neon); }

.rail-cta {
  align-self: center;
  margin: 0 20px 0 8px;
  display: inline-flex;
  align-items: center;
  padding: .62em 1.1em;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--neon);
  background: rgba(53, 242, 208, .07);
  border: 1px solid var(--neon);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.rail-cta:hover {
  background: var(--neon);
  color: #04140F;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  min-height: 56px;
  padding: 0;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--edge);
  color: var(--silver);
  cursor: pointer;
}
.nav-toggle__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--silver);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 2;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--neon));
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 9vw, 110px);
  background: linear-gradient(180deg, rgba(21, 11, 58, .1) 0%, rgba(21, 11, 58, .8) 26%, #070416 100%);
  border-top: 1px solid var(--edge);
  color: var(--silver);
}
.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--violet) 30%, var(--neon) 70%, transparent);
}

.orbit-strip {
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--edge);
}
.orbit-strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  margin-bottom: 14px;
}
.orbit-strip__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: .02em;
}
.orbit-strip__hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mist);
}
.orbit-strip__track {
  display: flex;
  gap: 12px;
  padding: 4px var(--pad-x) 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--violet) transparent;
}
.orbit-strip__track:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: -4px;
}
.orbit-strip__track::-webkit-scrollbar { height: 6px; }
.orbit-strip__track::-webkit-scrollbar-track { background: rgba(43, 34, 112, .35); }
.orbit-strip__track::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 999px; }

.orbit-card {
  flex: 0 0 auto;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  scroll-snap-align: start;
  background: rgba(30, 18, 80, .55);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
.orbit-card__fmt {
  font-family: var(--font-mono);
  font-size: .95rem;
  letter-spacing: .06em;
  color: var(--neon);
}
.orbit-card__res {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--mist);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(22px, 3vw, 44px);
  padding-top: clamp(30px, 5vw, 54px);
  padding-bottom: clamp(30px, 5vw, 54px);
}
.footer-col--wide { grid-column: span 2; }

.footer-col__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--violet);
}

.footer-links { display: grid; gap: 9px; }
.footer-links a {
  font-size: .92rem;
  color: var(--silver);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.footer-links a:hover {
  color: var(--neon);
  border-bottom-color: var(--neon);
  text-decoration: none;
}

.footer-contact {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .03em;
  color: var(--silver);
}
.footer-note {
  margin: 0;
  max-width: 32em;
  font-size: .78rem;
  line-height: 1.85;
  color: var(--mist);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
  padding-top: 18px;
  padding-bottom: 34px;
  border-top: 1px solid var(--edge);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mist);
}
.footer-meta p { margin: 0; }
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--silver);
}

/* ---------- 10. 显现动效 ---------- */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .32s ease-out, transform .32s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 响应式：≤960px ---------- */
@media (max-width: 960px) {
  :root { --header-h: 56px; }

  .site-header { min-height: 56px; }

  .rail {
    flex: 0 0 auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 0;
  }
  .rail::after { display: none; }
  .rail__word {
    max-width: none;
    white-space: nowrap;
    font-size: 13px;
  }
  .rail__status { display: none; }

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

  .cmdbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    z-index: 70;
    display: block;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    background: linear-gradient(180deg, #150B3A 0%, #0A0620 94%);
    border-bottom: 1px solid var(--edge);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .2s ease-out, transform .2s ease-out, visibility .2s;
  }
  .cmdbar[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .cmdbar__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
    overflow: visible;
  }
  .cmdbar__link {
    justify-content: flex-start;
    gap: .7em;
    padding: 14px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--edge);
  }
  .cmdbar__link[aria-current="page"] { border-bottom-color: var(--neon); }

  .rail-cta { margin-left: auto; margin-right: 0; }

  .footer-col--wide { grid-column: span 1; }
}

/* ---------- 12. 响应式：≤640px ---------- */
@media (max-width: 640px) {
  body { background-attachment: scroll; }

  .rail-cta { display: none; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .footer-meta { gap: 6px 18px; }

  .orbit-card { min-width: 116px; }
}

/* ---------- 13. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }

  .header-progress { transition: none; }
}
