/* ===================================================
   SC88 - Truy Tìm Kho Báu
   Build Template CSS
=================================================== */

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  cursor: default;
  padding: 0;
  border: 0;
  margin: 0;
  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  overflow: hidden;
  width: 100%;
  height: 100%;
  /* Dùng màu nền trùng với viền game để không lộ thanh đen */
  background-color: #1a0a00;
  /* background-image: url("./bg-mb.cc559.webp"); */
  background-size: cover;
  background-position: center;
}

canvas {
  background-color: transparent;
  /* Stretch canvas để phủ toàn bộ container */
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#GameDiv {
  margin: 0 auto;
  position: relative;
  width: 100%;
  height: 100%;
}

#Cocos3dGameContainer {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

#GameCanvas {
  width: 100% !important;
  height: 100% !important;
}

/* --- Splash Screen Custom --- */
#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("./bg.6f84e.webp") no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 9999; /* Đảm bảo nằm trên cùng */
}

.logo-container {
  margin-bottom: 30px;
  animation: pulse 2s infinite ease-in-out;
}

.logo-text {
  color: #ffcc00 !important; /* Màu vàng kim */
  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(255, 204, 0, 0.7);
  display: block;
}

/* Responsive cho Mobile & Tablet */
@media (max-width: 1024px) or (orientation: portrait) {
  #splash {
    background: url("./bg-mb.cc559.webp") no-repeat center center;
    background-size: cover;
  }
  .logo-container {
    display: none !important;
  }
  .progress-container {
    margin-bottom: 20%;
  }
}

.progress-container {
  width: 75%;
  max-width: 550px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 204, 0, 0.5);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  margin-bottom: 10%;
}

#loading-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff9900);
  box-shadow: 0 0 15px rgba(255, 153, 0, 0.8);
  transition: width 0.3s ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

/* Ẩn mọi thẻ img lạ (logo Cocos) nếu Engine cố tình chèn vào */
#splash img {
  display: none !important;
}
