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;
  width: 100%;
  height: 100%; /* 1920px / 16px = 120rem */
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #000000;
  background-color: #000000;

  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%;
  background-color: rgba(0, 0, 0, 0);
}

: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);
}

.loading-div {
  position: fixed; /* 改为 fixed，相对于视口，更稳定 */
  top: 0;
  left: 0;
  width: 100vw; /* 明确使用视口单位 */
  height: 100vh; /* 明确使用视口单位 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 改为 center，避免空间动态分配 */
  align-items: center;
  background: rgba(0, 0, 0, 0);
  z-index: 9999; /* 确保在最上层 */
  /* 预先占位，防止布局偏移 */
  box-sizing: border-box;
}

.image-container{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  max-width: 533px;
  max-height: 360px;
  /* 添加以下代码确保绝对居中 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 确保容器不会超出视口 */
  width: auto;
  height: auto;
}

.image-container img{
  width: 360px;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* 确保图片本身不会影响布局 */
  display: block;
}

/* 加载点 */
.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem; /* 20px */
  margin-top: 1.875rem; /* 30px */
}

.dot {
  width: 1.5625rem; /* 25px */
  height: 1.5625rem; /* 25px */
  border-radius: 50%;
  background-color: white;
  /* box-shadow: 0 0 1.25rem rgba(255, 255, 255, 0.7); */
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
  animation-delay: 0.3s;
}

.dot:nth-child(3) {
  animation-delay: 0.6s;
}

/* 点的脉冲动画 */
@keyframes pulse-dot {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

.fixed-div {
  position: fixed;  /* 使div固定位置 */
  top: 0px;       /* 距离顶部10像素 */
  right: 0px;     /* 距离右侧10像素 */
  width: 100%;    /* 宽度 */
  left: 0px;
  height: 100%;    /* 高度 */    
  background-color: #333; /* 背景颜色 */
  color: white;    /* 文字颜色 */
  text-align: center; /* 文字居中 */ 
  display: none;
}
.close_btn {
  position: fixed;  /* 使div固定位置 */
  top: 5px;       /* 距离顶部10像素 */
  left: 30%;     /* 距离右侧10像素 */
  width: 30px;    /* 宽度 */
  height: 30px;    /* 高度 */
  padding: 0px;   /* 内边距 */   
}
@keyframes loading {
  0% {
      width: 0%;
  }
  100% {
      width: 100%;
  }
}
