/* ============================================================
   BLOCO DO USUÁRIO (avatar + nome + dropdown)
============================================================ */

/* Container dos botões da navbar */
.nav-buttons { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

/* Wrapper do avatar + nome */
.user-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow: visible;
}

/* ===========================
   AVATAR + GLOW ANIMADO
=========================== */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: relative;
    overflow: visible;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Glow giratório */
.user-avatar::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 18px);
    height: calc(100% + 18px);
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(180,145,255,0.45),
        rgba(255,128,200,0.35),
        rgba(180,145,255,0.45)
    );
    filter: blur(6px);
    opacity: 0.55;
    z-index: 1;
    pointer-events: none;
    animation: ringRotate 6s linear infinite;
}

/* Círculo superior */
.user-avatar::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.10);
    z-index: 2;
    pointer-events: none;
}

/* Imagem do avatar */
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 4;
}

/* Hover — removido QUALQUER roxo */
.user-avatar:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 24px rgba(178,141,255,0.25);
}

/* Animação */
@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ======================
   MENU DROPDOWN
====================== */
.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(10,4,25,0.98);
    border: 1px solid rgba(169,128,248,0.15);
    padding: 8px;
    border-radius: 10px;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 1000;
    transform-origin: top right;
    transition: transform .16s ease, opacity .12s ease;
}

.user-menu[hidden] { 
    opacity: 0; 
    transform: scale(0.94); 
    pointer-events: none; 
}

.user-menu:not([hidden]) { 
    opacity: 1; 
    transform: scale(1); 
    pointer-events: auto; 
}

.user-menu .menu-item {
    display: block;
    padding: 8px 10px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
}

/* Hover — agora sem aquele roxo */
.user-menu .menu-item:hover {
    background: rgba(255,255,255,0.06);
}

/* Nome do usuário */
.user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--branco-luxo);
    font-size: 0.95rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* Avatar fallback */
.avatar-fallback {
    display: inline-block;
    width: 100%;
    height: 100%;
    line-height: 36px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg,#b491ff,#7e57c2);
}

/* ======================
      RESPONSIVO
====================== */
@media (max-width: 520px) {
    .user-name { display: none; }
    .user-avatar::before { 
        width: calc(100% + 14px); 
        height: calc(100% + 14px); 
        filter: blur(7px); 
    }
    .user-avatar::after { 
        width: calc(100% + 6px); 
        height: calc(100% + 6px); 
    }
}

@media (max-width: 600px) {
    .nav-buttons {
        display: flex;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        flex-wrap: nowrap;
        margin-top: 10px;
    }

    .nav-buttons a {
        flex: 1 1 auto;
        max-width: 45%;
        padding: 6px 8px;
        text-align: center;
    }
}