/* 全屏：让游戏占满浏览器，无黑框、无标题/页脚 */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}
* {
  box-sizing: border-box;
}
body {
  cursor: default;
  text-align: center;
  background-color: #000;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  border: none !important;
}
/* 只隐藏页面级标题、版权（body 下的），不隐藏游戏内元素 */
body > .header, body > .footer,
body > header, body > footer,
body > [id*="header"], body > [id*="footer"],
body > [class*="copyright"], body > [class*="branding"] {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

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

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
  -webkit-appearance: none;
  margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

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

/* 游戏容器铺满视口，去掉黑框和固定尺寸（设计分辨率 1920x1080 由引擎缩放，容器仍铺满） */
#GameDiv {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

#Cocos3dGameContainer, #GameCanvas {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  border: none !important;
  display: block !important;
}

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