:root {
    --primary-color: #4CAF50; /* Verde vibrante */
    --secondary-color: #FFC107; /* Amarelo divertido */
    --background-color: #2c3e50; /* Azul escuro */
    --text-color: #ecf0f1; /* Branco/Cinza claro */
    --correct-color: #28a745; /* Verde de acerto */
    --wrong-color: #dc3545; /* Vermelho de erro */
    --modal-bg: #34495e; /* Fundo do modal */
    --game-bg: #34495e; /* Fundo do jogo */
    --rank-bg: #22303e; /* Fundo do ranking, um pouco mais escuro */
    --button-hover-bg: #45a049;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow: auto;
}

.modal {
    background-color: var(--modal-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.hidden {
    display: none !important;
}

/* Estilo para Modais (Início) */
.modal h2 {
    font-size: 2.2em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.modal p {
    font-size: 1.1em;
}
.listar
.modal .small-text { /* Estilo para o texto "Escolha sua foto" */
    font-size: 0.9em;
    color: #a0b7cf;
    margin-top: 10px;
    margin-bottom: 5px;
}


/* Campo de Nome do Jogador */
#player-name {
    width: 80%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    text-align: center;
    background-color: #4a627a;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
}

#player-name::placeholder {
    color: #a0b7cf;
}

#player-name:focus {
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Estilo para o input de arquivo customizado */
.hidden-file-input {
    display: none; /* Esconde o input original */
}

.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6c757d; /* Cor cinza para o botão de upload */
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.custom-file-upload:hover {
    background-color: #5a6268;
}

/* Estilo da prévia da foto */
.hidden-photo-preview {
    display: none;
    width: 100px;
    height: 100px;
    border-radius: 50%; /* Borda arredondada */
    object-fit: cover; /* Garante que a imagem preencha o espaço */
    margin: 15px auto; /* Centraliza e adiciona margem */
    border: 3px solid var(--primary-color); /* Borda da foto */
}


/* Botões Gerais */
button {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    align-self: center;
}

button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* --- Novo Layout Principal (Game Container) --- */
#game-container {
    display: flex;
    gap: 30px;
    max-width: 1000px;
    width: 100%;
    align-items: flex-start;
}

/* Estilos da Tela do Jogo */
#game-screen {
    flex: 2;
    background-color: var(--game-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    min-height: 500px;
}

/* Novo: Info do Jogador (Foto + Nome) */
.player-info-top {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
    width: 100%;
    justify-content: center; /* Centraliza a info do jogador */
}

#player-avatar {
    width: 120px; /* Tamanho da foto do jogador */
    height: 120px;
    border-radius: 50%; /* Borda arredondada (círculo) */
    object-fit: cover;
    border: 3px solid var(--secondary-color); /* Borda destacada */
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5); /* Efeito de brilho */
}


#player-display {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--secondary-color);
    white-space: nowrap; /* Impede quebra de linha no nome */
    overflow: hidden; /* Oculta se o nome for muito longo */
    text-overflow: ellipsis; /* Adiciona "..." se o nome for muito longo */
    max-width: 150px; /* Limita a largura do nome */
}

#score {
    font-size: 1.5em;
    font-weight: bold;
    margin: -15px;
}

#color-word {
    font-size: 4.5em;
    font-weight: bold;
    color: white;/*var(--secondary-color)*/
    margin-bottom: 30px;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4);
    /*user-select: none;*/
}
.listar {
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: white;
    border-radius: 5px;
    background-color: white;
    padding: 5px 20px 25px 20px;
    font-size: 20px;
    color: blue;
    height: 20px;
    position: absolute;
    top: 20px; /* Posiciona 10px do topo */
    left: 10px; /* Posiciona 10px da esquerda */
}

#emoji-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: -30px;
    flex-wrap: wrap;
}

.emoji-btn {
    font-size: 4em;
    background: none;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: all 0.3s ease;
}

.emoji-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.emoji-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #7f8c8d;
}

#feedback {
    font-size: 1.3em;
    font-weight: bold;
    min-height: 1.5em;
    margin-bottom: 20px;
}

.feedback-correct {
    color: var(--correct-color);
}

.feedback-wrong {
    color: var(--wrong-color);
}

/* --- Estilos do Rank --- */
#rank-display {
    flex: 1;
    background-color: var(--rank-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 250px;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#rank-display h2 {
    font-size: 1.8em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

#high-scores-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

#high-scores-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #3b506b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1em;
    background-color: #2c3e50;
    margin-bottom: 5px;
    border-radius: 5px;
}

#high-scores-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#high-scores-list li:nth-child(odd) {
    background-color: #3b506b;
}

#high-scores-list li span:first-child {
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px; /* Espaçamento entre medalha/avatar e nome */
}
#high-scores-list li span:last-child {
    font-size: 0.9em;
    color: #b0c4de;
}

/* Avatar no ranking */
.rank-avatar {
    width: 30px; /* Menor para o ranking */
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--secondary-color);
}

/* Responsividade */
@media (max-width: 900px) {
    #game-container {
        position: absolute;
        top: 60px;
        flex-direction: column;
        align-items: top;
        gap: 20px;
    }

    #game-screen, #rank-display {
        width: 100%;
        max-width: 450px;
    }

    #rank-display {
        margin-top: 20px;
        max-height: 300px;
    }

    .modal {
        position: absolute;
        top: 60px;
        flex-direction: column;
        align-items: top;
        gap: 20px;
    }

    .modal h2 {
        font-size: 1.8em;
    }

    #color-word {
        font-size: 3.5em;
    }

    #emoji-options {
        flex-direction: row;
        gap: 10px;
    }

    .emoji-btn {
        width: 90px;
        height: 90px;
        font-size: 3em;
    }

    button {
        padding: 10px 20px;
        font-size: 1em;
    }

    .player-info-top {
        flex-direction: column; /* Foto e nome empilhados em telas pequenas */
        gap: 5px;
    }

    #player-display {
        max-width: 100%; /* Permite que o nome ocupe mais largura */
    }

    #high-scores-list li {
        font-size: 0.9em;
        padding: 8px 12px;
    }
}
.emoji-btn {
    font-size: 4em;
    background: none;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    transition: all 0.3s ease;
}
/*
@media (max-width: 500px) {
    #emoji-options {
        flex-direction: column;
    }
}
    */