html {
  -ms-touch-action: none; /* IE / Edge */
  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;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

  cursor: default;
  color: #888;
  background-color: #333;

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

  display: flex;
  flex-direction: column;

  /* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
  /* overflow cannot be applied in Cocos2dGameContainer, 
  otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
  overflow: hidden;
}

#Cocos2dGameContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
  width: 100%;
  height: 100%;
}

/* splash 容器 */
#splash {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;             /* flex 布局 */
  align-items: center;       /* 垂直居中 */
  justify-content: center;   /* 水平居中 */

  /* 可换成图片或渐变 */
  background: #171717;       
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 三点 Loading 动画 */
.loading-dots {
  display: flex;
  justify-content: center;   /* 确保水平排列 */
  align-items: center;
  gap: 36px;
}

.loading-dots .dot {
  width: 24px;    /* 固定像素更稳 */
  height: 24px;
  border-radius: 50%;
  animation: scalePulse 1.2s infinite ease-in-out;
}

.loading-dots .dot:nth-child(1) { background: #ff3b30; animation-delay: 0s; }
.loading-dots .dot:nth-child(2) { background: #ffcc00; animation-delay: 0.2s; }
.loading-dots .dot:nth-child(3) { background: #34c759; animation-delay: 0.4s; }

@keyframes scalePulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.6; }
  40% { transform: scale(1.3); opacity: 1; }
}

/* 游戏容器 */
#GameDiv {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  background: black;

  display: flex;
  align-items: center;      /* 垂直居中 */
  justify-content: center;  /* 水平居中 */
}