* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f1e2e;
    --bg-secondary: #1a2942;
    --card-bg: #1e3247;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-white: #f0f6fc;
    --accent-purple: #bf46f3;
    --accent-blue: #4c66f4;
    --accent-cyan: #38bdf8;
    --accent-yellow: #FFD700;
    --gradient: linear-gradient(135deg, #bf46f3, #4c66f4);
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-white);
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Fixo */
header {
    position: fixed;
    top: 0;
    width: 100%;
    /* ATUALIZAÇÃO: Remove backdrop-filter e ajusta opacidade */
    background: rgba(15, 30, 46, 0.9); 
    z-index: 1000;
    padding: 1.2rem 3rem;
    border-bottom: 1px solid rgba(0, 246, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    mix-blend-mode: lighten;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo .neuro { color: var(--accent-cyan); }
.logo .race { color: var(--accent-yellow); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.btn-vote-header {
    background: linear-gradient(135deg, var(--accent-cyan), #FF1493);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
    display: none;
}

.btn-vote-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 20, 147, 0.6);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
}

.nav-links a:hover { color: var(--accent-cyan); }


/* --- ATUALIZAÇÃO TÍTULO E ESPAÇAMENTO --- */
/* Esta regra aplica-se ao H1 dentro da <section id="projeto"> */
#projeto .page-title {
    padding-top: 120px;
    text-align: center;
    margin-bottom: 0.5rem; /* Margem pequena entre H1 e P */

    /* Gradiente (Ciano -> Rosa/Pink) */
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    background: linear-gradient(90deg, #00F6FF, #FF1493);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Esta regra aplica-se ao <div class="page-title"> dentro do .container */
.container .page-title {
    padding-top: 0; /* Remove o padding-top duplicado */
    text-align: center;
    margin-bottom: 3rem; /* Espaço ajustado antes dos filtros */
}

.container .page-title p {
    font-size: 1.1rem;
    color: var(--text-primary);
}
/* --- FIM DA ATUALIZAÇÃO --- */


header p {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
    align-items: end;
}

.podium-place {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s;
}

.podium-place:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.podium-place.first {
    order: 2;
    border-color: var(--gold);
    grid-row: 1;
}

.podium-place.second {
    order: 1;
    border-color: var(--silver); /* ATUALIZAÇÃO: Borda Prata */
}

.podium-place.third {
    order: 3;
    border-color: var(--bronze); /* ATUALIZAÇÃO: Borda Bronze */
}

.podium-medal {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.podium-position {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.podium-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.podium-email {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    word-break: break-all;
}

.podium-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.ranking-table {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.ranking-header {
    background: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    display: grid;
    grid-template-columns: 80px 1fr 1.5fr 150px;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-white);
}

.ranking-row {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 80px 1fr 1.5fr 150px;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s;
}

.ranking-row:hover {
    background: var(--bg-secondary);
}

.ranking-row:last-child {
    border-bottom: none;
}

.rank-position {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.rank-name {
    font-weight: 600;
    color: var(--text-white);
}

.rank-email {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.rank-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-align: right;
}

.loading {
    text-align: center;
    padding: 4rem;
    font-size: 1.2rem;
}

.error {
    background: #ff4444;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza os botões */
}

.filter-btn {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
}

/* Menu Hamburger Mobile */
.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001;
    line-height: 0;
}

.menu-toggle img {
    filter: drop-shadow(0 0 5px var(--accent-cyan)); 
    transition: filter 0.3s;
    width: 30px;
    height: 30px;
}

.menu-toggle:hover img {
    filter: drop-shadow(0 0 10px var(--accent-cyan));
}

.menu-toggle span {
   display: none; 
}

/* Botão de Fechar Mobile */
.menu-close-btn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 3rem;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1;
    z-index: 1002;
}

/* ATUALIZAÇÃO: Adiciona estilo para o link ativo */
.nav-links a.active {
    color: var(--accent-cyan);
    font-weight: 700;
}


@media (max-width: 768px) {
    .podium {
        grid-template-columns: 1fr;
    }

    .podium-place.first,
    .podium-place.second,
    .podium-place.third {
        order: initial;
    }

    .ranking-header,
    .ranking-row {
        grid-template-columns: 60px 1fr 120px;
    }

    .rank-email {
        display: none;
    }

    header { padding: 1rem 2rem; }
    .menu-toggle { display: flex; }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        /* ATUALIZAÇÃO: Ajusta opacidade no mobile */
        background: rgba(15, 30, 46, 0.95); 
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-right.active { right: 0; }
    
    .menu-close-btn {
        display: block; 
    }
    
    .btn-vote-header {
        display: inline-flex;
        width: 90%;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .nav-links { flex-direction: column; }
}

footer {
    background: var(--bg-primary);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 246, 255, 0.1);
}