html {
  -ms-touch-action: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

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: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;

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

#GameDiv {
  position: fixed;
  inset: 0;
  width: var(--slot777-viewport-width, 100vw);
  height: var(--slot777-viewport-height, 100dvh);
  overflow: hidden;
}

#Cocos3dGameContainer,
#GameCanvas {
  position: absolute;
  inset: 0;
}

#HallGameTransition {
  display: none;
}

.hall-transition-entry #HallGameTransition {
  position: fixed;
  z-index: 2147483647;
  top: 0;
  bottom: 0;
  left: 50%;
  display: block;
  width: min(100vw, 430px);
  overflow: hidden;
  /* Keep a painted fallback behind both shutters while image decoding and
     Cocos' first frame race each other on mobile browsers. */
  background: #10062c;
  pointer-events: all;
  isolation: isolate;
  contain: paint;
  backface-visibility: hidden;
  transform: translate3d(-50%, 0, 0);
}

.hall-transition-entry #HallGameTransition .hall-game-transition-top {
  transform: translate3d(0, -100%, 0);
}

.hall-transition-entry #HallGameTransition .hall-game-transition-bottom {
  transform: translate3d(0, 100%, 0);
}

.hall-transition-complete #HallGameTransition {
  opacity: 0;
  transition: opacity 180ms ease;
}

.hall-game-transition-panel {
  position: absolute;
  z-index: 1;
  left: 0;
  width: 100%;
  height: 50.1%;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.hall-game-transition-loading {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #10062c;
}

.hall-game-transition-loading img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.hall-game-transition-background {
  opacity: 0;
}

.hall-transition-assets-ready .hall-game-transition-background {
  opacity: 1;
}

.hall-game-transition-loading-icon {
  position: absolute;
  z-index: 1;
  bottom: 19%;
  left: 50%;
  width: min(25.5%, 110px) !important;
  height: auto !important;
  transform: translateX(-50%);
}

.hall-game-transition-progress {
  position: absolute;
  z-index: 1;
  bottom: 14%;
  left: 50%;
  width: 66.67%;
  height: min(2.4vw, 10px);
  overflow: hidden;
  border: 1px solid rgba(210, 255, 230, 0.94);
  border-radius: 999px;
  background: rgba(3, 55, 42, 0.82);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(0, 0, 0, 0.65);
  transform: translateX(-50%);
}

.hall-game-transition-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #baff8f 0%, #43de4f 42%, #0e8b35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 6px rgba(96, 255, 122, 0.82);
  transform: scaleX(0.06);
  transform-origin: left center;
  transition: transform 100ms linear;
}

.hall-game-transition-progress-text {
  position: absolute;
  z-index: 1;
  bottom: 10.8%;
  left: 50%;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: min(3vw, 13px);
  line-height: 1;
  text-shadow: 0 1px 2px #000;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hall-game-transition-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.hall-game-transition-top {
  top: 0;
}

.hall-game-transition-bottom {
  bottom: 0;
}

.hall-transition-opening .hall-game-transition-top {
  transform: translate3d(0, -100%, 0);
  transition: transform 520ms cubic-bezier(0.4, 0, 0.25, 1);
}

.hall-transition-opening .hall-game-transition-bottom {
  transform: translate3d(0, 100%, 0);
  transition: transform 520ms cubic-bezier(0.4, 0, 0.25, 1);
}

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