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

body {
  background: #f4f6f8;
  color: #333;
  line-height: 1.6;
  padding: 0 20px;
}

/* CONTENEDOR PRINCIPAL */
.container {
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* TITULOS */
h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
}

/* TEXTO */
p {
  text-align: center;
  margin-bottom: 15px;
  font-size: 16px;
}
.acciones {
  text-align: center;
  margin-bottom: 20px;
}
.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-volver::before {
  content: "←";
  font-size: 18px;
}

.btn-volver:hover {
  background: #1e40af;
  transform: translateY(-2px);
}

/* LINKS DE TABLAS */
.tablas-links {
  text-align: center;
  margin-bottom: 20px;
}

.tablas-links a {
  display: inline-block;
  margin: 5px;
  padding: 10px 14px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

.tablas-links a:hover {
  background: #1e40af;
}
/* CONTENEDOR DE RESULTADOS */
.tabla-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* 10 por fila */
  gap: 10px;
  margin: 25px auto;
  padding: 0;
  max-width: 1000px;
}

/* CADA ITEM */
.tabla-grid li {
  background: #f1f5f9;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* HOVER */
.tabla-grid li:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .tabla-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 500px) {
  .tabla-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* INPUT Y BOTON */
.input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

input[type="number"] {
  padding: 10px;
  width: 200px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
}

button {
  padding: 10px 18px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background: #059669;
}

.tablas-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.tablas-links a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.tablas-links a:hover {
  background: #1e40af;
  transform: translateY(-2px);
}

/* BOTÓN ACTIVO (opcional) */
.tablas-links a.active {
  background: #10b981;
}
/* TABLA RESULTADO */
ul {
  list-style: none;
  max-width: 300px;
  margin: 0 auto 20px auto;
}

ul li {
  background: #f1f5f9;
  margin-bottom: 6px;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
}

/* FOOTER */
.footer {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin-top: 30px;
}

.generador {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  margin-top: 30px;
}
.generador-action {
  display: flex;
  gap: 10px;
}

h2 {
  text-align: center;
}
.btn-guia {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition:
    background 0.3s,
    transform 0.2s;
}

.btn-guia:hover {
  background: #1e40af;
  transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .container {
    margin: 20px;
    padding: 20px;
  }

  .input-group {
    flex-direction: column;
  }

  input,
  button {
    width: 100%;
  }
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tabla-grid li {
  animation: aparecer 0.35s ease forwards;
}

/* MÚLTIPLOS */
.mult-5 {
  background: #fef3c7;
  color: #92400e;
}

.mult-10 {
  background: #dcfce7;
  color: #166534;
  font-weight: bold;
}

/* SELECTOR 1–100 */
.selector-numeros {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  max-width: 600px;
  margin: 20px auto;
}

.selector-numeros span {
  background: #e5e7eb;
  padding: 8px;
  text-align: center;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selector-numeros span:hover {
  background: #2563eb;
  color: #fff;
  transform: scale(1.1);
}

.selector-numeros span.active {
  background: #10b981;
  color: #fff;
}

@media (max-width: 768px) {
  .selector-numeros {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 10px 5px;
  }

  .selector-numeros span {
    min-width: 48px;
    height: 48px;
    flex-shrink: 0;
    scroll-snap-align: center;
  }
}

/* Layout general */
.layout {
  display: grid;
  gap: 20px;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* Contenido */
.content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
}
.textJustify {
  text-align: justify;
}

/* Ads */
.ad-left,
.ad-right {
  position: sticky;
  top: 80px;
}

/* Mobile */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .ad-left,
  .ad-right {
    display: none;
  }
}
