/* ===== PC 顶栏用户菜单（登录后显示头像+昵称，下拉个人中心/退出登录） ===== */

.user-menu-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* 触发区：头像 + 昵称 + 箭头，胶囊形，hover 浅灰底 */
.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 10px 0 4px;
    border-radius: 16px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    user-select: none;
}

.user-menu-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: none;
}

/* 无头像时显示昵称首字母的圆形占位 */
.user-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #d60017;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-caret {
    color: #86868b;
    flex: none;
}

/* 下拉面板：毛玻璃风格 */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 1000;
}

.user-menu-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    color: #1d1d1f;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.user-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-menu-logout {
    color: #d60017;
}

.user-menu-dropdown form {
    margin: 0;
}
