2012 Honda Civic Hybrid - Car coasted to a stop

i was driving on the highway and tried to accelerate but nothing happened and slowly the car decelerated until it stopped, but the engine was running just pressing the gas did nothing. I turned the car off and turned it back on and it worked fine. What could cause that?

What do you mean by “pressing the gas did nothing?” Did the engine rev up, but the car didn’t go anywhere, or did, literally, nothing happen?