A high-fidelity fully-implantable seizure prediction system