/* Contenedor del modal */
#registerModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  font-family: 'Inter', sans-serif;
}

/* Contenido del modal */
#registerModal .modal-content {
  background-color: #fff;
  margin: auto;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-in-out;
}

/* Encabezado */
#registerModal .modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

#registerModal .modal-header h2 {
  margin-bottom: 0.5rem;
}

#registerModal .form-group {
  margin-bottom: 1.25rem;
}

#registerModal input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.3s;
}

#registerModal input:focus {
  border-color: #007bff;
  outline: none;
}

#registerModal .btn-register {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#registerModal .btn-register:hover {
  background-color: #0056b3;
}

/* Cierre (x) */
#registerModal .close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Spinner y mensajes */
#registerModal .loading,
#registerModal .success-message {
  text-align: center;
  display: none;
}

#registerModal .loading .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-60%); }
  to   { opacity: 1; transform: translateY(-50%); }
}

#registerModal .error-message {
  color: red;
  font-size: 0.85rem;
  display: none;
  margin-top: 0.25rem;
}

#registerModal .login-link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  width: 100%;
  padding-right: 40px;
}

.input-with-icon .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

/* Botón hamburguesa oculto por defecto */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/* Mobile nav oculto por defecto */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #1a1a1a;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 1rem;
    border-radius: 10px;
    z-index: 999;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .nav-links a {
    color: #fff;
    text-decoration: none;
  }
}
