I know this is more of a general question, I would like to get some details on the websites that I could use to do automation testing for learning purpose. I'm looking to a website which have complexity.
Let's get practical here.
You are learning automation so that you can get a job or project. Sites like Mercury Tours are good to practice but in real world actual websites/apps are much complex then this one.
If you want to learn and practice automation, go for the real website/app. For example, automate your network service provider's website or app. As you are practicing, you can use your credentials, login into the web/app and then try to fetch information or change your setting and reset them back. That's how I started and got really good hands-on.
To learn is also very good Facebook. I did my first experiments with Python and Selenium. Login process, logout on Facebook.
One can expand his test according to the knowledge more and more. Upload, integrate the Facebook Api, there are no limits.
There are also very good beginner tutorials that also advise.
This is the site I used:
It's quite old, but it's actually a pretty good test site.