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

/* ===== Loading Screen ===== */
#splash {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #020a1a 0%, #0a1832 35%, #101e3a 60%, #050d1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  overflow: hidden;
}

/* Stars */
#splash .stars {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  pointer-events: none;
}
#splash .star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite alternate;
}
#splash .star:nth-child(1)  { top:  8%; left: 12%; width: 2px; height: 2px; animation-duration: 1.5s; }
#splash .star:nth-child(2)  { top: 15%; left: 75%; width: 3px; height: 3px; animation-duration: 2.2s; animation-delay: .3s; }
#splash .star:nth-child(3)  { top: 25%; left: 40%; width: 2px; height: 2px; animation-duration: 1.8s; animation-delay: .7s; }
#splash .star:nth-child(4)  { top:  5%; left: 55%; width: 2px; height: 2px; animation-duration: 2.5s; animation-delay: .1s; }
#splash .star:nth-child(5)  { top: 35%; left: 85%; width: 3px; height: 3px; animation-duration: 1.3s; animation-delay: .5s; }
#splash .star:nth-child(6)  { top: 18%; left: 28%; width: 2px; height: 2px; animation-duration: 2.0s; animation-delay: 1s; }
#splash .star:nth-child(7)  { top: 42%; left: 15%; width: 2px; height: 2px; animation-duration: 1.7s; animation-delay: .4s; }
#splash .star:nth-child(8)  { top: 10%; left: 92%; width: 2px; height: 2px; animation-duration: 2.3s; animation-delay: .8s; }
#splash .star:nth-child(9)  { top: 30%; left: 60%; width: 3px; height: 3px; animation-duration: 1.4s; animation-delay: .2s; }
#splash .star:nth-child(10) { top: 48%; left: 70%; width: 2px; height: 2px; animation-duration: 2.1s; animation-delay: .6s; }
#splash .star:nth-child(11) { top: 22%; left:  5%; width: 2px; height: 2px; animation-duration: 1.9s; animation-delay: 1.2s; }
#splash .star:nth-child(12) { top: 38%; left: 48%; width: 2px; height: 2px; animation-duration: 2.4s; animation-delay: .9s; }

@keyframes twinkle {
  0%   { opacity: 0.2; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.4); }
}

/* Jet icon + flame */
#splash .jet-wrap {
  position: relative;
  margin-bottom: 24px;
}
#splash .jet-icon {
  font-size: 64px;
  animation: jet-hover 2s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(100,180,255,0.4));
}
@keyframes jet-hover {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

#splash .flame {
  position: absolute;
  bottom: -8px; left: 50%;
  width: 6px; height: 18px;
  margin-left: -3px;
  background: linear-gradient(180deg, #ff8c00, #ff4500, transparent);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.9;
  animation: flame-flicker 0.15s ease-in-out infinite alternate;
}
#splash .flame.f2 {
  width: 4px; height: 14px;
  margin-left: -2px;
  bottom: -6px;
  opacity: 0.6;
  animation-duration: 0.1s;
  animation-delay: 0.05s;
}
@keyframes flame-flicker {
  0%   { transform: scaleY(1) scaleX(1); opacity: 0.8; }
  100% { transform: scaleY(1.3) scaleX(0.8); opacity: 1; }
}

/* Title */
#splash .game-title {
  font-size: 38px;
  font-weight: bold;
  color: #7ec8e3;
  text-shadow: 0 0 20px rgba(100,180,255,0.5), 0 0 40px rgba(100,180,255,0.2), 0 2px 4px rgba(0,0,0,0.6);
  margin-bottom: 6px;
  letter-spacing: 8px;
}

#splash .game-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 40px;
  letter-spacing: 3px;
}

/* Progress bar - HUD style */
.progress-bar {
  position: relative;
  width: 55%;
  max-width: 280px;
  height: 4px;
  background: rgba(100,180,255,0.1);
  border: 1px solid rgba(100,180,255,0.15);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  transition: width .3s ease-in-out;
  background: linear-gradient(90deg, #3a7bd5, #64b4ff);
  box-shadow: 0 0 8px rgba(100,180,255,0.6);
}

#splash .loading-text {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1px;
}

#splash .loading-percent {
  margin-top: 4px;
  font-size: 15px;
  color: #64b4ff;
  font-weight: bold;
  letter-spacing: 1px;
}
