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);
}

#overlay_container {
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0);
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 0px;
  margin: 0px;
}

@media screen and (orientation: portrait) {
  #logo {
    position: fixed;
    width: 100vw;
    height: 60vh;
    background-repeat: no-repeat;
    background-position: center top 90%;
  }

  #loading {
    position: fixed;
    left: 0;
    bottom: 0;
    right: 0;
    height: 20%;
    background-image: url("./LoadingIndicator.gif");
    background-position: center top 20%;
    background-size: auto 20%;
    background-repeat: no-repeat;
    background-color: transparent;
  }
}

@media screen and (orientation: landscape) {
  #logo {
    position: fixed;
    width: 99%;
    height: 70%;
    background-repeat: no-repeat;
    background-position: center top 80%;
  }

  #loading {
    position: fixed;
    left: 0;
    bottom: 0;
    right: 0;
    height: 25%;
    background-image: url("./LoadingIndicator.gif");
    background-position: center top 20%;
    background-size: auto 20%;
    background-repeat: no-repeat;
    background-color: transparent;
  }
}

/* prevent pull-to-refresh for Safari 16+ */
@media screen and (pointer: coarse) {
  @supports (-webkit-backdrop-filter: blur(1px)) and (overscroll-behavior-y: none) {
    html {
      min-height: 100%;
      overscroll-behavior-y: none;
    }
  }
}

/* prevent pull-to-refresh for Safari 9~15 */
@media screen and (pointer: coarse) {
  @supports (-webkit-backdrop-filter: blur(1px)) and (not (overscroll-behavior-y: none)) {
    html {
      height: 100%;
      overflow: hidden;
    }

    body {
      margin: 0px;
      max-height: 100%;
      /* or `height: calc(100% - 16px);` if body has default margin */
      overflow: auto;
      -webkit-overflow-scrolling: touch;
    }

    /* in this case to disable pinch-zoom, set `touch-action: pan-x pan-y;` on `body` instead of `html` */
  }
}

/* prevent pull-to-refresh for Chrome 63+ */
body {
  overscroll-behavior-y: none;
}