Ok, so it didn't work.
I tried partitioning with Disk utility but it just hang preparing the resize of the osx partition for hours.
So next I tried with Gparted created following partitions: OSX, NTFS (for windows 10), Fat32 (as a shared files drive), BOOTCAMP (windows8.1 was created earlier) and 2 small partitions DiskOs3 and DiskOs5.
Rebooted but then only the OSX partition is working. The windows 8.1 partition stopped working with a "Your PC needs to be repaired" 0x000000e and can't be repaired with the windows CD repair option nor with FixMbr.
The newly created NTFS disk can't be used to install windows 10 either because i'm getting the following error:
"Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks.
Windows cannot be installed to this hard disk space. The selected disk has the maximum number of partitions of this type."
So what did I do wrong... how to fix this mess?