Phase transitions in 3D gravity and fractal dimension