html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* overflow: hidden; */
  background-color: #000;
}

html {
  -ms-touch-action: none;
}

body,
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;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  top: 0;
  left: 0;
}

.blur {
  position: fixed;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-image: url(./public/bg_blur.jpg);
  background-size: cover;
  background-position: center;
}

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

#swipe {
  width: 100%;
  height: 200%;
  position: relative;
  z-index: -1;
  display: none;
  /* pointer-events: none; */
}

.swipe {
  height: 100%;
  z-index: 12;
  background-color: #000;
  opacity: 0.5;
  color: #fff;
  position: relative;
  pointer-events: none;
}

.fullscreen-icon {
  position: fixed;
  z-index: 11;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 90px;
  height: 179px;
  background-image: url(./public/swipe-up.png);
  animation: fullscreen-spin 1.6s linear infinite;
  pointer-events: none;
}

@keyframes fullscreen-spin {
  from {
    opacity: 0.4;
    margin-top: 0px;
  }
  50% {
    opacity: 0.9;
    margin-top: 20px;
  }
  to {
    opacity: 0.4;
    margin-top: 0px;
  }
}

#orientation {
  position: fixed;
  z-index: 1002;
  display: none;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

#orientation .icon {
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 50%;
  aspect-ratio: 1/1;
  max-width: 500px;
  background-size: cover;
  background-image: url(./public/landscape.png);
  /* animation: rotateAnimation 2s linear infinite; */
}

#orientation .icon.portrait {
  width: 36%;
  transform: translateX(-50%) translateY(-50%) rotate(-90deg);
}

#logo {
  position: fixed;
  z-index: 1000;
  width: 100%;
  height: 100vh;
  background-color: #000;
}

#logo img {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  transform: translateX(-50%) translateY(-50%);
}

/* #iframeWrapper {
  display: flex;
  width: 100%;
  height: auto;
  max-width: 1280px;
  max-height: 720px;
  aspect-ratio: 16/9;
  position: fixed;
  z-index: 10;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  box-shadow: 0px 0px 8px #000;
  overflow: hidden;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#iframeWrapper.isMobile {
  max-width: none;
  max-height: none;
  height: 100%;
  aspect-ratio: auto;
} */

/* @media screen and (orientation: landscape) {
  #iframeWrapper.isMobile {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
  }
  @media (min-aspect-ratio: 16/9) {
    #iframeWrapper.isMobile {
      width: auto;
      height: 100%;
    }
  }
}

@media screen and (orientation: portrait) {
  #iframeWrapper.isMobile {
    aspect-ratio: 9/16;
    height: 100%;
    width: auto;
  }
  @media (max-aspect-ratio: 9/16) {
    #iframeWrapper.isMobile {
      height: auto;
      width: 100%;
    }
  }
} */

#loadingMsg {
  position: fixed;
  z-index: 10000;
  bottom: 2rem;
  color: #787878;
  text-align: center;
  width: 100%;
  font-size: 13px;
}

#GameDiv {
  position: relative;
  z-index: 10;
  /* margin: 0 !important; */
}

#GameWrapper.desktop {
  position: fixed;
  z-index: 10;
  box-shadow: 0px 0px 8px #000;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}


#GameWrapper.desktopP {
  position: fixed;
  z-index: 10;
  box-shadow: 0px 0px 8px #000;
  overflow: hidden;
  width: auto;
  height: 100%;
  aspect-ratio: 9/16;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}

/* 暫時先移除 -jojo 2024/4/29 */
/* @media (min-aspect-ratio: 9/16) {
  #GameWrapper.desktopP {
    width: 100%;
    height: auto;
    max-width: 720px;
  }
} */

/* 移至 game.css -jojo 2024/4/29 */
/* @media (min-aspect-ratio: 9/16) {
  #GameDiv .gameDivP {
    margin: auto 0px !important;
  }
} */

#GameWrapper.mobile {
  position: fixed;
  z-index: 10;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

#version {
  position: fixed;
  bottom: 4px;
  left: 4px;
  display: none;
  z-index: 10;
  color: #fff;
  font-size: 12px;
  transform: scale(0.6);
  opacity: 0.3;
  transform-origin: bottom left;
  line-height: 1;
}

#debug {
  position: absolute;
  z-index: 10;
  width: 100%;
  top: 0;
  left: 0;
  color: #fff;
  background-color: #0000008c;
  font-size: 0.75rem;
}
