/* ==========================================================================
   爱游戏官方网址 — /assets/site.css
   共享外壳样式：reset / 变量 / 中文排版 / 页头 / 页脚 / 基础组件
   ========================================================================== */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, pre { margin: 0; }

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

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

button { font: inherit; color: inherit; background: none; border: 0; }

a { color: inherit; }

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

/* ---------- 2. Design tokens ---------- */
:root {
  --ink: #05130F;
  --ink-2: #081A15;
  --panel: #0B211B;
  --panel-2: #102E26;

  --line: rgba(151, 222, 205, 0.14);
  --line-strong: rgba(151, 222, 205, 0.30);

  --text: #E4F3EC;
  --text-2: #C3D8D0;
  --muted: #8AA69C;

  --cyan: #2BE8D0;
  --cyan-dim: rgba(43, 232, 208, 0.14);
  --cyan-line: rgba(43, 232, 208, 0.45);

  --orange: #FF8A2B;
  --orange-dim: rgba(255, 138, 43, 0.14);
  --orange-line: rgba(255, 138, 43, 0.45);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --shell: 1240px;
  --gutter: clamp(18px, 4vw, 54px);
  --head-h: 74px;

  --shadow-hard: 8px 8px 0 rgba(0, 0, 0, 0.5);
  --shadow-cyan: 5px 5px 0 rgba(43, 232, 208, 0.16);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --radius: 2px;
}

/* ---------- 3. Base ---------- */
html { background-color: var(--ink); }

body {
  min-height: 100vh;
  overflow-x: clip;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(90deg, rgba(151, 222, 205, 0.035) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(151, 222, 205, 0.025) 0 1px, transparent 1px 88px);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 520px at 82% -8%, rgba(43, 232, 208, 0.10), transparent 62%),
    radial-gradient(640px 480px at 4% 104%, rgba(255, 138, 43, 0.07), transparent 62%);
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
h3 { font-size: clamp(1.05rem, 1.7vw, 1.25rem); }

::selection { background: var(--cyan); color: #04140F; }

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

#main-content { outline: none; }

[id] { scroll-margin-top: calc(var(--head-h) + 24px); }

/* ---------- 4. Layout helpers ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  position: relative;
  z-index: 1;
  display: block;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 14px;
  z-index: 200;
  padding: 11px 18px;
  background: var(--cyan);
  color: #04140F;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 14px;
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: var(--cyan);
  color: #04140F;
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: var(--shadow-cyan);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background-color 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(43, 232, 208, 0.22);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
}

.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 8px 8px 0 rgba(43, 232, 208, 0.16);
}

.btn--orange {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0D02;
  box-shadow: 5px 5px 0 rgba(255, 138, 43, 0.18);
}

.btn--orange:hover { box-shadow: 8px 8px 0 rgba(255, 138, 43, 0.26); }

/* ---------- 6. Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 19, 15, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-strong);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 40px);
  min-height: var(--head-h);
  padding-block: 10px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 4px 0;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  background: var(--cyan);
  color: #04140F;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 rgba(43, 232, 208, 0.2);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.brand:hover .brand__mark {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(43, 232, 208, 0.3);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand__name {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

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

.nav-toggle__lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__lines i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}

.nav-toggle__label { white-space: nowrap; }

.site-head[data-open] .nav-toggle__lines i:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.site-head[data-open] .nav-toggle__lines i:nth-child(2) { opacity: 0; }
.site-head[data-open] .nav-toggle__lines i:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

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

.site-nav__list > li { flex: 0 0 auto; }

.site-nav__list a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.site-nav__list a:hover {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
}

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.65;
  transition: color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.site-nav__list a:hover .site-nav__idx { color: var(--cyan); opacity: 1; }

.site-nav__label { line-height: 1.2; }

.site-nav__list a[aria-current="page"] {
  color: var(--cyan);
  background: var(--panel);
  border-color: var(--line-strong);
}

.site-nav__list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--orange);
}

.site-nav__list a[aria-current="page"] .site-nav__idx {
  color: var(--orange);
  opacity: 1;
}

/* 滚动进度 */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(151, 222, 205, 0.08);
  pointer-events: none;
}

.progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

/* ---------- 7. Crumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.crumbs li { display: flex; align-items: center; gap: 8px; }

.crumbs li + li::before {
  content: "/";
  color: var(--line-strong);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

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

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

/* ---------- 8. Section head & kicker ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section-head h2 { margin: 0; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--cyan);
}

/* ---------- 9. Prose ---------- */
.prose {
  max-width: 70ch;
  color: var(--text-2);
}

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

.prose h2,
.prose h3 { color: var(--text); }

.prose h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

.prose h3 { font-size: 1.05rem; font-weight: 700; }

.prose ul {
  display: grid;
  gap: 0.5em;
  padding-left: 1.25em;
}

.prose ul li { position: relative; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.15em;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--cyan);
}

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 232, 208, 0.4);
  transition: border-color 0.16s var(--ease);
}

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

.prose strong { color: var(--text); }

.prose code {
  padding: 2px 6px;
  background: var(--panel-2);
  border-radius: var(--radius);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- 10. Grid ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
}

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

/* ---------- 11. Panels & cards ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 32px);
  box-shadow: var(--shadow-hard);
}

.panel--flat { box-shadow: none; }
.panel--cyan { border-color: var(--cyan-line); }
.panel--orange { border-color: var(--orange-line); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 24px);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.card:hover {
  background: var(--panel-2);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

/* ---------- 12. Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--cyan {
  color: var(--cyan);
  border-color: var(--cyan-line);
  background: var(--cyan-dim);
}

.tag--orange {
  color: var(--orange);
  border-color: var(--orange-line);
  background: var(--orange-dim);
}

/* ---------- 13. Stats ---------- */
.stat { display: grid; gap: 6px; }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.stat--cyan .stat__value { color: var(--cyan); }

.stat__label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- 14. Media ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

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

.media__ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(43, 232, 208, 0.07) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(43, 232, 208, 0.06) 0 1px, transparent 1px 56px),
    radial-gradient(120% 90% at 24% 26%, rgba(255, 138, 43, 0.16), transparent 58%);
}

.media > img,
.media > picture > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.04);
}

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  background: linear-gradient(0deg, rgba(5, 19, 15, 0.94), rgba(5, 19, 15, 0));
}

/* ---------- 15. Segmented control ---------- */
.segs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(16px, 2.4vw, 26px);
}

.segs__btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease),
    background-color 0.16s var(--ease);
}

.segs__btn:hover {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line-strong);
}

.segs__btn[aria-selected="true"] {
  color: var(--cyan);
  background: var(--panel-2);
  border-color: var(--cyan-line);
  box-shadow: inset 0 -2px 0 var(--orange);
}

.segs-panel[hidden] { display: none; }

/* ---------- 16. Reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

/* ---------- 17. Footer ---------- */
.site-foot {
  position: relative;
  z-index: 5;
  margin-top: clamp(56px, 9vw, 110px);
  background: var(--ink-2);
  border-top: 1px solid var(--line-strong);
}

.site-foot::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(120px, 26vw, 340px);
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.site-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px) clamp(26px, 4vw, 48px);
}

.site-foot__lead { min-width: 0; }

.site-foot__brand {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.site-foot__line {
  margin-top: 12px;
  max-width: 34ch;
  color: var(--text-2);
  font-size: 0.94rem;
}

.site-foot__lead .btn { margin-top: 20px; }

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

.foot-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.foot-col__list { display: grid; gap: 9px; }

.foot-col__list a {
  display: inline-block;
  color: var(--text-2);
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.foot-col__list a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.foot-col__list--plain span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.site-foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.site-foot__copy,
.site-foot__icp,
.site-foot__domain { margin: 0; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1100px) {
  .site-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot__lead { grid-column: 1 / -1; }
}

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

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    padding: 6px var(--gutter) 22px;
    max-height: min(78vh, 640px);
    overflow-y: auto;
    background: var(--ink-2);
    border-bottom: 2px solid var(--cyan);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
      visibility 0.24s linear;
  }

  .site-head[data-open] .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .site-nav__list > li { flex: 1 1 auto; }

  .site-nav__list a {
    justify-content: flex-start;
    gap: 14px;
    padding: 15px 4px;
    font-size: 1.02rem;
    border: 0;
    border-bottom: 1px dashed var(--line);
    border-radius: 0;
  }

  .site-nav__list a:hover { background: transparent; }

  .site-nav__list a[aria-current="page"] {
    background: transparent;
    color: var(--cyan);
    box-shadow: inset 3px 0 0 var(--orange);
    padding-left: 15px;
  }

  .site-nav__list a[aria-current="page"]::after { display: none; }
}

@media (max-width: 720px) {
  .site-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .site-foot__base { flex-direction: column; align-items: flex-start; }
  .section-head { align-items: flex-start; }
}

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

  .brand__meta { letter-spacing: 0.14em; }
  .btn { width: 100%; justify-content: center; }
  .site-foot__lead .btn { width: auto; }
}

/* ---------- 19. Motion preferences ---------- */
@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;
  }

  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
