/* ============================================================
   97游戏站 · 共享外壳样式  /assets/site.css
   霓虹档案风：深空蓝黑底 + 青绿/紫/琥珀荧光信息层
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  background-color: #070B1A;
}

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

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

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

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

button {
  border: 0;
  cursor: pointer;
}

a { color: inherit; }

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

hr { border: 0; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --abyss: #070B1A;
  --panel: #0C1226;
  --line: #1B2540;
  --line-strong: #2C3A5E;
  --text: #EDF3FF;
  --muted: #94A3C8;
  --muted-deep: #5A6A8F;
  --cyan: #35F0C2;
  --violet: #9B5CFF;
  --amber: #FFB020;
  --pink: #FF5C7A;
  --teal-mist: #0F3B37;
  --violet-mist: #241640;
  --grad: linear-gradient(90deg, #35F0C2 0%, #9B5CFF 100%);

  --font-display: 'Chakra Petch', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Sarasa Mono SC', 'SFMono-Regular', monospace;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --maxw: 1280px;
  --gutter: clamp(16px, 3.6vw, 32px);
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  color: var(--text);
  background-color: var(--abyss);
  background-image:
    radial-gradient(62% 38% at 88% -6%, rgba(155, 92, 255, .18), transparent 70%),
    radial-gradient(56% 42% at 0% 2%, rgba(53, 240, 194, .10), transparent 72%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.02em;
  color: var(--text);
}

h1 { font-size: clamp(34px, 5.6vw, 61px); }
h2 { font-size: clamp(25px, 3.4vw, 39px); }
h3 { font-size: clamp(19px, 2.2vw, 25px); }

p { max-width: 70ch; }

strong { font-weight: 700; color: #fff; }

::selection {
  background: rgba(53, 240, 194, .28);
  color: #fff;
}

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

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

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

.tilt { display: inline-block; transform: skewX(-4deg); }

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -140px;
  z-index: 200;
  display: inline-block;
  padding: 10px 20px;
  background: var(--cyan);
  color: #04121A;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top .16s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- 5. 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 11, 26, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}

.site-header[data-scrolled] {
  background: rgba(7, 11, 26, .99);
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .95);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(27, 37, 64, .85);
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width .12s linear;
}

.header-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: var(--header-h);
  padding: 9px var(--gutter);
  display: flex;
  align-items: center;
  gap: 18px;
}

/* 品牌 */
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--teal-mist);
  border: 1px solid rgba(53, 240, 194, .55);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(53, 240, 194, .12), 0 0 18px -6px rgba(53, 240, 194, .6);
  transition: box-shadow .16s var(--ease), transform .16s var(--ease);
}

.brand:hover .brand-mark {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(53, 240, 194, .2), 0 0 22px -4px rgba(53, 240, 194, .9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}

.brand-line {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted-deep);
}

/* 移动端切换按钮 */
.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .16s var(--ease), opacity .16s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle-label { white-space: nowrap; }

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  transition: color .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted-deep);
  transition: color .16s var(--ease);
}

.nav-list a:hover {
  color: var(--text);
  background: rgba(155, 92, 255, .14);
}

.nav-list a:hover .nav-index { color: var(--violet); }

.nav-list a[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 240, 194, .10);
  box-shadow: inset 0 0 0 1px rgba(53, 240, 194, .38);
}

.nav-list a[aria-current="page"] .nav-index { color: var(--cyan); }

/* 右侧工具区 */
.header-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.command {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 8px;
  min-width: 216px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--panel);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.command:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 240, 194, .16);
}

.command-glyph {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted-deep);
  line-height: 1.4;
}

.command-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 4px 0;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  background: transparent;
}

.command-input::placeholder { color: var(--muted-deep); }
.command-input:focus { outline: none; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 176, 32, .38);
  background: rgba(255, 176, 32, .08);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: statusPulse 2.4s var(--ease) infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s var(--ease), background-color .16s var(--ease),
              border-color .16s var(--ease), color .16s var(--ease),
              box-shadow .16s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: var(--cyan);
  border-color: rgba(53, 240, 194, .45);
  background: linear-gradient(100deg, rgba(53, 240, 194, .18), rgba(155, 92, 255, .18));
}

.btn-primary:hover {
  border-color: var(--cyan);
  background: linear-gradient(100deg, rgba(53, 240, 194, .32), rgba(155, 92, 255, .32));
  box-shadow: 0 8px 22px -14px rgba(53, 240, 194, .95);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ---------- 7. 容器 / 排版辅助 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.page-head {
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--line);
}

.lede {
  margin-top: 16px;
  max-width: 64ch;
  font-size: 17px;
  line-height: 1.72;
  color: var(--muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 { font-size: clamp(22px, 2.8vw, 31px); }

.surface {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}

.divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted-deep);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb li { display: inline-flex; align-items: center; }

.breadcrumb li:not(:first-child)::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .16s var(--ease);
}

.breadcrumb a:hover { color: var(--cyan); }

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

/* ---------- 9. 标签胶囊 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(12, 18, 38, .85);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.5;
  white-space: nowrap;
}

.chip--cyan {
  color: var(--cyan);
  border-color: rgba(53, 240, 194, .42);
  background: rgba(15, 59, 55, .55);
}

.chip--violet {
  color: #C7A8FF;
  border-color: rgba(155, 92, 255, .45);
  background: var(--violet-mist);
}

.chip--amber {
  color: var(--amber);
  border-color: rgba(255, 176, 32, .42);
  background: rgba(255, 176, 32, .09);
}

.chip--pink {
  color: var(--pink);
  border-color: rgba(255, 92, 122, .42);
  background: rgba(255, 92, 122, .09);
}

/* ---------- 10. 栅格 ---------- */
.grid {
  display: grid;
  gap: var(--gutter);
}

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

/* ---------- 11. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background-color: var(--panel);
  background-image:
    radial-gradient(120% 92% at 12% 0%, rgba(155, 92, 255, .24), transparent 62%),
    radial-gradient(100% 92% at 100% 100%, rgba(53, 240, 194, .18), transparent 66%);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(53, 240, 194, .10);
}

.media-frame figcaption {
  position: absolute;
  left: 0;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 12px;
  border-left: 2px solid var(--cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(7, 11, 26, .82);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}

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

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

.js [data-reveal].reveal-in {
  opacity: 1;
  transform: none;
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 88px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  width: 100%;
  background: var(--grad);
  opacity: .85;
}

.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 46px var(--gutter) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 36px 32px;
}

.footer-col { min-width: 0; }

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-note {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 40ch;
}

.footer-note + .footer-note { margin-top: 10px; }

.footer-note--dim { color: var(--muted-deep); }

.footer-title {
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .16s var(--ease), padding-left .16s var(--ease);
}

.footer-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transform: translateY(-50%);
  transition: width .16s var(--ease);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  padding-left: 15px;
  color: var(--text);
}

.footer-links a:hover::before,
.footer-links a:focus-visible::before { width: 10px; }

.footer-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.footer-contact dt {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-deep);
}

.footer-contact dt:first-child { margin-top: 0; }

.footer-contact dd {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-closing {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  color: var(--muted);
}

.footer-meta {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted-deep);
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  transition: color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}

.to-top:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.to-top-arrow { font-family: var(--font-mono); font-size: 13px; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1180px) {
  .status-chip { display: none; }
}

@media (max-width: 1080px) {
  .command { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 18px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    box-shadow: 0 28px 44px -28px rgba(0, 0, 0, .95);
  }

  .site-nav[data-open] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .nav-list a {
    width: 100%;
    padding: 12px 12px;
    border-radius: var(--radius-md);
    font-size: 15px;
  }

  .nav-index { font-size: 11px; }

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

@media (max-width: 760px) {
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .footer-inner { padding-top: 36px; }
  .footer-bottom { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .header-cta { display: none; }
  .brand-line { display: none; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .site-footer { margin-top: 64px; }
  .page-head { padding: 26px 0 24px; }
  .lede { font-size: 15.5px; }
}

/* ---------- 15. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
  .btn:hover,
  .brand:hover .brand-mark,
  .to-top:hover { transform: none; }
  .status-dot { animation: none; }
}
