Why is she being nicer to me now that I'm being meaner to her?

Maybe it's just me but a really nice friend of mine has been acting meaner to me and as the months went by she steadily got meaner. Nothing horrible but compared to before it was worse. So one day I decided to call her out on it and fight fire with fire. Things l like if she called me a name I called her one right back or if she told me to move I asked for a good reason or if she asked me to do something I didn't jump to do it or if she was just plain mean I told her she was. It was almost a complete 180 after that and she started being somewhat nicer to me. She's almost like the way she was when we first met albeit with a bit more bite. I'm still monitoring the situation.

Am I losing it or did being meaner to her make her nicer?
Updates
+1 y
Is she doing this consciously to test me and push my buttons or is this how she really acts?
Why is she being nicer to me now that I'm being meaner to her?
Post Opinion