#!/usr/bin/env python3
from PIL import Image, ImageDraw
import os

# Create a simple orange fox avatar
img = Image.new('RGB', (512, 512), color='white')
draw = ImageDraw.Draw(img)

# Draw fox head (orange circle)
draw.ellipse([100, 100, 412, 412], fill='#FF8C00', outline='#8B4513', width=5)

# Draw ears
draw.polygon([(200, 100), (256, 50), (312, 100)], fill='#FF8C00', outline='#8B4513', width=3)
draw.polygon([(312, 100), (368, 50), (424, 100)], fill='#FF8C00', outline='#8B4513', width=3)

# Draw eyes
draw.ellipse([180, 200, 220, 240], fill='white', outline='black', width=2)
draw.ellipse([292, 200, 332, 240], fill='white', outline='black', width=2)
draw.ellipse([195, 215, 205, 225], fill='black')  # Left pupil
draw.ellipse([307, 215, 317, 225], fill='black')  # Right pupil

# Draw nose
draw.ellipse([246, 280, 266, 300], fill='black')

# Draw mouth (smile)
draw.arc([220, 320, 292, 380], start=0, end=180, fill='black', width=3)

# Draw whiskers
draw.line([150, 260, 100, 260], fill='black', width=2)  # Left whisker 1
draw.line([150, 280, 100, 290], fill='black', width=2)  # Left whisker 2
draw.line([362, 260, 412, 260], fill='black', width=2)  # Right whisker 1
draw.line([362, 280, 412, 290], fill='black', width=2)  # Right whisker 2

# Add text (without emoji to avoid encoding issues)
draw.text((256, 420), "Ginger", fill='#8B4513', anchor='mm')

# Save the image
img.save('ginger-avatar.png')
print("Created ginger-avatar.png")
print(f"File size: {os.path.getsize('ginger-avatar.png')} bytes")