/* 批68部署-2：游戏区恒定 16:9 居中 + 深色留边（覆盖 Cocos 出厂模板的 1280x960 白底黑框外壳） */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  cursor: default;
  padding: 0;
  border: 0;
  margin: 0;
  text-align: center;
  background-color: #0a1410;
  font-family: Helvetica, Verdana, Arial, sans-serif;
}

body, canvas, div {
  outline: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

/* 🔴恒定 16:9＝引擎 FIXED_HEIGHT 下可视设计宽恒为 1280⇒Viewport.fitScale 恒为 1
   ⇒ 所有面板与本地预览逐像素一致；窗口比 16:9 更方时留深色边，绝不再缩整屏内容 */
#GameDiv {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}
