/* =========================================================================
ESTILOS GLOBAIS DO MENU
========================================================================= */

/* --- FUNDO MÁGICO DO HEADER COM TRANSPARÊNCIA --- */
.magic-header-bg {
background-color: rgba(15, 23, 42, 0.7) !important; /* 20% Fundo Escuro */
}

/* --- NOVO MENU DESKTOP ESTILO FACEBOOK --- */
.desktop-magic-nav {
display: flex;
align-items: center;
gap: 0.5rem;
height: 100%;
}

.desktop-nav-item {
position: relative;
display: flex;
align-items: center;
justify-content: center;
/* Tamanhos ajustados para mobile como base para evitar quebra de layout */
width: 2.75rem;
height: 2.75rem;
border-radius: 0.75rem;
color: #94a3b8; /* Slate 400 */
font-size: 1.15rem;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
text-decoration: none;
border: 1px solid transparent;
}

.desktop-nav-item i {
transition: color 0.3s ease;
}

/* Restaura e Ajusta para o Desktop com Textos Dinâmicos */
@media (min-width: 768px) {
.desktop-nav-item {
width: auto;
min-width: 3.5rem;
padding: 0 1.25rem; /* Espaçamento horizontal para suportar o texto */
height: 3rem;
font-size: 1.15rem;
}
}

/* Oculta itens específicos no celular */
@media (max-width: 767px) {
.hide-on-mobile {
display: none !important;
}
}

/* Efeito Hover nas Abas Inativas */
.desktop-nav-item:not(.active):hover {
background-color: rgba(30, 41, 59, 0.8); /* Slate 800 com opacidade */
border-color: rgba(34, 211, 238, 0.2);
box-shadow: 0 0 15px rgba(34, 211, 238, 0.2); /* Brilho Azul Claro */
transform: translateY(-2px);
}

/* Ícone Azul Claro no Hover Inativo */
.desktop-nav-item:not(.active):hover i {
color: #22d3ee;
}

/* Texto Branco no Hover Inativo */
.desktop-nav-item:not(.active):hover .nav-text {
color: #ffffff;
text-shadow: 0 0 8px rgba(255, 255, 255, 0.3); /* Leve brilho opcional para maior contraste */
}

/* Item Ativo (Página Atual) */
.desktop-nav-item.active {
background: rgba(30, 41, 59, 0.6);
border-radius: 0.5rem 0.5rem 0 0;
box-shadow: inset 0 -10px 20px -10px rgba(34, 211, 238, 0.2);
border: none;
}

/* Borda Inferior Mágica Animada (Item Ativo) */
.desktop-nav-item.active::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background: linear-gradient(to right, #22d3ee, #4ade80, #facc15, #f472b6, #22d3ee);
background-size: 200% auto;
animation: magic-shine-text 4s linear infinite;
box-shadow: 0 -2px 10px rgba(34, 211, 238, 0.5);
z-index: 10;
}

/* Texto Adicional nos Itens do Menu Central */
.nav-text {
font-size: 0.95rem;
font-weight: 600;
letter-spacing: 0.02em;
transition: color 0.3s ease;
}

/* Ícone Animado Fluido (Item Ativo) */
.desktop-nav-item.active i {
background: linear-gradient(to right, #22d3ee, #4ade80, #facc15, #f472b6, #22d3ee);
background-size: 200% auto;
color: transparent;
-webkit-background-clip: text;
background-clip: text;
animation: magic-shine-text 4s linear infinite, icon-float 3s ease-in-out infinite;
filter: drop-shadow(0 2px 5px rgba(244, 114, 182, 0.5));
}

/* Texto (Item Ativo) - Apenas Branco Vivo */
.desktop-nav-item.active .nav-text {
color: #ffffff !important;
text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
background: none;
-webkit-text-fill-color: initial;
-webkit-background-clip: initial;
background-clip: initial;
animation: none;
}

@keyframes magic-shine-text {
0% { background-position: 0% center; }
100% { background-position: 200% center; }
}

@keyframes icon-float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-3px); }
}

/* Texto da Logo e Nome de Usuário */
.magic-logo-text {
color: #ffffff !important;
-webkit-text-fill-color: #ffffff !important;
background: none !important;
-webkit-background-clip: initial !important;
background-clip: initial !important;
animation: none !important;
font-family: 'Orbitron', 'Exo 2', 'Rajdhani', sans-serif;
font-size: 16px !important; /* Tamanho Mobile da Logo */
}

@media (min-width: 768px) {
.magic-logo-text {
font-size: 20px !important; /* Tamanho Desktop da Logo (reduzido de 22px) */
}
}

/* Animação exclusiva: Cores Fluindo + Flutuação */
@keyframes magic-icon-anim {
0% { background-position: 0% center; transform: translateY(0); }
50% { background-position: 100% center; transform: translateY(-4px); }
100% { background-position: 200% center; transform: translateY(0); }
}

/* Classe do Ícone com Efeito de Cores da Marca */
.magic-icon-gradient {
background: linear-gradient(to right, #22d3ee, #4ade80, #facc15, #f472b6, #22d3ee);
background-size: 200% auto;
color: transparent;
-webkit-background-clip: text;
background-clip: text;
animation: magic-icon-anim 4s ease-in-out infinite;
display: inline-block;
filter: drop-shadow(0 0 2px rgba(255,255,255,0.3));
}

/* Container do Ícone da Logo (Borda Sci-Fi Mágica Animada) */
.sci-magic-icon-box {
position: relative;
border-radius: 0.75rem;
background: rgba(15, 23, 42, 1);
overflow: hidden;
padding: 1px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
transition: all 0.3s ease;
}

.sci-magic-icon-box::before {
content: '';
position: absolute;
top: -50%; left: -50%;
width: 200%; height: 200%;
background: conic-gradient(
#22d3ee,
#4ade80,
#facc15,
#f472b6,
#22d3ee
);
animation: rotate-border-sci 3s linear infinite;
z-index: 0;
}

.sci-magic-icon-inner {
position: relative;
z-index: 1;
background: #0f172a;
width: 100%; height: 100%;
border-radius: 0.65rem;
display: flex;
align-items: center;
justify-content: center;
box-shadow: inset 0 0 10px rgba(34, 211, 238, 0.15);
}

.sci-magic-icon-box:hover {
transform: scale(1.05);
box-shadow: 0 0 25px rgba(244, 114, 182, 0.4);
}

.sci-magic-icon-box:hover::before {
animation-duration: 1.5s;
}

@keyframes rotate-border-sci {
100% { transform: rotate(360deg); }
}

/* =========================================================================
BOTÃO DE AVATAR DO USUÁRIO E BADGE MÁGICO GLOBAL
========================================================================= */

#user-profile-menu-toggle:hover #header-user-name {
text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

#user-profile-menu-toggle:hover #header-avatar-container {
box-shadow: 0 0 15px rgba(244, 114, 182, 0.4);
filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.3));
}

#user-profile-menu-toggle.is-cockpit-open #header-user-name {
text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
transition: all 0.3s ease;
}

#user-profile-menu-toggle.is-cockpit-open #header-avatar-container {
box-shadow: 0 0 15px rgba(255, 255, 255, 0.7) !important;
transition: all 0.3s ease;
}

#user-profile-menu-toggle.is-cockpit-open .global-avatar-badge {
box-shadow: 0 0 12px rgba(255, 255, 255, 0.7) !important;
transition: all 0.3s ease;
}

#header-user-name {
position: relative;
top: 3px;
font-size: 12.5px !important; /* Tamanho Mobile do Nome de Usuário */
}

@media (min-width: 768px) {
#header-user-name {
font-size: 15px !important; /* Tamanho Desktop do Nome de Usuário (reduzido de 17px) */
}
}

/* Badge Notificações */
.global-avatar-badge {
position: absolute;
top: 0px;
right: 54px;
min-width: 20px;
height: 20px;
padding: 0 5px;
background: linear-gradient(135deg, #991b1b, #7f1d1d);
color: #ffffff;
font-size: 10px;
font-weight: 900;
display: flex;
align-items: center;
justify-content: center;
border-radius: 9999px;
border: 1px solid #fca5a5;
box-shadow: 0 0 10px rgba(153, 27, 27, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.3);
z-index: 60;
pointer-events: none;
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.global-avatar-badge.hidden {
display: none !important;
transform: scale(0);
}

.global-avatar-badge.pulse-active {
animation: globalAvatarBadgePulse 2s infinite ease-in-out;
}

@keyframes globalAvatarBadgePulse {
0% { box-shadow: 0 0 10px rgba(153, 27, 27, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.3); transform: scale(1); }
50% { box-shadow: 0 0 20px rgba(153, 27, 27, 1), 0 0 10px rgba(255, 255, 255, 0.6), inset 0 0 8px rgba(255, 255, 255, 0.5); transform: scale(1.15); }
100% { box-shadow: 0 0 10px rgba(153, 27, 27, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.3); transform: scale(1); }
}

/* Tamanho do Avatar */
#header-avatar-container .magic-avatar-wrapper {
width: 40px !important;
height: 40px !important;
min-width: 40px !important;
}

#header-avatar-container .magic-avatar-wrapper .magic-avatar-inner {
width: 100% !important;
height: 100% !important;
}

#header-avatar-container .magic-avatar-fallback {
font-size: 1.4rem !important;
}

#header-avatar-container .magic-avatar-badge {
transform: scale(0.85) !important;
bottom: -2px !important;
right: -2px !important;
}

/* =========================================================================
NOVA IMPLEMENTAÇÃO: PAINEL SCI-FI CENTRAL (CONTADOR MÁGICO)
========================================================================= */

.scifi-panel {
position: relative;
background: rgba(3, 10, 16, 0.7);
border: 1px solid rgba(0, 242, 254, 0.4);
border-radius: 6px;
padding: 6px 20px;
box-shadow:
0 0 10px rgba(0, 242, 254, 0.2),
inset 0 0 15px rgba(0, 242, 254, 0.15);
overflow: hidden;
min-width: 90px;
max-width: 280px;
display: flex;
justify-content: center;
align-items: center;
transform: perspective(500px) rotateX(2deg);
transition: all 0.3s ease;
}

/* "HUD" Corners Sci-Fi */
.scifi-panel::before,
.scifi-panel::after {
content: '';
position: absolute;
width: 12px;
height: 2px;
background: #00f2fe;
box-shadow: 0 0 8px #00f2fe;
}
.scifi-panel::before { top: 0; left: 0; }
.scifi-panel::after { bottom: 0; right: 0; }

/* Efeito Holográfico de Linha Passando (Scanner) */
.scifi-scanline {
position: absolute;
top: -50%;
left: 0;
width: 100%;
height: 10px;
background: linear-gradient(to bottom, transparent, rgba(0, 242, 254, 0.4), transparent);
opacity: 0.6;
animation: scanline 3.5s linear infinite;
pointer-events: none;
z-index: 1;
}

@keyframes scanline {
0% { top: -20%; }
50% { top: 120%; }
100% { top: 120%; }
}

/* Glow Interno */
.scifi-glow-bg {
position: absolute;
top: 50%;
left: 50%;
width: 120%;
height: 100%;
background: radial-gradient(circle, rgba(0, 242, 254, 0.1) 0%, transparent 70%);
transform: translate(-50%, -50%);
pointer-events: none;
z-index: 0;
}

/* Efeito de Atualização Numérica (Ativado pelo Javascript) */
#scifi-points-display {
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}