* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { width:100%; height:100%; overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  touch-action:none; user-select:none; -webkit-user-select:none; }
canvas { display:block; width:100%; height:100%; }

.hidden { opacity:0 !important; pointer-events:none !important; }
.page { position:fixed; inset:0; z-index:10; }

/* ===== HUD ===== */
#hud { position:fixed; top:0; left:0; right:0; z-index:5; pointer-events:none;
  padding:env(safe-area-inset-top) 14px 0;
  display:flex; justify-content:space-between; align-items:flex-start; }
.hud-left, .hud-right { background:rgba(0,0,0,.35); color:#fff; border-radius:14px; padding:8px 14px; }
.hud-value { font-size:24px; font-weight:900; }
.hud-level { font-size:11px; opacity:.8; }
.hud-best { font-size:13px; font-weight:700; }

#banner { position:fixed; top:35%; left:0; right:0; text-align:center; pointer-events:none;
  font-size:52px; font-weight:900; color:#fff; text-shadow:0 4px 16px rgba(0,0,0,.5);
  opacity:0; transition:opacity .3s; z-index:6; }

/* ===== 首页 ===== */
.home-page { background:linear-gradient(180deg,#7ec8e3 0%,#a8d8ea 50%,#c8e6f0 100%);
  display:flex; flex-direction:column; align-items:center;
  padding:env(safe-area-inset-top) 20px env(safe-area-inset-bottom); }
.home-header { width:100%; display:flex; justify-content:space-between; align-items:center; padding-top:8px; }
.coin-box { display:flex; align-items:center; background:#fff; border-radius:999px;
  padding:6px 12px; box-shadow:0 3px 0 rgba(0,0,0,.1); font-weight:900; color:#333; font-size:18px; }
.coin-icon { color:#2ecc71; font-size:20px; margin-right:6px; }
.coin-plus { background:#2ecc71; color:#fff; border-radius:50%; width:24px; height:24px;
  display:flex; align-items:center; justify-content:center; margin-left:6px; font-size:16px; }
.level-badge { background:rgba(255,255,255,.8); border-radius:999px; padding:8px 20px;
  font-size:15px; color:#555; font-weight:700; }
.level-badge b { color:#3b82f6; font-size:18px; }

.home-hero { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.hero-number { font-size:130px; font-weight:900; color:#3b82f6; line-height:1;
  text-shadow:0 8px 0 rgba(0,0,0,.12); animation:floaty 1.6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-14px);} }
.hero-sub { font-size:16px; color:#fff; margin-top:12px; opacity:.9; }

.big-btn { pointer-events:auto; border:none; cursor:pointer;
  background:linear-gradient(180deg,#5be39a,#22b566); color:#062b18;
  font-size:22px; font-weight:900; border-radius:999px; padding:16px 60px;
  box-shadow:0 8px 0 #157a43, 0 12px 24px rgba(0,0,0,.25); }
.big-btn:active { transform:translateY(4px); box-shadow:0 4px 0 #157a43; }
.btn-gold { background:linear-gradient(180deg,#ffd166,#f4a261); box-shadow:0 8px 0 #b06a1f; color:#5a3a00; }
.btn-gap { height:14px; }

.upgrades { display:flex; gap:10px; width:100%; margin-top:24px; }
.up-card { flex:1; background:linear-gradient(180deg,#ffd93d,#f4b942); border-radius:16px;
  padding:12px 4px; text-align:center; box-shadow:0 5px 0 #d49a2a; }
.up-icon { font-size:28px; }
.up-name { font-size:13px; font-weight:900; color:#5a3a00; margin-top:4px; }
.up-level { font-size:11px; color:#7a5a00; margin-top:2px; }

.home-howto { font-size:12px; color:#558; padding:16px 0 8px; opacity:.8; }

/* ===== 结算页 ===== */
.over-page { background:rgba(0,0,0,.85); color:#fff;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  transition:opacity .3s; }
.over-title { font-size:44px; font-weight:900; color:#ff6b6b; text-shadow:0 4px 0 rgba(0,0,0,.3); }
.newbest { color:#ffd166; font-size:16px; font-weight:800; margin:10px 0; }
.over-score { font-size:60px; font-weight:900; margin:8px 0; }
.over-best { font-size:14px; opacity:.7; margin-bottom:30px; }
