:root {
    --blue-gov: #00427b;
    --yellow-gov: #f9d423;
    --green-gov: #2d924d;
    --white: #ffffff;
    --bg-dark: #0a1120;
    --card-bg: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body { background: var(--bg-dark); color: var(--white); min-height: 100vh; overflow-x: hidden; }

/* REGRAS DE EXIBIÇÃO */
.hidden { display: none !important; }
.active-screen { display: block; }

/* HEADER */
.header-principal {
    background: var(--blue-gov);
    border-bottom: 5px solid var(--yellow-gov);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.logo-box h1 { font-size: clamp(1rem, 4vw, 2rem); }
.logo-box p { color: var(--yellow-gov); font-weight: bold; font-size: 0.8rem; }

/* DASHBOARD / TELÃO */
.grid-ranking {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.card-escola {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.4s ease;
}

.card-escola.vencedora {
    border: 3px solid var(--yellow-gov);
    background: rgba(249, 212, 35, 0.1);
    transform: scale(1.05);
}

.score {
    font-size: 4rem;
    font-weight: 900;
    margin: 15px 0;
    text-shadow: 0 0 15px var(--blue-gov);
}

/* FORMULÁRIOS */
.card-login, .form-votacao {
    background: white;
    color: #333;
    padding: 40px;
    border-radius: 15px;
    max-width: 600px;
    margin: 100px auto;
}

.grid-criterios { margin-top: 20px; }
.row-crit { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.row-crit input { width: 70px; padding: 8px; text-align: center; font-size: 1.2rem; border: 2px solid var(--blue-gov); border-radius: 5px; }

/* BOTÕES */
.btn-acao { width: 100%; padding: 15px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; background: var(--blue-gov); color: white; font-size: 1rem; }
.btn-save { background: var(--green-gov); margin-top: 20px; }
.btn-link { background: none; border: none; color: #666; width: 100%; margin-top: 15px; cursor: pointer; text-decoration: underline; }

/* MARQUEE */
.footer-marquee { position: fixed; bottom: 0; width: 100%; background: var(--blue-gov); padding: 10px 0; border-top: 3px solid var(--yellow-gov); }
.marquee-wrapper { white-space: nowrap; overflow: hidden; }
.marquee-text { display: inline-block; animation: move 20s linear infinite; font-weight: bold; }

@keyframes move { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ADMIN */
.admin-controls { position: fixed; top: 10px; right: 10px; z-index: 999; display: flex; gap: 5px; }
.btn-admin { padding: 8px 12px; font-size: 0.7rem; border-radius: 5px; border: none; cursor: pointer; }
.btn-reveal { background: var(--yellow-gov); }




/* Container das bolinhas */
.notas-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Estilo da bolinha */
.btn-nota {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #003366;
    background: white;
    color: #003366;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Efeito quando passa o mouse */
.btn-nota:hover {
    background-color: #ffcc00;
    border-color: #ffcc00;
}

/* Classe para quando a bolinha estiver selecionada */
.btn-nota.active {
    background-color: #003366;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}


/* Container de cada critério */
.item-criterio {
    margin-bottom: 25px;
    text-align: left;
}

.item-criterio label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    color: #003366;
    text-transform: uppercase;
}

/* Container das bolinhas (Flexbox para alinhar) */
.notas-container {
    display: flex;
    gap: 5px;
    flex-wrap: wrap; /* Para não quebrar em telas pequenas */
}

.notas-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
}

.btn-nota {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #003366;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-nota.active {
    background: #003366;
    color: white;
    transform: scale(1.1);
}

.hidden { display: none !important; }


/* Garante que o dashboard ocupe a tela toda para a animação aparecer */
#screen-dashboard {
    position: relative;
    min-height: 80vh;
    width: 100%;
    overflow: hidden;
}

/* Estilo do Canvas de fundo */
#canvas-wait {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Não atrapalha cliques em botões */
}

/* Container de espera centralizado */
.waiting-box {
    position: relative;
    z-index: 2; /* Fica na frente do canvas */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.glow-text {
    color: #ffcc00;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.8);
    margin-bottom: 20px;
    font-family: sans-serif;
    font-weight: bold;
}

/* Barra de Progresso */
.progress-container {
    width: 80%;
    max-width: 500px;
    height: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-top: 30px;
    border: 1px solid #ffcc00;
    overflow: hidden;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: #ffcc00;
    box-shadow: 0 0 15px #ffcc00;
    transition: width 0.8s ease-in-out;
}


.monitor-grid {
    display: flex;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
}

.school-dot {
    width: 50px;
    height: 50px;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Quando a escola for votada, esta classe será adicionada pelo JS */
.school-dot.active {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: scale(1.1);
}