* {
    box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; padding: 0; -webkit-tap-highlight-color: transparent !important; outline: none !important;
}
button:focus, div:focus { outline: none !important; }

html, body { width: 100%; height: 100%; overflow: hidden; background-color: #0b1a26; }

/* --- VÉUS E MANDALA DO MAPA --- */
.veil { position: absolute; border-radius: 50%; filter: blur(140px); z-index: 0; opacity: 0.35; }
.veil-1 { width: 60vw; height: 60vh; background: #00579b; top: -10%; left: -10%; animation: float1 14s infinite alternate; }
.veil-2 { width: 75vw; height: 75vh; background: #00d2ff; bottom: -15%; right: -10%; animation: float2 18s infinite alternate; }
.veil-3 { width: 55vw; height: 55vh; background: #e3bc8e; top: 30%; left: 20%; animation: float3 22s infinite alternate; }

@keyframes float1 { 0% { transform: translate(0, 0); } 100% { transform: translate(10vw, 10vh); } }
@keyframes float2 { 0% { transform: translate(0, 0); } 100% { transform: translate(-10vw, -10vh); } }
@keyframes float3 { 0% { transform: translate(0, 0); } 100% { transform: translate(15vw, -5vh); } }

/* Mandala Estática do Fundo do Mapa */
.dec-mandala-mapa {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80vh; height: auto; opacity: 0.04; z-index: 0; pointer-events: none;
}

/* --- MAPA --- */
#mapa-painel { width: 100vw; height: 100vh; position: absolute; top: 0; left: 0; z-index: 1; background-color: transparent; }

/* --- LOGO FIXA TOPO ESQUERDO --- */
.logo-ce-fixa { 
    position: absolute; 
    top: 55px; 
    left: 55px; 
    z-index: 1050; 
    pointer-events: none; 
    width: 180px; 
}
.logo-ce-fixa img { width: 100%; height: auto; filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.5)); }

/* ========================================================= */
/* --- CONTAINER MORPHING (Botão -> Menu -> CELEBRAÇÃO GIGANTE) --- */
/* ========================================================= */
.menu-container {
    position: absolute; bottom: 40px; left: 40px;
    background: rgba(11, 26, 38, 0.85); backdrop-filter: blur(35px); -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 20px; z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); overflow: hidden; display: flex; flex-direction: column;
    
    /* Estado 2: Menu de Lista */
    width: 380px; height: 600px;
    /* AQUI: O menu agora para de crescer 180px antes do topo (não encosta na logo!) */
    max-height: calc(100vh - 180px); 
    
    transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), max-height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Estado 1: Fechado (Gatilho) */
.menu-container.fechado {
    width: 140px; height: 75px; cursor: pointer;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s, width 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}
.menu-container.fechado:hover { background: rgba(11, 26, 38, 0.95); border: 1px solid rgba(0, 210, 255, 0.4); box-shadow: 0 0 20px rgba(0, 210, 255, 0.2); }

/* Estado 3: CELEBRAÇÃO TELA CHEIA! */
.menu-container.modo-celebracao {
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px); 
}

/* --- Content Wrapper --- */
.menu-content-wrapper { position: relative; flex: 1; overflow: hidden; width: 100%; height: 100%; }

.pane {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; padding: 25px 25px 0 25px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pane-inativa { opacity: 0; pointer-events: none; transform: translateX(30px); }
.pane-ativa { opacity: 1; pointer-events: auto; transform: translateX(0); }
.menu-container.fechado .pane { opacity: 0 !important; transition: opacity 0.1s !important; }

/* Botões de Ícone */
.btn-icone {
    align-self: flex-end; background: transparent; border: none; color: rgba(255,255,255,0.4); cursor: pointer; transition: 0.2s; margin-bottom: 15px; display: flex; align-items: center; gap: 5px; font-weight: 600; text-transform: uppercase; font-size: 14px; z-index: 10;
}
.btn-icone:hover { color: #00d2ff; transform: scale(1.05); }
.btn-icone svg { width: 28px; height: 28px; }

/* --- CONTEÚDO: RANKING --- */
.sort-toggle { display: flex; background: rgba(0, 0, 0, 0.3); padding: 4px; border-radius: 10px; margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, 0.05); flex-shrink: 0; }
.sort-btn { flex: 1; background: transparent; border: none; color: #cbd5e1; font-size: 11px; font-weight: 700; padding: 8px 0; border-radius: 8px; cursor: pointer; transition: 0.2s; text-transform: uppercase; }
.sort-btn.active { background: #00d2ff; color: #0b1a26; box-shadow: 0 0 10px rgba(0, 210, 255, 0.3); }
.lista-cidades { list-style: none; overflow-y: auto; flex: 1; padding-right: 15px; user-select: none; margin-bottom: 15px; }
.lista-cidades::-webkit-scrollbar { width: 8px; }
.lista-cidades::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.lista-cidades::-webkit-scrollbar-thumb { background: rgba(0, 210, 255, 0.5); border-radius: 10px; }
.lista-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); cursor: pointer; transition: 0.2s; border-radius: 8px; }
.lista-item:hover { background: rgba(255,255,255,0.05); padding-left: 15px; border-bottom: 1px dashed rgba(0, 210, 255, 0.5); }
.lista-item .nome { color: #f1f5f9; font-size: 14px; font-weight: 600; text-transform: uppercase; max-width: 200px; }
.lista-item .numero { color: #0b1a26; background: #e3bc8e; font-size: 16px; font-weight: 800; padding: 4px 14px; border-radius: 12px; box-shadow: 0 0 10px rgba(227, 188, 142, 0.4); }

/* --- CONTEÚDO: CELEBRAÇÃO TELA CHEIA --- */
#pane-celebracao { position: relative; } /* Para conter as decorações absolutas */

/* Decorações da Celebração */
.dec-mandala-cel { position: absolute; right: -250px; top: -250px; width: 1200px; opacity: 0.15; animation: gira-mandala 60s linear infinite; pointer-events: none; z-index: 0; }
@keyframes gira-mandala { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.dec-moldura { position: absolute; width: 180px; opacity: 0.2; pointer-events: none; z-index: 0; }
.dec-top-left { top: -20px; left: -20px; }
.dec-bottom-right { bottom: 0px; right: -20px; transform: rotate(180deg); }

.cel-conteudo-central {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 2; padding-bottom: 30px;
}
.celebracao-header { text-align: center; margin-bottom: 60px; }
.celebracao-header h1 { font-size: 80px; color: #ffffff; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin-bottom: -5px; text-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.cel-subtitulo { font-size: 40px; color: #cbd5e1; font-weight: 300; font-style: italic; margin-bottom: 40px; }
.cel-badge-rank { display: inline-block; background: #00d2ff; color: #0b1a26; font-size: 32px; font-weight: 900; padding: 12px 40px; border-radius: 50px; box-shadow: 0 0 30px rgba(0, 210, 255, 0.6); }

.cel-grid-nomes { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; max-width: 1200px; overflow-y: auto; }
.nome-card {
    background: rgba(227, 188, 142, 0.15); border: 1px solid rgba(227, 188, 142, 0.4); color: #e3bc8e;
    font-size: 20px; font-weight: 600; padding: 12px 25px; border-radius: 12px;
    display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px);
}
.nome-card svg { width: 22px; height: 22px; opacity: 0.8; }

/* --- Rodapé Interno (Logos Fixas) --- */
.menu-rodape-gatilho {
    display: flex; align-items: center; justify-content: flex-start; gap: 45px; 
    padding: 0 25px; height: 75px; min-height: 75px; border-top: 1px solid transparent; transition: 0.3s; user-select: none;
}
.menu-container:not(.fechado) .menu-rodape-gatilho { border-top: 1px solid rgba(255, 255, 255, 0.1); cursor: default; }
.logo-sebrae-gatilho { height: 30px; width: auto; flex-shrink: 0; opacity: 0.9; }
.selo-dez-anos-gatilho { height: 50px; width: auto; opacity: 1; transition: opacity 0.3s ease 0.3s; }
.menu-container.fechado .selo-dez-anos-gatilho { opacity: 0; transition: opacity 0.1s ease 0s; }

/* 🟢 REDE VIVA: BOLINHAS E FEIXES 🟢 */
.node-wrapper { display: flex; align-items: center; justify-content: center; }
.node-hub { width: 8px; height: 8px; background-color: #e3bc8e; border-radius: 50%; animation: breathe-hub 1.5s infinite alternate ease-in-out; }
.node-satellite { width: 5px; height: 5px; background-color: #00d2ff; border-radius: 50%; animation: breathe-sat 1s infinite alternate ease-in-out; }

@keyframes breathe-hub { 0% { transform: scale(0.8); box-shadow: 0 0 5px #e3bc8e; opacity: 0.8; } 100% { transform: scale(1.6); box-shadow: 0 0 15px #e3bc8e; opacity: 1; } }
@keyframes breathe-sat { 0% { transform: scale(0.8); box-shadow: 0 0 4px #00d2ff; opacity: 0.7; } 100% { transform: scale(1.5); box-shadow: 0 0 12px #00d2ff; opacity: 1; } }

.beam-fast { stroke-dasharray: 6 250; animation: flow-beam 3s linear infinite; }
.beam-slow { stroke-dasharray: 6 250; animation: flow-beam 5s linear infinite; }
.beam-fast-rev { stroke-dasharray: 6 250; animation: flow-beam-rev 4s linear infinite; }
.beam-slow-rev { stroke-dasharray: 6 250; animation: flow-beam-rev 6s linear infinite; }
@keyframes flow-beam { from { stroke-dashoffset: 256; } to { stroke-dashoffset: 0; } }
@keyframes flow-beam-rev { from { stroke-dashoffset: -256; } to { stroke-dashoffset: 0; } }