html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* 100dvh = dynamic viewport height, tự động điều chỉnh khi address bar ẩn/hiện */
  height: 100dvh;
  margin: 0;
  padding: 0;
}

body {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

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

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#GameDiv {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Safe area cho iPhone notch */
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

#Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

#rotate-notice {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
  pointer-events: auto;
}

.rotate-notice-title {
  font-size: 24px;
  font-weight: 700;
}

.rotate-notice-text {
  font-size: 16px;
  color: #bbb;
}

@media screen and (orientation: portrait) and (pointer: coarse) {
  #GameDiv {
    visibility: hidden;
    pointer-events: none;
  }

  #rotate-notice {
    display: flex;
  }
}
