/* --- FUNDAMENTOS E RESET --- */
body { 
    background: #020617; 
    color: #f1f5f9; 
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden; 
    margin: 0;
}

/* --- COMPONENTES GLASSMORPHISM --- */
.glass { 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05); 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- NAVEGAÇÃO --- */
.tab-btn { 
    padding: 1rem; 
    font-weight: bold; 
    border-bottom: 2px solid transparent; 
    transition: 0.3s; 
    color: #64748b; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    cursor: pointer;
}
.tab-active { 
    border-bottom: 2px solid #3b82f6; 
    color: #3b82f6; 
    background: rgba(59, 130, 246, 0.05); 
}

/* --- CARDS E MÉTRICAS --- */
.metric-card { 
    background: linear-gradient(145deg, #0f172a, #020617); 
    border-radius: 1.25rem; 
    padding: 1.5rem; 
    border: 1px solid #1e293b; 
    transition: 0.3s; 
    position: relative; 
}

.panel-impacto {
    animation: slideIn 0.5s ease-out;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(15, 23, 42, 0.8));
}

/* --- VOLANTE E DEZENAS --- */
.ball { 
    width: 32px; 
    height: 32px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    font-size: 13px; 
    font-weight: 800; 
    background: #0f172a; 
    color: #38bdf8; 
    border: 1px solid #334155; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ball-selected { 
    background: #3b82f6 !important; 
    color: white !important; 
    border-color: #60a5fa !important; 
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); 
    transform: scale(1.05);
}

.ball-prime { position: relative; }
.ball-prime::after { 
    content: ''; 
    position: absolute; 
    top: -2px; 
    right: -2px; 
    width: 6px; 
    height: 6px; 
    background: #a855f7; 
    border-radius: 50%; 
}

/* --- SELETOR COMPACTO (5 COLUNAS PADRÃO) --- */
#selector-18 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 220px;
    margin: 0 auto;
}

#selector-18 button {
    aspect-ratio: 1/1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

#selector-18 button:hover:not(.ball-selected) {
    border-color: #475569;
    background: #0f172a;
}

/* --- RADAR GEOMÉTRICO E ANIMAÇÕES --- */
#radar-poly {
    transition: all 0.5s ease;
    overflow: visible;
}

@keyframes pulse-critical {
    0% {
        fill: rgba(168, 85, 247, 0.3);
        stroke-width: 1.5;
        filter: drop-shadow(0 0 0px rgba(239, 68, 68, 0));
    }
    50% {
        fill: rgba(239, 68, 68, 0.5); 
        stroke-width: 3;
        filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.9));
    }
    100% {
        fill: rgba(168, 85, 247, 0.3);
        stroke-width: 1.5;
        filter: drop-shadow(0 0 0px rgba(239, 68, 68, 0));
    }
}

.radar-critical {
    animation: pulse-critical 1.5s infinite ease-in-out;
    stroke: #ef4444 !important;
    stroke-dasharray: 4;
}

/* --- TOOLTIPS (SISTEMA DE INFO) --- */
.info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    margin-left: 8px;
    position: relative;
}

.info-content {
    visibility: hidden;
    width: 260px;
    background: #1e293b;
    color: #f1f5f9;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #334155;
    position: absolute;
    z-index: 999;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: 0.3s;
    font-size: 11px;
    line-height: 1.5;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.info-trigger:hover .info-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* --- ESTATÍSTICAS E BADGES --- */
.badge-stats {
    background: rgba(30, 41, 59, 0.8);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    transition: 0.2s;
}

.badge-stats:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 197, 94, 0.4);
}

.label-stats { font-size: 9px; font-weight: 900; color: #64748b; margin-bottom: 4px; }
.value-stats { font-size: 1.25rem; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.value-gold { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
.value-green { color: #22c55e; text-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }

/* --- ESCALA DE CALOR (HEATMAP) --- */
.heat-node {
    flex: 1; min-width: 40px; height: 50px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);
}
.heat-low { background: rgba(71, 85, 105, 0.2); color: #64748b; }
.heat-mid { background: rgba(34, 197, 94, 0.2); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.heat-high {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white; font-weight: 900;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

/* --- AUXILIARES E ANIMAÇÕES --- */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.text-glow { text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }

@media (max-width: 640px) { 
    .ball { width: 26px; height: 26px; font-size: 11px; }
    #selector-18 { gap: 4px; }
}

/* Marcador de indicação Cont3 */
.indicador-cont3 {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #06b6d4; /* Cyan-500 */
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.8);
}

/* Tooltip simples */
.has-tooltip { position: relative; cursor: help; }
.has-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 9px;
    white-space: nowrap;
    z-index: 50;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Estilo da bolinha indicadora */
.marcador-cont3 {
    position: absolute;
    top: -4px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid #0f172a; /* Cor do fundo para dar contraste */
    z-index: 10;
}

/* Container da dezena para permitir o posicionamento da bolinha */
.dezena-container {
    position: relative;
    display: inline-block;
}