body {
  font-family: Arial, sans-serif;
  margin: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Contenedor principal */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Crucigrama ocupa toda la fila */
.crossword {
  display: grid;
  gap: 3px;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 1 / 1;
  background: #ddd;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Celdas */
.cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}

.black { background: #333; }

/* Inputs */
.cell input {
  width: 100%;
  height: 100%;
  border: none;
  text-align: center;
  font-size: clamp(14px, 5vw, 22px);
  text-transform: uppercase;
  border-radius: 6px;
  transition: background 0.3s;
  background: white;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
}

.correct { background: #d4f8d4 !important; }
.wrong { background: #f8d4d4 !important; }

/* Números en esquinas */
.legend {
  position: absolute;
  font-size: clamp(8px, 2vw, 12px);
  color: #777;
  font-weight: bold;
}
.legend-ul { top: 2px; left: 4px; }
.legend-lr { bottom: 2px; right: 4px; }

/* === Pistas === */
.clues {
  width: 100%;
  max-width: 1000px;
  background: #fff;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.clues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.clue-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  background: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.clue-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
  border-radius: 6px;
}

.clue-number {
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 16px;
  color: #333;
}

/* Botón de audio */
.btn-audio {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}
.btn-audio:hover {
  background: #0056b3;
}
.btn-audio i {
  margin-right: 6px;
}

/* Botones finales */
.buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s;
}
.btn:hover {
  background: #0056b3;
}
