/* =========================================================
   电子游戏888攻略 · 共享站点样式
   文件路径：/assets/site.css
   ========================================================= */

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

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

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 { display: block; max-width: 100%; }

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

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

main { display: block; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --void: #0B0E14;
  --panel: #11161F;
  --floor: #1A2130;
  --line: #2A3446;
  --cyan: #00F0FF;
  --violet: #8B5CF6;
  --orange: #FF7A45;
  --text: #E8EDF5;
  --text-dim: #9AA7BD;
  --text-mute: #6E7C93;
  --ok: #2BD9A6;
  --warn: #FFC24B;

  /* 骨架 */
  --gutter: 20px;
  --page-max: 1180px;
  --gap: 24px;
  --radius-s: 4px;
  --radius-m: 14px;

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Courier, monospace;

  /* 尺幅 */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-17: 17px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-32: 32px;
  --fs-44: 44px;
  --fs-64: 64px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--void);
  background-image:
    radial-gradient(58% 42% at 10% -4%, rgba(0, 240, 255, 0.10), transparent 62%),
    radial-gradient(52% 48% at 94% 8%, rgba(139, 92, 246, 0.14), transparent 66%),
    radial-gradient(66% 38% at 50% 104%, rgba(255, 122, 69, 0.07), transparent 72%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-17);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
  body {
    font-size: var(--fs-16);
    line-height: 1.8;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.26;
  color: var(--text);
}

h1 { font-size: clamp(32px, 6vw, 64px); }
h2 { font-size: clamp(24px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 2.4vw, 32px); }
h4 { font-size: var(--fs-20); }

p { text-wrap: pretty; }

::selection {
  background: rgba(0, 240, 255, 0.28);
  color: #FFFFFF;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

main:focus-visible { outline: none; }

/* ---------- 4. 布局工具 ---------- */
.container {
  width: min(var(--page-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: clamp(28px, 5vw, 56px); }

.grid {
  display: grid;
  gap: var(--gap);
}

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

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

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

/* ---------- 5. 通用面板与标签 ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: clamp(20px, 3.2vw, 36px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.panel--live {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.18), 0 16px 36px rgba(0, 0, 0, 0.42);
  transform: translateY(-4px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--floor);
  color: var(--text-dim);
  font-size: var(--fs-12);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.42);
  background: rgba(0, 240, 255, 0.08);
}

.tag--orange {
  color: var(--orange);
  border-color: rgba(255, 122, 69, 0.45);
  background: rgba(255, 122, 69, 0.08);
}

.tag--warn {
  color: var(--warn);
  border-color: rgba(255, 194, 75, 0.42);
  background: rgba(255, 194, 75, 0.08);
}

.tag--ok {
  color: var(--ok);
  border-color: rgba(43, 217, 166, 0.42);
  background: rgba(43, 217, 166, 0.08);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--floor);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.32), 0 0 18px rgba(0, 240, 255, 0.16);
}

.btn--cta {
  background: var(--orange);
  border-color: transparent;
  color: #0B0E14;
  animation: cta-breathe 4s ease-in-out infinite;
}

.btn--cta:hover {
  background: #FF8F62;
  color: #0B0E14;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255, 122, 69, 0.55), 0 0 24px rgba(255, 122, 69, 0.4);
}

@keyframes cta-breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.42), 0 0 16px rgba(255, 122, 69, 0.22);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 122, 69, 0), 0 0 26px rgba(255, 122, 69, 0.44);
  }
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  color: var(--text-mute);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  color: var(--line);
}

.breadcrumbs a {
  color: var(--text-dim);
  transition: color 180ms ease;
}

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

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

/* ---------- 8. 正文容器 ---------- */
.prose {
  max-width: 46em;
  font-size: var(--fs-16);
  line-height: 1.85;
  color: var(--text);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  margin-top: 2em;
  font-size: clamp(20px, 2.4vw, 28px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: var(--fs-20);
}

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 240, 255, 0.4);
  transition: border-color 180ms ease;
}

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

.prose ul,
.prose ol { padding-left: 1.2em; }

.prose ul > li {
  position: relative;
  padding-left: 1em;
  list-style: none;
}

.prose ul > li + li { margin-top: 0.5em; }

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--cyan);
}

.prose ol { list-style: decimal; }
.prose ol > li + li { margin-top: 0.5em; }
.prose ol > li::marker { color: var(--cyan); font-weight: 700; }

.prose blockquote {
  border-left: 2px solid var(--cyan);
  padding: 4px 0 4px 18px;
  color: var(--text-dim);
  font-family: var(--font-serif);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: var(--radius-s);
  background: var(--floor);
  border: 1px solid var(--line);
  color: var(--cyan);
}

/* ---------- 9. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(0, 240, 255, 0.16), transparent 58%),
    radial-gradient(110% 110% at 92% 100%, rgba(139, 92, 246, 0.22), transparent 62%),
    var(--floor);
}

.media-frame > img,
.media-frame > picture > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.04) 0%, rgba(11, 14, 20, 0.74) 100%);
}

.media-frame__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.media-frame__placeholder {
  position: absolute;
  inset: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(42, 52, 70, 0.9);
  border-radius: var(--radius-s);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: rgba(154, 167, 189, 0.7);
}

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

/* ---------- 10. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  background: var(--cyan);
  color: #05070B;
  font-size: var(--fs-14);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* ---------- 11. 头部：悬浮胶囊 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 14px 0 12px;
  background: linear-gradient(180deg,
    rgba(11, 14, 20, 0.94) 18%,
    rgba(11, 14, 20, 0.62) 62%,
    rgba(11, 14, 20, 0) 100%);
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  width: min(var(--page-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: 8px 12px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 22, 31, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 34px rgba(0, 0, 0, 0.5);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.nav-pill:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

/* 品牌 */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  flex: 0 0 auto;
}

.nav-brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: var(--fs-12);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #05070B;
  background: linear-gradient(140deg, var(--cyan) 0%, #4CC9F0 44%, var(--violet) 100%);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.32);
}

.nav-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
}

.nav-brand__name {
  font-size: var(--fs-16);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-brand__sub {
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--text-mute);
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle__label { letter-spacing: 0.08em; }

.nav-pill[data-open] .nav-toggle {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.18);
}

.nav-pill[data-open] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-pill[data-open] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-pill[data-open] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 导航 */
.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: var(--fs-14);
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.48);
}

/* 头部 CTA */
.nav-cta {
  flex: 0 0 auto;
  padding-inline: 18px;
  font-size: var(--fs-14);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

/* ---------- 12. 头部移动端 ---------- */
@media (max-width: 900px) {
  .site-header { padding: 10px 0 8px; }

  .nav-pill {
    flex-wrap: wrap;
    gap: 8px;
    border-radius: var(--radius-m);
    padding: 8px 10px;
  }

  .nav-brand {
    order: 1;
    margin-right: auto;
  }

  .nav-brand__sub { display: none; }

  .nav-cta { order: 2; }

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

  .site-nav {
    order: 4;
    flex-basis: 100%;
    margin-left: 0;
    display: none;
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .site-nav__link {
    justify-content: flex-start;
    min-height: 46px;
    padding: 0 14px;
    border-radius: var(--radius-s);
    font-size: var(--fs-16);
  }

  .scroll-progress {
    left: 14px;
    right: 14px;
    bottom: 3px;
  }
}

@media (max-width: 420px) {
  .nav-cta {
    min-height: 40px;
    padding-inline: 12px;
    font-size: var(--fs-12);
  }
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  margin-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(20px, 4vw, 40px);
}

.footer-panel {
  position: relative;
  overflow: hidden;
  width: min(var(--page-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.footer-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 52%, rgba(255, 122, 69, 0.72));
  opacity: 0.85;
}

.footer-panel::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 68%);
  pointer-events: none;
}

.footer-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

/* 页脚品牌 */
.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.footer-brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-s);
  font-size: var(--fs-12);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #05070B;
  background: linear-gradient(140deg, var(--cyan), var(--violet));
}

.footer-brand__name {
  font-size: var(--fs-20);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-brand__line {
  margin-top: 14px;
  font-size: var(--fs-14);
  letter-spacing: 0.04em;
  color: var(--cyan);
}

.footer-brand__note {
  margin-top: 8px;
  max-width: 26em;
  font-size: var(--fs-12);
  line-height: 1.8;
  color: var(--text-mute);
}

/* 页脚栏目 */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col__title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-12);
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.footer-list {
  display: grid;
  gap: 6px;
}

.footer-list__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: var(--fs-14);
  color: var(--text-dim);
  transition: color 180ms ease;
}

.footer-list__link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 180ms ease, margin-right 180ms ease;
}

.footer-list__link:hover,
.footer-list__link:focus-visible { color: var(--cyan); }

.footer-list__link:hover::before,
.footer-list__link:focus-visible::before {
  width: 12px;
  margin-right: 8px;
}

/* 页脚联系面板 */
.footer-contact {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: clamp(24px, 4vw, 40px);
  padding: clamp(16px, 2.6vw, 24px);
  background: var(--floor);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.footer-contact__title {
  font-size: var(--fs-14);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text);
}

.footer-contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
}

.footer-contact__item {
  display: block;
  min-width: 0;
}

.footer-contact__label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  color: var(--text-mute);
}

.footer-contact__value {
  display: block;
  font-size: var(--fs-14);
  color: var(--text);
  overflow-wrap: anywhere;
}

.footer-contact__value--mono {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  letter-spacing: 0.01em;
  color: var(--cyan);
}

.footer-contact__note {
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: var(--fs-12);
  line-height: 1.8;
  color: var(--text-dim);
}

/* 页脚底部 */
.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-12);
  color: var(--text-mute);
}

.footer-bottom__line {
  margin-right: auto;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.footer-bottom__icp { letter-spacing: 0.06em; }

.footer-bottom__copy { color: var(--text-mute); }

/* ---------- 14. 页脚响应式 ---------- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-bottom__line { margin-right: 0; }
}

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