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 {
    -webkit-appearance: none;
    margin: 0;
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #888;
  background-color: #1a1a2e;

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

/* H5 boot splash — shown before Cocos engine is ready */
#game-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#game-splash.game-splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.game-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.game-splash-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #e8c547;
  border-radius: 50%;
  animation: game-splash-spin 0.75s linear infinite;
}

.game-splash-text {
  margin: 0;
  padding: 0;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

@keyframes game-splash-spin {
  to {
    transform: rotate(360deg);
  }
}
