/* RESET + BODY */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  background: #000;
}

/* UNITY CANVAS */
#unity-canvas {
  width: 100vw;
  height: 100dvh;
  display: block;
  background: url('Build/BuildWeb.jpg') center/cover no-repeat;
}

/* PC: tỉ lệ 9:18 + căn giữa */
@media (min-width: 768px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #unity-canvas {
    aspect-ratio: 9 / 18;
    height: 100vh;
    width: auto;
    max-height: 100vh;
    max-width: 100vw;
  }
}

/* Fullscreen class cho mobile */
.fullscreen {
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===================== LOADING UI =======================*/
#loading {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 99999;
  font-family: sans-serif;
}

#loading-box {
  width: 80%;
  max-width: 350px;
  text-align: center;
}

#loading-text {
  font-size: 22px;
  margin-bottom: 15px;
  font-weight: bold;
}

#loading-bar {
  width: 100%;
  height: 14px;
  background: #333;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

#loading-fill {
  width: 0%;
  height: 100%;
  background: #4caf50;
  transition: width 0.2s ease-out;
}

#loading-percent {
  font-size: 16px;
  margin-top: 5px;
}
