:root{
  --primary:#7c5cff;
  --accent:#22d3ee;
  --glow-1:rgba(124,92,255,.42);
  --glow-2:rgba(34,211,238,.24);
  --bg:#08080c;
  --fg:#f6f7fb;
  --muted:#a3a8bd;
  --stroke:rgba(255,255,255,.11);
  --card:rgba(255,255,255,.05);
  --radius:18px;
  --max:720px;
  --press:scale(.985);
}
*{box-sizing:border-box}
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  background:var(--bg);
}
html,body{margin:0;padding:0}
body{
  background:var(--bg);color:var(--fg);
  font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  /* 手机浏览器地址栏伸缩：优先动态视口高度，逐级降级 */
  min-height:100vh;
  min-height:100svh;
  min-height:100dvh;
  display:flex;flex-direction:column;
  overflow-x:hidden;
  overscroll-behavior-y:contain;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

/* ---------- 背景 ---------- */
.bg-layer{
  position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(1100px 640px at 50% -14%, var(--glow-1), transparent 62%),
    radial-gradient(760px 520px at 90% 12%, var(--glow-2), transparent 66%),
    radial-gradient(680px 520px at 6% 88%, var(--glow-1), transparent 68%);
}
.bg-layer[data-has-image="1"]{
  background-size:cover;background-position:center;background-repeat:no-repeat;
}
.bg-layer[data-has-image="1"]::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(8,8,12,.62),rgba(8,8,12,.88));
}
.grain{
  position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.35;
  background-image:radial-gradient(rgba(255,255,255,.045) 1px,transparent 1px);
  background-size:3px 3px;
  mask-image:radial-gradient(circle at 50% 35%,#000 0%,transparent 78%);
  -webkit-mask-image:radial-gradient(circle at 50% 35%,#000 0%,transparent 78%);
}

/* ---------- 主容器：小屏垂直居中，内容超高时不裁切 ---------- */
.wrap{
  position:relative;z-index:1;
  width:100%;max-width:var(--max);
  margin:0 auto;
  flex:1 0 auto;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;
  padding:
    calc(clamp(24px,6vh,60px) + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    clamp(18px,3.5vh,30px)
    calc(20px + env(safe-area-inset-left));
}

.brand{margin-bottom:clamp(16px,3.2vw,26px)}
.logo{
  display:block;width:clamp(72px,22vw,96px);height:auto;aspect-ratio:1;border-radius:26%;
  box-shadow:0 18px 46px -18px rgba(0,0,0,.9),0 0 0 1px rgba(255,255,255,.08);
  object-fit:cover;
}
h1{
  margin:0 0 10px;
  font-size:clamp(26px,7.2vw,44px);
  line-height:1.16;letter-spacing:-.02em;font-weight:800;
  background:linear-gradient(180deg,#fff 25%,rgba(255,255,255,.68));
  -webkit-background-clip:text;background-clip:text;color:transparent;
  text-wrap:balance;
}
.subtitle{
  margin:0 auto clamp(20px,4vw,32px);max-width:32em;
  color:var(--muted);font-size:clamp(13.5px,3.8vw,17px);
  text-wrap:pretty;
}
.subtitle:empty{display:none}

/* ---------- 下载按钮 ---------- */
.buttons{width:100%;max-width:460px;display:flex;flex-direction:column;gap:12px}
.dl-btn{
  --btn:#1b1b22;--btn-2:#111116;--btn-fg:#fff;
  position:relative;display:flex;align-items:center;gap:13px;
  width:100%;min-height:64px;padding:14px 16px;
  border-radius:var(--radius);
  background:linear-gradient(135deg,var(--btn),var(--btn-2));
  color:var(--btn-fg);text-decoration:none;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 16px 40px -18px rgba(0,0,0,.95),inset 0 1px 0 rgba(255,255,255,.16);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
  overflow:hidden;
  touch-action:manipulation;
  -webkit-user-select:none;user-select:none;
}
.dl-btn::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(120deg,rgba(255,255,255,.16),transparent 55%);
  opacity:.5;pointer-events:none;
}
@media (hover:hover){
  .dl-btn:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.26)}
  .dl-btn:hover .dl-arrow{transform:translateX(3px);opacity:1}
}
.dl-btn:active{
  transform:scale(.985);
  box-shadow:0 10px 24px -16px rgba(0,0,0,.9),inset 0 1px 0 rgba(255,255,255,.14);
}
.dl-ico{
  flex:0 0 auto;display:grid;place-items:center;
  width:44px;height:44px;border-radius:13px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
  overflow:hidden;
}
.dl-ico svg{width:24px;height:24px;display:block}
.dl-ico img{width:26px;height:26px;object-fit:contain;display:block}
.dl-ico span{font-size:22px;line-height:1}
.dl-txt{flex:1 1 auto;min-width:0;text-align:left}
.dl-txt b{
  display:block;font-size:clamp(15.5px,4.2vw,16.5px);font-weight:700;letter-spacing:-.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.dl-txt small{
  display:block;margin-top:2px;font-size:clamp(11.5px,3.2vw,12.5px);opacity:.72;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.dl-arrow{flex:0 0 auto;opacity:.62;transition:transform .16s ease,opacity .16s ease}
.dl-arrow svg{width:18px;height:18px;display:block}

/* ---------- 游戏截图（有图才显示，横向滑动） ---------- */
.gallery{
  width:100%;max-width:var(--max);
  margin:clamp(18px,4vw,30px) auto 0;
  z-index:1;
}
.gallery[hidden]{display:none}
.shots{
  display:flex;gap:10px;
  overflow-x:auto;overflow-y:hidden;
  padding:4px calc(20px + env(safe-area-inset-left)) 6px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.shots::-webkit-scrollbar{display:none}
.shots img{
  flex:0 0 auto;
  height:clamp(180px,52vw,320px);
  width:auto;max-width:78vw;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 16px 34px -22px #000;
  scroll-snap-align:center;
  background:#101018;
}

/* ---------- 提示与页脚 ---------- */
.note{
  margin:clamp(16px,3.4vw,24px) 0 0;max-width:32em;
  font-size:clamp(11.5px,3.1vw,12.5px);color:var(--muted);
  padding:9px 13px;border:1px solid var(--stroke);border-radius:12px;background:var(--card);
}
.note[hidden]{display:none}

.foot{
  position:relative;z-index:1;flex:0 0 auto;
  width:100%;max-width:var(--max);margin:0 auto;
  padding:16px calc(20px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  text-align:center;font-size:12px;color:var(--muted);
}
.foot:empty{display:none}

/* ---------- 小屏微调 ---------- */
@media (max-width:380px){
  .dl-btn{min-height:60px;padding:12px 14px;gap:11px}
  .dl-ico{width:40px;height:40px;border-radius:12px}
  .dl-ico svg{width:22px;height:22px}
}
@media (max-height:640px){
  .wrap{padding-top:calc(18px + env(safe-area-inset-top));padding-bottom:14px}
  .logo{width:clamp(56px,16vw,72px)}
  .brand{margin-bottom:12px}
  h1{font-size:clamp(22px,6.4vw,28px);margin-bottom:8px}
  .subtitle{margin-bottom:14px}
  .gallery{margin-top:14px}
  .shots img{height:clamp(140px,40vw,220px)}
}
/* ---------- 横屏手机：藏掉截图、压细节，一屏塞下按钮 ---------- */
@media (orientation:landscape) and (max-height:520px){
  .wrap{
    padding:calc(10px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right))
            calc(8px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
    justify-content:center;
  }
  .logo{width:clamp(44px,8vh,58px)}
  .brand{margin-bottom:6px}
  h1{font-size:clamp(18px,4.2vh,24px);margin-bottom:4px}
  .subtitle{margin-bottom:10px;font-size:12.5px;max-width:26em}
  .buttons{max-width:380px;gap:8px}
  .dl-btn{min-height:48px;padding:8px 12px;gap:10px;border-radius:14px}
  .dl-ico{width:32px;height:32px;border-radius:10px}
  .dl-ico svg{width:18px;height:18px}
  .dl-txt b{font-size:14.5px}
  .dl-txt small{font-size:11px}
  .gallery{display:none}
  .note{margin-top:8px;font-size:11px;padding:6px 10px}
  .foot{padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom));font-size:11px}
}
/* ---------- 平板/桌面：不拉太宽 ---------- */
@media (min-width:820px){
  .buttons{max-width:420px}
}
@media (prefers-reduced-motion:reduce){
  .dl-btn,.dl-arrow{transition:none}
  .dl-btn:active{transform:none}
}
