Self-similar electron distributions in a non-uniform plasma embedded in a high-frequency electromagnetic field