/* Reseta margens e paddings globais para evitar variações entre navegadores */
* {
    margin: 0; /* Remove espaçamento externo padrão */
    padding: 0; /* Remove espaçamento interno padrão */
    box-sizing: border-box; /* Inclui border e padding no tamanho total do elemento */
}

body {
    background-color: #141414; /* Fundo escuro da página */
    color: #fff; /* Texto branco para contraste */
    font-family: Arial, sans-serif; /* Fonte legível padrão */
}

main {
    display: flex; /* Layout flexível para facilitar o posicionamento */
    flex-direction: column; /* Elementos empilhados verticalmente */
    align-items: center; /* Centraliza horizontalmente */
    justify-content: center; /* Centraliza verticalmente */
    min-height: 100vh; /* Altura mínima igual à altura da janela */
    padding: 20px; /* Espaçamento interno ao redor do conteúdo */
}

h1 {
    font-size: 2.5rem; /* Tamanho maior para o título */
    margin-bottom: 50px; /* Espaço abaixo do título */
    text-align: center; /* Centraliza o texto */
}

.profiles {
    display: flex; /* Cada perfil fica em linha */
    gap: 30px; /* Espaçamento entre perfis */
    flex-wrap: wrap; /* Quebra linha em telas estreitas */
    justify-content: center; /* Centraliza os perfis */
    list-style: none; /* Remove marcadores de lista */
}

.profile {
    display: flex; /* Contêiner flex para alinhar itens */
    flex-direction: column; /* Itens em coluna (imagem + texto) */
    align-items: center; /* Centraliza texto abaixo da imagem */
    cursor: pointer; /* Muda cursor para indicar que é clicável */
    transition: transform 0.3s ease; /* Transição suave no hover do contêiner */
}

.profiles li {
    list-style: none; /* Garante que não há marcadores */
}

.profile:hover {
    transform: scale(1.05); /* Leve aumento ao passar o mouse */
}

.profile img {
    width: 200px; /* Largura fixa da imagem */
    height: 200px; /* Altura fixa da imagem */
    border-radius: 10px; /* Cantos arredondados */
    border: 3px solid rgb(255, 255, 255); /* Borda de cor definida */
    margin-bottom: 15px; /* Espaço abaixo da imagem */
    object-fit: cover; /* Corta a imagem para preencher mantendo proporção */
    transition: box-shadow 0.3s ease; /* Transição suave do efeito de sombra */
}

.profile img:hover {
    box-shadow: 0 0 20px rgb(255, 255, 255); /* Sombra roxa ao redor da imagem no hover */

}

.profile p {
    font-size: 1.2rem; /* Tamanho de texto dos nomes */
    text-align: center; /* Centraliza o texto */
}

/* ========== RESPONSIVIDADE PARA DIFERENTES DEVICES ========== */

/* Mobile - Telas pequenas (até 576px) */
@media (max-width: 575.98px) {
    h1 {
        font-size: 1.8rem; /* Reduz tamanho do título */
        margin-bottom: 30px; /* Reduz espaço abaixo */
    }

    .profiles {
        gap: 20px; /* Reduz espaço entre perfis */
    }

    .profile img {
        width: 150px; /* Reduz tamanho das imagens */
        height: 150px;
        margin-bottom: 10px;
    }

    .profile p {
        font-size: 1rem; /* Reduz tamanho da fonte */
    }

    main {
        padding: 15px; /* Reduz padding */
    }
}

/* Tablet - Telas médias (576px a 768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    h1 {
        font-size: 2rem; /* Tamanho médio do título */
        margin-bottom: 40px;
    }

    .profiles {
        gap: 25px; /* Espaço médio entre perfis */
        max-width: 600px; /* Limita a largura máxima */
    }

    .profile img {
        width: 170px; /* Tamanho médio das imagens */
        height: 170px;
        margin-bottom: 12px;
    }

    .profile p {
        font-size: 1.1rem; /* Tamanho médio da fonte */
    }
}

/* Desktop - Telas grandes (acima de 768px) */
@media (min-width: 768px) {
    /* Mantém os estilos padrão já definidos acima */
    h1 {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }

    .profile img {
        width: 200px;
        height: 200px;
    }

    .profile p {
        font-size: 1.2rem;
    }
}

/* Extra large - Telas muito grandes (acima de 1200px) */
@media (min-width: 1200px) {
    h1 {
        font-size: 3rem; /* Aumenta ainda mais em telas grandes */
    }

    .profiles {
        gap: 40px; /* Aumenta espaçamento em telas grandes */
    }

    .profile img {
        width: 220px; /* Imagens maiores em telas grandes */
        height: 220px;
        margin-bottom: 20px;
    }

    .profile p {
        font-size: 1.3rem;
    }
}

/* Tema Light e Dark */
body.light-theme {
    background-color: #f2f2f2;
    color: #111;
}

body.light-theme .profile img {
    border-color: rgb(0, 0, 0);
}

body.light-theme .profile img:hover {
    box-shadow: 0 0 20px rgb(0, 0, 0);
}

body.light-theme header button {
    background-color: #ffffff;
    color: #111;
    border: 1px solid #ccc;
}

body.dark-theme {
    background-color: #141414;
    color: #fff;
}

body.dark-theme .profile img {
    border-color: #fff;
}

body.dark-theme header button {
    background-color: #333;
    color: #fff;
    border: 1px solid #666;
}

header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 15px;
}

#themeToggle {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 575.98px) {
    #themeToggle {
        top: 6px;
        right: 6px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #themeToggle {
        top: 8px;
        right: 8px;
        padding: 7px 13px;
        font-size: 0.93rem;
    }
}

@media (min-width: 768px) {
    #themeToggle {
        top: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 1rem;
    }
}

#themeToggle:hover {
    transform: scale(1.05);
    opacity: 0.9;
}
