/* Mega-Sena - visual compacto */
:root {
    --verde: #209869;
    --verde-escuro: #157347;
    --fundo: #eef5f1;
    --texto: #2f3a33;
    --borda: #dce7e1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    min-height: 100vh;
    padding: 28px 14px;
}

.container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 28px;
    background: #fff;
    border-top: 7px solid var(--verde);
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,.08);
}

.topo { text-align: center; margin-bottom: 25px; }
.topo h1 { color: var(--verde-escuro); font-size: 27px; }
.topo p { margin-top: 4px; color: #718078; font-size: 14px; }

h2 { color: var(--verde-escuro); font-size: 18px; }
.cadastro, .conferidor, .lista-jogos {
    padding: 18px;
    border: 1px solid var(--borda);
    border-radius: 12px;
    margin-top: 16px;
    background: #fff;
}
.cadastro h2 { text-align: center; margin-bottom: 16px; }

.campos-dezenas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
}

input[type="number"] {
    width: 57px;
    height: 57px;
    border: 2px solid #cdd9d3;
    border-radius: 50%;
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    outline: none;
    background: #fafafa;
    color: var(--texto);
}
input[type="number"]:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 4px rgba(32,152,105,.13);
}

button { font: inherit; }
.botao-salvar {
    display: block;
    width: 100%;
    margin-top: 17px;
    padding: 12px;
    border: 0;
    border-radius: 9px;
    background: var(--verde);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.botao-salvar:hover { background: var(--verde-escuro); }

.mensagem {
    margin-top: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}
.mensagem.sucesso { color: #198754; background: #eaf8ef; border: 1px solid #bfe4ca; }
.mensagem.erro { color: #c62828; background: #fdeeee; border: 1px solid #efb6b6; }

.conferidor { padding: 14px; }
.conferidor-topo, .lista-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.contador-atual, .contador {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #eaf8ef;
    color: var(--verde-escuro);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.painel-bolinhas {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
}
.bolinha {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #edf1ef;
    color: #66736c;
    font-size: 11px;
    font-weight: 700;
    transition: background .15s, color .15s, transform .15s;
}
.bolinha.selecionada {
    background: var(--verde);
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 2px 5px rgba(21,115,71,.2);
}

.navegacao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 13px;
}
.botao-navegar {
    padding: 7px 10px;
    border: 1px solid #cbdcd2;
    border-radius: 7px;
    background: #f7faf8;
    color: var(--verde-escuro);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.botao-navegar:hover:not(:disabled) { background: #eaf8ef; }
.botao-navegar:disabled { opacity: .4; cursor: not-allowed; }
.resumo-jogo { color: #69776f; font-size: 11px; text-align: center; }

.lista-cabecalho { margin-bottom: 10px; }
.lista-jogos details summary {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--verde);
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.lista-jogos details summary::-webkit-details-marker { display: none; }
.lista-jogos details summary::before { content: "＋ "; }
.lista-jogos details[open] summary::before { content: "－ "; }
.itens-jogos {
    list-style: none;
    max-height: 310px;
    overflow-y: auto;
    margin-top: 12px;
    padding-right: 4px;
}
.itens-jogos li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 2px;
    border-bottom: 1px solid #edf1ef;
}
.numero-jogo { min-width: 38px; color: var(--verde-escuro); font-size: 12px; text-align: right; }
.jogo-numeros { display: flex; flex-wrap: wrap; gap: 5px; }
.dezena {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: var(--verde);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.lista-vazia { padding: 12px 0; color: #7b8981; font-size: 13px; text-align: center; }
footer { margin-top: 18px; color: #849189; font-size: 11px; text-align: center; }

@media (max-width: 480px) {
    body { padding: 12px 8px; }
    .container { padding: 17px 12px; }
    .cadastro, .conferidor, .lista-jogos { padding: 13px; }
    .painel-bolinhas { gap: 4px; }
    .bolinha { font-size: 10px; }
    .navegacao { gap: 5px; }
    .botao-navegar { padding: 7px 6px; font-size: 11px; }
    .resumo-jogo { font-size: 10px; }
}

.botoes-salvar {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.botoes-salvar button {
    flex: 1;
}

.botao-aposta {
    background-color: #287a48;
}
