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: #333;

  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%;
}

: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);
}

#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
}

#splash-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
}

@keyframes animate-stripes {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 60px 0;
  }
}

/* 进度文案样式：由 #splash-container 纵向 flex 置于进度条上方 */
#loading-text {
  color: white;
  /* 白色文字，与黑色背景形成对比 */
  font-size: 15px;
  /* 响应式字体大小 */
  font-family: Arial, sans-serif;
  white-space: nowrap;
  /* 防止文字换行 */
  line-height: 1.2;
  /* 使用多层阴影模拟描边效果 (0,0,0,0.3) */
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.3),
    1px -1px 0 rgba(0, 0, 0, 0.3),
    -1px 1px 0 rgba(0, 0, 0, 0.3),
    1px 1px 0 rgba(0, 0, 0, 0.3);
}

#splash-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 文案与进度条间距 */
  gap: 2px;
  z-index: 10;
}

#progress-bg-container {
	/* 由背景图原始尺寸撑开，无需写死宽高 */
	position: relative;
	display: inline-block;
	line-height: 0;
	/* --progress: 0~1 揭示比例；nudge 用于后期微调填充图位置 */
	--progress: 0;
	--progress-fill-nudge-x: 0px;
	--progress-fill-nudge-y: 0px;
}

#progress-bg {
	display: block;
}

#progress-fill {
	position: absolute;
	left: calc(50% + var(--progress-fill-nudge-x));
	top: calc(50% + var(--progress-fill-nudge-y));
	transform: translate(-50%, -50%);
	display: block;
	/* 从左到右按 --progress 揭示填充图 */
	clip-path: inset(0 calc((1 - var(--progress)) * 100%) 0 0);
}

#age-rating {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 43px;
  height: auto;
  display: block;
  z-index: 11;
  pointer-events: none;
}