Theory of magnetically coupled type-II superconducting films