@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #000000;
    color: #ffffff;
  }
  
  main {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
  }
  
  h1 {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .periodic-table {
    display: grid;
    grid-template-columns: repeat(18, 50px);
    grid-auto-rows: 50px;
    gap: 5px;
    justify-content: start;
    margin-bottom: 30px;
  }
  
  .element {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #555555;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
    text-align: center;
  }
  
  .element:hover {
    background: #3d3d3d;
  }
  
  .modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
  }
  
  .modal-bg.show {
    display: flex;
    opacity: 1;
  }
  
  .modal {
    background: #1f1f1f;
    max-width: 400px;
    width: 90%;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    transform: translateY(-20px);
    animation: slideDown 0.3s forwards;
  }
  
  @keyframes slideDown {
    to {
      transform: translateY(0);
    }
  }
  
  .close {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 20px;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  footer {
    text-align: center;
    margin-top: 50px;
    font-size: 14px;
    color: #666;
  }
  