/* Contenedor principal que cubre toda la pantalla */
.login-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
  z-index: 1000; /* Asegura que esté por encima de todo */
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto; /* Permite scroll si el contenido es muy largo */
}

/* Estilos para las tarjetas de contenido */
.login-section,
.change-username-section,
.logout-confirmation {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.3s ease-out;
}

/* Animación para aparecer suavemente */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mantenemos todos los estilos anteriores para los elementos internos */
.login-section h2,
.change-username-section h2,
.logout-confirmation h2 {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  text-align: center;
}

.login-section > p {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}

.version-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.version-btn {
  flex: 1;
  padding: 12px;
  background-color: #f5f5f7;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.version-btn:hover {
  background-color: #ebebed;
}

.username-input p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.username-input input,
#new-username {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.username-input input:focus,
#new-username:focus {
  border-color: #007AFF;
  outline: none;
}

#login-btn,
#save-username-btn,
#confirm-logout-btn {
  width: 100%;
  padding: 14px;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

#login-btn,
#save-username-btn {
  background-color: #007AFF;
}

#login-btn:hover,
#save-username-btn:hover {
  background-color: #0066CC;
}

.change-username-section p {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-top: 16px;
}

#logout-link {
  color: #007AFF;
  font-weight: 500;
  text-decoration: none;
}

#logout-link:hover {
  text-decoration: underline;
}

.logout-confirmation p {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

#confirm-logout-btn {
  background-color: #FF3B30;
  margin-top: 20px;
}

#confirm-logout-btn:hover {
  background-color: #E0352B;
}



/* Estilos para los botones de cerrar */
.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: 300;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-btn:hover {
  color: #333;
}

/* Añadir posición relativa a los contenedores para posicionar los botones */
.login-section,
.change-username-section,
.logout-confirmation {
  position: relative;
  padding-top: 40px; /* Más espacio arriba para el botón */
}

/* Ajustar el margen superior de los títulos */
.login-section h2,
.change-username-section h2,
.logout-confirmation h2 {
  margin-top: 0;
}

/* Añadir al CSS existente */
.version-btn.active {
  background-color: #007AFF;
  color: white;
}

.login-content {
  display: none; /* Ocultar inicialmente */
}

/* Para evitar que los clicks en el contenido cierren el modal */
.login-section,
.change-username-section,
.logout-confirmation {
  pointer-events: auto;
}