html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  font-family: sans-serif;
}

/* CANVAS FRAME */
#GameDiv {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  height: 800px;

  border: 5px solid #000;
  border-radius: 10px;
  box-shadow: 0 5px 50px #333;

  touch-action: none;
}

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

canvas {
  display: block;
}

/* ======================== */
/*         SPLASH           */
/* ======================== */
#splash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 450px;
  height: 800px;

  background: url("./bg.png") no-repeat center center;
  background-size: cover;

  z-index: 9999;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transition: opacity 0.4s ease;
}

#logo {
  width: 180px;
  margin-bottom: 24px;
}

/* Loading Bar ở vị trí 10% tính từ dưới lên */
.progress-bar,
.progress-bar span {
  box-sizing: border-box;
}

.progress-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10%;
  width: 400px;           /* đúng bằng width của bar-bg.png */
  height: 29px;           /* đúng bằng height của bar-bg.png */
  background: url("./bar-bg.png") no-repeat center center;
  background-size: 100% 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.progress-bar span {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 29px;
  width: 0%;
  background: url("./bar-fill.png") repeat-x left center;
  background-size: auto 100%;
  transition: width 0.2s linear;
}