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: #d8c397;
  background-color: #0b1c22;

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

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

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;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 42%, #1d3c3b, #0b1c22 66%, #08151b);
}

#splash::before {
  content: "";
  position: absolute;
  inset: 13% 12% 27%;
  max-width: 420px;
  margin: auto;
  background: url("./splash.png") center / contain no-repeat;
}

.loading-status {
  position: absolute;
  bottom: clamp(32px, 13%, 124px);
  left: 50%;
  width: min(60%, 270px);
  transform: translateX(-50%);
}

.loading-status__label {
  margin-bottom: 14px;
  color: #dfca9d;
  font: 500 14px/1.5 "Microsoft YaHei UI", "PingFang SC", sans-serif;
  letter-spacing: 0.15em;
}

.progress-bar {
  box-sizing: border-box;
  height: 6px;
  padding: 1px;
  border: 1px solid #6f684d;
  border-radius: 8px;
  background: #10282d;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #4c9d8c, #ddbc78);
  transition: width 250ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar span {
    transition: none;
  }
}
