:root {
  color-scheme: dark;
  --ink: #eef4f1;
  --muted: #8c9b98;
  --line: rgba(210, 232, 225, 0.16);
  --accent: #a8f5d5;
  --panel: rgba(14, 25, 26, 0.78);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #071011;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: #071011; }
a { color: inherit; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 76% 8%, rgba(86, 167, 142, .14), transparent 30rem),
    linear-gradient(rgba(255,255,255,.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.027) 1px, transparent 1px),
    #071011;
  background-size: auto, 64px 64px, 64px 64px, auto;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  pointer-events: none;
}

.download-view { width: min(1180px, calc(100% - 48px)); min-height: 100vh; margin: auto; }
.site-header { height: 104px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 13px; align-items: center; text-decoration: none; }
.brand img { border-radius: 50%; box-shadow: 0 0 24px rgba(168,245,213,.15); }
.brand span { display: grid; gap: 2px; }
.brand b { font: 700 13px/1.1 ui-monospace, monospace; letter-spacing: .18em; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .16em; }
.platform { color: var(--muted); font: 11px/1 ui-monospace, monospace; letter-spacing: .14em; }

.hero { padding: clamp(74px, 10vw, 132px) 0 clamp(60px, 8vw, 100px); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--accent); font: 12px/1 ui-monospace, monospace; letter-spacing: .2em; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.hero h1 { margin: 0; font-size: clamp(58px, 9vw, 124px); line-height: .9; letter-spacing: -.065em; font-weight: 700; }
.hero h1 span { color: var(--accent); }
.intro { width: min(560px, 100%); margin: 34px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }

.games { border-top: 1px solid var(--line); }
.game-card { display: grid; grid-template-columns: 64px minmax(240px, 1fr) 140px 178px; gap: 24px; align-items: center; min-height: 190px; border-bottom: 1px solid var(--line); transition: background .25s ease; }
.game-card:hover { background: linear-gradient(90deg, transparent, rgba(168,245,213,.035), transparent); }
.game-index { align-self: start; padding-top: 39px; color: #61706e; font: 12px/1 ui-monospace, monospace; }
.game-type { margin: 0 0 13px !important; color: var(--accent) !important; font: 10px/1 ui-monospace, monospace; letter-spacing: .18em; }
.game-copy h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 47px); line-height: 1; letter-spacing: -.04em; }
.game-copy > p { margin: 0; color: var(--muted); font-size: 13px; }
.game-version { display: grid; gap: 8px; padding-left: 22px; border-left: 1px solid var(--line); }
.game-version span { color: var(--muted); font: 10px/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .12em; }
.game-version strong { font: 600 14px/1 ui-monospace, monospace; }
.download-button { min-height: 58px; padding: 0 19px 0 22px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(168,245,213,.5); background: rgba(168,245,213,.05); color: var(--accent); text-decoration: none; font-size: 13px; letter-spacing: .08em; transition: color .2s, background .2s, transform .2s; }
.download-button b { font-size: 24px; font-weight: 300; }
.download-button:hover { color: #071011; background: var(--accent); transform: translateY(-2px); }
.download-button.is-starting { pointer-events: none; opacity: .7; }

footer { min-height: 130px; display: flex; justify-content: space-between; align-items: center; color: #62706e; font: 10px/1 ui-monospace, monospace; letter-spacing: .13em; }
footer a { text-underline-offset: 5px; }

.wechat-view { display: none; min-height: 100vh; padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); align-items: center; justify-content: center; }
.wechat-arrow { position: fixed; top: max(8px, env(safe-area-inset-top)); right: 7px; width: 154px; height: 184px; }
.wechat-arrow svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(168,245,213,.3)); }
.wechat-panel { width: min(460px, 100%); padding: 44px 30px 34px; text-align: center; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,.32); backdrop-filter: blur(18px); }
.wechat-panel > img { border-radius: 50%; margin-bottom: 23px; }
.step { margin: 0 0 12px; color: var(--accent); font: 11px/1 ui-monospace, monospace; letter-spacing: .2em; }
.wechat-panel h1 { margin: 0; font-size: clamp(30px, 8vw, 42px); letter-spacing: -.04em; }
.wechat-lead { margin: 18px auto 29px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.wechat-lead strong { padding: 0 5px; color: var(--ink); letter-spacing: .18em; }
.wechat-panel ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; text-align: left; }
.wechat-panel li { display: flex; align-items: center; gap: 15px; padding: 15px 17px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: 14px; }
.wechat-panel li b { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: #071011; font: 700 12px/1 ui-monospace, monospace; }
.wechat-note { margin: 25px 0 0; color: #687875; font-size: 12px; }
.noscript { position: fixed; inset: auto 16px 16px; padding: 12px; color: #071011; background: var(--accent); text-align: center; }

html[data-view="wechat"] .download-view { display: none; }
html[data-view="wechat"] .wechat-view { display: flex; }
html[data-view="downloads"] .wechat-view { display: none; }

@media (max-width: 760px) {
  .download-view { width: min(100% - 32px, 560px); }
  .site-header { height: 86px; }
  .platform { display: none; }
  .hero { padding: 70px 0 60px; }
  .hero h1 { font-size: clamp(54px, 18vw, 82px); }
  .game-card { grid-template-columns: 40px 1fr; gap: 0 14px; padding: 30px 0; }
  .game-index { grid-row: 1 / 3; padding-top: 4px; }
  .game-version { grid-column: 2; margin: 23px 0 18px; padding: 0; border: 0; display: flex; gap: 10px; align-items: center; }
  .download-button { grid-column: 2; }
  footer { min-height: 110px; flex-direction: column; justify-content: center; gap: 14px; align-items: flex-start; }
  .wechat-panel { margin-top: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
