I don't see a replay of it in the archives- Hence, this is guesswork. If something like this happens again, save the replay so we can see if anything led up to it. However, what I think happened is that you used a move like U-turn in the sense that you attack then have to do something else (in U-turn's case, pick a pokemon to come in). Like a lot of people, you didn't notice that you had to, and the battle stopped, and you thought your opponent was stalling or whatever. So once you hit the timer and waited, you lost instead of your opponent, since you were the one who wasn't ready. It's an honest mistake, and one a lot players have made before. Hopefully I helped!