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;
}

body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  background: #111526;
  font-family: Arial, Helvetica, sans-serif;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#GameDiv, #Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

#BoxLoading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(82, 101, 193, 0.28), transparent 36%),
    linear-gradient(180deg, #171c34 0%, #0d1020 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#BoxLoading.box-loading--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.box-loading__spinner {
  width: 52px;
  height: 52px;
  box-sizing: border-box;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-top-color: #f5c34d;
  border-radius: 50%;
  animation: box-loading-spin 0.85s linear infinite;
}

.box-loading__text {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  letter-spacing: 1px;
}

.box-loading__track {
  width: min(62vw, 280px);
  height: 5px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.box-loading__bar {
  width: 3%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f1a93b, #ffe28a);
  box-shadow: 0 0 10px rgba(245, 195, 77, 0.45);
  transition: width 0.25s ease-out;
}

.box-loading__percent {
  min-width: 44px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.box-loading__retry {
  display: none;
  min-width: 110px;
  margin-top: 18px;
  padding: 9px 20px;
  border: 1px solid rgba(255, 226, 138, 0.75);
  border-radius: 18px;
  color: #ffe28a;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  cursor: pointer;
}

@keyframes box-loading-spin {
  to { transform: rotate(360deg); }
}

: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);
}
