/* 通用样式 */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -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 {
  -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;
  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(36, 78, 31, 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;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #333131 no-repeat center;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.5s;
  flex-direction: row; /* 默认横屏布局 */
}

.icon {
  width: 40%;
  height: 40%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.5s;
}

.progress-bar {
  position: absolute;
  top: 70%;
  left: 35%;
  width: 30%;
  height: 5px;
  padding: 2px;
  border-radius: 7px;
  box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
  transition: all 0.5s;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease-in-out;
  background-color: #63c5fae5;
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  animation: animate-stripes 1s linear infinite;
}

@keyframes animate-stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 0;
  }
}

/* 竖屏样式 */
@media (orientation: portrait) {
  #splash {
    flex-direction: column;
  }
  .icon {
    position: absolute;
    top: 27.5%;
    left: 27.5%;
    width: 45%;
    height: 45%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.5s;
    transform: rotate(90deg);
  }
  .progress-bar {
    position: absolute;
    left: 0%;
    top: 50%;
    height: 3px;
    padding: 2px;
    width: 50%;
    border-radius: 7px;
    box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
    transform: rotate(90deg);
  }
}

/* 横屏样式 */
@media (orientation: landscape) {
  #splash {
    flex-direction: row;
  }
  .icon {
    position: absolute;
    top: 27.5%;
    left: 27.5%;
    width: 45%;
    height: 45%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.5s;
    transform: rotate(0deg);
  }
  .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;
    transform: rotate(0deg);
  }
}

/* PC端默认横屏样式 */
@media screen and (min-width: 768px) {
  #splash {
    flex-direction: row;
  }
  .icon {
    position: absolute;
    top: 27.5%;
    left: 27.5%;
    width: 45%;
    height: 45%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
  .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;
    transform: rotate(0deg);
  }
}
