/* assets/css/menu.css */
/* Estilos centralizados para todos os elementos de navegação: sidebar e header. */

/* --- GERAL DO MENU LATERAL (SIDEBAR) --- */
#sidebar { 
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out; 
}
#sidebar.collapsed .link-text,
#sidebar.collapsed .sidebar-logo-text,
#sidebar.collapsed .clock-details { 
    opacity: 0; 
    pointer-events: none; 
    display: none; 
}
#sidebar.collapsed #clock-hours-only { 
    display: flex; 
}
#sidebar.collapsed .sidebar-link { 
    justify-content: center; 
}

/* --- LINKS DO MENU LATERAL --- */
.sidebar-link { 
    display: flex; 
    align-items: center; 
    padding: 0.75rem 1rem; 
    margin: 0.25rem 0.5rem; 
    border-radius: 0.5rem; 
    font-weight: 600; 
    color: var(--text-dark); 
    transition: all 0.2s ease; 
    position: relative; 
}
.sidebar-link:hover { 
    background-color: rgba(255, 255, 255, 0.05); 
    color: var(--text-light); 
}
.sidebar-link.active { 
    background-color: var(--primary-accent); 
    color: #111827; 
    box-shadow: 0 4px 14px 0 rgba(0, 255, 140, 0.25); 
}
.sidebar-link .link-icon { 
    width: 2rem; 
    font-size: 1.125rem; 
    text-align: center; 
    flex-shrink: 0; 
    transition: transform 0.2s ease; 
}
.sidebar-link:hover .link-icon { 
    transform: scale(1.1); 
}
.sidebar-link .link-text { 
    margin-left: 0.75rem; 
    transition: opacity 0.2s ease, transform 0.2s ease; 
}

/* --- RELÓGIO NA SIDEBAR --- */
.clock-glow { 
    text-shadow: 0 0 5px rgba(0, 255, 140, 0.4), 0 0 10px rgba(0, 255, 140, 0.3); 
}

/* --- MODAL DE PESQUISA --- */
#search-modal { 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s ease-in-out; 
}
#search-modal.active { 
    opacity: 1; 
    pointer-events: auto; 
}
#search-container-modal { 
    transform: translateY(-5rem); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}
#search-modal.active #search-container-modal { 
    transform: translateY(0); 
}
#search-results-dropdown .results-list { 
    max-height: 360px; 
    overflow-y: auto; 
}
#search-results-dropdown .results-list::-webkit-scrollbar { 
    width: 8px; 
}
#search-results-dropdown .results-list::-webkit-scrollbar-track { 
    background: #1e293b; 
}
#search-results-dropdown .results-list::-webkit-scrollbar-thumb { 
    background-color: #334155; 
    border-radius: 4px; 
}
#search-results-dropdown .results-list::-webkit-scrollbar-thumb:hover { 
    background-color: #475569; 
}

/* --- ÍCONE DE NOTIFICAÇÃO MÁGICO --- */
#notification-bell {
    position: relative;
    overflow: hidden;
}
#notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px; /* Maior e mais visível */
    height: 18px;
    background: radial-gradient(circle at 30% 30%, #ff5e5e, #dc2626);
    border: 2px solid #0f172a;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}
#notification-dot.visible { 
    opacity: 1; 
    transform: scale(1); 
    animation: notification-pulse 2s infinite;
}
@keyframes notification-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- BOTÃO DE LOGIN --- */
.btn-login-glow { 
    background-image: linear-gradient(to right, #00ff8c, #00c6ff, #00ff8c); 
    background-size: 200% auto; 
    color: #111827; 
    font-weight: 700; 
    padding: 0.5rem 1rem; 
    border-radius: 9999px; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    font-size: 0.875rem; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 4px 15px rgba(0, 255, 140, 0.2); 
    border: none; 
}
.btn-login-glow:hover { 
    background-position: right center; 
    box-shadow: 0 6px 20px rgba(0, 255, 140, 0.4); 
    transform: translateY(-2px); 
}

/* --- ANIMAÇÃO PARA CONTADOR DE SEGUNDOS (BADGE PREMIUM) --- */
@keyframes tick {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}
.timer-seconds.tick {
    animation: tick 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    display: inline-block;
}

/* --- BADGE DE ASSINATURA PREMIUM (OTIMIZADO) --- */
.premium-badge {
    position: relative;
    display: none; /* Controlado por JS, 'inline-flex' quando ativo */
    align-items: center;
    text-decoration: none;
    border-radius: 9999px;
    padding: 3px; /* Espaçamento para o brilho interno */
    background-color: #1e293b; /* Cor de fundo (slate-800) */
    border: 1px solid #334155; /* Borda (slate-700) */
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.premium-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Camada de brilho animado (aurora) */
.premium-badge-glow {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: linear-gradient(
        115deg,
        transparent 20%,
        rgba(251, 191, 36, 0.6), /* amber-400 com alpha */
        rgba(252, 165, 165, 0.5), /* rose-300 com alpha */
        transparent 80%
    );
    animation: premium-aurora 4s linear infinite;
    z-index: 1;
    opacity: 0.8;
}

@keyframes premium-aurora {
    from { transform: translateX(-50%); }
    to { transform: translateX(0%); }
}

/* Conteúdo principal do badge */
.premium-badge-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Gap ajustado */
    background-color: #1e293b; /* slate-800 */
    padding: 2px 4px 2px 10px; /* Padding ajustado para ícone à direita */
    border-radius: 9999px;
    width: 100%;
    height: 100%;
}

/* Ícone de coroa */
.premium-badge-icon {
    flex-shrink: 0;
    width: 28px; /* Tamanho ajustado */
    height: 28px; /* Tamanho ajustado */
    background-color: #f59e0b; /* amber-500 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #422006; /* Marrom escuro para contraste */
    font-size: 14px; /* Tamanho ajustado */
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.7), inset 0 -2px 2px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.premium-badge:hover .premium-badge-icon {
    transform: scale(1.1) rotate(10deg);
}

/* Informações (Nome do Plano e Timer) */
.premium-badge-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1; /* Line-height ajustado */
}

.plan-name {
    font-size: 0.7rem; /* Fonte ajustada */
    font-weight: 700;
    color: #e5e7eb; /* gray-200 */
    white-space: nowrap;
}

/* Estilos do contador */
.timer {
    display: flex;
    align-items: baseline;
    font-family: 'Inter', monospace;
    font-size: 0.8rem; /* Fonte ajustada */
    font-weight: 600;
    color: #fcd34d; /* amber-300 */
    text-shadow: 0 0 5px rgba(252, 211, 77, 0.5);
}

.timer-segment {
    padding: 0 1px;
}

.timer-separator {
    font-size: 0.7rem; /* Fonte ajustada */
    color: #9ca3af; /* gray-400 */
    opacity: 0.7;
    margin: 0 1px;
}

/* --- LOGO MÁGICA --- */
@keyframes magic-shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.magic-logo-text {
    background: linear-gradient(to right, #fff 20%, #22d3ee 40%, #22d3ee 60%, #fff 80%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: magic-shine 4s linear infinite;
    filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.5));
}

/* --- AVATAR MÁGICO (LOOP NAS BORDAS) --- */
.magic-avatar-wrapper {
    position: relative;
    padding: 3px; /* Espaço para a borda mágica */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Borda Rotativa */
.magic-avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg, 
        transparent 0deg, 
        #06b6d4 90deg, /* Cyan */
        #8b5cf6 180deg, /* Violet */
        #f59e0b 270deg, /* Amber */
        transparent 360deg
    );
    animation: avatar-spin 3s linear infinite;
    z-index: 0;
}

.magic-avatar-inner {
    position: relative;
    z-index: 1;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    background: #1e293b; /* Fundo para cobrir o centro do gradiente */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.1);
}

@keyframes avatar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- CARD DE PONTOS MÁGICO (MOEDA) --- */
.magic-points-card {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(251, 191, 36, 0.3); /* Borda dourada sutil */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 15px rgba(245, 158, 11, 0.15);
    overflow: hidden;
}
.magic-points-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251,191,36,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.magic-points-card:hover::after {
    opacity: 1;
}
.coin-icon {
    filter: drop-shadow(0 0 5px rgba(252, 211, 77, 0.6));
    animation: coin-pulse 2s infinite ease-in-out;
}
@keyframes coin-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(252, 211, 77, 0.6)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(252, 211, 77, 0.9)); }
}

/* --- PRELOADER MÁGICO COM RAIO --- */
#magic-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.95); /* Fundo um pouco mais escuro */
    backdrop-filter: blur(15px); /* Mais blur */
    z-index: 9999; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
    opacity: 1;
    visibility: visible;
}

#magic-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-orb {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 30% 30%, #22d3ee, #1e3a8a);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.5);
    animation: orb-float 2s ease-in-out infinite;
    /* Centraliza o ícone do raio */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ícone de Raio Mágico */
.magic-bolt-icon {
    font-size: 2.5rem;
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    animation: bolt-pulse 1.5s infinite alternate;
    z-index: 10;
}

@keyframes bolt-pulse {
    from { 
        transform: scale(1); 
        text-shadow: 0 0 10px #fff, 0 0 20px #22d3ee;
        opacity: 0.9;
    }
    to { 
        transform: scale(1.15); 
        text-shadow: 0 0 20px #fff, 0 0 30px #22d3ee, 0 0 40px #f0f9ff;
        opacity: 1;
    }
}

.preloader-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #00ff8c;
    border-right-color: #a855f7;
    animation: spin-ring 1.5s linear infinite;
}

.preloader-text {
    margin-top: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
    animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes orb-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}