:root {
  --page: #140f26;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(255, 255, 255, 0.07);
  --gold: #ffc93c;
  --bg: #1d1440;
  --accent: #ffc93c;
  --soft: #b79cff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
body.is-game { background: var(--bg); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 8, 22, 0.55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: 0.02em; text-decoration: none; }
.brand-dot { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--gold), #ff7a59); transform: rotate(45deg); }
.top-right { display: flex; align-items: center; gap: 12px; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: #fff; }
.lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.28); background: transparent; color: #fff;
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer;
}

/* buttons */
.dl { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 440px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 10px 18px; border-radius: 16px; border: 0;
  font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { flex: none; }
.btn-apk {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #fff1b0 -40%, var(--accent));
  color: #1d1400;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}
.btn-apk:hover { filter: brightness(1.05); }
.btn-store { background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); }
.btn-store:hover { background: #111; }
.btn-store > span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; font-size: 17px; }
.btn-store small { font-size: 10px; font-weight: 600; opacity: 0.8; }
.is-disabled, .btn-apk.is-disabled {
  background: rgba(255, 255, 255, 0.09); color: rgba(255, 255, 255, 0.6);
  box-shadow: none; font-weight: 700; font-size: 15px; cursor: default;
}
.is-disabled:active { transform: none; }
.dl-meta { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.sha { margin-top: 6px; font-size: 12px; color: var(--muted); max-width: 440px; }
.sha summary { cursor: pointer; }
.sha code { display: block; margin-top: 4px; word-break: break-all; }

.qr { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.qr-box { width: 112px; height: 112px; flex: none; padding: 8px; border-radius: 14px; background: #fff; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr b { display: block; font-size: 16px; }
.qr span { font-size: 13px; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.13); font-size: 12px; font-weight: 600; }

/* hub */
.hub-hero { padding: 44px 0 26px; }
.hub-hero-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.hub-hero h1 { margin: 0 0 10px; font-size: clamp(32px, 7vw, 52px); font-weight: 900; }
.hub-hero p { margin: 0; color: var(--muted); font-size: 17px; }
.hub-hero .qr { margin-top: 0; }

.cards { display: grid; gap: 18px; padding-bottom: 48px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}
.card-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(rgba(0, 0, 0, 0), var(--bg)); }
.card-body { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; margin-top: -42px; padding: 0 18px 20px; }
.card-icon { width: 76px; height: 76px; border-radius: 20px; border: 3px solid rgba(255, 255, 255, 0.92); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.card h2 { margin: 12px 0 4px; font-size: 23px; font-weight: 900; }
.card h2 a { text-decoration: none; }
.card p { margin: 0 0 10px; color: var(--soft); font-size: 15px; font-weight: 700; }
.card .tags { margin-bottom: 18px; }
.card .dl { margin-top: auto; max-width: none; grid-template-columns: 1fr; }
.more { margin-top: 14px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.more:hover { color: #fff; }

/* game page */
.g-hero { position: relative; overflow: hidden; }
.g-hero-bg {
  position: absolute; top: -40px; right: -40px; bottom: -40px; left: -40px;
  background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.25); opacity: 0.6;
}
.g-hero::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), var(--bg) 94%); }
.g-hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; padding-top: 36px; padding-bottom: 36px; }
.g-icon { width: 100px; height: 100px; border-radius: 26px; border: 3px solid rgba(255, 255, 255, 0.92); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38); }
.g-text h1 { margin: 18px 0 8px; font-size: clamp(36px, 9vw, 60px); font-weight: 900; letter-spacing: -0.01em; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
.tagline { margin: 0 0 14px; color: var(--soft); font-size: 18px; font-weight: 800; }
.g-phone { display: none; }
@media (min-width: 860px) {
  .g-hero-in { grid-template-columns: minmax(0, 1fr) 290px; padding-top: 64px; padding-bottom: 72px; }
  .g-phone {
    display: block; overflow: hidden; aspect-ratio: 540 / 1181;
    border: 8px solid #0b0816; border-radius: 40px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    transform: rotate(3deg);
  }
  .g-phone img { width: 100%; height: 100%; object-fit: cover; }
}

.sec { padding-top: 26px; padding-bottom: 26px; }
.sec h2 { margin: 0 0 14px; font-size: 22px; font-weight: 900; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
/* 固定高度、宽度跟随原图比例，不同比例的截图都不会被裁 */
.shots img { flex: none; width: auto; height: 438px; border-radius: 20px; border: 1px solid var(--line); scroll-snap-align: start; }
@media (min-width: 860px) { .shots img { height: 503px; } }
.about p { max-width: 720px; margin: 0; color: rgba(255, 255, 255, 0.86); }
.feat { display: grid; gap: 10px; max-width: 720px; margin: 18px 0 0; padding: 0; list-style: none; }
.feat li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }
.feat li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.mini-list { display: grid; gap: 10px; }
@media (min-width: 640px) { .mini-list { grid-template-columns: repeat(2, 1fr); } }
.mini { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.mini:hover { background: rgba(255, 255, 255, 0.12); }
.mini img { width: 58px; height: 58px; flex: none; border-radius: 15px; }
.mini b { display: block; }
.mini span { font-size: 13px; color: var(--muted); }

/* footer */
.foot { padding: 28px 0 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot a { color: rgba(255, 255, 255, 0.8); }
.icp { margin-top: 6px; }
.icp a { color: var(--muted); text-decoration: none; }
.icp a:hover { color: #fff; }
.is-game .foot { margin-top: 20px; }

/* overlays */
.overlay { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; background: rgba(0, 0, 0, 0.82); }
.overlay.show { display: block; }
.mask-in { padding: 14px 22px; text-align: right; }
.mask-in svg { display: inline-block; }
.mask-title { margin: 8px 0 4px; font-size: 22px; font-weight: 900; }
.mask-text { margin: 0 0 0 auto; max-width: 300px; font-size: 16px; color: rgba(255, 255, 255, 0.85); }
.modal {
  position: absolute; left: 16px; right: 16px; bottom: 24px; max-width: 420px; margin: 0 auto;
  padding: 22px 22px 18px; border-radius: 22px; background: #fff; color: #17142a;
}
.modal h3 { margin: 0 0 12px; font-size: 20px; }
.modal ol { margin: 0 0 12px; padding-left: 20px; font-size: 15px; }
.modal li { margin-bottom: 6px; }
.retry { display: block; margin-bottom: 14px; font-size: 13px; color: #4b5bd6; }
.btn-ok { width: 100%; background: #17142a; color: #fff; }
@media (min-width: 640px) { .modal { top: 50%; bottom: auto; transform: translateY(-50%); } }

@media (max-width: 520px) {
  .hub-hero-in { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card-cover img { transition: none; }
}
