/* ============================================================
   百胜游戏中心 · Nexus Site Kit
   /assets/site.css —— reset / tokens / 中文字排 / 共享头尾 / 通用组件
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a { color: inherit; }

/* ---------- tokens ---------- */
:root {
  --nx-space: #080D22;
  --nx-panel: #121A38;
  --nx-line: #2B3A66;
  --nx-cyan: #3FE0D0;
  --nx-orange: #FF7A3C;
  --nx-grad-a: #B44CF0;
  --nx-grad-b: #F2418E;
  --nx-paper: #EEF3FF;
  --nx-mist: #9AA6CC;
  --nx-green: #3DDC97;
  --nx-amber: #FFC24B;

  --nx-rail: 92px;
  --nx-rail-open: 252px;
  --nx-topbar: 60px;
  --nx-wrap: 1180px;
  --nx-gutter: 24px;

  --nx-mono-font: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --nx-latin-font: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --nx-cn-font: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;

  --nx-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
body {
  background-color: var(--nx-space);
  background-image:
    radial-gradient(1200px 620px at 82% -8%, rgba(180, 76, 240, .14), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(63, 224, 208, .09), transparent 60%);
  background-repeat: no-repeat;
  color: var(--nx-paper);
  font-family: var(--nx-cn-font);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
p { max-width: 68ch; }

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

::selection { background: rgba(63, 224, 208, .28); color: var(--nx-paper); }

/* ---------- utilities ---------- */
.nx-wrap {
  width: min(100% - (var(--nx-gutter) * 2), var(--nx-wrap));
  margin-inline: auto;
}

.nx-section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.nx-canvas {
  background-image:
    linear-gradient(rgba(43, 58, 102, .26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 58, 102, .18) 1px, transparent 1px);
  background-size: 100% 32px, 88px 100%;
}

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

.nx-index {
  display: inline-block;
  font-family: var(--nx-mono-font);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nx-mist);
}

.nx-lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: var(--nx-mist);
  max-width: 60ch;
}

/* ---------- skip link ---------- */
.nx-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  background: var(--nx-cyan);
  color: #04121A;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 2px;
  text-decoration: none;
  transition: transform .22s var(--nx-ease);
}
.nx-skip:focus { transform: translateY(0); }

/* ---------- scroll progress ---------- */
.nx-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 3px;
  height: 100vh;
  z-index: 80;
  background: rgba(43, 58, 102, .45);
  pointer-events: none;
}
.nx-progress__bar {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--nx-cyan), var(--nx-orange));
  transition: height .12s linear;
}

/* ---------- header shell ---------- */
.nx-header { position: relative; z-index: 60; }

/* ---------- side rail ---------- */
.nx-rail {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nx-rail);
  z-index: 70;
  flex-direction: column;
  padding: 22px 0 16px;
  overflow: hidden;
  background-color: #0B1230;
  background-image:
    linear-gradient(180deg, rgba(18, 26, 56, .96), rgba(8, 13, 34, .98)),
    repeating-linear-gradient(180deg, rgba(43, 58, 102, .42) 0 1px, transparent 1px 30px);
  border-right: 1px solid var(--nx-line);
  transition: width .32s var(--nx-ease), box-shadow .32s var(--nx-ease);
}
.nx-rail:hover,
.nx-rail:focus-within {
  width: var(--nx-rail-open);
  box-shadow: 28px 0 70px rgba(4, 7, 18, .72);
}

.nx-rail__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--nx-line);
  text-decoration: none;
  color: var(--nx-paper);
}
.nx-rail__mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-family: var(--nx-mono-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #05121B;
  background: linear-gradient(135deg, var(--nx-cyan) 8%, var(--nx-orange) 92%);
}
.nx-rail__brandtext {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .28s var(--nx-ease) .06s, transform .28s var(--nx-ease) .06s;
}
.nx-rail:hover .nx-rail__brandtext,
.nx-rail:focus-within .nx-rail__brandtext { opacity: 1; transform: none; }
.nx-rail__name { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.nx-rail__sub { font-size: 12px; color: var(--nx-mist); line-height: 1.5; }

.nx-rail__nav { padding: 18px 0 0; }

.nx-navlist { display: flex; flex-direction: column; }

.nx-navlink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 24px;
  font-size: 15px;
  color: var(--nx-mist);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nx-navlink::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--nx-cyan);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .26s var(--nx-ease), background-color .2s;
}
.nx-navlink__num {
  font-family: var(--nx-mono-font);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--nx-line);
  transition: color .2s;
}
.nx-navlink__label {
  font-weight: 500;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .28s var(--nx-ease) .05s, transform .28s var(--nx-ease) .05s;
}
.nx-rail:hover .nx-navlink__label,
.nx-rail:focus-within .nx-navlink__label { opacity: 1; transform: none; }

.nx-navlink:hover { color: var(--nx-paper); background: rgba(63, 224, 208, .07); }
.nx-navlink:hover .nx-navlink__num { color: var(--nx-cyan); }

.nx-navlink[aria-current="page"] { color: var(--nx-cyan); background: rgba(63, 224, 208, .06); }
.nx-navlink[aria-current="page"]::before { transform: scaleY(1); }
.nx-navlink[aria-current="page"] .nx-navlink__num { color: var(--nx-orange); }
.nx-navlink[aria-current="page"] .nx-navlink__label { font-weight: 700; }

.nx-rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px 4px;
  border-top: 1px solid var(--nx-line);
}
.nx-rail__util {
  font-size: 13px;
  color: var(--nx-mist);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .28s var(--nx-ease) .08s, transform .28s var(--nx-ease) .08s, color .2s;
}
.nx-rail:hover .nx-rail__util,
.nx-rail:focus-within .nx-rail__util { opacity: 1; transform: none; }
.nx-rail__util:hover { color: var(--nx-cyan); }

/* ---------- mobile topbar ---------- */
.nx-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nx-topbar);
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  background: rgba(8, 13, 34, .94);
  border-bottom: 1px solid var(--nx-line);
}
.nx-topbar__brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--nx-paper);
}
.nx-topbar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--nx-line);
  border-radius: 2px;
  font-size: 13px;
  color: var(--nx-paper);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.nx-topbar__toggle:hover { border-color: var(--nx-cyan); background: rgba(63, 224, 208, .08); }
.nx-topbar__toggletext { letter-spacing: .08em; }
.nx-topbar__bars { display: flex; flex-direction: column; gap: 4px; width: 16px; }
.nx-topbar__bars i { display: block; height: 1.5px; width: 100%; background: var(--nx-orange); }
.nx-topbar__bars i:last-child { width: 62%; background: var(--nx-cyan); }

/* ---------- scrim ---------- */
.nx-scrim {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 7, 18, .74);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--nx-ease), visibility .3s;
}
.nx-scrim[data-visible] { opacity: 1; visibility: visible; }

/* ---------- drawer ---------- */
.nx-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(86vw, 344px);
  z-index: 95;
  display: flex;
  flex-direction: column;
  padding: 18px 0 22px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0D1433, #080D22 70%);
  border-right: 1px solid var(--nx-line);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .34s var(--nx-ease), visibility .34s;
}
.nx-drawer[data-open] { transform: none; visibility: visible; }

.nx-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--nx-line);
}
.nx-drawer__close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nx-line);
  border-radius: 2px;
  font-size: 20px;
  line-height: 1;
  color: var(--nx-paper);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.nx-drawer__close:hover { border-color: var(--nx-orange); color: var(--nx-orange); }

.nx-drawer__nav { padding: 10px 0; }

.nx-drawer__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 0;
  border-top: 1px solid var(--nx-line);
}
.nx-drawer .nx-rail__util { opacity: 1; transform: none; font-size: 14px; }

.nx-navlist--drawer .nx-navlink { padding: 14px 20px; font-size: 17px; }
.nx-navlist--drawer .nx-navlink__label { opacity: 1; transform: none; }
.nx-navlist--drawer .nx-navlink__num { color: var(--nx-cyan); }

/* ---------- buttons ---------- */
.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--nx-cyan);
  border-radius: 2px;
  color: var(--nx-cyan);
  background: transparent;
  cursor: pointer;
  transition: background-color .22s, color .22s, border-color .22s, box-shadow .22s, transform .22s;
}
.nx-btn:hover { background: rgba(63, 224, 208, .12); transform: translateY(-1px); }

.nx-btn--primary {
  background: var(--nx-orange);
  border-color: var(--nx-orange);
  color: #140A03;
}
.nx-btn--primary:hover {
  background: #FF8F5B;
  color: #140A03;
  box-shadow: 0 0 0 4px rgba(255, 122, 60, .16);
}

.nx-btn--ghost {
  border-color: var(--nx-line);
  color: var(--nx-paper);
}
.nx-btn--ghost:hover { border-color: var(--nx-cyan); background: rgba(63, 224, 208, .08); }

/* ---------- breadcrumb ---------- */
.nx-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--nx-mono-font);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nx-mist);
}
.nx-crumb li { display: inline-flex; align-items: center; gap: 8px; }
.nx-crumb li + li::before { content: "/"; color: var(--nx-line); }
.nx-crumb a { color: var(--nx-mist); text-decoration: none; transition: color .2s; }
.nx-crumb a:hover { color: var(--nx-cyan); }
.nx-crumb [aria-current="page"] { color: var(--nx-paper); }

/* ---------- record card ---------- */
.nx-record {
  padding: 18px 20px;
  background: var(--nx-panel);
  border-left: 2px solid var(--nx-line);
  transition: border-color .24s, background-color .24s;
}
.nx-record:hover { border-left-color: var(--nx-cyan); background: #16203F; }

/* ---------- tag ---------- */
.nx-tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid rgba(63, 224, 208, .42);
  border-radius: 12px;
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--nx-cyan);
  white-space: nowrap;
}

/* ---------- media placeholder ---------- */
.nx-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: 3px;
  background-color: #0C1330;
  background-image: linear-gradient(148deg, rgba(180, 76, 240, .22), rgba(63, 224, 208, .14) 46%, rgba(8, 13, 34, .9));
}
.nx-media img { width: 100%; height: 100%; object-fit: cover; }
.nx-media--21x9 { aspect-ratio: 21 / 9; }
.nx-media--16x9 { aspect-ratio: 16 / 9; }
.nx-media--4x3 { aspect-ratio: 4 / 3; }
.nx-media--1x1 { aspect-ratio: 1 / 1; }
.nx-media__index {
  position: absolute;
  left: 12px;
  top: 10px;
  font-family: var(--nx-mono-font);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--nx-cyan);
}
.nx-media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 16px 12px;
  font-size: 14px;
  color: var(--nx-paper);
  background: linear-gradient(transparent, rgba(8, 13, 34, .92));
}

/* ---------- reveal ---------- */
.nx-reveal { transition: opacity .6s var(--nx-ease), transform .6s var(--nx-ease); }
.nx-js .nx-reveal:not(.is-in) { opacity: 0; transform: translateY(24px); }

/* ---------- footer ---------- */
.nx-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background: var(--nx-panel);
  border-top: 1px solid var(--nx-line);
}
.nx-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--nx-cyan), var(--nx-orange) 42%, rgba(180, 76, 240, .55) 70%, transparent 96%);
}

.nx-footer__inner {
  width: min(100% - (var(--nx-gutter) * 2), var(--nx-wrap));
  margin-inline: auto;
  padding: clamp(44px, 6vw, 72px) 0 28px;
}

.nx-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 38px;
}

.nx-footer__mark {
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--nx-paper);
  max-width: 22ch;
}
.nx-footer__legal {
  margin-top: 14px;
  font-family: var(--nx-mono-font);
  font-size: 13px;
  color: var(--nx-mist);
  max-width: none;
}
.nx-footer__version {
  margin-top: 8px;
  font-size: 13px;
  color: var(--nx-mist);
  max-width: none;
}
.nx-footer__version .nx-mono { color: var(--nx-amber); }

.nx-footer__title {
  font-family: var(--nx-mono-font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--nx-cyan);
  margin-bottom: 14px;
}

.nx-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}
.nx-footer__links a {
  font-size: 14px;
  color: var(--nx-mist);
  text-decoration: none;
  transition: color .2s;
}
.nx-footer__links a:hover { color: var(--nx-cyan); }

.nx-updatelist { display: flex; flex-direction: column; }
.nx-updatelist li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(43, 58, 102, .8);
}
.nx-updatelist li:last-child { border-bottom: 0; }
.nx-updatelist__text { font-size: 14px; line-height: 1.6; color: var(--nx-paper); }
.nx-updatelist__time {
  font-family: var(--nx-mono-font);
  font-size: 12px;
  color: var(--nx-mist);
  white-space: nowrap;
}

.nx-footer__line {
  font-size: 14px;
  line-height: 1.7;
  color: var(--nx-paper);
  max-width: 34ch;
}
.nx-footer__line + .nx-footer__line { margin-top: 8px; }
.nx-footer__note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--nx-mist);
  max-width: 34ch;
}

.nx-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: 20px;
  border-top: 1px solid var(--nx-line);
}
.nx-footer__bar .nx-footer__note { margin-top: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  body { padding-top: var(--nx-topbar); }
  .nx-section { padding-block: clamp(36px, 8vw, 64px); }
}

@media (min-width: 768px) {
  :root { --nx-gutter: 32px; }
  .nx-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  body { padding-left: var(--nx-rail); }
  .nx-rail { display: flex; }
  .nx-topbar { display: none; }
  .nx-progress { left: var(--nx-rail); }
  .nx-scrim { display: none; }
  .nx-drawer { display: none; }
}

@media (min-width: 1080px) {
  .nx-footer__grid { grid-template-columns: 1.25fr 1fr 1.6fr 1.1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .nx-rail,
  .nx-rail__brandtext,
  .nx-navlink__label,
  .nx-rail__util,
  .nx-drawer,
  .nx-scrim,
  .nx-progress__bar { transition: none !important; }

  .nx-reveal { transition: opacity .35s linear !important; }
  .nx-js .nx-reveal:not(.is-in) { transform: none !important; }
}
