/* Login link styling */
.nav-login {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    margin-left: 8px;
}

/* Avatar & username */
.nav-user {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    background: #f1f1f1;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
}

.nav-user-btn .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 6px;
}

.nav-user-btn .username {
    font-weight: bold;
    margin-right: 4px;
}

.nav-dropdown[hidden] {
    display: none;
}

/* Dropdown hidden by default */
.nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-radius: 6px;
    z-index: 1000;
}

/* Shown only when JS adds .show */
.nav-dropdown.show {
    display: block;
}

.nav-dropdown a,
.nav-dropdown button {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: #333;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-dropdown a:hover,
.nav-dropdown button:hover {
    background: #f0f0f0;
}