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;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#GameDiv, #Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}

.preloader-overlay {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-inner {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 16px;
}

.preloader-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(12vh + 80px);
  width: 70vw;
  max-width: 520px;
  height: auto;
}

.progress {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16vh;
  width: min(64vw, 480px);
}

.progress-track {
  position: relative;
  width: 100%;
  height: 24px;
  border: 3px solid #f5c14d;
  border-radius: 999px;
  background: linear-gradient(180deg, #6c2f00 0%, #3a1400 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.progress-bar-wrap {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  overflow: hidden;
  transition: width 200ms ease-out;
  will-change: width;
}

.progress-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #7ffb60 0%, #36cf42 100%);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.35);
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0.35) 14px, rgba(255, 255, 255, 0) 14px, rgba(255, 255, 255, 0) 28px);
  opacity: 0.65;
  animation: progress-stripes 1.2s linear infinite;
}

@keyframes progress-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 32px 0;
  }
}
