Fractal structures in perovskite-based solar cells