/* navbar.css - Stili per la navbar e badge notifiche */

/* Stili per la navbar (esistenti) */
.site-header {
    background: var(--panel);
    border-bottom: 2px solid var(--muted);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    color: var(--muted);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(155, 231, 255, 0.1);
    color: var(--muted);
}

.username {
    color: var(--muted);
    font-weight: bold;
    margin-right: 1rem;
}

.btn-logout {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b !important;
}

.btn-logout:hover {
    background: rgba(255, 107, 107, 0.2) !important;
}

.btn-home {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.btn-home:hover,
.btn-home.active {
    background: rgba(155, 231, 255, 0.1);
    color: var(--muted);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

/* Stili per badge notifiche */
.message-badge,
.friend-request-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
    text-align: center !important;
}

.friend-request-badge {
    background: #2ed573;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.messages-icon,
.friends-icon {
    position: relative;
    font-size: 1.2rem;
}

.messages-icon i,
.friends-icon i {
    transition: transform 0.3s ease;
}

.messages-icon:hover i {
    transform: translateY(-2px);
}

.friends-icon:hover i {
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--panel);
        border-top: 1px solid var(--border);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end; /* MODIFICA: allineamento a destra */
        text-align: right; /* MODIFICA: testo allineato a destra */
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-end; /* MODIFICA: allineamento a destra */
        gap: 0.5rem;
    }
    
    .username {
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: right; /* MODIFICA: testo allineato a destra */
    }
    
    .messages-icon,
    .friends-icon {
        align-self: flex-end; /* MODIFICA: allineamento a destra */
    }
    
    .main-nav li {
        width: 100%;
        display: flex;
        justify-content: flex-end; /* MODIFICA: allineamento a destra */
    }
    
    .main-nav a {
        justify-content: flex-end; /* MODIFICA: allineamento a destra */
        text-align: right;
    }
}

/* Stili per visualizzazione badge su mobile */
@media (max-width: 576px) {
    .message-badge,
    .friend-request-badge {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
        top: -6px;
        right: -6px;
    }
}