html, body, canvas, div {
  touch-action: none;
  -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: #4a7c3f;

  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-color: #4a7c3f;
  background-image: url(./splash-forest.webp?v=acwebp1);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.splash-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

@font-face {
  font-family: jingnan;
  src: url(./assets/resources/native/46/462d2e5d-6086-49d4-98f0-d58e27f32855.93d26/jingnan.ttf) format("truetype");
  font-display: swap;
}

#splash.bg-ready {
  background-image: url(./splash-forest.webp?v=acwebp1);
}

.progress-bar {
    position: absolute;
    z-index: 1;
    left: 29%;
    top: 76%;
    height: 16px;
    padding: 0;
    width: 42%;
    border-radius: 16px;
    overflow: visible;
    background: rgba(15, 15, 35, 0.59);
    box-shadow: none;
}

.progress-bar span {
    display: block;
    position: relative;
    height: 100%;
    min-height: 16px;
    border-radius: 16px;
    overflow: visible;
    transition: width .35s linear;
    background-color: #FFC846;
}

.progress-star {
    position: absolute;
    right: 0;
    top: 50%;
    width: 36px;
    height: 36px;
    margin-right: -18px;
    margin-top: 0;
    transform: translateY(calc(-50% - 2px));
    -webkit-transform: translateY(calc(-50% - 2px));
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    background: url(./splash-star-clean.webp?v=acwebp1) no-repeat center;
    background-size: contain;
    -webkit-mask-image: none;
    mask-image: none;
    pointer-events: none;
}

.progress-pct {
    display: none;
}

.splash-text {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    top: calc(76% + 38px);
    color: #FFFFFF;
    font-size: clamp(11px, 1.7vh, 18px);
    font-weight: 500;
    letter-spacing: 2px;
    font-family: "STHupo", "华文琥珀", "Microsoft YaHei", "PingFang SC", sans-serif;
    -webkit-text-stroke: 1.5px #3C2D6E;
    paint-order: stroke fill;
    text-shadow: -1px -1px 0 #3C2D6E, 1px -1px 0 #3C2D6E, -1px 1px 0 #3C2D6E, 1px 1px 0 #3C2D6E;
}

.splash-dots {
    display: inline-block;
    min-width: 1.6em;
    text-align: left;
    letter-spacing: 1px;
}

.splash-dots i {
    font-style: normal;
    font-weight: inherit;
    opacity: 0;
}

.splash-dots i:nth-child(1) {
    animation: splash-dot1 1.2s linear infinite;
    -webkit-animation: splash-dot1 1.2s linear infinite;
}

.splash-dots i:nth-child(2) {
    animation: splash-dot2 1.2s linear infinite;
    -webkit-animation: splash-dot2 1.2s linear infinite;
}

.splash-dots i:nth-child(3) {
    animation: splash-dot3 1.2s linear infinite;
    -webkit-animation: splash-dot3 1.2s linear infinite;
}

@-webkit-keyframes splash-dot1 {
    0%, 8% { opacity: 0; }
    12%, 82% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@keyframes splash-dot1 {
    0%, 8% { opacity: 0; }
    12%, 82% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@-webkit-keyframes splash-dot2 {
    0%, 28% { opacity: 0; }
    32%, 82% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@keyframes splash-dot2 {
    0%, 28% { opacity: 0; }
    32%, 82% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@-webkit-keyframes splash-dot3 {
    0%, 48% { opacity: 0; }
    52%, 82% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

@keyframes splash-dot3 {
    0%, 48% { opacity: 0; }
    52%, 82% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

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