<?php
/**
 * Plugin Name:     The Matrix Falling Code Background
 * Plugin URI:      https://example.com/the-matrix-falling-code
 * Description:     Adds a green “Matrix” code-rain effect to your site background.
 * Version:         1.0.0
 * Author:          Your Name
 * Author URI:      https://example.com
 * Text Domain:     matrix-falling-code
 * Domain Path:     /languages
 * License:         GPLv2 or later
 */

defined( 'ABSPATH' ) || exit;

// Plugin constants
define( 'MFC_VERSION',    '1.0.0' );
define( 'MFC_PLUGIN_FILE', __FILE__ );
define( 'MFC_PLUGIN_DIR',  plugin_dir_path( __FILE__ ) );
define( 'MFC_PLUGIN_URL',  plugin_dir_url(  __FILE__ ) );

// Load translations
add_action( 'plugins_loaded', function() {
    load_plugin_textdomain( 'matrix-falling-code', false, dirname( plugin_basename( MFC_PLUGIN_FILE ) ) . '/languages' );
});

// Require core classes
require_once MFC_PLUGIN_DIR . 'includes/class-matrix-activator.php';
require_once MFC_PLUGIN_DIR . 'includes/class-matrix-deactivator.php';
require_once MFC_PLUGIN_DIR . 'includes/class-matrix-falling-code.php';

// Activation & deactivation hooks
register_activation_hook(   MFC_PLUGIN_FILE, [ 'Matrix_Falling_Code_Activator',   'activate'   ] );
register_deactivation_hook( MFC_PLUGIN_FILE, [ 'Matrix_Falling_Code_Deactivator', 'deactivate' ] );

// Kick off the plugin
add_action( 'plugins_loaded', function() {
    $plugin = new Matrix_Falling_Code();
    $plugin->run();
} );
