Unfortunately, you can not castle in this position. You can not castle 0-0 because the Bishop is occupying a needed square (g8). You can not castle 0-0-0 because the wrong Rook is occupying a needed square (d8).
So, uh, how do I castle?

Oh, wow, I managed to get the files reversed. You'd think I'd be used to the fact that Black plays 0-0 to the left and 0-0-0 to the right...
Thanks...

You can't castle H-side in this position for two reasons: The bishop occupies g8, which is where your king ends up, and the opponents bishop is attacking the e8 square. Remember, you can't castle into, or through, check.

So, how do I castle?
It seems it won't let me. I tried moving (in analysis mode) my King to c1, but this only moves the King to c1. I want final position to have King on c1 and Rook from a1 to d1 (as per normal A-side castling).
I also tried moving my rook to d1 - but this doesn't work either.

I think chess.com should make it so that when you castle, you have to move the king and rook separately. Currently when you move your king your rook automatically moves with it, but in an OTB game that can only happen if you're using different hands to move the king and rook (like Nakamura), which is against the rules. So in order to make the game more realistic, and to encourage people to follow the rules, you should have to move the king and then move the rook, both manually, when you castle.
Now, I would like to castle kingside/h-side. Moving the rook over doesn't work. Obviously I can't move the king because it doesn't move. As far as I know one is allowed to castle the rook out of 'check' when castling.