html {
  -ms-touch-action: none;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  user-select: 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 */
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #888;
  background-color: #7ECFFF;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;
}

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

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

#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  background-color: #7ECFFF;
}

/* 与 LoadingScene Mask 一致的竖屏舞台；PC 上只占中间（SHOW_SIZE 750x1334） */
.boot-splash-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#boot-splash.is-pc {
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#boot-splash.is-pc .boot-splash-stage {
  position: relative;
  inset: auto;
  height: 100%;
  width: calc(100vh * 750 / 1334);
  max-width: 100%;
  flex-shrink: 0;
}

.boot-splash-bg {
  position: absolute;
  inset: 0;
  background-color: #7ECFFF;
  background-image: url(boot/loang_bg1.webp);
  background-repeat: no-repeat;
  background-position: center center;
  /* boot 纹理 750×1350（原 1000×1800 的 0.75），仍按场景逻辑尺寸居中裁切 */
  background-size: calc(100% * 1000 / 750) auto;
}

.boot-splash-title {
  position: absolute;
  left: 50%;
  /* 与 LoadingScene loading_2：UITransform 663 × node.scale 0.85；Widget top 90 / 1334 ≈ 6.7% */
  top: 6.7%;
  width: calc(100% * 663 * 0.85 / 750);
  max-width: calc(663px * 0.85);
  height: auto;
  transform: translateX(-50%);
  display: block;
}

.boot-splash-loading {
  position: absolute;
  left: 50%;
  bottom: calc(100% * 135 / 1334);
  transform: translateX(-50%);
  color: #324682;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(100vw * 36 / 750);
  font-weight: bold;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
}

#boot-splash.is-pc .boot-splash-loading {
  /* stage 宽 = 100vh * 750/1334 → 字号与设计 36/750 一致 */
  font-size: calc(100vh * 36 / 1334);
}

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