html {
  -ms-touch-action: none;
  background: #8ea3ad;
}

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;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  cursor: default;
  color: #d8ddd8;
  background: #111;
  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Verdana, Arial, sans-serif;
}

#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0;
  top: 0;
  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,
a:active, a:hover {
  color: #666;
}

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

#splash {
  position: absolute;
  z-index: 100;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #8ea3ad;
  background-image: url(./splash-bg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.progress-bar {
  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: #c7a75a;
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg,
    rgba(255, 255, 255, .16) 25%, transparent 25%,
    transparent 50%, rgba(255, 255, 255, .16) 50%,
    rgba(255, 255, 255, .16) 75%, transparent 75%, transparent);
  animation: animate-stripes 1s linear infinite;
}

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

/* Desktop: keep only the centered portrait game frame. */
body.is-desktop-game {
  background: #111;
}

body.is-desktop-game #Cocos2dGameContainer {
  z-index: 10;
  left: 50% !important;
  top: 50% !important;
  overflow: hidden;
  transform: translate(-50%, -50%) !important;
  background: #0a0d0c;
}

body.is-desktop-game #splash {
  z-index: 11;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  overflow: hidden;
  background-color: #8ea3ad;
  background-size: cover;
}

@media (prefers-reduced-motion: reduce) {
  .stripes span { animation: none; }
}
