/* Configurações Globais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;   
    background-color: #121212;
}

.layout-principal {
    display: flex;
    justify-content: center; /* Centraliza o jogo */
    min-height: 100vh;
    padding: 20px;
    gap: 20px;
    
}

/* Estilo das Laterais de Anúncio */
.ads-lateral {
    width: 160px; /* Largura padrão de anúncios "Skyscraper" */
    min-width: 160px;
    height: 530px;
    background-color: #1e1e1e;
    border: 1px dashed #444; /* Borda pontilhada para você ver o espaço */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Esconde o anúncio de rodapé por padrão (no Computador) */
.ads-rodape-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #1e1e1e;
    border-top: 1px solid #4db8ff;
    z-index: 1000;
}

/* === RESPONSIVIDADE (CELULAR) - ÚNICO BLOCO === */
@media (max-width: 480px) {
    /* Esconde as colunas laterais em telas menores */
    .ads-lateral {
        display: none;
    }
    
    .layout-principal {
        flex-direction: column;
        padding: 10px;
        gap: 0;
        min-height: calc(100vh - 60px); /* Reduz espaço para o rodapé */
        padding-bottom: 80px; /* IMPORTANTE: Espaço extra para não cobrir conteúdo */
    }

    .container {
        width: 50%;
        padding: 0.8rem;
        border-radius: 15px;
        background-color: #1e1e1e;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        text-align: center;
        margin-bottom: 0; /* Remove margem */
    }

    /* Mostra o anúncio de rodapé apenas no celular */
    .ads-rodape-mobile {
        display: block;
        z-index: 999; /* Abaixo do modal, acima do conteúdo */
    }

    /* Feedback mais visível em mobile */
    #feedback {
        margin-top: 1.2rem;
        font-weight: bold;
        height: auto;
        min-height: 30px;
        margin-bottom: 1.5rem; /* Espaço antes do rodapé */
        padding: 0.8rem;
        border-radius: 8px;
        background-color: #2d2d2d;
    }

    #tela-jogo {
        padding-bottom: 1.5rem; /* Espaço extra no fim da tela-jogo */
    }

    h1 {
        margin-bottom: 0.4rem;
        font-size: 1.2rem;
        color: #4db8ff;
    }

    h4 {
        margin-bottom: 1rem;
        font-size: 0.7rem;
        color: #c9e0f0;
    }

    #text-pergunta {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    #opcoes-container {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
        margin-top: 0.8rem;
        margin-bottom: 0.8rem;
    }

    #opcoes-container button {
        padding: 12px 6px;
        font-size: 0.9rem;
    }

    #btn-sortear {
        padding: 10px 8px;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    hr {
        margin-top: 1px;
        margin-bottom: 12px;
    }

    #tela-niveis p {
        margin-bottom: 0.4rem;
        font-size: 0.9rem;
    }

    .grid-niveis {
        margin-top: 0.6rem;
    }

    body {
        padding-bottom: 60px; /* Espaço para o anúncio fixo */
    }

    .grid-niveis button {
    background-color: #333;
    color: white;
    padding: 15px;
    border: 1px solid #4db8ff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    }

    #btn-voltar {
        background: none;
        border: none;
        color: #4db8ff;
        cursor: pointer;
        margin-bottom: 10px;
        font-size: 1rem;
    }
    .grid-niveis {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    }
}

.container {
    width: 100%;
    height: 530px;
    flex: auto; /* Faz o jogo ocupar o espaço central */
   

    padding: 1rem;
    border-radius: 15px;
    background-color: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    
}

.grid-niveis button {
    background-color: #333;
    color: white;
    padding: 12px;
    border: 1px solid #4db8ff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 50px;
    margin-right: 50px;
    }

.grid-niveis {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    }

#btn-voltar {
        background: none;
        border: none;
        color: #4db8ff;
        cursor: pointer;
        margin-bottom: 10px;
        font-size: 1.5rem;
    }  

h1 {
    margin-bottom: 0.5rem;
    margin-top: 0.1rem;
    font-size: 1.5rem;
    color: #4db8ff;
}

h3 {
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #b7e6f8;
}

p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #c9e0f0;
}

h4 {
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    font-size: 1rem;
    color: #c9e0f0;
}

#tela-niveis {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #c9e0f0;

}

/* Estilo do Botão Principal de Sorteio */
#btn-sortear {
    background-color: #4db8ff;
    color: #000;
    border: none;
    padding: 12px 10px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    width: 60%;
    margin-bottom: 1rem;
    margin-top: 15px;
}

#btn-sortear:hover {
    background-color: #37a3eb;
    transform: scale(1.05);
}

/* Área do Desafio */
#display-desafio {
    border-top: 1px solid #333333;
    padding-top: 0.1rem;
}

#texto-pergunta {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 300;
    color: #37a3eb;
}

#grau-alvo, #tom-alvo {
    font-weight: bold;
    color: #ffcc00;
    text-decoration: underline;
}

/* Grid de Botões de Acordes (Responsivo) */
#opcoes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 0.5rem;
}

#opcoes-container button {
    background-color: #2d2d2d;
    color: #fff;
    border: 1px solid #444;
    padding: 20px 10px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#opcoes-container button:hover {
    border-color: #4db8ff;
    background-color: #333;
}

#opcoes-container button:active {
    transform: scale(0.95);
}

/* Mensagens de Feedback */
#feedback {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: auto;
    font-width: auto;
    height: auto;
}

.hidden {
    display: none;
}

/* Animação para a pergunta */
.brilho-pergunta {
    animation: pulse-azul 1s ease;
    border-radius: 10px;
}

@keyframes pulse-azul {
    0% { box-shadow: 0 0 0 0 rgba(77, 184, 255, 0.7); background-color: rgba(77, 184, 255, 0.1); }
    50% { box-shadow: 0 0 20px 10px rgba(77, 184, 255, 0); background-color: rgba(77, 184, 255, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(77, 184, 255, 0); background-color: transparent; }
}

/* Animação para o feedback (Acerto/Erro) - Versão Destacada */
.brilho-feedback {
    /* Aumentamos a duração para 1.2s para dar tempo de ver o efeito */
    animation: super-flash 1.2s ease-out; 
    display: inline-block; /* Necessário para o transform (scale) funcionar bem */
}

@keyframes super-flash {
    0% { 
        transform: scale(1); 
        opacity: 0.5;
        text-shadow: none;
    }
    /* No meio da animação (0.6s), o texto fica gigante e brilha */
    50% { 
        transform: scale(1.4); /* Aumenta 80% do tamanho original */
        opacity: 1; 
        font-weight: bold;
        /* Adiciona um brilho (sombra) da cor do texto */
        text-shadow: 0 0 15px currentColor; 
    }
    /* Volta ao normal suavemente */
    100% { 
        transform: scale(1); 
        opacity: 1;
        text-shadow: none;
    }
}

.conteudo-educativo {
    background-color: #1a1a1a;
    color: #c9e0f0;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 2px solid #333;
    line-height: 1.6;
    display: flex;
    justify-content: center;
}

.texto-container {
    max-width: 800px; /* Largura ideal para leitura */
    text-align: left;
}

.conteudo-educativo h2 {
    color: #4db8ff;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.conteudo-educativo h3 {
    color: #ffcc00;
    margin-top: 30px;
    margin-bottom: 15px;
}

.conteudo-educativo p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.lista-beneficios {
    margin-left: 20px;
    margin-bottom: 20px;
}

.lista-beneficios li {
    margin-bottom: 10px;
    list-style-type: square;
    color: #4db8ff;
}

.lista-beneficios li strong {
    color: #fff;
}

/* Ajuste para Mobile */
@media (max-width: 480px) {
    .conteudo-educativo {
        padding: 30px 15px;
        margin-bottom: 80px; /* Espaço para o anúncio de rodapé */
    }
    
    .conteudo-educativo h2 {
        font-size: 1.5rem;
    }

    /* Ajustes do header para mobile */
    .site-header {
        padding: 10px 0;
    }

    .header-content {
        padding: 0 10px;
        flex-direction: row;
        gap: 10px;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Botões do header menores no mobile */
    .nav-links {
        flex-direction: row;
        gap: 0;
        width: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .btn-menu {
        display: flex;
    }

    .dropdown-menu {
        position: absolute;
        display: none;
        flex-direction: column;
        top: 100%;
        right: 0;
        background-color: #1e1e1e;
        border: 1px solid #333;
        border-radius: 8px;
        min-width: 180px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        margin-top: 5px;
        gap: 0;
    }

    .dropdown-menu.ativo {
        display: flex;
    }

    .dropdown-menu a {
        display: block;
        padding: 10px 16px;
        font-size: 0.8rem;
        text-align: left;
        border: none;
        background-color: transparent;
        border-radius: 0;
        border-bottom: 1px solid #333;
    }

    .dropdown-menu a:last-child {
        border-bottom: none;
    }

    .dropdown-menu a:hover {
        background-color: rgba(77, 184, 255, 0.1);
        padding-left: 16px;
        transform: none;
    }
}

@media (max-width: 600px) {
    .btn-menu {
        display: flex !important;
    }

    .dropdown-menu {
        display: none !important;
    }

    .dropdown-menu.ativo {
        display: flex !important;
    }

    .btn-contato-mobile {
        display: block;
        color: #c9e0f0;
        text-decoration: none;
        padding: 10px 16px;
        font-size: 0.8rem;
        text-align: left;
        border: none;
        background-color: transparent;
        border-radius: 0;
        border-bottom: 1px solid #333;
    }

    .btn-contato-mobile:hover {
        background-color: rgba(77, 184, 255, 0.1);
        color: #4db8ff;
    }
}

/* Header Estiloso */
.site-header {
    background-color: #1e1e1e;
    padding: 15px 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 2000;
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo { font-weight: bold; font-size: 1.4rem; color: #fff; }
.logo span { color: #4db8ff; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.btn-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.btn-menu span {
    width: 25px;
    height: 3px;
    background-color: #c9e0f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.btn-menu.ativo span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.btn-menu.ativo span:nth-child(2) {
    opacity: 0;
}

.btn-menu.ativo span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.dropdown-menu {
    display: flex;
    position: static;
    background-color: transparent;
    border: none;
    border-radius: 0;
    min-width: auto;
    box-shadow: none;
    z-index: auto;
    margin-top: 0;
    gap: 10px;
}

.dropdown-menu.ativo {
    display: flex;
}

.dropdown-menu a {
    display: inline-block;
    color: #c9e0f0;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.dropdown-menu a:hover {
    color: #4db8ff;
    background-color: rgba(77, 184, 255, 0.1);
    border-color: #4db8ff;
    padding-left: 16px;
    transform: translateY(-2px);
}

.btn-contato-mobile {
    display: none;
}

/* Botão Flutuante */
#btn-flutuante-contato {
    position: fixed;
    bottom: 80px; /* Acima do anúncio de rodapé */
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4db8ff;
    border: none;
    color: #000;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1500;
}

/* Modal de Contato */
#modal-contato {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000;
    visibility: hidden; opacity: 0; transition: 0.3s;
}

#modal-contato.mostrar { visibility: visible; opacity: 1; }

.modal-content {
    background: #252525; padding: 30px; border-radius: 15px;
    width: 90%; max-width: 400px; position: relative;
}

.modal-content input, .modal-content textarea {
    width: 100%; margin-bottom: 15px; padding: 12px;
    background: #333; border: 1px solid #444; color: white; border-radius: 5px;
}

.modal-content button {
    width: 100%; padding: 12px; background: #4db8ff; border: none;
    border-radius: 5px; font-weight: bold; cursor: pointer;
}

.fechar-modal { position: absolute; top: 15px; right: 20px; font-size: 25px; cursor: pointer; color: #666; }

.modal-hidden { display: none; } /* Classe auxiliar para o JS */

#mensagem-sucesso {
    text-align: center;
    padding: 20px 0;
}

.sucesso-icon {
    font-size: 3rem;
    color: #4db8ff;
    margin-bottom: 15px;
}

#mensagem-sucesso h3 {
    color: #fff;
    margin-bottom: 10px;
}

.btn-voltar-jogo {
    margin-top: 20px;
    background-color: transparent;
    border: 1px solid #4db8ff;
    color: #0c598d;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-voltar-jogo:hover {
    background-color: #4db8ff;
    color: #000;
}

/* Footer Minimalista */
.footer-minimalista {
    width: 100%;
    background-color: #1d1d1d;
    color: #aaaaaa;
    text-align: center;
    padding: 12px 10px;
    border-top: 1px solid #333;
    position: relative;
    z-index: 100;
}

.footer-minimalista a {
    color: #4db8ff;
    text-decoration: none;
    font-weight: 500;
}

.footer-minimalista a:hover {
    color: #7ecbff;
}

/* Classe utilitária para esconder elementos */
.hidden {
    display: none !important;
}