/* Custom web-desktop template style (build-templates override).
 * 让 Cocos 画布铺满整个浏览器窗口 (像部署版 web-client 响应式填满视口),
 * 而非默认模板那个白底页面里居中的固定 960×640 黑边小框 (导致"巨大留白/没适配").
 * 配合宿主脚本 setDesignResolutionSize(...SHOW_ALL): 等比缩放、不拉伸变形、全内容可见,
 * 多出来的边由深色 letterbox 填充 (不再是刺眼白边). */
body {
  cursor: default;
  padding: 0;
  border: 0;
  margin: 0;
  text-align: center;
  background-color: #060b14; /* 深色 letterbox 底, 取代默认 white */
  overflow: hidden;
  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);
}

/* 隐藏默认模板的标题条与页脚 (它们挤压画布、制造留白) */
.header, .footer { display: none !important; }

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* EditBox 在 Web 平台是叠在 canvas 上的真实 <input>, 选中文字默认走系统蓝色高亮,
 * 跟整体金紫色调不搭 (登录密码框截图反馈过) —— 改成跟 UI 一致的金色半透明. */
input::selection {
  background-color: rgba(212, 175, 55, 0.45);
  color: #fff;
}

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

/* GameDiv 铺满整窗 (覆盖内联 width/height:960×640 + 默认黑边/圆角/阴影/居中 margin) */
#GameDiv {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

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