Htc One Mini heats up whenever in use and shuts down suddenly without any warning. Any fix ?

A

AC Question

Hi guys so i got this used HTC One Mini in like 10/10 condition for use as a secondary phone. I noticed that if i charge the battery to 100% and leave it on standby it would go an entire day and still have 80% charge left. But the problem i am facing is that whenever either at 100% or at 10% i start to use the phone the battery starts to drop really quickly and if i use the phone lets say at 100% for 10 minutes straight and feel the phone start to heat up a little i suddenly get the battery low indicator and from 95% it drops dead to 0% and stuts down. I have tried to re calibrate the battery by leaving it on standby and run down flat and then again charging it upto 100% but still facing this problem. I think that it might ave something to do with the hardware i'm not sure. I have tried to wipe cache and factory reset the phone via stock recovery but still no luck. If anyone has a solution for it please do let me know