Create a detailed, almost photorealistic image of a medieval castle perched atop a rocky cliff, bathed in the soft glow of a full moon. The sky is dark, studded with twinkling stars, and the air is thick with mystery. The castle is grand and imposing, with soaring towers and intricate spires, casting long shadows across the craggy landscape. A winding river snakes through the valley below, reflecting the moon’s light and creating a sense of peace and tranquility. Use a color palette that evokes a sense of warmth and magic, with rich browns, deep blues, and a touch of gold. Let the castle be the focal point of the image, but include details like mountains in the distance, trees clinging to the cliff face, and perhaps even the silhouette of a lone bird soaring in the night sky.