I have read already about Cell here.
They say if you want to change background color of selected TreeItem you need to use :
I tried list-cell, tree-cell and my own selector and all does not work.
How to change background color of selected tree cell?
Following are a number of key use cases used to drive the Cell API design, along with code examples showing how those use cases are satisfied by this API. This is by no means to be considered the definitive list of capabilities or features supported, but rather, to provide some guidance as to how to use the Cell API. The examples below are focused on the ListView, but the same philosophy applies to TreeCells or other kinds of cells.
So, you should use the ".tree-cell" selector, not the ".list-cell" selector to style cells of a TreeView.
Complete CSS reference here:
JavaFX CSS Reference