I would like to identify animated movie from my childhood.
Not sure about language, animation style could be anime or similar.
Watched it on VHS in early 90's so it could be from 90's or 80's.
Teenagers or young adults in time traveling ship. They got to some dystopian/apocalyptic setting where people where enslaved in mines, one of them fell in love with native girl(princess?). They helped to free those people, fighting guards (robots or maybe monsters or armored soldiers).
At some point they lost their ship, or were very close to losing it.