/* Contenedor principal del menú */
#menu-container {
  position: absolute;
  top: 10px;
  left: 40%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  padding: 20px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
  font-family: 'Segoe UI', sans-serif;
  transition: all 0.3s ease;
}

/* Layout interno en fila */
#menu-flex {
  display: flex;
  flex-direction: row;
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* Tipos de compuestos */
#tipos-compuestos {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 8px;

  font-size: 0.9rem;
  flex-shrink: 0;
}

#tipos-compuestos h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  text-align: center;
}

/* Menú de compuestos con grupos */
#menu-compuestos {
  display: flex;
  flex-direction: row; /* Asegura disposición horizontal */
  gap: 20px;
}

.binarios, .ternarios {
  display: flex;
  justify-content: center; 
}


.grupo-compuesto {
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  padding: 5px;
}

.grupo-titulo {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
  text-align: center;
}

.subgrupo {
  margin-left: 12px;
  margin-bottom: 8px;
  text-align: center;
}

.subtitulo {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: #555;
  
}

#menu-compuestos button {
  display: block;
  background: #e0e0e0;
  border: none;
  margin: 4px 0;
  padding: 4px 15px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s ease;
  text-align: center;
}

#menu-compuestos button:hover,
#menu-compuestos button.active {
  background-color: #007acc;
  color: white;
}

/* Botón de borrar */
#borrar-seleccion {
  width: 100%;
  margin-top: 12px;
  padding: 6px 10px;
  background-color: #ffefef;
  border: 1px solid #dd9999;
  color: #a00;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

/* Filtro por categoría */
#filtro-categorias {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
  align-items: flex-start;
}

#filtro-categorias label {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

#filtro-categoria {
  appearance: none;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#filtro-categoria:hover {
  border-color: #888;
}

#filtro-categoria:focus {
  outline: none;
  border-color: #0077cc;
  box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.3);
}

/* Atenuar elementos */
.elemento.dim {
  opacity: 0.2;
}
