I have an offer of cs PHD, but not from the top schools you listed. I applied PHD directly in my 4th year undergraduate. It is hard. I cannot answer that much questions. But about applying PHD, I have three suggestions.
1. trying to know what is the research of a certain field actually do, and most importantly, whether you like it (both the field and the research life itself). It helps you find your research interest early, and begin to accumulate knowledge of it. You can trying to attend some class, like AI. After knowing the basics from the class, go to a lab's website, reading papers. You may find different labs doing different aspect of, for example AI research. Papers can help you get some ideas of what is research, but not the whole thing. Attend a research lab and doing some research, even write a paper yourself may surly help you figure out whether PHD is a suitable choice for you.
2. maintain great GPA, and other stuff. PHD application is quite competitive. I see you mentioned google intern. Company experience helps you in many ways, like coding, which is important to cs research. But sometime, industrial experience is different to research. And I think no one will assure you that if you do something, then you can get a top school PHD offer. Application results are affected by too many things, even the profs' funding. Great GPA, language score, recommendation, research experience, even top papers can only give you plus, not assurance. Of course, if you can do well in most of these aspects, then you get a high chance.
3.about MS. it is easier to get into a top school's MS. If someone do well in MS, s/he get familiar with research of certain field and may have top papers. That will help. But if this person do not make great progress in MS, or even have low grade, it will hurt.
That is only my opinion. But knowing more about field you interested (class+research) is always a good thing to do. Only imagining what field is interesting or research is cool is not enough. Many of my friend who claimed to apply PHD change their ideas after truly get into a lab and doing research, because they find out that research is not exactly as they thought and just not suitable for them.