html { -ms-touch-action: none; touch-action: none; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

body {
  position: fixed;
  overscroll-behavior: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  cursor: default;
  color: #888;
  background-color: #333333;
  text-align: center;
  font-family: Helvetica, Thonburi, 'Noto Sans Thai', 'Leelawadee UI', Tahoma, Verdana, Arial, sans-serif;
  overflow: hidden;
}

#GameContainer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#GameCanvas {
  background-color: rgba(0, 0, 0, 0);
  touch-action: none;
}

/* Loading screen */
#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 5;
  transition: opacity .35s ease;
}

.progress-bar {
  position: absolute;
  left: 20%;
  top: 53%;
  height: 8.5px;
  padding: 0;
  width: 60%;
  background: #c5c5c5;
  border-radius: 7px;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 7px;
  transition: width .4s ease-in-out;
  background-color: #ffe451;
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg, rgba(253, 216, 67, 1) 25%, transparent 25%,
    transparent 50%, rgba(253, 216, 67, 1) 50%, rgba(253, 216, 67, 1) 75%,
    transparent 75%, transparent);
  animation: animate-stripes 1s linear infinite;
}

@keyframes animate-stripes {
  0% { background-position: 0 0; }
  100% { background-position: 60px 0; }
}

#loadingImg {
  top: 24%;
  width: 100%;
  position: absolute;
  z-index: 10;
}

#loadingImg .logo {
  display: inline-block;
  border-radius: 15px;
  vertical-align: top;
}

#webText {
  width: 100%;
  text-align: center;
  position: absolute;
  top: 38%;
  z-index: 99;
  font-size: 16px;
  color: #1e2222;
}

#loadingText {
  width: 100%;
  text-align: center;
  position: absolute;
  top: 56%;
  z-index: 99;
  font-size: 17px;
  color: #e29a00;
}

#skipHint {
  width: 100%;
  text-align: center;
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 99;
  font-size: 16px;
  color: #b0b0b0;
}

#rotateNote {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  background: #2f8c99;
  color: #ffffff;
  font-size: 26px;
}
body.sideways #rotateNote { display: flex; }

.fade-out { opacity: 0 !important; pointer-events: none; }
