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: #07091a;

  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%;
  z-index: 10;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5, 7, 25, .12) 0%, rgba(5, 7, 25, .72) 100%),
    #080b25 url(./assets/main/native/10/10b7d748-b033-4bcd-9f82-f2f89da0534a.278d7.jpg) no-repeat center;
  background-size: cover;
}

#splash::before {
  content: '';
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle at 50% 42%, rgba(184, 52, 255, .34), transparent 38%);
  animation: loader-ambient 3.2s ease-in-out infinite alternate;
}

.loader-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(58vw, 720px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 57, .2), rgba(101, 31, 228, .15) 38%, transparent 68%);
  filter: blur(18px);
  animation: loader-pulse 2.4s ease-in-out infinite;
}

.loader-logo {
  position: absolute;
  left: 50%;
  top: 43%;
  width: min(45vw, 560px);
  max-height: 62vh;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .42));
  animation: loader-reveal .7s cubic-bezier(.2, .75, .25, 1) both;
}

.loader-copy,
.loader-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .28em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}

.loader-copy {
  top: 76%;
  font-size: clamp(12px, 1.5vw, 18px);
}

.loader-hint {
  top: calc(76% + 51px);
  color: rgba(255, 255, 255, .62);
  font-size: clamp(9px, 1vw, 12px);
  font-weight: 500;
  letter-spacing: .12em;
}

.progress-bar {
    position: absolute;
    left: 50%;
    top: calc(76% + 30px);
    width: min(46vw, 620px);
    height: 4px;
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(3, 5, 20, .65);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width .45s ease-out;
    background: linear-gradient(90deg, #f39c20 0%, #ffd86a 54%, #3dc5de 100%);
    box-shadow: 0 0 16px rgba(255, 198, 61, .72);
}

@keyframes loader-reveal {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes loader-pulse {
  0%, 100% { opacity: .62; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes loader-ambient {
  from { opacity: .55; transform: scale(.96); }
  to { opacity: 1; transform: scale(1.04); }
}

@media (max-aspect-ratio: 4/3) {
  .loader-logo { width: min(68vw, 520px); }
  .progress-bar { width: min(68vw, 560px); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-logo,
  .loader-glow,
  #splash::before { animation: none; }
}
