/* Loading screen: barra compacta com etapas do carregamento real.
 * Visível na tela inicial (login), some ao entrar no jogo.
 * Não interfere no boot: apenas apresentação, sem bloquear nada. */

#loading-screen {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(520px, 92vw);
  padding: 10px 14px 12px;
  background: rgba(8, 8, 8, 0.88);
  border: 1px solid #5c4128;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  font-family: 'Roboto', sans-serif;
  color: #e0e0e0;
  z-index: 9000;
  transition: opacity 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-screen-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffdb7a;
  margin-bottom: 6px;
}

.loading-screen-bar {
  width: 100%;
  height: 10px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid #3d2e1e;
  border-radius: 3px;
  overflow: hidden;
}

.loading-screen-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b33904 0%, #f07e13 100%);
  transition: width 0.15s linear;
}

.loading-screen-current {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
  min-height: 14px;
}

.loading-screen-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.loading-step {
  color: #666;
}

.loading-step::before {
  content: "○ ";
}

.loading-step.active {
  color: #ffdb7a;
}

.loading-step.active::before {
  content: "◌ ";
}

.loading-step.done {
  color: #6fbf6f;
}

.loading-step.done::before {
  content: "● ";
}

.loading-step.fail {
  color: #e05555;
}

.loading-step.fail::before {
  content: "✕ ";
}

/* Home (login): em telas estreitas a barra centralizada cobriria a caixa
 * de botões da home (.login-settings, canto inferior esquerdo);
 * nesses casos ancora à direita em vez do centro. */
@media (max-width: 900px) {
  #loading-screen {
    left: auto;
    right: 12px;
    transform: none;
    width: min(420px, 60vw);
  }
}
