/* ============================================================
   优发国游戏 · 共享样式 /assets/site.css
   夜间开服指挥台：蓝图网格 + 珠宝色分区 + 等宽数据层
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img, picture, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
table { border-collapse: collapse; }

/* ---------- tokens ---------- */
:root {
  --abyss: #080F1B;
  --abyss-2: #0B1524;
  --abyss-3: #0E1A2C;
  --lake: #0F5C7A;
  --dusk: #4A2A6B;
  --wine: #7A1F3D;
  --pulse: #2FE8D6;
  --gold: #F2B33D;
  --ink: #E8EEF5;
  --muted: #9FB0C4;
  --grid: rgba(30, 110, 122, .45);
  --grid-soft: rgba(30, 110, 122, .17);
  --hair: rgba(159, 176, 196, .18);
  --glass: rgba(255, 255, 255, .06);
  --glass-strong: rgba(255, 255, 255, .1);
  --shell: 1240px;
  --gutter: clamp(18px, 4vw, 44px);
  --header-h: 64px;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
body {
  background-color: var(--abyss);
  background-image:
    linear-gradient(to right, var(--grid-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-soft) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: center top;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.14;
  color: var(--ink);
}
h1 { font-size: clamp(42px, 7.2vw, 96px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: 22px; letter-spacing: -.01em; }
h4 { font-size: 18px; }
p { margin: 0 0 1.1em; }
strong { color: var(--ink); }
a { color: var(--pulse); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--ink); }
hr { border: 0; height: 1px; background: var(--hair); margin: 0; }
::selection { background: var(--pulse); color: #04222a; }
:focus-visible {
  outline: 2px solid var(--pulse);
  outline-offset: 3px;
  border-radius: 2px;
}
#main-content { scroll-margin-top: calc(var(--header-h) + 18px); }

.mono { font-family: var(--mono); letter-spacing: .04em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: -80px;
  left: 14px;
  z-index: 220;
  padding: 10px 18px;
  background: var(--pulse);
  color: #04222a;
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; color: #04222a; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(8, 15, 27, .92);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hair);
}
.cmdbar {
  max-width: var(--shell);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 3px;
  background: linear-gradient(140deg, var(--pulse), var(--lake));
  color: #04222a;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.brand__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--pulse);
  text-transform: uppercase;
}

/* nav */
.cmdnav { flex: 1 1 auto; min-width: 0; }
.cmdnav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.cmdnav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.cmdnav__link:hover { color: var(--ink); background: var(--glass); }
.cmdnav__idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(159, 176, 196, .55);
}
.cmdnav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--pulse);
  background: linear-gradient(180deg, rgba(47, 232, 214, .07), rgba(47, 232, 214, 0));
}
.cmdnav__link[aria-current="page"] .cmdnav__idx { color: var(--pulse); }

/* side cluster */
.cmdbar__side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}
.statusled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--glass);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.statusled__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pulse);
  animation: ledPulse 2.6s var(--ease) infinite;
}
.statusled__next { color: var(--gold); margin-left: 4px; }
@keyframes ledPulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 232, 214, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(47, 232, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 232, 214, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 8px 13px; font-size: 12.5px; }
.btn--lg { padding: 14px 24px; font-size: 15px; }
.btn--gold { background: var(--gold); color: #2A1A02; }
.btn--gold:hover { background: #FFC75A; color: #2A1A02; }
.btn--cyan { background: var(--pulse); color: #04222A; }
.btn--cyan:hover { background: #63F2E4; color: #04222A; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn--ghost:hover { color: var(--pulse); border-color: rgba(47, 232, 214, .55); }

/* ---------- nav toggle ---------- */
.navtoggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.navtoggle:hover { border-color: rgba(47, 232, 214, .5); }
.navtoggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.navtoggle__bars::before,
.navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.navtoggle__bars::before { top: -5px; }
.navtoggle__bars::after { top: 5px; }
.navtoggle[aria-expanded="true"] .navtoggle__bars { background: transparent; }
.navtoggle[aria-expanded="true"] .navtoggle__bars::before { transform: translateY(5px) rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- scroll rail ---------- */
.scrollrail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.scrollrail__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pulse), var(--gold));
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 10vw, 140px);
  border-top: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(14, 26, 44, .92), rgba(8, 15, 27, 1));
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(360px, 65%);
  height: 2px;
  background: linear-gradient(90deg, var(--pulse), rgba(47, 232, 214, 0));
}
.footgrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.6fr;
  gap: clamp(26px, 4vw, 56px);
  padding-top: clamp(42px, 6vw, 78px);
  padding-bottom: clamp(34px, 5vw, 60px);
}
.footcol { min-width: 0; }
.footcol__title {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand--foot { margin-bottom: 16px; }
.footline {
  max-width: 30ch;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}
.footlist {
  list-style: none;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
}
.footlist a {
  font-size: 14.5px;
  color: var(--muted);
}
.footlist a:hover { color: var(--pulse); }
.footlist--plain li {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--muted);
  word-break: break-word;
}
.footnote {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(159, 176, 196, .78);
  max-width: 40ch;
}
.footbar {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px var(--gutter) 34px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.footbar__mem { margin: 0; color: var(--gold); }
.footbar__legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.footbar__legal li { display: inline-flex; align-items: center; gap: 8px; }
.footbar__legal li + li::before { content: "/"; color: var(--grid); }
.footbar__legal a { color: var(--muted); }
.footbar__legal a:hover { color: var(--pulse); }
.footbar__meta { margin: 0; }
.footbar__icp { color: var(--ink); }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}
.section { position: relative; padding: clamp(54px, 8vw, 118px) 0; }
.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }
.zone { position: relative; }
.zone::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--grid);
  opacity: .55;
}
.zone--lake { background: linear-gradient(180deg, rgba(15, 92, 122, .34), rgba(8, 15, 27, 0) 72%); }
.zone--dusk { background: linear-gradient(180deg, rgba(74, 42, 107, .38), rgba(8, 15, 27, 0) 72%); }
.zone--wine { background: linear-gradient(180deg, rgba(122, 31, 61, .32), rgba(8, 15, 27, 0) 72%); }

/* ---------- section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--pulse);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--pulse);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(26px, 4vw, 52px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hair);
}
.section-head h2 { margin: 0; }
.prose { max-width: 44ch; font-size: 17.5px; color: var(--muted); }
.prose p { margin-bottom: 1.15em; }
.prose strong { color: var(--ink); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--grid); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--pulse); }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--grid);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}
.tag--pulse { color: var(--pulse); border-color: rgba(47, 232, 214, .42); background: rgba(47, 232, 214, .08); }
.tag--gold { color: var(--gold); border-color: rgba(242, 179, 61, .45); background: rgba(242, 179, 61, .09); }

/* ---------- data table ---------- */
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 520px; font-size: 15px; }
.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--grid);
}
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
  color: var(--ink);
}
.data-table tbody tr:hover { background: var(--glass); }
.data-table .num { color: var(--gold); }

/* ---------- stat panel ---------- */
.statpanel {
  display: grid;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.statpanel__cell { background: var(--abyss-2); padding: 18px 20px; }
.statpanel__val {
  font-family: var(--mono);
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.statpanel__val .unit { font-size: .42em; color: var(--muted); margin-left: 6px; }
.statpanel__key {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- fold (expandable group) ---------- */
.fold { border-top: 1px solid var(--hair); }
.fold:last-child { border-bottom: 1px solid var(--hair); }
.fold__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
  transition: color .18s var(--ease);
}
.fold__head:hover { color: var(--pulse); }
.fold__sign {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1px solid var(--grid);
  border-radius: 2px;
}
.fold__sign::before,
.fold__sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--pulse);
  transform: translate(-50%, -50%);
}
.fold__sign::before { width: 8px; height: 1.5px; }
.fold__sign::after { width: 1.5px; height: 8px; transition: transform .22s var(--ease), opacity .22s var(--ease); }
.fold__head[aria-expanded="true"] .fold__sign::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.fold__body { padding: 0 4px 22px 32px; color: var(--muted); }
.fold__body p { max-width: 46ch; }
.fold__body[hidden] { display: none; }

/* ---------- media containers ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background:
    linear-gradient(150deg, rgba(15, 92, 122, .5), rgba(74, 42, 107, .45)),
    var(--abyss-2);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-soft) 1px, transparent 1px);
  background-size: 34px 34px;
}
.media > img,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 2 / 3; }
.media__hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(232, 238, 245, .72);
}
.media__caption {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- reveal ---------- */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
html.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .cmdbar__side .btn--ghost { display: none; }
}
@media (max-width: 1180px) {
  .statusled { display: none; }
}
@media (max-width: 1080px) {
  :root { --header-h: 62px; }
  .navtoggle { display: inline-flex; }
  .cmdnav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 110;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gutter) 22px;
    background: rgba(8, 15, 27, .98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hair);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s var(--ease);
  }
  .cmdnav[data-open] { opacity: 1; visibility: visible; transform: none; }
  .cmdnav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .cmdnav__link {
    padding: 14px 6px;
    font-size: 16px;
    border-bottom: 1px solid var(--hair);
    border-left: 2px solid transparent;
  }
  .cmdnav__link[aria-current="page"] {
    border-bottom-color: var(--hair);
    border-left-color: var(--pulse);
    padding-left: 14px;
    background: linear-gradient(90deg, rgba(47, 232, 214, .09), rgba(47, 232, 214, 0));
  }
  .footgrid { grid-template-columns: 1fr 1fr; }
  .shell { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .footgrid { grid-template-columns: 1fr; gap: 32px; }
  .footbar { justify-content: flex-start; }
  .cmdbar { gap: 10px; }
  .brand__name { font-size: 15px; }
  .brand__tag { font-size: 9.5px; letter-spacing: .12em; }
  .fold__body { padding-left: 4px; }
}
@media (max-width: 460px) {
  :root { --header-h: 58px; }
  .cmdbar__side .btn--gold { padding: 7px 10px; font-size: 12px; }
  .brand__tag { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .scrollrail__fill { transition: none !important; }
}
