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: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: #0d1b2a url(./splash-web.jpg) no-repeat center center;
  /* 启动图是整屏海报（1672x941），必须铺满；原来的 45% 会缩成中间一小块 */
  background-size: cover;
  background-position: center center;
}

/* 启动图还在显示时，不要把竖屏提示盖在它上面，避免看起来像两个启动页 */
#splash:not([style*="display: none"]) ~ #rotateTip {
  display: none !important;
}

.progress-bar {
    position: absolute;
    left: 50%;
    top: 88%;
    transform: translateX(-50%);
    height: 4px;
    padding: 0;
    width: 56%;
    max-width: 520px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, .35);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease-in-out;
    background-color: #3dc5de;
    box-shadow: 0 0 8px rgba(61, 197, 222, .85);
}

.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;}
}

/* 竖屏提示：横屏游戏在竖屏下不再展示旋转 90° 的 UI */
#rotateTip { display: none; }

/* H5 主动切竖屏时（在线客服 / 竖屏游戏）：关闭横屏引导层，
   否则它会以 z-index 9998 盖住客服的 cc.WebView iframe，玩家怎么转都出不来。 */
html body.portrait-mode #rotateTip { display: none !important; }

@media (orientation: portrait) and (max-width: 900px) {
  #rotateTip {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 20%, #1f4f7a 0%, #0d1b2a 60%, #070d14 100%);
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #fff;
    text-align: center;
  }
  #rotateTip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
  }
  .rotate-box { position: relative; z-index: 1; padding: 24px; }
  .rotate-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 22px; }
  .rotate-phone {
    width: 42px;
    height: 72px;
    margin: 0 auto 22px;
    border: 2px solid #fff;
    border-radius: 8px;
    position: relative;
    transform: rotate(90deg);
    animation: rotate-phone 1.6s ease-in-out infinite;
  }
  .rotate-phone::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: translateX(-50%);
  }
  .rotate-title { font-size: 20px; font-weight: 600; letter-spacing: 2px; margin-bottom: 8px; }
  .rotate-desc { font-size: 13px; color: rgba(255, 255, 255, .72); }
}

@keyframes rotate-phone {
  0%, 20% { transform: rotate(90deg); }
  55%, 80% { transform: rotate(0deg); }
  100% { transform: rotate(90deg); }
}

/* 刘海/Home 条安全区 */
@supports (padding: env(safe-area-inset-bottom)) {
  .progress-bar { top: calc(88% - env(safe-area-inset-bottom)); }
}
