@font-face {
  font-family: 'andante';
  src: url(./public/fonts/andante.ttf);
}
@font-face {
  font-family: 'futura';
  src: url(./public/fonts/Futura\ Std\ Extra\ Bold\ Condensed.ttf);
}
@font-face {
  font-family: 'futura';
  src: url(./public/fonts/Futura\ Std\ Extra\ Bold\ Condensed\ Oblique.ttf);
  font-style: italic;
}

:root {
  --vw-factor: 19.2px; /* calc(1920px * 0.01) */
}

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;
  
  /* 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;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(./public/images/bg_loading@2x.png);
  background-size: cover;
  background-position: center bottom;
}

#splash .progress {
  position: absolute;
  /* top: 740px */
  /* top: 68.51vh; */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
}

#splash .progress-text {
  /* font-size: 28px; */
  /* font-size: 1.458vw; */

  /* font-size: 40px */
  font-size: 2.083vw;

  font-weight: 750;
  font-style: italic;
  letter-spacing: 0.02em;
  color: white;
  font-family: 'futura';
}

#splash .hourglass {
  /* width: 44px;
  height: 44px; */
  /* width: 2.291vw;
  height: 2.291vw; */

  /* 50px */
  width: 2.604vw;
  height: 2.604vw;
  
  /* margin-right: 4px; */
  margin-right: 0.208vw;
  animation-name: hourglass-ani;
  animation-duration: 2s;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
}

@media (orientation: portrait) {
  #splash .progress-text {
    /* font-size: 28px; */
    /* font-size: 2.592vh; */

    /* font-size: 40px */
    font-size: 3.703vh;
  }

  #splash .hourglass {
    /* width: 44px;
    height: 44px; */
    /* width: 2.291vw;
    height: 2.291vw; */

    /* 50px */
    width: 4.629vh;
    height: 4.629vh;
    
    /* margin-right: 4px; */
    margin-right: 0.37vh;
  }
}

/* #splash .title {
  position: absolute;
  top: 28.7vh;
}
#splash .subtitle {
  color: white;
  font-size: 1.25vw;
  font-family: 'andante';
  position: absolute;
  top: 25vh;
  left: 50%;
  transform: translateX(-50%);
}

#splash .title.first {
  width: 59.375vw;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}
#splash .title.second {
  width: 46.875vw;
  left: 50%;
  transform: translateX(-50%);
} */

.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: #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;}
}

@keyframes hourglass-ani {
  0% { transform: none; }
  90% { transform: none; }
  100% { transform: rotate(180deg); }
}