I had the same problem with alcohol and one day I got so sick that I knew I had to let go. I had been praying because I knew it was something I shouldn't be doing, and in 1 day it was done. I thought about it but never went back to it and now I never think about it. God is amazing and kind. I am so glad you are free of alcohol.
We have traveled similar paths, I am much older, 58 to be exact, and like you learning as much as I could became my addiction. All my time was consumed on line or a book, but I excused my behavior with thinking that all I was doing was learn, and not willing to see all the other things that didn't get done. I think balance is what God expects, and I am asking God to help me find that balance.