I need a better litter box

Su

So rescently I took in a VERY old stray. She had to have been someones cat at one point because she has been spayed and she tries to go in the litterbox. Main word here TRIES. She can poop okay in it. For the most part she makes it in. But she misses the box when she pees a lot. Ill find it on the floor and underneath the box like she just barely missed. I need to know what i should do here. I thought about a box with a lid but im afraid she wont go in if its too dark and small. She also relies heavily on her smell and idk if she would smell her box from the outside and know what it is. Ive also thought of getting a taller box wothout a lid so its uncomfortable for her to sit over the edge. Just not sure what might be best for her. Her coordination is way off and she always reaches outside the litterbox to try to bury her stuff. I have it on two mats but the pee just winds up underneath them and i wipe them down.