* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f4f7;
  color: #222;
}

.topo {
  background: linear-gradient(135deg, #6a1b9a, #9c27b0);
  color: white;
  padding: 28px 20px;
  text-align: center;
}

.topo h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.topo p {
  margin: 0;
  font-size: 15px;
}

.menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 12px;
  background: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 20;
}

.menu button {
  border: 0;
  background: #eeeeee;
  color: #222;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.menu button:hover {
  background: #e0e0e0;
}

.menu button.ativo {
  background: #8e24aa;
  color: white;
}

.container {
  width: min(1100px, calc(100% - 30px));
  margin: 22px auto 40px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
}

.card h2,
.card h3 {
  margin-top: 0;
  color: #7b1fa2;
}

.descricao {
  color: #555;
  line-height: 1.5;
}

.configuracao {
  margin: 18px 0;
}

.configuracao label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

select,
input[type="text"] {
  width: 100%;
  max-width: 420px;
  padding: 11px 12px;
  border: 1px solid #bbb;
  border-radius: 8px;
  font-size: 15px;
  background: white;
}

.acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
}

.acoes button {
  border: 0;
  padding: 11px 16px;
  border-radius: 8px;
  cursor: pointer;
  background: #eeeeee;
  font-weight: 600;
}

.acoes button:hover {
  background: #dddddd;
}

.acoes button.principal {
  background: #8e24aa;
  color: white;
}

.acoes button.principal:hover {
  background: #7b1fa2;
}

#mensagem,
#mensagemEstatisticas,
#mensagemEstrategia,
#mensagemFiltroHistorico,
#mensagemConferencia,
#mensagemMeusJogos,
#mensagemGrupoVariavel,
#mensagemDezenasFixas {
  margin-top: 10px;
  font-weight: 600;
}

.jogo {
  background: #faf7fc;
  border: 1px solid #e1bee7;
  border-left: 5px solid #8e24aa;
  padding: 13px 14px;
  border-radius: 9px;
  margin: 9px 0;
  line-height: 1.6;
  font-family: Consolas, monospace;
}

.jogo-premiado {
  background: #f8f0fb;
}

.grade-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.mini-card {
  background: #faf7fc;
  border: 1px solid #e1bee7;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.mini-card span {
  display: block;
  color: #666;
  font-size: 13px;
  margin-bottom: 7px;
}

.mini-card strong {
  font-size: 24px;
  color: #7b1fa2;
}

.destaque-historico {
  border: 2px solid #8e24aa;
}

.aviso-filtro {
  background: #f3e5f5;
  border-left: 5px solid #8e24aa;
  padding: 14px;
  border-radius: 8px;
  line-height: 1.5;
  margin: 16px 0;
}

.aviso {
  background: #fffdf5;
  border: 1px solid #f1df9f;
}

.resumo-base {
  margin: 14px 0;
  font-weight: 700;
}

#gradeGrupoVariavel,
#gradeDezenasFixas {
  display: grid;
  grid-template-columns: repeat(5, 54px);
  gap: 9px;
  margin: 18px 0;
}

.dezena {
  width: 54px;
  height: 44px;
  border: 1px solid #bbb;
  background: #f5f5f5;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.dezena:hover {
  background: #e9e9e9;
}

.dezena.selecionada {
  background: #8e24aa;
  color: white;
  border-color: #8e24aa;
}

#frequenciaDezenas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.frequencia-item {
  background: #faf7fc;
  border: 1px solid #e1bee7;
  border-radius: 9px;
  padding: 12px;
  text-align: center;
}

.frequencia-item strong {
  display: block;
  font-size: 20px;
  color: #7b1fa2;
}

.linha-premio {
  background: #faf7fc;
  border: 1px solid #e1bee7;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 7px 0;
}

footer {
  background: #2c2c2c;
  color: white;
  text-align: center;
  padding: 20px 15px;
  margin-top: 30px;
  font-size: 14px;
}

@media (max-width: 700px) {

  .topo h1 {
    font-size: 26px;
  }

  .menu {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .menu button {
    flex: 0 0 auto;
  }

  .container {
    width: min(100% - 18px, 1100px);
  }

  .card {
    padding: 16px;
  }

  #gradeGrupoVariavel,
  #gradeDezenasFixas {
    grid-template-columns: repeat(5, 1fr);
  }

  .dezena {
    width: 100%;
  }

}