#info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro */
    z-index: 1000;
    display: none;  /* Inicialmente oculto */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }
  
  #info-modal.visible {
    display: flex;
    opacity: 1;
  }
  
  .info-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    width: 450px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: left;
    transition: background-color 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
  }
  
  .info-content .symbol {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
  }
  
  .info-content .name {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
  }
  
  .info-content div {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.5;
  }
  
  #cerrar-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    color: #888;
  }
  
  #cerrar-modal:hover {
    color: #333;
  }
  
  /* Colores según las categorías */
  .metal-alcalino {
    background-color: #ffb3ba;
  }
  
  .metal-alcalinoterreo {
    background-color: #ffdfba;
  }
  
  .metal-transicion {
    background-color: #ffffba;
  }
  
  .lantanido {
    background-color: #baffc9;
  }
  
  .actinido {
    background-color: #bae1ff;
  }
  
  .metaloide {
    background-color: #e0baff;
  }
  
  .no-metal {
    background-color: #d3f8e2;
  }
  
  .halogeno {
    background-color: #cce5ff;
  }
  
  .gas-noble {
    background-color: #e6ccff;
  }
  
  .metal-post-transicion {
    background-color: #f4cccc;
  }
  
  /* Agregar un estilo dinámico de fondo con la clase color-bg */
  .info-content.color-bg {
    color: white; /* Texto blanco si hay fondo de color */
  }
  
  #info-modal.visible .info-content {
    opacity: 1;  /* Fondo completamente visible */
  }
  