body { 
  padding: 0; 
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  overflow: hidden; /* Prevent scrollbars */
  background: url('BG.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}
#unity-container { 
  position: absolute;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  overflow: hidden;
  z-index: 10; /* Ensure game container is above background */
}
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 1920px; height: 1080px; }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
#unity-canvas { background: url('BG.png') no-repeat center center; background-size: cover; width: 1920px; height: 1080px; }
.unity-mobile #unity-canvas { width: 100%; height: 100% }

/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease-out;
  background: url('BG.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

#logo {
  width: 300px;
  margin-bottom: 40px;
  animation: pulse 2s infinite;
}

.game-title {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 50px;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  letter-spacing: 2px;
}

.loading-container {
  width: 80%;
  max-width: 600px;
  text-align: center;
}

.progress-text {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 15px;
  height: 24px;
}

.progress-bar {
  width: 100%;
  height: 10px; /* Thinner bar */
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.progress-bar-fill {
  height: 100%;
  background: #FF0040;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 5px;
  box-shadow: 0 0 10px #FF0040;
  animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 10px #FF0040;
  }
  to {
    box-shadow: 0 0 20px #FF0040, 0 0 30px rgba(255, 0, 64, 0.5);
  }
}

.loading-info {
  color: #aaa;
  margin-top: 20px;
  font-size: 0.9rem;
  text-align: center;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Fullscreen styles - override to use 100% dimensions */
:fullscreen #unity-container,
:-webkit-full-screen #unity-container,
:-moz-full-screen #unity-container,
:-ms-fullscreen #unity-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

:fullscreen #unity-canvas,
:-webkit-full-screen #unity-canvas,
:-moz-full-screen #unity-canvas,
:-ms-fullscreen #unity-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* This ensures the canvas maintains its aspect ratio without cropping */
}



/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease-out;
}

#logo {
  width: 300px;
  margin-bottom: 40px;
  animation: pulse 2s infinite;
}

.game-title {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 50px;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  letter-spacing: 2px;
}

.loading-container {
  width: 80%;
  max-width: 600px;
  text-align: center;
}

.progress-text {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 15px;
  height: 24px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00c9ff, #92fe9d);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

.loading-info {
  color: #aaa;
  margin-top: 20px;
  font-size: 0.9rem;
  text-align: center;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Old loading bar styles (in case we need them) - Hiding these to avoid conflicts */
#unity-loading-bar { display: none !important; }
#unity-logo { display: none !important; }
#unity-progress-bar-empty { display: none !important; }
#unity-progress-bar-full { display: none !important; }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { display: none; }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

