/* ======================================
   RESET & BASE
====================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #eef3f7;
  color: #333;
}

.container {
  width: 95%;
  max-width: 1200px;
  margin: 30px auto;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  color: #0b7a43;
}

.subtitulo {
  text-align: center;
  margin-bottom: 20px;
}

hr {
  margin: 30px 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

/* ======================================
   PAINEL DO ÚLTIMO RESULTADO
====================================== */

#ultimoResultado {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 35px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 6px solid #0b7a43;
  transition: opacity 0.25s, border-color 0.25s;
}

#ultimoResultado h2 {
  text-align: center;
  color: #0b7a43;
  margin-bottom: 20px;
}

#ultimoResultado.carregando {
  opacity: 0.6;
}

#ultimoResultado.erro {
  border-left-color: #d32f2f;
}

#ultimoResultado.erro h2 {
  color: #d32f2f;
}

.infoResultado {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.infoResultado p {
  font-size: 18px;
}

#dezenasResultado {
  margin: 15px 0;
}

#dezenasResultado .bolinha {
  background: #ff9800;
  width: 48px;
  height: 48px;
  font-size: 18px;
}

#usarResultado {
  background: #0b7a43;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 17px;
  font-weight: bold;
  transition: 0.25s;
}

#usarResultado:hover:not(:disabled) {
  background: #0d8f4f;
  transform: translateY(-2px);
}

#usarResultado:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ======================================
   CONTADOR
====================================== */

#contador {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 25px;
}

#contador span {
  color: #0b7a43;
}

/* ======================================
   GRADE DE NÚMEROS
====================================== */

.grade {
  display: grid;
  grid-template-columns: repeat(5, 80px);
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.numero {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #0b7a43;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  transition: 0.25s;
  user-select: none;
}

.numero:hover {
  transform: scale(1.08);
}

.numero:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 2px;
}

.numero.selecionado {
  background: #0b7a43;
  color: white;
}

/* Reservado para uso futuro: números indisponíveis para seleção */
.numero.bloqueado {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ======================================
   SELETOR DE MÉTODO
====================================== */

.metodo-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: bold;
}

.metodo-selector label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.metodo-selector input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #0b7a43;
  cursor: pointer;
}

.metodo-selector input[type="radio"]:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 2px;
}

/* ======================================
   BOTÕES DE AÇÃO
====================================== */

.botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

button {
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: 0.2s;
}

button:hover {
  transform: translateY(-2px);
}

button:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 2px;
}

#gerar {
  background: #0b7a43;
  color: white;
}

#novamente {
  background: #1976d2;
  color: white;
}

#copiar {
  background: #ff9800;
  color: white;
}

#limpar {
  background: #d32f2f;
  color: white;
}

/* ======================================
   RESULTADOS (Método 1 e Método 2)
====================================== */

#resultado,
#resultadoMetodo2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.bloco {
  background: #f7f9fb;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.bloco h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #0b7a43;
  font-size: 20px;
}

.lista {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
}

.bolinha {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #0b7a43;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.jogo .bolinha {
  background: #1565c0;
}

/* ======================================
   EXPLICAÇÃO
====================================== */

.explicacao {
  margin-top: 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 2px solid #0b7a43;
  overflow: hidden;
}

.explicacao summary {
  cursor: pointer;
  padding: 18px 22px;
  font-size: 20px;
  font-weight: bold;
  color: #0b7a43;
  background: #edf8f2;
  transition: 0.25s;
}

.explicacao summary:hover {
  background: #dff3e7;
}

.explicacao summary:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: -3px;
}

.conteudo-explicacao {
  padding: 25px;
  line-height: 1.8;
}

.conteudo-explicacao h2 {
  color: #0b7a43;
  margin-bottom: 20px;
}

.conteudo-explicacao h3 {
  margin-top: 25px;
  margin-bottom: 10px;
  color: #1565c0;
}

.conteudo-explicacao p {
  margin-bottom: 12px;
}

.conteudo-explicacao ul {
  margin-left: 25px;
  margin-top: 15px;
}

.conteudo-explicacao li {
  margin-bottom: 8px;
}

.conteudo-explicacao table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  margin-bottom: 20px;
}

.conteudo-explicacao th {
  background: #0b7a43;
  color: white;
  padding: 12px;
}

.conteudo-explicacao td {
  border: 1px solid #ddd;
  padding: 12px;
}

.aviso {
  margin-top: 30px;
  padding: 18px;
  border-left: 6px solid #ff9800;
  background: #fff8e6;
  border-radius: 6px;
}

/* ======================================
   RESPONSIVO
====================================== */

@media (max-width: 700px) {
  .grade {
    grid-template-columns: repeat(5, 60px);
    gap: 10px;
  }

  .numero {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }

  button {
    width: 100%;
  }

  #ultimoResultado {
    padding: 18px;
  }

  #dezenasResultado .bolinha {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  #usarResultado {
    width: 100%;
  }
}