html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: #000;
  overflow: hidden;
  font-family: sans-serif;
}

#unity-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
  position: relative;
}

#unity-canvas {
  background: #231F20;
  display: block;
  object-fit: contain;
}

/* Loading bar */
#unity-loading-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 24px;
  margin: -12px 0 0 -150px;
  background-color: #555;
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 100%;
  background-color: #555;
  border-radius: 12px;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background-color: #4af;
  border-radius: 12px;
  transition: width 0.3s ease;
}

#unity-logo {
  display: none;
}

#unity-warning {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px;
  color: white;
  background: red;
  display: none;
  z-index: 100;
}

#unity-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  box-sizing: border-box;
  z-index: 20;
}

#unity-fullscreen-button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 10px;
}

/* === Custom Domino Loading Screen === */
#custom-loading-container {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20vmin;
  max-width: 120px;
  min-width: 60px;
  opacity: 1;
  transition: opacity 1s ease;
}

#game-logo {
  width: 250%; /* 2.5 veces más que la ficha */
  height: auto;
  margin-bottom: 36px; /* aproximadamente 20px más alto que antes */
  image-rendering: auto;
  object-fit: contain;
  filter: brightness(1.3);
}

#domino-loader {
  width: 100%;
  padding-top: 100%; /* Square container */
  margin-bottom: 12px;
  background-image: url('Loading_Icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: domino-spin 3.6s linear infinite;
  filter: brightness(4) saturate(0); /* Make it white */
}

@keyframes domino-spin {
  0% { transform: rotate(0deg); }
  80% { transform: rotate(720deg); }
  100% { transform: rotate(720deg); } /* pause */
}

#domino-progress-bar-empty {
  width: 100%;
  height: 6px;
  background-color: #444;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 36px; /* igual al espacio del logo arriba */
}

#domino-progress-bar-full {
  height: 100%;
  width: 0%;
  background-color: white;
  transition: width 0.2s ease;
  border-radius: 4px;
}
