/* 手机横屏展示版：全屏、无滚动、无选中、纯游戏画面 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; width: 100%; height: 100%; overflow: hidden;
  background: #050914; color: #eef4ff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none;
  overscroll-behavior: none;
}
#app { position: fixed; inset: 0; overflow: hidden; }

#game {
  position: absolute; display: block;
  image-rendering: pixelated; image-rendering: crisp-edges;
  background: #050914;
}

#hud {
  position: absolute; left: 0; top: 0; z-index: 4;
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 4px 10px; pointer-events: none;
  font-size: 11px; font-weight: 800; letter-spacing: .4px;
  text-shadow: 0 1px 2px #000;
  background: linear-gradient(180deg, rgba(4, 8, 20, .82), rgba(4, 8, 20, 0));
}
#hud .hud-l { display: flex; gap: 12px; }
#hud .hud-r { display: flex; gap: 10px; align-items: center; }
#hud b { color: #fff; font-variant-numeric: tabular-nums; }
#hud .k { color: #9db4dc; font-size: 9px; font-weight: 600; }
#hud .lv { color: #ffd85c; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#minibar {
  position: absolute; right: 8px; top: 26px; z-index: 6; display: flex; gap: 6px;
}
.mini {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(160, 190, 240, .35);
  background: rgba(12, 20, 42, .72); color: #dbe8ff; font-size: 13px; font-weight: 800;
  display: grid; place-items: center; pointer-events: auto; touch-action: manipulation;
}
.mini:active { background: #2c3f72; }

#touch {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 14px 12px; pointer-events: none;
}
.pad { display: flex; gap: 10px; pointer-events: auto; }
.key {
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid rgba(190, 210, 255, .34); background: rgba(20, 32, 62, .55);
  color: #eaf2ff; font-size: 22px; font-weight: 900;
  display: grid; place-items: center; touch-action: none; pointer-events: auto;
}
.key.small { width: 48px; height: 48px; font-size: 11px; border-radius: 12px; }
.key.jump { width: 68px; height: 68px; background: rgba(255, 216, 92, .82); color: #17203a; border-color: rgba(255, 240, 180, .9); }
.key.pressed { background: rgba(120, 170, 255, .9); color: #06122a; transform: translateY(2px); }
.key.jump.pressed { background: #fff3b0; }

.mask {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 20px;
  background: radial-gradient(900px 500px at 50% 20%, rgba(30, 48, 100, .92), rgba(5, 9, 20, .96));
}
.mask.dim { background: rgba(5, 9, 20, .82); }
.logo {
  width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; font-weight: 900; color: #0a1428;
  background: linear-gradient(135deg, #ffd85c, #4fd6c9); box-shadow: 0 6px 0 rgba(0, 0, 0, .4);
}
.mask h1 { margin: 0; font-size: 26px; letter-spacing: 2px; }
.mask h2 { margin: 0; font-size: 22px; color: #ffd85c; }
.mask p { margin: 0; font-size: 12px; line-height: 1.7; color: #aebfdd; max-width: 460px; }
.btn {
  pointer-events: auto; cursor: pointer; border: none; border-radius: 12px;
  padding: 12px 30px; font-size: 15px; font-weight: 900; color: #10182c;
  background: linear-gradient(135deg, #ffd85c, #4fd6c9); box-shadow: 0 5px 0 rgba(0, 0, 0, .4);
  touch-action: manipulation;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.btn.ghost { background: rgba(40, 56, 96, .9); color: #dbe8ff; font-size: 13px; padding: 9px 20px; }
.hidden { display: none !important; }

#banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 8;
  padding: 12px 22px; border-radius: 12px; pointer-events: none;
  background: rgba(8, 14, 32, .84); border: 1px solid rgba(255, 216, 92, .45);
  color: #ffd85c; font-size: 18px; font-weight: 900; letter-spacing: 1px;
  text-align: center; text-shadow: 0 2px 3px #000;
}
#banner small { display: block; margin-top: 4px; color: #b9cbe8; font-size: 11px; font-weight: 600; letter-spacing: 0; }

/* 竖屏时强制提示横屏，游戏暂停 */
#rotate { z-index: 30; display: none; }
@media (orientation: portrait) {
  #rotate { display: flex; }
  #rotate .glyph { font-size: 46px; animation: tilt 1.6s ease-in-out infinite; }
  @keyframes tilt { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-90deg); } }
}
