/* --- Estilos Gerais --- */
.gt-quiz-host-container, .gt-quiz-player-container {
    font-family: sans-serif;
    text-align: center;
    padding: 20px;
    background-color: #f4f4f9;
    border-radius: 8px;
    max-width: 900px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Estilos do Host (sem alterações) --- */
#game-pin {
    font-size: 3em;
    color: #4a148c;
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    margin: 20px 0;
}
#start-game-btn, #next-question-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}
#start-game-btn:hover, #next-question-btn:hover {
    background-color: #27ae60;
}
#player-list ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
#player-list li {
    background-color: #fff;
    padding: 5px 15px;
    margin: 5px;
    border-radius: 20px;
    font-weight: bold;
}
#quiz-question h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
}
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.answer {
    padding: 20px;
    font-size: 1.5em;
    color: white;
    display: flex;
    align-items: center;
    border-radius: 5px;
}
.answer .shape { font-size: 2em; margin-right: 20px; }
.answer[data-option="a"] { background-color: #e74c3c; }
.answer[data-option="b"] { background-color: #3498db; }
.answer[data-option="c"] { background-color: #f1c40f; }
.answer[data-option="d"] { background-color: #2ecc71; }

#timer {
    font-size: 2em;
    font-weight: bold;
    margin-top: 20px;
    background: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    margin: 20px auto 0;
    border: 3px solid #4a148c;
}

#leaderboard-list, #final-leaderboard-list {
    list-style: none;
    padding: 0;
    max-width: 400px;
    margin: 20px auto;
}
#leaderboard-list li, #final-leaderboard-list li {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
}
#leaderboard-list .score, #final-leaderboard-list .score { font-weight: bold; color: #4a148c; }

/* --- Estilos do Jogador (COM ALTERAÇÕES) --- */
.gt-quiz-player-container input {
    display: block;
    width: 80%;
    max-width: 300px;
    margin: 15px auto;
    padding: 15px;
    font-size: 1.1em;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.gt-quiz-player-container button {
    background-color: #4a148c;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    width: 80%;
    max-width: 320px;
}
.gt-quiz-player-container button:hover {
    background-color: #c6c6c6;
}

/* NOVO: Centraliza a tela da pergunta */
#player-question-screen {
    display: none; /* A lógica JS controla a exibição */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 70vh;
}

#player-question-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #333;
}

/* ALTERADO: Grade de respostas do jogador */
.player-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-width: 700px; /* Define uma largura máxima para a grade */
    /* A propriedade 'height' que ocupava a tela inteira foi removida */
}

/* ALTERADO: Botões de resposta do jogador */
.player-answer-btn {
    width: 100%;
    min-height: 150px; /* Define uma altura mínima em vez de preencher a tela */
    border: none;
    cursor: pointer;
    font-size: 4em; /* Tamanho do ícone um pouco menor */
    color: white;
    border-radius: 8px; /* Cantos arredondados */
    transition: transform 0.1s ease-in-out;
}

.player-answer-btn:active {
    transform: scale(0.95); /* Efeito de clique */
}

.player-answer-btn[data-option="a"] { background-color: #e74c3c; }
.player-answer-btn[data-option="b"] { background-color: #3498db; }
.player-answer-btn[data-option="c"] { background-color: #f1c40f; }
.player-answer-btn[data-option="d"] { background-color: #2ecc71; }

/* Cor do botão enquanto aguarda o resultado */
.player-answer-btn.waiting {
    background-color: #34495e !important; /* Cor escura para indicar que foi clicado */
    cursor: not-allowed;
}

#player-result-screen h2.correct { color: #2ecc71; }
#player-result-screen h2.incorrect { color: #e74c3c; }

/* --- Estilos do Feedback em Tempo Real --- */
.live-tracker {
    margin-bottom: 25px;
    background: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #e1e1e1;
}
.live-tracker h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #333;
}
.live-player-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.live-player-list li {
    background: #e9f5ff;
    color: #005a9c;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}
.live-player-list li.answered {
    background: #e2e2e2;
    color: #777;
    text-decoration: line-through;
}

/* --- Estilos do Modo Self-Paced (Design "Clean & Neutro" - FINAL) --- */
.gt-quiz-player-container .self-paced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    color: #6c757d; /* Cinza sutil para informações secundárias */
}
.gt-quiz-player-container .self-paced-timer {
    font-size: 1.2em;
    font-weight: 700;
    color: #212529; /* Texto escuro */
    background: #fff;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    border: 2px solid #dee2e6; /* Borda cinza clara */
}
.gt-quiz-player-container .self-paced-question-title {
    font-size: 1.8em; /* Tamanho um pouco mais contido */
    font-weight: 600;
    color: #212529; /* Cor de texto principal, alta legibilidade */
    text-align: center;
    margin-bottom: 35px;
    line-height: 1.4;
}
.gt-quiz-player-container .self-paced-answers {
    display: grid;
    grid-template-columns: 1fr; /* Uma única coluna */
    gap: 12px;
}
.gt-quiz-player-container .self-paced-answer-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px; /* Botões ligeiramente menores */
    font-size: 1.05em;
    cursor: pointer;
    border: 1px solid #ced4da; /* Borda cinza padrão */
    background: #ffffff;
    color: #212529;
    border-radius: 8px; /* Cantos suavemente arredondados */
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease-in-out;
    max-width: 100%;
}
.gt-quiz-player-container .self-paced-answer-btn .letter {
    font-weight: 700;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 5px 10px;
    margin-right: 15px;
    transition: all 0.2s ease-in-out;
}
.gt-quiz-player-container .self-paced-answer-btn .text {
    flex-grow: 1;
}
.gt-quiz-player-container .self-paced-answer-btn:hover {
    border-color: #8a8a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}
.gt-quiz-player-container .self-paced-answer-btn:disabled {
    cursor: not-allowed;
}
.gt-quiz-player-container .self-paced-answer-btn.selected {
    border-color: #212529;
    background-color: #212529; /* Fundo escuro ao selecionar */
    color: #ffffff; /* Texto branco */
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.gt-quiz-player-container .self-paced-answer-btn.selected .letter {
    background-color: #ffffff;
    color: #212529;
    border-color: #212529;
}
.gt-quiz-player-container .self-paced-feedback {
    margin-top: 20px;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    color: #495057;
}

/* --- Estilos do Leaderboard Self-Paced --- */
.self-paced-leaderboard-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    max-width: 700px;
    margin: 20px auto;
    font-family: sans-serif;
}
.self-paced-leaderboard-container h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #d16b45;
}
.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    color: #000;
}
.leaderboard-list li:nth-child(odd) {
    background-color: #fff;
}
.leaderboard-list .leaderboard-header {
    font-weight: bold;
    background-color: #d16b4500 !important;
    border: 1px solid;
    color: #000000;
}
.leaderboard-list .pos { flex-basis: 10%; text-align: left; font-style: italic; color: #000; }
.leaderboard-list .player { flex-basis: 50%; text-align: left; font-weight: bold; }
.leaderboard-list .score { flex-basis: 20%; text-align: right; font-weight: bold; }
.leaderboard-list .time { flex-basis: 20%; text-align: right; color: #000000; font-size: 0.9em; }

/* --- Novas Cores e Estilos para Botões Self-Paced --- */
.self-paced-answer-btn {
    display: flex;
    align-items: center;
    border: none;
    color: white;
}
.self-paced-answer-btn:hover {
    opacity: 0.9;
}
.self-paced-answer-btn .shape {
    font-size: 2em;
    margin-right: 15px;
}
.self-paced-answer-btn .text {
    flex-grow: 1;
}
.self-paced-answer-btn.selected {
    transform: scale(0.98);
    box-shadow: 0 0 10px rgba(0,0,0,0.3) inset;
    opacity: 1;
}

/* --- Regra Específica para Largura Total do Self-Paced --- */
.gt-quiz-player-container.self-paced-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

/* --- Correção de Largura para Conteúdo Interno (Self-Paced) --- */
.self-paced-container .self-paced-header,
.self-paced-container .self-paced-question-title,
.self-paced-container .self-paced-answers {
    max-width: 100%; /* Remove qualquer limite de largura imposto pelo tema */
    margin-left: auto;
    margin-right: auto;
}

/* Classes de Cor Reutilizáveis */
.gt-red { background-color: #e74c3c; }
.gt-blue { background-color: #3498db; }
.gt-yellow { background-color: #f1c40f; }
.gt-green { background-color: #2ecc71; }