/* Estilos Globais e Variáveis */
:root {
    --primary-color: #ffd700; /* Amarelo Dourado (bolinhas) */
    --secondary-color: #0056b3; /* Azul (números dentro das bolinhas, títulos) */
    --button-bg-color: #dc3545; /* Vermelho (botões) */
    --button-text-color: #ffffff; /* Branco (texto dos botões) */
    --button-saved-bg-color: #28a745; /* Verde para botão salvo */
    --header-bg-color: #0056b3; /* Azul para o header */
    --header-text-color: #ffffff; /* Branco (H1 do header) */
    --header-subtext-color: #ffd700; /* Amarelo (P do header) */
    --title-box-bg-color: rgba(135, 206, 235, 0.8); /* Azul claro com transparência */
    --title-box-text-color: #ffffff; /* Branco (texto do título H1) */
    /* Cor de fundo dos cards removida, agora usará RGBA no .card */
    --table-text-color: #111; /* Texto da tabela mais escuro para contraste */
    --footer-bg-color: #343a40; /* Cinza escuro (rodapé) */
    --footer-text-color: #f8f9fa; /* Branco/Cinza claro (texto rodapé) */
    /* Fundo do body removido, usará background-image */
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    /* ========== IMAGEM DE FUNDO ========== */
    background-image: url('mega-sena.jpg');
    background-size: cover; /* Cobre toda a área */
    background-position: center center; /* Centraliza a imagem */
    background-repeat: no-repeat; /* Não repete a imagem */
    background-attachment: fixed; /* Mantém a imagem fixa durante o scroll */
    background-color: #f0f4f8; /* Cor de fundo fallback se a imagem não carregar */
    /* ===================================== */
    color: #eee; /* Cor de texto padrão mais clara para contraste com fundo */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 650px;
    margin: 20px auto;
    padding: 15px;
    flex-grow: 1;
}

/* Cabeçalho (sem alterações visuais significativas) */
.header-compact {
    background-color: var(--header-bg-color);
    padding: 10px 0;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Sombra para destacar */
}
.header-compact-content {
    max-width: 1000px; margin: 0 auto; display: flex;
    align-items: center; justify-content: center; padding: 0 15px;
}
.header-logo { max-height: 50px; margin-right: 15px; }
.header-compact-text { text-align: center; }
.header-compact-text h1 { color: var(--header-text-color); font-size: 1.8em; margin: 0 0 5px 0; }
.header-compact-text p { color: var(--header-subtext-color); margin: 0; font-size: 0.9em; }

/* Caixa do Título Principal com transparência */
.title-box {
    background-color: var(--title-box-bg-color);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borda sutil */
}
.title-box h1 {
    color: var(--title-box-text-color);
    margin: 0;
    font-size: 1.6em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Sombra no texto */
}

/* Botões (sem alterações visuais significativas, exceto hover/active) */
.button-container { text-align: center; margin-bottom: 25px; }
button {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none; padding: 10px 20px; border-radius: 25px;
    font-size: 1em; cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, color 0.3s; /* Adiciona transição de cor */
    font-weight: bold; margin: 5px 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
button:hover {
    background-color: #c82333; /* Vermelho mais escuro no hover */
    transform: translateY(-2px);
}
button:active { transform: translateY(0px); }

/* ========== CARD COM EFEITO VIDRO ========== */
.card {
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.15); /* Fundo branco BEM transparente */
    backdrop-filter: blur(10px); /* Desfoque do fundo */
    -webkit-backdrop-filter: blur(10px); /* Para compatibilidade Safari */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borda sutil clara */

    border-radius: 15px; /* Mantém bordas arredondadas */
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Sombra para profundidade */
}

.card h3 {
    color: #fff; /* Título do card em branco */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Sombra para legibilidade */
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Linha divisória sutil */
    padding-bottom: 10px;
}
/* ========================================= */

/* Estilo das Bolinhas (sem alterações) */
.number-ball {
    display: inline-block; width: 35px; height: 35px; border-radius: 50%;
    background-color: var(--primary-color); color: var(--secondary-color);
    text-align: center; line-height: 35px; font-weight: bold;
    margin: 2px; font-size: 0.9em; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Tabela Geral */
table {
    width: 100%; border-collapse: collapse; margin: 15px 0 0 0;
    background: transparent; /* Fundo transparente */
    color: var(--table-text-color); /* Cor de texto ajustada */
}

th, td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Borda da tabela sutil */
    vertical-align: middle;
}

th {
    /* Cabeçalho da tabela com fundo semi-transparente */
    background-color: rgba(0, 86, 179, 0.5); /* Azul secundário com transparência */
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    font-weight: bold;
    font-size: 0.95em;
}

/* Ajustes tabela principal (números gerados) */
#numbersTable th:first-child, #numbersTable td:first-child { width: 80px; text-align: center; }
#numbersTable th:nth-child(2), #numbersTable td:nth-child(2) { width: 40px; text-align: center; }
#numbersTable th:nth-child(3), #numbersTable td:nth-child(3) { text-align: left; padding-left: 15px; }
#numbersTable td input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* Wrapper da Tabela de Histórico (scroll) */
.history-table-wrapper {
    max-height: 400px; overflow-y: auto;
    /* Estilo de vidro aplicado ao wrapper também pode ser uma opção, ou manter sólido */
    background-color: rgba(255, 255, 255, 0.1); /* Fundo levemente diferente */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px; padding: 5px;
}

/* Tabela de Histórico (centralizada) */
#history th, #history td { text-align: center; vertical-align: middle; }
#history th:first-child, #history td:first-child { width: 110px; }
#history th:last-child, #history td:last-child { width: auto; line-height: 1.5; }

/* Slot AdSense */
.adsense-slot {
    margin: 15px auto; padding: 10px; text-align: center;
    min-height: 70px; width: 100%; max-width: 650px; box-sizing: border-box;
    /* Fundo de vidro para o AdSense também */
    background: rgba(0, 0, 0, 0.1); /* Fundo escuro transparente */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}
.adsense-slot ins.adsbygoogle { display: block; margin: 0 auto; }
.adsense-slot p, .adsense-slot small { color: #ccc; } /* Textos auxiliares em cinza claro */

/* Rodapé */
.tool-footer {
    background-color: var(--footer-bg-color); color: var(--footer-text-color);
    text-align: center; padding: 15px 0; width: 100%; margin-top: auto;
    font-size: 0.9em; box-shadow: 0 -2px 5px rgba(0,0,0,0.2); /* Sombra superior */
}
.tool-footer-links a { color: var(--primary-color); text-decoration: none; margin: 0 5px; }
.tool-footer-links a:hover { text-decoration: underline; }
.tool-footer div { margin-top: 8px; }

/* Media Queries */
@media (max-width: 700px) {
    .container { max-width: 95%; padding: 10px; }
    .header-compact-content { flex-direction: column; text-align: center; }
    .header-logo { margin-bottom: 10px; margin-right: 0; }
    .header-compact-text h1 { font-size: 1.5em; }
    .header-compact-text p { font-size: 0.8em; }
    .title-box h1 { font-size: 1.4em; }
    button { padding: 10px 15px; font-size: 0.9em; }
    .number-ball { width: 30px; height: 30px; line-height: 30px; font-size: 0.8em; margin: 1px; }
    th, td { padding: 8px 5px; font-size: 0.85em; }
    #history th:first-child, #history td:first-child { width: 90px; }
    .adsense-slot { margin: 10px auto; min-height: 40px; padding: 5px; }
    #numbersTable th:nth-child(3), #numbersTable td:nth-child(3) { padding-left: 5px; }
    .card { padding: 15px; } /* Menos padding em telas pequenas */
}