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

img {
  pointer-events: none;
}


/* 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;

  /* 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;
  margin: 0;
  left: 0px;
  top: 0px;

  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

:root {
  --safe-area-top: env(safe-area-inset-top);
}

#SubGameContainer {
  position: absolute;
  top: 0px;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  visibility: hidden;
}

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

/* 加载中：先隐藏引擎容器，避免闪屏；加载完成后再显示 */
#GameCanvas,
#Cocos2dGameContainer {
  visibility: hidden;
}

body.game-ready #GameCanvas,
body.game-ready #Cocos2dGameContainer {
  visibility: visible;
}

/* 防止引擎脚本过早隐藏 #splash 造成黑屏（ready 之前强制显示） */
body:not(.allow-engine-hide) #splash {
  display: block !important;
}

a:link,
a:visited {
  color: #666;
}

a:active,
a:hover {
  color: #666;
}

p.header {
  font-size: small;
}

p.footer {
  font-size: x-small;
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #31CEC8 0%, #01AFA8 100%);
  z-index: 500;
}

.linear-bg{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(13, 35, 33, 0) 68.56%, rgba(0, 31, 30, 0.92) 89.53%, #04110F 100%);
  z-index: 300;
}

#splash_logo {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#LandscapeBlock {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, #021B19 0%, #166F69 97.82%);
  overflow: hidden;
  pointer-events: none;
  z-index: 1000;
}

#LandscapeBlockImg {
  position: absolute;
  height: 108px;
  width: 108px;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-80%);
}

#LandscapeBlockText {
  position: absolute;
  font-family: Roboto;
  color: #FFFFFF;
  font-size: 25px;
  line-height: 30px;
  height: 30px;
  width: 80%;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(130%);
}

.progress-bar {
  display: none;
  position: absolute;
  left: 27.5%;
  top: 80%;
  height: 3px;
  padding: 2px;
  width: 45%;
  border-radius: 7px;
  box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease-in-out;
  background-color: #3dc5de;
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
      transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
      transparent 75%, transparent);

  animation: animate-stripes 1s linear infinite;
}

@keyframes animate-stripes {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 60px 0;
  }
}

#progresscontainer {
  position: absolute;
  width: 89%;
  height: 4px;
  border-radius: 3px;
  align-content: center;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 245, 245, 0.40);
  backdrop-filter: blur(2px);
  bottom: 15.7%;
  /* overflow: hidden; */
  z-index: 10000;
}

#progress {
  width: 0%;
  height: 100%;
  border-radius: 3px;
  /* background: linear-gradient(90deg, #31CEC8 0%, #01AFA8 60%, #00E6DC 100%);
  box-shadow: 0 0 10px rgba(0, 230, 220, 0.5); */
  background: linear-gradient(270deg, #84F9CC 0.22%, #03D1E7 99.79%), #FFF;
  will-change: width;
}

#p-v {
  position: absolute;
  width: 100%;
  left: 0;
  text-align: center;
  color: white;
  bottom: 18.3%;
  margin-bottom: 12px;
  z-index: 10001;
}

#first-text {
  position: absolute;
  left: 0;
  text-align: center;
  width: 100%;
  color: white;
  top: 14px;
  z-index: 10002;
  display: none;
}

/* iOS Safari 桌面 PWA：可能会先展示上次缓存的 100% 进度（bfcache/快照），再被脚本重置为 0。
 * 这里默认先隐藏进度 UI，等 JS 启动并完成一次重置后再显示，避免“满进度一闪而过”。 */
#progresscontainer,
#p-v {
  opacity: 0;
}

body.wpk-booted #progresscontainer,
body.wpk-booted #p-v {
  opacity: 1;
}