body {
    font-family: serif;
    background: MediumPurple;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100dvw;
    height: 100dvh;

    color: gainsboro;
}

#sopa {
  display: grid;
  grid-template-columns: repeat(auto-fit, 2em); /* se adapta */


  gap: 0.2rem;
  background: DimGray;
  padding: 1rem;
}

.celda {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: DimGray;
  user-select: none;
}

.celda.seleccionada {
  background: wheat;
  color: darkblue;
}

@keyframes pistaParpadeo {
  0%, 100% { background-color: DimGray; }
  50% { background-color: Cornsilk; }
}

.celda.pista {
  animation: pistaParpadeo 1s infinite;
}

.celda.encontrada {
  background: MediumSeaGreen;
  color: white;
  font-weight: bold;
}

#resultado {
  margin-top: 2rem;
  font-size: 1rem;
  text-align: center;
}

#resultado a {
    text-decoration: none;
    font-weight: bold;
    color: Goldenrod;
}

#resultado a:hover {
    color: DarkGoldenrod;
}

/* botón de pista */
#pista-btn,
#validar-btn {
  position: fixed;
  bottom: 1rem;
  padding: 0.5rem 1rem;
  background: black;
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

#pista-btn {
  right: 1rem;
}

#validar-btn {
  right: 5rem; /* para que no se solapen */
}

@keyframes parpadeo {
  0%, 100% { background-color: crimson; color: white; }
  50% { background-color: black; color: crimson; }
}

.celda.error {
  animation: parpadeo 0.4s ease-in-out 2;
}