/* Web Desktop 构建模板：覆盖默认 style.css。
 * 竖屏游戏在电脑浏览器里按「手机的宽高比」居中显示（390:844，iPhone 12，和编辑器预览一样），左右两边纯黑。
 * 游戏框高度占满窗口，宽度 = 高度 × 390 / 844，随窗口大小自动调整；窗口比这个比例更窄就占满宽度。
 * 要改手机宽高比，同步改下面 calc 里的 390 / 844，以及 assets/scripts/ViewFit.ts 里的 PHONE_W / PHONE_H。 */

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000;
  text-align: center;
  cursor: default;
  font-family: Helvetica, Verdana, Arial, sans-serif;
}

/* 默认模板里的标题和 Cocos 页脚 */
.header, .footer { display: none; }

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);
}

/* 默认是内联的固定 1280×960，这里用 !important 盖掉 */
#GameDiv {
  position: relative;
  height: 100vh !important;
  width: calc(100vh * 390 / 844) !important;
  max-width: 100vw;
  margin: 0 auto;
  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);
}
