/* Define que todas as caixas consideram a borda dentro do tamanho total */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Estiliza o corpo da página */
body {
    font-family: 'Arial', sans-serif; /* Define a fonte padrão */
    background-color: #f5f5f5; /* Cor de fundo (usada caso a imagem não carregue) */
    background-image: url('./images/background-stars.png'); /* URL da imagem de fundo */
    background-size: cover; /* Faz com que a imagem cubra todo o fundo */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat; /* Evita a repetição da imagem */
    display: flex;
    flex-direction: column; /* Mantém o layout em coluna */
    justify-content: flex-start; /* Alinha o conteúdo ao topo */
    height: 100vh; /* Ocupa toda a altura da tela */
    padding-top: 1rem; /* Adiciona espaçamento no topo */
}

*::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-thumb {
    background-color: rgb(25, 180, 130);
    border-radius: 5px;
}

body::-webkit-scrollbar-thumb:hover {
    background-color: rgb(21, 153, 111);
}

/* Estiliza os títulos principais */
h1 {
    color: #333; 
    text-align: center; /* Centraliza o título */
    margin-bottom: 1rem; /* Espaçamento inferior */
}

#alignment {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center; /* Mantém os itens dentro alinhados ao centro */
    width: 100%;
    max-width: 1000px; /* Define um tamanho máximo para evitar expansão excessiva */
    margin: 0 auto; /* Garante centralização no layout normal */
}

h2 {
    font-size: 20px; 
    align-self: flex-start;
}

/* Estiliza o contêiner do input e botões */
#inputContainer {
    display: flex;
    flex-direction: row; /* Alinha os elementos em linha */
    align-items: baseline; /* Alinha os elementos pela linha base do texto */
    justify-content: flex-start; /* Centraliza o conteúdo */
    margin-bottom: 2rem; 
    width: 100%; 
}

footer {
    font-size: 15px; 
    color: black; /* Cor do texto */
    padding: 20px; /* Espaçamento interno */
    display: flex;
    justify-content: center; /* Centraliza o conteúdo */
    text-align: center;
}

/* Alinha a imagem à esquerda e o texto à direita */
.footer-content {
    display: flex;
    align-items: center; /* Alinha verticalmente */
    gap: 15px; /* Espaço entre a imagem e o texto */
}

/* Estiliza a imagem */
.footer-img {
    width: 30px; /* Define a largura da imagem */
    height: auto; /* Mantém a proporção */
    margin-top: 10px; /* Adiciona espaçamento entre o texto e a imagem */
}

/* Estiliza o campo de input de nomes */
#nameInput {
    width: 100%; /* Define largura relativa */
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    font-size: 1rem; 
    color: #333; 
    outline: none; /* Remove o contorno ao focar */
    margin: 0 2%; /* Adiciona espaçamento lateral */
}

/* Define espaçamento para instruções */
#instruction {
    margin-left: 2.3%;
}

/* Estiliza os botões */
button {
    width: 100%; 
    max-width: 300px; /* Define uma largura máxima */
    padding: 10px 20px; /* Espaçamento interno */
    background-color: rgb(25, 180, 130); 
    color: #fff; 
    border: none; 
    border-radius: 5px; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
    margin-top: 10px; 
    text-align: center; 
}

/* Muda a cor do botão ao passar o mouse */
button:hover {
    background-color: rgb(25, 180, 130);
}

/* Define estilo para botões desabilitados */
button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* Estiliza listas de nomes e vencedores */
#nameList, #winnerList {
    list-style-type: none;
    padding: 10px; 
    margin: 20px auto; 
    width: 100%;
    max-width: 400px; 
    background-color: #fff; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    color: #555; 
    margin-left: 0;
    max-height: 504px;
    overflow-y: auto;
    scrollbar-color: rgb(25, 180, 130) #f5f5f5;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

/* Estiliza os itens das listas */
#nameList li, #winnerList li {
    padding: 8px; 
    border-bottom: 1px solid #ddd; 
}

/* Remove a borda inferior do último item da lista */
#nameList li:last-child, #winnerList li:last-child {
    border-bottom: none;
}

/* Define layout em 3 colunas */
.containerPag {
    display: flex;
    justify-content: space-between; /* Distribui os elementos uniformemente */
    height: 100vh; 
    padding: 1rem; 
    gap: 10px; 
}

/* Define largura das colunas */
.left-column, .center-column, .right-column {
    width: 32%;
}

/* Alinha os botões na esquerda */
.left-column {
    display: flex;
    flex-direction: column; /* Empilha os botões verticalmente */
    gap: 10px; /* Espaçamento entre botões */
    align-items: center; /* Centraliza os botões */
}

/* Centraliza o conteúdo das colunas do meio e direita */

/* Define o estilo das bolinhas */
.bolinhas-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Permite quebra de linha */
    gap: 10px; /* Espaçamento entre bolinhas */
    width: 100%;
    padding: 20px 0;
    max-width: 100%;
}

.bolinha {
    width: 50px;
    height: 50px;
    background-color: rgb(25, 180, 130);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: black;
    position: relative;
}

/* Círculo interno da bolinha */
.bolinha::before {
    content: '';
    width: 60%;
    height: 60%;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    z-index: 0;
}

/* Prioriza a ordem para que o número da bolinha apareca */
.bolinha span {
    position: relative;
    z-index: 1;
}

#meuIframe {
    display: block; /* Garante que ele não tenha comportamento inline */
    width: 100%;
    max-width: 500px; /* Ajuste conforme necessário */
    height: auto;
    aspect-ratio: 1.1; /* Mantém a proporção do globo */
    margin: 0 auto
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .containerPag {
        flex-direction: column;
        align-items: center;
    }

    .left-column, .center-column, .right-column {
        text-align: left;
        min-width: 250px;
    }


    #alignment{
        width: fit-content;
    }

    #instruction {
        align-self: flex-start;
        font-size: 1rem;
        margin-bottom: 1rem;
        margin-left: 0;
    }

    #inputContainer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        height: 108px;
        width: fit-content;
    }

    #nameInput {
        width: 100%;
        max-width: 300px;
    }

    button {
        width: 100%;
        font-size: 1.2rem;
    }

    #nameList, #winnerList {
        width: 90%;
    }

    .bolinha {
        width: 40px;
        height: 40px;
    }
}