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: #171717 no-repeat center;
  background-size: 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.progress-bar {
    position: absolute;
    left: 13%;
    top: 80%;
    width: 74%;
    height: 16px;
    padding: 2px;

    border-radius: 8px;

    /* 进度条背景 */
    background: rgba(255,255,255,.08);

    box-shadow:
        inset 0 0 2px rgba(0,0,0,.6),
        0 0 3px rgba(0,0,0,.3);
}

.progress-bar span {
    display: block;
    position: relative;       /* 必须 */
    overflow: hidden;         /* 裁剪斜纹 */
    height: 100%;
    border-radius: 4px;
    transition: width .3s linear;

    /* 紫色渐变 */
    background: linear-gradient(
        90deg,
        #A328B5 0%,
        #492DC2 100%
    );

    /* 发光 */
    box-shadow:
        0 0 4px #A328B5,
        0 0 8px rgba(163,40,181,.8),
        0 0 16px rgba(73,45,194,.7);

    animation: glow 1.2s ease-in-out infinite alternate;
}

.progress-bar span::after{
    content:"";
    position:absolute;
    inset:0;

    background:
      linear-gradient(
        110deg,
        transparent 20%,
        rgba(255,255,255,.5) 40%,
        rgba(255,255,255,.8) 50%,
        rgba(255,255,255,.5) 60%,
        transparent 80%
      );

    width:40%;
    animation:shine 1.2s linear infinite;
}

@keyframes shine{
    from{
        transform:translateX(-120%);
    }
    to{
        transform:translateX(320%);
    }
}

@keyframes glow {

    from {
        box-shadow:
            0 0 4px #A328B5,
            0 0 8px rgba(163,40,181,.6),
            0 0 14px rgba(73,45,194,.5);
    }

    to {
        box-shadow:
            0 0 8px #A328B5,
            0 0 16px rgba(163,40,181,.9),
            0 0 28px rgba(73,45,194,.8);
    }

}

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

.game-icon {
    display: inline-block;
    animation: jump 1.8s infinite;
}

.game-icon img {
    width: 100px;   /* 修改图片大小 */
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes jump {
    0% {
        transform: translateY(0);
    }

    15% {
        transform: translateY(-15px);
    }

    30% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(0);
    }
}

.loading-text {
    color: white;
    font-weight: bold;
    font-size: 40px;
    margin-top: 24px;
}

