html {
  -ms-touch-action: none;
  background: #ffeef6;
}

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 {
    /* 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;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #6c3e5d;
  background: #ffeef6;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: grid;
  place-items: center;
  overflow: hidden;
}

canvas {
  background-color: #ffeef6;
}

#GameDiv {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  background: #ffeef6;
}

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

#CandyFunLoading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ffeef6;
  opacity: 1;
  transition: opacity 420ms ease;
}

#CandyFunLoading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-scene {
  position: relative;
  width: min(100vw, calc(100vh * 0.5625));
  height: min(100vh, calc(100vw * 1.7777778));
  max-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 246, 251, 0.18), rgba(255, 238, 247, 0.28)),
    url("assets/resources/native/3f/3fc863eb-6395-4c92-b286-accf354351b5.png") center / cover no-repeat,
    #ffeef6;
}

.loading-title {
  position: absolute;
  top: 28%;
  left: 50%;
  width: min(82%, 430px);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 18px rgba(140, 53, 95, 0.22));
  pointer-events: none;
}

.loading-progress {
  position: absolute;
  top: 64%;
  left: 50%;
  width: min(78%, 390px);
  transform: translate(-50%, -50%);
}

.loading-track {
  position: relative;
  height: 22px;
  padding: 3px;
  overflow: hidden;
  border: 3px solid #fff8d6;
  border-radius: 999px;
  background: rgba(255, 126, 181, 0.38);
  box-shadow:
    0 5px 0 rgba(190, 86, 67, 0.2),
    0 12px 28px rgba(127, 58, 111, 0.24),
    inset 0 2px 5px rgba(255, 255, 255, 0.55);
}

.loading-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5ca8 0%, #ffcf3d 54%, #25d6d8 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.58),
    0 0 12px rgba(255, 92, 168, 0.42);
  transition: width 120ms ease-out;
}

.loading-shine {
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.56) 38%, transparent 70%);
  transform: translateX(-100%);
  animation: loading-shine 1.25s ease-in-out infinite;
}

.loading-percent {
  margin-top: 10px;
  text-align: center;
  color: #8c3f64;
  font-size: 18px;
  font-weight: 900;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.82),
    0 4px 10px rgba(133, 62, 105, 0.18);
}

@keyframes loading-shine {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (max-aspect-ratio: 9 / 16) {
  .loading-scene {
    width: 100vw;
    height: 100vh;
    max-width: none;
  }
}

: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);
}
