it's 100% about creating a calorie deficit. eating late at night, oh, eating junk food, and so on have nothing to do with it. eat 3 bags of chips before bed if you want, if the calories you take in are less than your daily needs, you'll lose weight.