Quasi-periodic oscillations (QPOs) observed at the tail end of soft gamma repeaters giant flares are commonly interpreted as the torsional oscillations of magnetars. From a theoretical perspective, the oscillatory motion is influenced by the strong interaction between the shear modes of the crust and magnetohydrodynamic Alfv??n-like modes in the core. We study the dynamics which arises through this interaction, and present several new results. (1) We show that discrete edge modes frequently reside near the edges of the core Alfv??n continuum, and explain using simple models why these are generic and long-lived. (2) We compute the magnetar s oscillatory motion for realistic axisymmetric magnetic field configurations and core density profiles, but with a simplified model of the elastic crust. We show that one may generically get multiple gaps in the Alfv??n continuum. One obtains strong discrete gap modes if the crustal frequencies belong to the gaps; the resulting frequencies do not coincide with, but are in some cases close to the crustal frequencies. (3) We deal with the issue of tangled magnetic fields in the core by developing a phenomenological model to quantify the tangling. We show that field tangling enhances the role of the core discrete Alfv??n modes and reduces the role of the core Alfv??n continuum in the overall oscillatory dynamics of the magnetar. (4) We demonstrate that the system displays transient QPOs when parts of the spectrum of the core Alfv??n modes contain discrete modes which are densely and regularly spaced in frequency. The transient QPOs are the strongest when they are located near the frequencies of the crustal modes. (5) We show that if the neutrons are coupled into the core Alfv??n motion, then the post-flare crustal motion is strongly damped and has a very weak amplitude. We thus argue that magnetar QPOs give evidence that the proton and neutron components in the core are dynamically decoupled and that at least one of them is a quantum fluid. (6) We show that it is difficult to identify the high-frequency 625-Hz QPO as being due to the physical oscillatory mode of the magnetar, if the latter s fluid core consists of the standard proton-neutron-electron mixture and is magnetized to the same extent as the crust.