Here's a second thumbs up, good for you, you caught those break lights on time!
About 6 months after I first got my license (at 26) I was driving down a somewhat bust street. Up ahead, I noticed a police car parked sideways on the road. I was trying to figure out why he was parked that way.. was there an accident? Unfortunately, I was so focused on figuring him out, that I rear ended a minivan in front of me. Lucky for me, he was available to assess my situation, and guide me in what to do next. The woman I hit was very forgiving, she ended up with a very minor dent which she chose not to claim, I ended up with a write off... as I was driving a neon that apparently couldn't handle the impact while driving at a reduced speed of 35 kms/hr. I am MUCH more focused on what I'm doing now when I drive, and try to keep in mind that anyone driving around me has the potential to catch me off guard.
I'm glad you were able to avoid hitting the other vehicle, even if there's only minor damage, the stress can be overwhelming.