/* Reset e Estilos Básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212; /* Fundo escuro */
    color: #e0e0e0; /* Texto claro */
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tela {
    background-color: #1e1e1e; /* Fundo dos cards escuro */
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    padding: 30px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.oculto {
    display: none;
}

/* Tela Inicial */
.cabecalho {
    text-align: center;
    margin-bottom: 30px;
}

.cabecalho h1 {
    color: #9c27b0; /* Roxo mais vivo para o título */
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitulo {
    color: #bb86fc; /* Roxo lavanda */
    font-size: 1.1rem;
}

/* Estilo para a área de temas */
.conteudo {
    text-align: center;
    margin-bottom: 40px;
}

.conteudo h2 {
    color: #bb86fc;
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.conteudo p {
    margin-bottom: 25px;
    font-size: 1.2rem;
    color: #e0e0e0;
}

/* Nova organização dos temas */
.temas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.tema-btn {
    position: relative;
    background: linear-gradient(145deg, #2d2d2d, #333333);
    border: 2px solid #424242;
    color: white;
    border-radius: 12px;
    padding: 20px;
    height: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.tema-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #9c27b0, #bb86fc);
    transition: all 0.3s ease;
}

.tema-btn:hover {
    transform: translateY(-5px);
    border-color: #bb86fc;
    box-shadow: 0 10px 25px rgba(187, 134, 252, 0.2);
}

.tema-btn:hover::before {
    height: 6px;
}

.tema-btn i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #bb86fc;
    transition: all 0.3s ease;
}

.tema-btn:hover i {
    transform: scale(1.1);
}

.tema-btn-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.tema-btn-desc {
    font-size: 0.85rem;
    color: #9e9e9e;
    max-width: 90%;
}

.tema-btn-perguntas {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(187, 134, 252, 0.2);
    color: #bb86fc;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Botão de voltar */
.voltar-btn {
    background-color: transparent;
    color: #bb86fc;
    border: 2px solid #bb86fc;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voltar-btn i {
    font-size: 0.9rem;
}

.voltar-btn:hover {
    background-color: rgba(187, 134, 252, 0.1);
    transform: translateY(-2px);
}

/* Área de Histórico */
.historico-area {
    margin-top: 30px;
    background-color: #2d2d2d; /* Fundo um pouco mais claro que o card principal */
    padding: 20px;
    border-radius: 10px;
}

.historico-area h2 {
    color: #bb86fc; /* Roxo lavanda */
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

#historico-resultados {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.historico-item {
    background-color: #333333; /* Ainda mais escuro */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: calc(50% - 15px);
    text-align: center;
}

.historico-item h3 {
    color: #bb86fc; /* Roxo lavanda */
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.historico-item p {
    margin: 5px 0;
    color: #bdbdbd;
}

/* Tela do Quiz */
.cabecalho-quiz {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cabecalho-quiz h2 {
    color: #bb86fc; /* Roxo lavanda */
    font-size: 1.8rem;
    flex-grow: 1;
    text-align: center;
    margin: 0 15px;
}

.progresso {
    background-color: #333333;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: #bb86fc; /* Roxo lavanda */
}

.pergunta-container {
    margin-bottom: 30px;
}

#pergunta-texto {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.opcoes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opcao {
    background-color: #333333;
    border: 2px solid #424242;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opcao:hover {
    background-color: #424242;
    border-color: #616161;
}

.opcao.selecionada {
    background-color: #424242;
    border-color: #bb86fc;
}

.opcao.correta {
    background-color: #1b5e20; /* Verde escuro */
    border-color: #4caf50;
}

.opcao.incorreta {
    background-color: #b71c1c; /* Vermelho escuro */
    border-color: #f44336;
}

.feedback {
    background-color: #333333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

#feedback-texto {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.feedback-acerto {
    color: #4caf50; /* Verde */
    font-weight: bold;
}

.feedback-erro {
    color: #f44336; /* Vermelho */
    font-weight: bold;
}

#proxima-btn {
    background-color: #9c27b0;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#proxima-btn:hover {
    background-color: #bb86fc;
}

/* Tela de Resultado */
.tela-resultado h2 {
    text-align: center;
    color: #bb86fc; /* Roxo lavanda */
    margin-bottom: 30px;
    font-size: 2rem;
}

.resultado-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.pontuacao {
    text-align: center;
}

.circulo-pontuacao {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a3093 0%, #bb86fc 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2.5rem;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(106, 48, 147, 0.3);
}

.resumo {
    text-align: center;
    max-width: 500px;
}

#mensagem-final {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.estatisticas {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.acertos, .erros {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.acertos i {
    color: #4caf50; /* Verde */
}

.erros i {
    color: #f44336; /* Vermelho */
}

#reiniciar-btn {
    background: linear-gradient(135deg, #6a3093 0%, #bb86fc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

#reiniciar-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(106, 48, 147, 0.3);
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding: 15px 0;
    font-size: 0.9rem;
    color: #9e9e9e;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tela {
    animation: fadeIn 0.5s ease;
}

.opcao {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

.opcao:nth-child(1) { animation-delay: 0.1s; }
.opcao:nth-child(2) { animation-delay: 0.2s; }
.opcao:nth-child(3) { animation-delay: 0.3s; }
.opcao:nth-child(4) { animation-delay: 0.4s; }

/* Pulsação para feedback */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.feedback-acerto, .feedback-erro {
    animation: pulse 1s ease infinite;
}

/* Responsividade - ATUALIZADO para mostrar 2 temas por linha em celular */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tela {
        padding: 20px;
    }
    
    .cabecalho h1 {
        font-size: 2rem;
    }
    
    /* Alterado para 2 colunas em vez de 1 */
    .temas {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    
    .tema-btn {
        height: 130px;
        padding: 12px;
    }
    
    .tema-btn i {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .tema-btn-title {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }
    
    .tema-btn-desc {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .tema-btn-perguntas {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    /* Ajustes para histórico */
    .historico-item {
        width: 100%;
    }
    
    /* Ajustes para cabeçalho quiz */
    .cabecalho-quiz h2 {
        font-size: 1.3rem;
        margin: 0 10px;
    }
    
    .voltar-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .voltar-btn i {
        font-size: 0.8rem;
    }
    
    .progresso {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* Ajustes para perguntas */
    #pergunta-texto {
        font-size: 1.1rem;
    }
    
    /* Ajustes para resultados */
    .circulo-pontuacao {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }
    
    .estatisticas {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Ajustes em telas muito pequenas */
    @media (max-width: 350px) {
        .temas {
            grid-template-columns: 1fr;
        }
        
        .tema-btn {
            height: 120px;
        }
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #bb86fc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9c27b0;
}
/* Tela de Boas-Vindas */
.boas-vindas-conteudo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.boas-vindas-header {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.boas-vindas-header h1 {
    color: #bb86fc;
    font-size: 2.5rem;
    text-shadow: 0 0 15px rgba(187, 134, 252, 0.5);
}

.mensagem-boasvindas {
    margin-bottom: 40px;
}

.mensagem-principal {
    font-size: 1.6rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.mensagem-secundaria {
    font-size: 1.1rem;
    color: #bdbdbd;
    line-height: 1.6;
}

.detalhes-quiz {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    width: 100%;
}

.detalhe-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #272727;
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.detalhe-item:hover {
    transform: translateX(5px);
}

.detalhe-item i {
    color: #bb86fc;
    font-size: 1.5rem;
    min-width: 30px;
}

.detalhe-item span {
    font-size: 1.1rem;
    color: #e0e0e0;
}

.iniciar-btn {
    background: linear-gradient(135deg, #9c27b0, #bb86fc);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(106, 48, 147, 0.3);
}

.iniciar-btn i {
    transition: transform 0.3s ease;
}

.iniciar-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(187, 134, 252, 0.4);
}

.iniciar-btn:hover i {
    transform: translateX(5px);
}

.assinatura {
    color: #9e9e9e;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsividade para a tela de boas-vindas */
@media (max-width: 768px) {
    .boas-vindas-header h1 {
        font-size: 2rem;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .mensagem-principal {
        font-size: 1.4rem;
    }
    
    .mensagem-secundaria {
        font-size: 1rem;
    }
    
    .iniciar-btn {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
}