* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}


.tabla-periodica {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(7, auto);
  gap: 8px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 12px;
}


.elemento {
  border: 1px solid #999;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  background-color: #eee;
  color: #333;
  padding: 6px 4px;
  cursor: pointer;
  display: block;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.elemento:hover,
.elemento:focus {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  outline: none;
}


.elemento:link,
.elemento:visited,
.elemento:hover,
.elemento:focus,
.elemento:active {
  color: inherit !important;
  text-decoration: none !important;
}


.numero {
  font-size: 10px;
  font-weight: bold;
  margin-bottom: 4px;
}


.simbolo {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}


.no-metal {
  background-color: #ffcc80;
  color: #6b4f00;
}

.alcalino {
  background-color: #ffb74d;
  color: #663c00;
}

.alcalinoterreo {
  background-color: #ffe0b2;
  color: #7f5a00;
}

.metaloide {
  background-color: #b39ddb;
  color: #311b92;
}

.otros-metales {
  background-color: #90caf9;
  color: #0d47a1;
}

.transicion {
  background-color: #81c784;
  color: #1b5e20;
}

.halogeno {
  background-color: #f48fb1;
  color: #880e4f;
}

.gas-noble {
  background-color: #80deea;
  color: #006064;
}
