/* --- CONFIGURACIÓN GENERAL --- */
body {
  margin: 0;
  padding: 20px; /* Añade un poco de espacio en pantallas pequeñas */
  box-sizing: border-box; /* Asegura que el padding no afecte el tamaño total */
  font-family: sans-serif;
  background: #181818;
  color: #eee;
  min-height: 100vh;
  
  /* Centra el contenedor principal */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- CONTENEDOR PRINCIPAL DEL LOGIN --- */
.login-container {
  width: 100%;
  max-width: 400px; /* Define un ancho máximo para el formulario */
  text-align: center; /* Centra el contenido interno como el logo y los links */
}

/* --- ELEMENTOS DEL FORMULARIO --- */
.logo {
  display: block;
  margin: 0 auto 4px; /* Antes era 14px, ahora mucho más pegado */
  width: 220px;
}

h2 {
  font-size: 3em; /* Tamaño de fuente ajustado */
  text-align: center;
  font-weight: 400;
  color: #181818;
  background: #89CFF0;
  border-radius: 12px;
  padding: 5px 0; /* Añadido para mejor espaciado vertical */
  margin-top: 0;
  margin-bottom: 20px;
}

input, button {
  width: 100%;
  box-sizing: border-box; /* Asegura que el padding no afecte el ancho */
  padding: 12px 16px; /* Padding unificado */
  margin-bottom: 12px;
  border-radius: 8px; /* Border-radius consistente */
  border: none;
  font-size: 1.5em; /* Tamaño de fuente ajustado */
}

input {
  background: #292929;
  color: #ffffff;
}

button {
  background: #89CFF0;
  color: #181818;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease; /* Transición suave para el hover */
}

button:hover {
  background: #6EA6C0;
}

/* --- LINKS Y MENSAJES --- */
.links a {
  display: block;
  text-align: center;
  color: #fdffff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1em;
  margin-top: 8px;
}

.msg {
  margin-top: 15px;
  font-size: 1em;
}

.error { color: #ff4d4d; }
.success { color: #2ecc71; } /* Verde más visible */

/* --- PANTALLA DE CARGA (PRELOAD) --- */
#preloadContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #181818;
  z-index: 9999;
  
  /* Centra su contenido con flexbox */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#preloadContainer .logo {
  width: 120px;
  margin-bottom: 14px;
  animation: pulse 1.5s infinite ease-in-out;
}

.loading-text {
  font-size: 1em;
  color: #aeaeae;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* --- CLASE UTILITARIA --- */
.hidden {
  display: none;
}