/*
 * web-mobile 满屏布局：Canvas 铺满视口（Playgama / Mobile 审核要求）。
 * 设计分辨率仍由 Cocos fitHeight / project.json 控制；此处不再 CSS letterbox。
 */

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}

body {
  cursor: default;
  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);
}

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

#GameDiv {
  width: 100vw;
  height: 100vh;
  margin: 0;
  position: relative;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}

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

canvas {
  background-color: #000;
  display: block;
}

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

/* 层 1：引擎 boot 期间 HTML splash（Cocos Loading 出现前可见） */
.nbt-html-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a12;
  color: #e8e8f0;
  transition: opacity 0.2s ease;
}

.nbt-html-splash--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nbt-html-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.nbt-html-splash__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #7cf5ff;
  border-radius: 50%;
  animation: nbt-html-splash-spin 0.85s linear infinite;
}

.nbt-html-splash__text {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

@keyframes nbt-html-splash-spin {
  to {
    transform: rotate(360deg);
  }
}
