// Phaser Game Configuration
const config = {
    type: Phaser.CANVAS, // Canvas renderer za pixel-perfect ostrino
    width: 640,  // Pixel Art Viewport
    height: 360, // Pixel Art Viewport (16:9)
    parent: 'game-container',
    backgroundColor: '#1a1a2e',
    pixelArt: true,
    antialias: false,
    roundPixels: true,
    render: {
        pixelArt: true,
        antialias: false,
        roundPixels: true,
        transparent: false,
        clearBeforeRender: true,
        powerPreference: 'high-performance'
    },
    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 0 },
            debug: false
        }
    },
    scene: [BootScene, PreloadScene, StoryScene, GameScene, UIScene],
    scale: {
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_BOTH
    },
    input: {
        gamepad: true
    }
};

// Initialize game
const game = new Phaser.Game(config);

// Global game state
window.gameState = {
    currentScene: null,
    debugMode: true
};

console.log('🎮 NovaFarma initialized!');
