:root {
    --primary-color: #FDB813;
    --accent-color: #004AAD;
    --secondary-color: #2a2a38;
    --dark-color: #1c1c24;
    --light-color: #F8F9FA;
    --font-family: 'Poppins', sans-serif;
    --cyan-tech: #22d3ee;
    --green-tech: #00ff87;
    --danger-color: #ef4444;
}

body {
    font-family: var(--font-family); margin: 0; background-color: var(--dark-color);
    color: var(--light-color); line-height: 1.6; overflow-x: hidden;
}

#cursor-glow {
    position: fixed; top: 0; left: 0; width: 800px; height: 800px;
    background: radial-gradient(circle at center, rgba(253, 184, 19, 0.08), transparent 50%);
    border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); z-index: -1;
    transition: width 0.3s, height 0.3s;
}

/* --- CABEÇALHO --- */
.page-header {
    display: flex; justify-content: center;
    padding: 2.5rem 1rem 1rem 1rem; position: relative; z-index: 1;
}
.logo-title-group {
    display: flex; align-items: center; justify-content: center; gap: 1.5rem;
}
.main-logo { height: 70px; }
.header-divider { width: 2px; height: 50px; background-color: #444; }
.title-text h2, .title-text p {
    font-size: 1.8rem; color: var(--light-color); margin: 0; font-weight: 600;
    text-transform: uppercase; line-height: 1.2;
}
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.status-indicator {
    display: flex; align-items: center; font-family: monospace; color: var(--light-color);
    font-size: 0.8rem; font-weight: bold; background-color: rgba(0,0,0,0.3);
    padding: 0.25rem 0.75rem; border-radius: 20px; border: 1px solid #444;
}
.ping-container { display: flex; position: relative; width: 0.6rem; height: 0.6rem; margin-right: 0.6rem; }
.animate-ping { position: absolute; display: inline-flex; height: 100%; width: 100%; border-radius: 50%; opacity: 0.75; animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
.ping-dot { position: relative; display: inline-flex; border-radius: 50%; height: 100%; width: 100%; }
.status-indicator .online { color: #22c55e; margin-left: 0.4rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; position: relative; z-index: 1; }

/* Seção Pódio */
.podium-section { text-align: center; }
.podium-header {
    display: flex; justify-content: center; align-items: center;
    gap: 1.5rem; flex-wrap: wrap; margin-bottom: 3.5rem;
}
.podium-header h2 { font-size: 2.2rem; color: var(--light-color); margin: 0; }
.podium-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    align-items: flex-start;
    gap: 1.5rem;
    padding-top: 30px;
}
@keyframes scanline-anim-card { from { top: 0%; } to { top: 100%; } }
.podium-card {
    background-color: var(--secondary-color); padding: 2rem; border-radius: 12px;
    border: 1px solid #444; display: flex; flex-direction: column;
    box-sizing: border-box; transition: transform 0.2s ease-out, box-shadow 0.3s ease;
    position: relative; overflow: hidden; min-height: 480px;
}
.podium-card .scanline {
    content: ''; position: absolute; top: -10%; left: 0; width: 100%; height: 2px;
    background: linear-gradient(to right, transparent, rgba(253, 184, 19, 0.5), transparent);
    box-shadow: 0 0 8px rgba(253, 184, 19, 0.7);
    animation: scanline-anim-card 3s linear infinite alternate; z-index: 2; pointer-events: none;
}
.podium-card.rank-1 {
    transform: scale(1.08);
    z-index: 10; border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(253, 184, 19, 0.4);
}
.podium-card.rank-2, .podium-card.rank-3 {
    transform: translateY(30px);
}
.podium-card::before, .goal-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 12px; border: 2px solid transparent; background: conic-gradient(from 180deg at 50% 50%, var(--primary-color), var(--accent-color), var(--primary-color)) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; opacity: 0; transition: opacity 0.3s ease-in-out; }
.podium-card:hover::before, .goal-card:hover::before { opacity: 1; }
.card-header { text-align: center; margin-bottom: 1.5rem; }
.rank-medal { font-size: 3.5rem; line-height: 1; margin-bottom: 0.5rem; }
.card-header .name { font-size: 1.5rem; font-weight: 700; color: var(--light-color); }
.card-divider { border: 0; height: 1px; background-color: #444; margin: 0.5rem 0 1.5rem 0; }
.card-status { color: var(--primary-color); font-weight: bold; text-align: center; margin-bottom: 1.5rem; font-size: 0.9rem; }
.card-metrics { margin-bottom: 1rem; flex-grow: 1; }
.metric-bar-container { margin-bottom: 1.5rem; }
.metric-label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; }
.metric-label span { color: #ccc; }
.metric-label strong { color: var(--light-color); font-weight: 600; }
.bar-background { height: 12px; background-color: #444; border-radius: 6px; overflow: hidden; }
.bar-foreground {
    height: 100%; width: 0;
    background-image: linear-gradient(90deg, var(--cyan-tech), var(--green-tech));
    border-radius: 6px; transition: width 1.8s ease-out;
}

/* Seção de Metas */
.goals-section { text-align: center; padding: 2rem 0; margin-top: 4rem; }
.goals-section h2 { font-size: 2.2rem; margin-bottom: 2rem; color: var(--light-color); }
.goal-card {
    background-color: var(--secondary-color); padding: 2rem; border-radius: 12px;
    border: 1px solid #444; text-align: center; transition: transform 0.2s ease-out, box-shadow 0.3s ease;
    position: relative;
}
.goal-icon { width: 36px; height: 36px; fill: var(--accent-color); }
.goal-card h3 { font-size: 1.2rem; color: var(--primary-color); font-weight: 600; margin: 0; margin-bottom: 1.5rem; }
.goal-progress-container { background-color: #444; border-radius: 10px; height: 15px; overflow: hidden; margin-bottom: 1rem; }
.goal-progress-bar { 
    height: 100%; width: 0; 
    background-image: linear-gradient(90deg, var(--cyan-tech), var(--green-tech));
    border-radius: 10px; transition: width 1.8s ease-out;
}
.goal-details { font-size: 1rem; font-weight: 500; color: #ccc; margin-bottom: 0.25rem; }
.goal-percentage { font-size: 1.3rem; font-weight: bold; color: var(--light-color); margin-top: 0.5rem; }

/* Ranking Geral */
.general-ranking-section { text-align: center; }
.general-ranking-section h2 { font-size: 2rem; margin-top: 4rem; margin-bottom: 2rem; }
.table-container { background-color: var(--secondary-color); padding: 1rem; border-radius: 8px; overflow-x: auto; }
#ranking-table { width: 100%; border-collapse: collapse; }
#ranking-table th, #ranking-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #444; transition: background-color 0.3s; }
#ranking-table th { color: var(--primary-color); }
.rank-position { font-weight: bold; text-align: center; }
tr.last-place {
    background-image: linear-gradient(to right, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    color: #fca5a5;
}
tr.last-place td:first-child::before {
    content: '⚠️ ';
    color: var(--danger-color);
}

/* Rodapé */
footer { text-align: center; padding: 3rem 1rem; margin-top: 3rem; background-color: var(--secondary-color); border-top: 1px solid #444; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.footer-credits p {
    margin: 0;
    color: var(--light-color);
    font-size: 1rem;
    font-weight: 600;
}
.connection-status { display: flex; align-items: center; font-family: monospace; font-size: 0.75rem; color: var(--primary-color); }
.connection-status .ping-container { width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; }
.connection-status .animate-ping { background-color: var(--primary-color); }
.connection-status .ping-dot { background-color: var(--primary-color); }
.footer-copyright { font-size: 0.8rem; color: #888; }

@media (max-width: 992px) {
    .podium-grid {
        grid-template-columns: 1fr;
        align-items: center;
        padding-top: 0;
    }
    .podium-card { min-height: auto; }
    .podium-card.rank-1 { order: 1; transform: scale(1.05); }
    .podium-card.rank-2 { order: 2; transform: translateY(0); }
    .podium-card.rank-3 { order: 3; transform: translateY(0); }
    
    .logo-title-group { flex-direction: column; gap: 0.5rem; }
    .title-text h2, .title-text p { font-size: 1.5rem; text-align: center; }
    .goals-grid.three-columns { grid-template-columns: 1fr; }
    #cursor-glow { display: none; }
}