/* --- Reset Básico e Configurações Gerais --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #00145f; /* Azul B3 */
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* <-- MUDAR AQUI */
    color: #FFFFFF;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Layout Principal --- */
.app-header {
    padding: 40px 5vw;
}

.app-logo {
    width: 350px;
    height: auto;
}

#app-container {
    flex-grow: 1;
    width: 100%;
    display: flex;
    /*align-items: center;*/
    justify-content: center; /* Já adicionado, mas mantendo */
    padding: 0 5vw 40px 5vw;
    /* <-- ALTERADO PARA TER O MESMO ESPAÇAMENTO DOS LADOS */
    /* Para telas muito grandes, podemos adicionar um max-width para o appContainer se o quiz
       ficar muito esticado, mas por enquanto, 700px no content-wrapper já ajuda. */
}

.content-wrapper {
    padding-top: 200px;
    padding-left: 100px;
    padding-right: 100px;
    width: 100%;
    max-width: 700px; /* Limita a largura do conteúdo para melhor leitura */
}

/* --- Estilos de Texto Comuns --- */
.quiz-title {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    color: #f6a733; /* Amarelo B3 */
    margin-bottom: 25px;
    line-height: 1.2;
}

.quiz-text {
    font-size: clamp(1rem, 5vw, 1.25rem);
    color: #FFFFFF;
    line-height: 1.6;
    max-width: 500px;
}

/* --- Botão Principal --- */
.btn-primary {
    width: 500px;
    display: inline-block;
    background-color: #f6a733;
    color: #00145f;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 20px 60px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


/* --- Botão Principal --- */
.btn-primaryinicioquiz {
    width: 500px;
    display: inline-block;
    background-color: #f6a733;
    color: #00145f;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 20px 60px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top:50px;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Tela de Regras --- */
.divider {
    border: none;
    height: 1px;
    background-color: #f6a733; /* <-- LINHA ATUALIZADA */
    margin: 30px 0;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.rule-icon {
    width: 24px;
    height: auto;
}

/* --- Tela de Cadastro --- */
.form-group {
    position: relative;
    margin-bottom: 35px;
}

.form-input {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
    font-size: 1.2rem;
    padding: 10px 40px 10px 0;
    outline: none;
    font-family: 'Montserrat', sans-serif; /* <-- MUDAR AQUI */
}
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.form-input:focus {
    border-bottom-color: #f6a733;
}

.form-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
}

#form-error {
    color: #ff8a80;
    margin-bottom: 15px;
    min-height: 20px;
}

/* --- Tela do Quiz --- */
.question-number {
    font-size: clamp(3.5rem, 8vw, 5rem);
    font-weight: 700;
    color: #f6a733;
    margin-bottom: 15px;
}

.question-text {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    margin-bottom: 50px;
    line-height: 1.4;
    max-width: none; /* Ocupa toda a largura do content-wrapper */
}

.options-list {
    list-style: none;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #FFC72C;
    cursor: pointer;
    transition: border-color 0.2s;
}
.option-item:hover {
    border-bottom-color: #FFC72C;
}
.option-item.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-letter {
    border: 1px solid #FFC72C;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
    color: #FFC72C;
}

.option-text {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Feedback visual para respostas (ATUALIZADO) */

/* --- Resposta CORRETA (Tudo Laranja) --- */
.option-item.correct .option-letter,
.option-item.correct .option-text {
    color: #FFC72C; /* Deixa o texto e a letra laranjas */
}
.option-item.correct .option-letter {
    border-color: #FFC72C; /* Deixa a borda da letra laranja */
}
.option-item.correct {
    border-bottom-color: rgba(255, 199, 44, 0.5); /* Deixa a linha de baixo laranja */
}
.option-item.correct:hover {
    border-bottom-color: rgba(255, 199, 44, 0.5);
}

/* --- Respostas ERRADAS (Tudo Cinza) --- */
.option-item.faded-out .option-letter,
.option-item.faded-out .option-text {
    color: #888; /* Deixa o texto e a letra cinzas */
}
.option-item.faded-out .option-letter {
    border-color: #888; /* Deixa a borda da letra cinza */
}
.option-item.faded-out {
    border-bottom-color: rgba(136, 136, 136, 0.3); /* Deixa a linha de baixo cinza */
    opacity: 1; /* Remove a opacidade antiga, pois já mudamos a cor */
}
.option-item.faded-out:hover {
    border-bottom-color: rgba(136, 136, 136, 0.3);
}

/* --- Tela de Resposta (Explicação) --- */
.explanation-box {
    margin-top: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #FFC72C;
}

/* --- Botão de Tela Cheia (Restaurado) --- */
#fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, .7);
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: transform .2s;
}

#fullscreen-btn:hover {
    transform: scale(1.1);
}

#fullscreen-btn svg {
    width: 24px;
    height: 24px;
    color: #2c3e50;
}

/* O seu script.js já controla qual ícone aparece,
   mas esta regra garante o estado inicial correto. */
#icon-exit-fs {
    display: none;
}

/* --- Estilos do Timer do Quiz --- */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
}

/* Remove a margem de baixo do número da pergunta para alinhar com o timer */
.question-number {
    margin-bottom: 0;
}

.quiz-timer {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFC72C; /* Amarelo B3 */
}

.quiz-titleranking {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    color: #f6a733; /* Amarelo B3 */
    margin-bottom: 25px;
    line-height: 1.2;
}

/* ================================================================== */
/* --- INÍCIO: ESTILOS COMPLETOS DO RANKING (USUÁRIO + ADMIN) --- */
/* ================================================================== */

/* --- PARTE 1: CSS DO RANKING DO USUÁRIO (O PADRÃO) --- */

/* Esconde o cabeçalho (que o usuário não usa) */
.ranking-header {
    display: none;
}

/* O container da lista com a moldura */
.ranking-list {
    position: relative;
    padding-left: 80px; /* Espaço para a moldura */
    padding-top: 65px; /* Espaço para o troféu da moldura */
    border-left: none;

    /* A IMAGEM DA MOLDURA (que sumiu) */
    background-image: url('../../image/candle-com-trofeu.png');
    background-repeat: no-repeat;
    background-size: 60px auto; /* Largura da moldura (ajuste se precisar) */
    background-position: 0 0; /* Posição: topo e esquerda */
}

/* Esconde a linha e o troféu do CSS (já que estão na imagem) */
.ranking-list::before,
.ranking-list::after {
    display: none;
}

/* Esconde o troféu branco do HTML (que apareceu na sua imagem) */
.ranking-trophy {
    display: none;
}

/* Item do ranking (Usuário = 3 colunas) */
.ranking-item {
    display: grid;
    grid-template-columns: 1fr 90px 100px; /* 3 Colunas: Nome | Acertos | Tempo */
    gap: 15px;
    align-items: center;
    padding: 14px 0;
    font-size: 1.1rem;
    position: relative; /* FUNDAMENTAL */
    background-color: transparent; /* Garante que não tem fundo */
    border-radius: 0;
    margin-bottom: 0;
}

/* Posição (Números 1, 2, 3...) */
.ranking-position {
    position: absolute;
    left: -75px; /* Puxa para dentro da moldura */
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 1.1rem;
    width: 50px;
    text-align: center;
    color: #f6a733; /* Cor laranja (para combinar com a moldura) */
    display: block;
}

/* Coluna 1: Nome */
.ranking-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0;
}

/* Coluna 2: Email */
.ranking-email {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0;
}

/* Coluna 3: Acertos */
.ranking-score {
    display: block;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    white-space: nowrap;
}

/* Coluna 4: Tempo */
.ranking-time {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    text-align: right;
}

/* Destaque do usuário atual */
.ranking-item.current-user {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 14px 15px;
    margin-left: -15px;
}
.ranking-item.current-user .ranking-position {
    left: -55px;
}

.ranking-empty {
    padding: 40px;
    text-align: center;
    opacity: 0.7;
}

.ranking-footer {
    text-align: center;
    margin-top: 40px;
}


/* --- PARTE 2: OVERRIDE DO RANKING ADMIN --- */
/* (Isto só afeta a página que tem .admin-list e .admin-item) */

/* 1. Reseta a lista: Remove a moldura e os paddings */
.ranking-list.admin-list {
    padding-left: 0;
    padding-top: 0;
    background-image: none; /* Remove a moldura */
}

/* 2. Mostra o cabeçalho do admin */
.ranking-header.admin-header {
    display: grid;
    /* 5 Colunas: Posição | Nome | Email | Acertos | Tempo */
    grid-template-columns: 50px 1.5fr 2fr 90px 100px;
    gap: 15px;
    padding: 0 15px;
    color: #f6a733;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.7;
}
.ranking-header.admin-header span:nth-child(n+4) { text-align: right; }
.ranking-header.admin-header .email-header { text-align: left; }

.ranking-item.admin-item {
    grid-template-columns: 50px 300px 130px 10px 50px; /* 5 Colunas! */
    gap: 15px;
    align-items: center;
    font-size: 1.1rem;
    position: relative;
    border-radius: 8px;
}

/* Traz o número da posição para dentro do grid (não flutuante) */
.ranking-item.admin-item .ranking-position {
    position: static; /* Tira do 'absolute' */
    transform: none;
    width: auto;
    text-align: left;
    color: #f6a733;
}

/* 5. Mostra a coluna de Email (APENAS no admin) */
.ranking-item.admin-item .ranking-email {
    display: block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* 6. Alinhamento das colunas */
.ranking-item.admin-item .ranking-score,
.ranking-item.admin-item .ranking-time {
    text-align: right;
}

/* Coluna 1: Nome */
.rankingadmin-name {
    font-weight: 700; /* Negrito */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Coluna 2: Email */
.rankingadmin-email {
    font-weight: 400; /* Peso normal */
    font-size: 0.95rem; /* Um pouco menor */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left; /* Alinha à esquerda */
    padding-right: 0;
}

/* Coluna 3: Acertos */
.rankingadmin-score {
    /* 'display: block;' FOI REMOVIDO DAQUI */
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    white-space: nowrap;
}

/* Coluna 4: Tempo */
.rankingadmin-time {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    text-align: right;
}

/* O container da lista com a moldura */
.rankingadmin2-list {
    position: relative;
    padding-left: 28px; /* Espaço para a moldura */
    padding-top: 65px; /* Espaço para o troféu da moldura */
    border-left: none;

    /* A IMAGEM DA MOLDURA (que sumiu) */
    background-image: url('../../image/candle-com-trofeu.png');
    background-repeat: no-repeat;
    background-size: 60px auto; /* Largura da moldura (ajuste se precisar) */
    background-position: 0 0; /* Posição: topo e esquerda */
}

.contentadmin-wrapper {
    width: 100%;
    max-width: 700px; /* Limita a largura do conteúdo para melhor leitura */
}

.quizadmin-titleranking {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    color: #f6a733; /* Amarelo B3 */
    margin-bottom: 25px;
    line-height: 1.2;
    text-align: center;
}

/* Adicionar ao final do style.css */

#login-container {
    max-width: 500px; /* Limita a largura do form de login */
    margin: 0 auto;
}

#login-error {
    color: #f6a733; /* Vermelho claro para erro */
    margin-bottom: 15px;
    min-height: 20px;
    font-weight: bold;
}

/* ================================================================== */
/* --- FIM: ESTILOS COMPLETOS DO RANKING --- */
/* ================================================================== */