* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #d946ef, #f97316, #facc15);
  min-height: 100vh;
  padding: 24px;
}

.contenedor {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.tarjeta {
  background: white;
  border: 4px solid black;
  border-radius: 28px;
  box-shadow: 0 16px 0 rgba(0, 0, 0, 0.9);
  padding: 28px;
}

.encabezado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.selector-operacion {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opcion-operacion {
  border: 3px solid black;
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  background: #e5e7eb;
}

.opcion-operacion.activa {
  background: #f97316;
  color: white;
}

.subtitulo {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  color: #a21caf;
  text-transform: uppercase;
}

.titulo {
  margin: 0;
  font-size: 52px;
  font-weight: 900;
  color: #0f172a;
}

.panel-pregunta {
  margin-top: 28px;
  background: #bef264;
  border: 4px solid black;
  border-radius: 28px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.9);
  padding: 32px;
  text-align: center;
}

.texto-calcula {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 900;
}

.pregunta {
  margin: 0;
  font-size: 86px;
  font-weight: 900;
  color: #020617;
}

.zona-respuesta {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.etiqueta {
  font-size: 34px;
  font-weight: 900;
  color: #0f172a;
}

.entrada {
  height: 88px;
  border: 4px solid black;
  border-radius: 22px;
  font-size: 42px;
  font-weight: 900;
  text-align: center;
  background: #fef08a;
}

.boton {
  min-height: 88px;
  border: 4px solid black;
  border-radius: 22px;
  font-size: 34px;
  font-weight: 900;
  cursor: pointer;
}

.boton-enviar {
  background: #2563eb;
  color: white;
}

.boton-siguiente {
  background: #22c55e;
  color: white;
}

.boton-reiniciar {
  min-height: 60px;
  padding: 0 22px;
  font-size: 22px;
  background: #22d3ee;
  color: black;
}

.resultado {
  margin-top: 24px;
  border: 4px solid black;
  border-radius: 28px;
  padding: 24px;
  display: none;
}

.resultado.correcto {
  background: #86efac;
}

.resultado.incorrecto {
  background: #fda4af;
}

.resultado-titulo {
  margin: 0 0 10px;
  font-size: 38px;
  font-weight: 900;
}

.resultado-texto,
.resultado-extra {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
}

.grid-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.panel-celeste {
  background: #67e8f9;
}

.bloque-score {
  border: 4px solid black;
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  margin-top: 14px;
}

.score-correctas {
  background: #4ade80;
}

.score-incorrectas {
  background: #fb7185;
}

.score-total {
  background: #fde047;
}

.score-label {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-valor {
  margin: 10px 0 0;
  font-size: 64px;
  font-weight: 900;
}

.panel-violeta {
  background: #ddd6fe;
}

.seccion-titulo {
  margin: 0 0 10px;
  font-size: 38px;
  font-weight: 900;
}

.texto-ayuda {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
}

.historial {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.jugada {
  border: 4px solid black;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.9);
}

.jugada.correcta {
  background: #86efac;
}

.jugada.incorrecta {
  background: #fda4af;
}

.jugada p {
  margin: 6px 0;
  font-size: 28px;
  font-weight: 800;
}

.vacio {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

@media (max-width: 900px) {
  .grid-info {
    grid-template-columns: 1fr;
  }

  .titulo {
    font-size: 40px;
  }

  .pregunta {
    font-size: 62px;
  }
}
