/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Estilos básicos */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #e3ebfc;
    margin: 0;
    padding: 20px 20px 0; /* Remove o padding inferior */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    gap: 20px;
}


/* Define o layout flexível para o header */
.main-header {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 1.5em;
}

/* Estilo para o ícone de ajuda à esquerda */
#help-icon, #ranking-icon, #settings-icon {
    cursor: pointer;
}

/* Estilo para o título centralizado */
.title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0;
}

.title a{
    text-decoration: none;
}

/* Estilo para a combinação "Karate" e "rmo" */
.karate {
    font-weight: bold;
}

.rmo {
    font-weight: bold;
}

/* Alinhamento dos ícones à direita com espaçamento */
.right-icons , .left-icons{
    display: flex;
    gap: 15px;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 800px; /* Limite de largura no desktop */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
}


/* Título com cores */
h1 {
    font-size: 2em;
}

h1 .karate {
    color: #3f51b5;
}

h1 .rmo {
    color: #eb810f;
}

/* Seções de feedback, termo e significado */
.feedback, .term, .meaning, #statistics {
    margin-top: 15px;
    font-size: 1em;
}

.term, .meaning {
    color: #4CAF50;
    padding: 10px;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    background-color: #e8f5e9;
    font-size: 1.2em;
}

/* Botões de escolha */
#choices {
    margin: 15px 0;
}

#choices button {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: none;
    border-radius: 8px;
    background-color: #3f51b5;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

#choices button:hover {
    background-color: #303f9f;
}

/* Estatísticas */
.stats-container {
    margin-top: 25px;
    border-top: 2px solid #3f51b5;
    padding-top: 15px;
    font-size: 1em;
}

#statistics .score {
    font-weight: bold;
    color: #3f51b5;
}

#statistics .score span {
    font-weight: bold;
    color: #eb810f;
}

#feedbackMessage #startQuiz{
    padding: 10px;
    margin: 5px 0;
    border: none;
    border-radius: 8px;
    background-color: #3f51b5;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

#feedbackMessage #startQuiz:hover {
    background-color: #303f9f;
}

#feedbackMessage #startQuiz a{
    text-decoration: none;
    color: white;
}

/* Estilos do modal */
.modal {
    display: none; /* Escondido por padrão */
    position: fixed; /* Fixo na tela */
    z-index: 1000; /* Acima de outros conteúdos */
    left: 0;
    top: 0;
    width: 100%; /* Largura total */
    height: 100%; /* Altura total */
    overflow: auto; /* Permite scroll se necessário */
    background-color: rgba(0, 0, 0, 0.7); /* Fundo escuro com opacidade */
}

/* Conteúdo do modal */
.modal-content {
    background-color: white;
    margin: 5% auto; /* 15% do topo e centraliza */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Largura do modal */
    max-width: 600px; /* Largura máxima */
    border-radius: 10px; /* Bordas arredondadas */
    text-align: justify;
}

/* Botão de fechar */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Títulos e textos do modal */
.modal-content h2 {
    color: #3f51b5;
}

.modal-content p {
    margin: 10px 0; /* Margem entre os parágrafos */
}

.modal .karate{
    font-weight: bold;
    color: #3f51b5;
}
.modal .rmo{
    font-weight: bold;
    color: #eb810f;
}


#date-options {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

#date-options button {
    padding: 10px;
    margin: 5px 0;
    border: none;
    background-color: #3f51b5;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

#date-options .correct-answered-date {

    color: #4CAF50;
    padding: 10px;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    background-color: #e8f5e9;
}

#date-options .wrong-answered-date {

    color: #af4c4c;
    padding: 10px;
    border: 2px solid #af4c4c;
    border-radius: 8px;
    background-color: #f5e8e8;
}

#codigoLivre{
    font-size: 0.8em;
}

#send-stats-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px;
    margin-left: 8px;
    transition: color 0.3s ease, transform 0.3s ease;
}

#send-stats-btn i {
    font-size: 1.1rem;
}

/* Efeito de destaque ao passar o mouse */
#send-stats-btn:hover {
    color: #555;
    transform: scale(1.1);
}

/* Loading overlay styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#loading-overlay p {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #333;
}

/* Spinner animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8); /* Fundo levemente transparente */
    padding: 20px;
    border-radius: 8px; /* Cantos arredondados para uma aparência melhor */
    margin: 20px 0; /* Margem para separar do conteúdo do modal */
}

.loader {
    font-size: 50px; /* Tamanho do spinner */
    color: #3498db; /* Cor do spinner */
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Ajustes para telas menores */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }

    .right-icons , .left-icons{
        gap: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    #choices button {
        padding: 8px;
        font-size: 0.9em;
    }

    .feedback, .term, .meaning, #statistics {
        font-size: 0.9em;
    }

    #statistics .score {
        font-size: 1em;
        color: #3f51b5;
    }

    .modal-content {
        width: 95%; /* Largura maior em telas pequenas */
        margin: 10% auto; /* Ajuste de margem superior */
    }
}

/* Ajustes para telas menores */
@media (max-width: 375px) {

    #divMenuHamburguer {
        display: block !important;
        font-size: 1 em;
    }

    .right-icons , .left-icons{
        display: none;
    }
    
}
