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: #0a1a3a;

  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: #0a1a3a;
}

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: linear-gradient(180deg, #0a1a3a 0%, #0d2b5e 40%, #103d7a 70%, #0a1a3a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#splash .game-title {
  font-size: 42px;
  font-weight: bold;
  color: #3dc5de;
  text-shadow: 0 0 20px rgba(61,197,222,0.5), 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 8px;
  letter-spacing: 6px;
}

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

#splash .fish-icon {
  font-size: 60px;
  margin-bottom: 30px;
  animation: fish-swim 2s ease-in-out infinite;
}

@keyframes fish-swim {
  0%, 100% { transform: translateX(0) scaleX(-1); }
  50% { transform: translateX(15px) scaleX(-1); }
}

#splash .bubbles {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  overflow: hidden;
  pointer-events: none;
}

#splash .bubble {
  position: absolute;
  bottom: -20px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), rgba(255,255,255,0.03));
  border-radius: 50%;
  animation: bubble-rise linear infinite;
}

#splash .bubble:nth-child(1) { left: 10%; width: 20px; height: 20px; animation-duration: 6s; animation-delay: 0s; }
#splash .bubble:nth-child(2) { left: 30%; width: 14px; height: 14px; animation-duration: 8s; animation-delay: 1s; }
#splash .bubble:nth-child(3) { left: 50%; width: 24px; height: 24px; animation-duration: 7s; animation-delay: 2s; }
#splash .bubble:nth-child(4) { left: 70%; width: 16px; height: 16px; animation-duration: 9s; animation-delay: 0.5s; }
#splash .bubble:nth-child(5) { left: 85%; width: 12px; height: 12px; animation-duration: 6s; animation-delay: 3s; }
#splash .bubble:nth-child(6) { left: 20%; width: 18px; height: 18px; animation-duration: 10s; animation-delay: 1.5s; }

@keyframes bubble-rise {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-100vh) scale(0.3); opacity: 0; }
}

.progress-bar {
  position: relative;
  width: 60%;
  max-width: 320px;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 6px;
  transition: width .3s ease-in-out;
  background: linear-gradient(90deg, #3dc5de, #5be8ff);
  box-shadow: 0 0 10px rgba(61,197,222,0.5);
}

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

#splash .loading-percent {
  margin-top: 6px;
  font-size: 16px;
  color: #3dc5de;
  font-weight: bold;
}

