Exciton and core-level electron confinement effects in transparent ZnO thin films