/* === 横板射击游戏：全局样式（横屏版）=== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #fff;
  touch-action: none;
  overscroll-behavior: none;
}

#game-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, #1a2a1a 0%, #050a05 100%);
  overflow: hidden;
}

#game {
  /* 游戏内渲染按 640x360 逻辑尺寸（横屏 16:9）*/
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background: #000;
  box-shadow: 0 0 40px rgba(0, 255, 0, 0.15);
  touch-action: none;
}

/* 触控覆盖层：铺满视口，承载虚拟按键（按键置于游戏画面外黑边） */
#touch {
  position: fixed;
  inset: 0;
  z-index: 400;
  touch-action: none;
  pointer-events: auto;
}

/* 小屏适配：留出 notch 与安全区 */
@supports (padding: env(safe-area-inset-top)) {
  #game-container {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* 竖屏轻提示：小药丸条，仅竖屏显示，横屏自动隐藏；不拦截触摸 */
#orientation-tip {
  display: none;
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  max-width: 92vw;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(180, 255, 180, 0.35);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  color: #b4ffb4;
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

@media (orientation: portrait) {
  #orientation-tip {
    display: block;
  }
}
