  @import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;600&display=swap');

.modalContainer {
    display: none;
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background-color: rgba(190, 190, 190, 0.835);

}

.modal {
    color: white;
    padding-right: 20px;
    padding-left: 30px;
    padding-top: 20px;
    padding-bottom: 5px;
    border-radius: 20px;
    max-width: 700px;
    height: 420px;
    
    margin: auto;
    background-color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: rgb(5, 5, 5);
}



.modal .infoSection {
    max-height: 60%;
    overflow-y: auto;
    scrollbar-width: thin;
    overflow-y: auto;
    height: 75%;
    margin-top: 25px;
    margin-bottom: 20px;
    word-spacing: 2px;
    padding-right: 5px;
    padding-left:5px ;
  }

.modal .infoSection::-webkit-scrollbar {
    width: 10px;
  }
  
  .modal .infoSection::-webkit-scrollbar-track {
    background-color: rgb(235, 235, 235);
  }
  
  .modal .infoSection::-webkit-scrollbar-thumb {
    background-color: rgb(150, 150, 150);
    border-radius: 5px;
    transition: .2s;

  }
  
  .modal::-webkit-scrollbar-thumb:hover {
    transition: .2s;
    background-color: rgb(120, 120, 120);
  }
.modalHeadingContainer{
    display: flex;
    align-items: flex-end;
    margin-top: 10px;
}
  
  .modalElementSymbol{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    width: 75px;
    height: 60px;
    padding-top: 5px;
    padding-left: 2px;
    padding-right: 2px;
    border: 5px solid white;
    border-radius: 10px;
    border-bottom-right-radius: 0;
    font-family: 'Comfortaa', cursive, 'Courier New', Courier, monospace;

  }

  .modalHeading{
    width: 75%;
    font-size: 1.2rem;
    letter-spacing: 1px;
    padding-bottom:10px;
    padding-left: 30px;
    border-bottom: 5px solid white;
    transform: translateX(-15px);
    font-family: 'Comfortaa', cursive, 'Courier New', Courier, monospace;
  }

  .modalLabel{
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
  }

  .modalInfo {
    color: rgb(190, 190, 190);
    font-size: 1.1rem;
    font-weight: 100;
    margin-left: 10px;

  }

  .elementHistory,
  .elementFacts{
    margin-top: 5px;
    padding-right: 10px;
  }

  .modalButton{
    font-family: 'Comfortaa', cursive;
    font-weight: 600;
    width: 150px;
    padding: 3px;
    padding-right: 10px;
    padding-left: 10px;
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 50px;
    cursor: pointer;
    background-color: rgb(255, 255, 255);
    transition: .2s;
  }
  .modalButton:hover{
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
  }

  .modalButton:active{
    background-color: rgb(225, 225, 225);
  }

  .closeButton {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ccc;
    border: none;
    color: #fff;
    font-size: 18px;
    text-align: center;
    line-height: 30px;
    background-color: rgb(254, 39, 20);
    cursor: pointer;
    transition: .2s;
}

.closeButton:hover{
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
}

.closeButton:active{
    background-color: rgb(237, 35, 17);
    box-shadow: 0 0 5px rgba(115, 115, 115, 0.9);

}


@media (max-width: 767px) {
  .modal {
    width: 70%;
    max-width: none;
    height: 80vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(5, 5, 5);
  }

   .modalFactLabel{
margin-top: 20px;
  }

  .modalInfo {
    color: rgb(190, 190, 190);
    font-size: .95rem;
    font-weight: 100;
    margin-left: 6px;

  }

  .elementFacts,
  .elementHistory {
    margin-left: 0;
  }

  .modalButton {
    display: flex;
    justify-content: center; /* Add this line */
    align-items: center; /* Add this line */
    width: 180px;
    padding: 4px;
    padding-right: 10px;
    padding-left: 10px;
    margin: 0 auto;
    cursor: pointer;
    background-color: rgb(255, 255, 255);
    transition: 0.2s;
  }

  .previousButton{
    margin-top: 40px;
    margin-bottom: 10px;
  }

  .closeButton {
    top: 25px;
    right: 25px;
}
  
}
