Well, I don't know why anything would say that the card game is not random, because it most definitely is. The numbers do indicate strength, and you have a much better chance to win if your card has higher "stats". However, as you experienced, a much weaker card can sometimes win.
The first number on the card is its attack power, the letter is its attack type, the second number is the card�s physical defense, and the last number is the card�s magical defense.
A card with a �P� attack type attacks the defending card�s physical defense. A card with a �M� attack type attacks the defending cards magical defense. A card with an �X� attack type attacks the defending card's lower defense stat. A card with an �A� attack type attacks the defending card's lowest stat (including attack power)
When you use the same card a lot it will "level up". The attack and defense stats will increase and the attack types will change from P/M -> X -> A.
In order to obtain the highest card rank, you must have one of each card. (There are 100 total and you can only hold 100 so you will not be able to have duplicates.) All cards must have an attack type of A, and all cards must have a unique arrow pattern.
(I don't remember were the potion ingredients are I think there is one you get from a woman on the far end of the business district near the weapons shop.)