body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #222, #444);
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 0;
}

h1 {
  margin-top: 10px;
  font-size: 2.5em;
  color: #ffd700;
}

.top-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 20px;
  font-size: 1.2em;
}

#board {
  display: grid;
  grid-template-columns: repeat(8, 50px);
  grid-template-rows: repeat(8, 50px);
  gap: 2px;
  justify-content: center;
  margin: 0 auto;
  background-color: #222;
  padding: 5px;
  border-radius: 10px;
}

.gem {
  width: 50px;
  height: 50px;
  background-size: cover;
  border-radius: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

.gem.pop {
  animation: pop 0.3s ease forwards;
}

@keyframes pop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(0.8); opacity: 0; }
}

.footer {
  margin: 20px;
  font-size: 1em;
}

.footer a {
  color: #00ffff;
  text-decoration: none;
  margin: 0 10px;
}

.footer a:hover {
  text-decoration: underline;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  /* Por defecto oculto; se mostrará solo cuando se remueva la clase .hidden */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#overlay.hidden {
  display: none !important;
}

.popup {
  background: #333;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 20px #00ffff;
}

button {
  padding: 10px 20px;
  font-size: 1em;
  background-color: #00ffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

button:hover {
  background-color: #00cccc;
}