:root {
  color-scheme: dark;
  --ink: #f5f2e9;
  --muted: rgba(245, 242, 233, 0.66);
  --line: rgba(255, 255, 255, 0.14);
  --surface: #080a0f;
  --accent: #f2c67c;
  --accent-rgb: 242, 198, 124;
  --font-display: "Bodoni 72", "Songti SC", "STSong", serif;
  --font-ui: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--surface); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.6;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #090a0d;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 4vw, 64px);
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}
.brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), .8);
}
.header-note {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero::before {
  background:
    radial-gradient(circle at 72% 28%, rgba(91, 140, 255, .18), transparent 30%),
    radial-gradient(circle at 20% 70%, rgba(139, 92, 246, .16), transparent 34%);
}
.hero::after {
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 180px 0 clamp(54px, 8vw, 100px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 44px;
  height: 1px;
  background: currentColor;
}
.hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 11vw, 148px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.055em;
}
.hero h1 span {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: clamp(11px, 1.3vw, 15px);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.hero-lead {
  max-width: 600px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 19px);
}
.scroll-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.scroll-note::after {
  content: "";
  width: 72px;
  height: 1px;
  background: var(--line);
}

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.game-panel {
  position: relative;
  min-height: min(780px, 86svh);
  display: flex;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background-position: center;
  background-size: cover;
  border-right: 1px solid var(--line);
}
.game-panel:last-child { border-right: 0; }
.game-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, .04) 0%, rgba(5, 7, 12, .26) 40%, rgba(5, 7, 12, .96) 100%),
    linear-gradient(90deg, rgba(5, 7, 12, .35), transparent 65%);
}
.game-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  transition: transform 1.2s cubic-bezier(.2, .65, .25, 1);
}
.game-panel--shanhai { background-image: url('../assets/shanhai-cover.jpg'); }
.game-panel--zhanlue { background-image: url('../assets/zhanlue-cover.jpg'); }
.game-panel:hover::after { transform: scale(1.025); }
.panel-content {
  width: 100%;
  padding: clamp(30px, 5vw, 72px);
}
.panel-no {
  color: var(--panel-accent, var(--accent));
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.game-panel h2 {
  margin: 16px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.045em;
}
.panel-en {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.panel-copy {
  max-width: 480px;
  margin: 22px 0 28px;
  color: rgba(245, 242, 233, .74);
}
.panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
}
.panel-meta span + span::before {
  content: "·";
  margin-right: 18px;
  color: rgba(255, 255, 255, .3);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  color: var(--panel-accent, var(--accent));
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}
.text-link span { transition: transform .25s ease; }
.text-link:hover span { transform: translateX(5px); }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 4vw, 64px);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
  border-top: 1px solid var(--line);
}

/* Game detail pages */
.game-page {
  --accent: #f2c67c;
  --accent-rgb: 242, 198, 124;
  background: #06070b;
}
.game-page--zhanlue {
  --accent: #7fd8ff;
  --accent-rgb: 127, 216, 255;
}
.game-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.game-stage__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
  animation: stage-in 1.5s cubic-bezier(.2, .65, .25, 1) both;
}
.game-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 5, 8, .94) 0%, rgba(4, 5, 8, .66) 42%, rgba(4, 5, 8, .18) 78%),
    linear-gradient(180deg, rgba(4, 5, 8, .12), rgba(4, 5, 8, .88));
}
.game-stage__inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 160px 0 clamp(52px, 8vw, 96px);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(42px, 8vh, 90px);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.back-link:hover { color: var(--ink); }
.game-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.game-title {
  max-width: 930px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 160px);
  font-weight: 500;
  line-height: .86;
  letter-spacing: -.06em;
}
.game-title small {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.game-intro {
  max-width: 580px;
  margin: 32px 0 0;
  color: rgba(245, 242, 233, .76);
  font-size: clamp(15px, 1.5vw, 19px);
}
.game-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 30px 0 34px;
  color: var(--muted);
  font-size: 12px;
}
.game-facts span { display: inline-flex; align-items: center; gap: 8px; }
.game-facts span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), .8);
}
.download-wrap { max-width: 520px; }
.download-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 10px 0 22px;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: 999px;
  background: var(--accent);
  color: #090a0d;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.download-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(var(--accent-rgb), .22);
}
.download-button:disabled { cursor: wait; opacity: .82; }
.download-button__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 7, 10, .12);
  font-size: 18px;
}
.download-status {
  min-height: 24px;
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.progress {
  height: 3px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
}
.progress__bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .7);
  transition: width .15s linear;
}
.download-note {
  margin: 13px 4px 0;
  color: rgba(245, 242, 233, .5);
  font-size: 11px;
}

.details {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(40px, 8vw, 120px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) 0;
}
.section-label {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  min-height: 84px;
  padding: 0 0 28px 58px;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}
.steps li + li { padding-top: 28px; }
.steps li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
}
.steps li + li::before { top: 29px; }
.steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.spec-list {
  margin: 0;
  border-top: 1px solid var(--line);
}
.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; text-align: right; }
.hash {
  margin-top: 24px;
  color: rgba(245, 242, 233, .38);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
  word-break: break-all;
}

@keyframes stage-in {
  from { opacity: 0; transform: scale(1.055); }
  to { opacity: 1; transform: scale(1.01); }
}

@media (max-width: 820px) {
  .header-note { display: none; }
  .games { grid-template-columns: 1fr; }
  .game-panel { min-height: 76svh; border-right: 0; border-bottom: 1px solid var(--line); }
  .game-panel:last-child { border-bottom: 0; }
  .details { grid-template-columns: 1fr; }
  .game-stage__inner { padding-top: 130px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
