const I18N = {
  en: {
    // Nav
    nav_launch: 'Launch', nav_server: 'Server', nav_event: 'Event', nav_sessions: 'Sessions', nav_settings: 'Settings', nav_save: 'Save',
    // Header
    server_offline: 'Offline', server_running: 'Running',
    // Server selector
    select_server: 'Select server',
    // Launch tab
    start_server: '▶ Start Server', stop_server: '⏹ Stop Server',
    configure_before_launch: 'Configure server settings before launching',
    server_console: 'Server Console', btn_clear: '🗑 Clear', btn_refresh: '🔄 Refresh', auto_scroll: 'Auto-scroll',
    quick_actions: 'Quick Actions', preview_json: '👁 Preview Config JSON',
    // Server tab
    server_identity: 'Server Identity', server_name: 'Server Name', server_type: 'Server Type',
    type_ranked: 'Ranked', type_unranked: 'Unranked',
    network_ports: 'Network Ports', tcp_port: 'TCP Port', udp_port: 'UDP Port', http_port: 'HTTP Port',
    ports_note: 'Each server must use different ports.',
    passwords: 'Passwords', driver_password: 'Driver Password', spectator_password: 'Spectator Password',
    admin_password: 'Admin Password', no_password: '(empty = no password)',
    paths_urls: 'Paths & URLs', entry_list_path: 'Entry List Path', results_path: 'Results Path',
    cycle_sessions: 'Cycle Sessions', enable_cycle: 'Enable cycle',
    // Event tab
    session_type_track: 'Session Type & Track', game_mode: 'Game Mode',
    mode_practice: 'Practice', mode_race: 'Race Weekend',
    track: 'Track', track_placeholder: '— Set executable path in config.json first —',
    players: 'Players', max_players: 'Max Players', max_players_limit: 'Max Players Limit',
    weather_conditions: 'Weather & Conditions', weather_type: 'Weather Type', weather_behavior: 'Weather Behaviour',
    initial_grip: 'Initial Grip',
    weather_clear: 'Clear', weather_scattered: 'Scattered Clouds', weather_broken: 'Broken Clouds',
    weather_overcast: 'Overcast', weather_drizzle: 'Drizzle', weather_rain: 'Rain',
    weather_heavy_rain: 'Heavy Rain', weather_damp: 'Damp',
    behavior_static: 'Static', behavior_dynamic: 'Dynamic',
    grip_green: 'Green', grip_fast: 'Fast', grip_optimum: 'Optimum',
    car_selection: 'Car Selection', search_cars: '🔍 Search cars...',
    filter_road: 'Road', filter_race: 'Race', filter_track: 'Track',
    filter_modern: 'Modern', filter_vintage: 'Vintage', filter_young: 'Young Timer',
    filter_ice: 'ICE', filter_ev: 'EV', filter_hybrid: 'Hybrid', filter_selected: 'Selected only',
    no_cars_match: 'No cars match the filters',
    set_exe_first: 'Set the executable path in config.json to load cars',
    // Sessions tab
    duration_type: 'Duration Type', dur_time: 'Time', dur_laps: 'Laps',
    duration_min: 'Duration (min)', duration_laps: 'Duration (laps)',
    time_multiplier: 'Time Multiplier', start_hour: 'Start Hour', start_minute: 'Start Minute',
    max_wait_box: 'Max Wait to Box', overtime_wait: 'Overtime Waiting',
    min_wait_players: 'Min Wait for Players', max_wait_players: 'Max Wait for Players',
    // Settings tab
    launcher_config: 'Launcher Configuration',
    launcher_config_note: 'Edit <code>config.json</code> next to the launcher and restart to apply changes.',
    executable: 'Executable', web_port: 'Web Port', server_count: 'Server Count',
    change_password: 'Change Password', old_password: 'Current Password',
    new_password: 'New Password', confirm_password: 'Confirm Password',
    btn_change_pwd: 'Change Password',
    pwd_mismatch: 'New passwords do not match', pwd_too_short: 'Password too short (min 4 chars)',
    pwd_changed: 'Password changed! Please log in again.',
    language: 'Language',
    about: 'About',
    about_text: 'EVO Server Launcher Web — browser-based reimplementation of the original Avalonia desktop app.',
    settings_saved_to: 'Session config saved to:',
    // Preview modal
    preview_title: 'Generated JSON Preview', cmd_line: 'Command Line', copy: '📋 Copy',
    config_json: 'configuration.json', season_json: 'season.json',
    no_exe_set: '(set exe path in config.json and select a track first)',
    // Toasts
    saved: 'Configuration saved!', copied: 'Command copied!',
    server_started: 'Server started! PID: ', stop_sent: 'Stop signal sent.',
    error_prefix: 'Error: ',
    // Logout
    logout: '⎋ Logout',
    theme_settings: 'Theme & Appearance', btn_apply_theme: 'Apply Theme', btn_reset_theme: 'Reset Default',
    theme_applied: 'Theme applied!', theme_reset: 'Theme reset to default.',
    server_suffix: 'Server Suffix',
    pit_slots: 'Max pit slots',
    nav_presets: 'Presets',
    presets_title: 'Event & Session Presets',
    presets_desc: 'Save the current Event and Sessions configuration as a named preset. Shared across all servers.',
    presets_saved: 'Saved Presets',
    presets_empty: 'No presets saved yet.',
    preset_name_placeholder: 'Preset name...',
    btn_save_preset: '💾 Save Preset',
    btn_load_preset: '▶ Load',
    preset_saved: 'Preset saved!',
    preset_applied: 'Preset applied',
    preset_deleted: 'Preset deleted.',
    preset_name_required: 'Enter a name for the preset.',
    preset_overwrite_confirm: 'Overwrite preset "{name}"?',
    preset_delete_confirm: 'Delete preset "{name}"?',
  },
  it: {
    nav_launch: 'Avvio', nav_server: 'Server', nav_event: 'Evento', nav_sessions: 'Sessioni', nav_settings: 'Impostazioni', nav_save: 'Salva',
    server_offline: 'Offline', server_running: 'In esecuzione',
    select_server: 'Seleziona server',
    start_server: '▶ Avvia Server', stop_server: '⏹ Ferma Server',
    configure_before_launch: 'Configura le impostazioni del server prima di avviarlo',
    server_console: 'Console Server', btn_clear: '🗑 Pulisci', btn_refresh: '🔄 Aggiorna', auto_scroll: 'Auto-scroll',
    quick_actions: 'Azioni Rapide', preview_json: '👁 Anteprima Config JSON',
    server_identity: 'Identità Server', server_name: 'Nome Server', server_type: 'Tipo Server',
    type_ranked: 'Classificato', type_unranked: 'Non classificato',
    network_ports: 'Porte di Rete', tcp_port: 'Porta TCP', udp_port: 'Porta UDP', http_port: 'Porta HTTP',
    ports_note: 'Ogni server deve usare porte diverse.',
    passwords: 'Password', driver_password: 'Password Pilota', spectator_password: 'Password Spettatore',
    admin_password: 'Password Admin', no_password: '(vuoto = nessuna password)',
    paths_urls: 'Percorsi & URL', entry_list_path: 'Percorso Entry List', results_path: 'Percorso Risultati',
    cycle_sessions: 'Ciclo Sessioni', enable_cycle: 'Abilita ciclo',
    session_type_track: 'Tipo Sessione & Circuito', game_mode: 'Modalità di Gioco',
    mode_practice: 'Prove Libere', mode_race: 'Fine Settimana di Gara',
    track: 'Circuito', track_placeholder: '— Prima imposta il percorso exe in config.json —',
    players: 'Giocatori', max_players: 'Max Giocatori', max_players_limit: 'Limite Max Giocatori',
    weather_conditions: 'Meteo & Condizioni', weather_type: 'Tipo Meteo', weather_behavior: 'Comportamento Meteo',
    initial_grip: 'Grip Iniziale',
    weather_clear: 'Sereno', weather_scattered: 'Nubi Sparse', weather_broken: 'Nuvoloso',
    weather_overcast: 'Coperto', weather_drizzle: 'Pioggerella', weather_rain: 'Pioggia',
    weather_heavy_rain: 'Pioggia Forte', weather_damp: 'Umido',
    behavior_static: 'Statico', behavior_dynamic: 'Dinamico',
    grip_green: 'Verde', grip_fast: 'Veloce', grip_optimum: 'Ottimale',
    car_selection: 'Selezione Auto', search_cars: '🔍 Cerca auto...',
    filter_road: 'Strada', filter_race: 'Gara', filter_track: 'Pista',
    filter_modern: 'Moderna', filter_vintage: 'Vintage', filter_young: 'Young Timer',
    filter_ice: 'Termica', filter_ev: 'Elettrica', filter_hybrid: 'Ibrida', filter_selected: 'Solo selezionate',
    no_cars_match: 'Nessuna auto corrisponde ai filtri',
    set_exe_first: 'Imposta il percorso exe in config.json per caricare le auto',
    duration_type: 'Tipo Durata', dur_time: 'Tempo', dur_laps: 'Giri',
    duration_min: 'Durata (min)', duration_laps: 'Durata (giri)',
    time_multiplier: 'Moltiplicatore Tempo', start_hour: 'Ora Inizio', start_minute: 'Minuto Inizio',
    max_wait_box: 'Max Attesa Box', overtime_wait: 'Attesa Overtime',
    min_wait_players: 'Min Attesa Giocatori', max_wait_players: 'Max Attesa Giocatori',
    launcher_config: 'Configurazione Launcher',
    launcher_config_note: 'Modifica <code>config.json</code> accanto al launcher e riavvia per applicare.',
    executable: 'Eseguibile', web_port: 'Porta Web', server_count: 'Numero Server',
    change_password: 'Cambia Password', old_password: 'Password Attuale',
    new_password: 'Nuova Password', confirm_password: 'Conferma Password',
    btn_change_pwd: 'Cambia Password',
    pwd_mismatch: 'Le nuove password non coincidono', pwd_too_short: 'Password troppo corta (min 4 caratteri)',
    pwd_changed: 'Password cambiata! Effettua di nuovo il login.',
    language: 'Lingua',
    about: 'Info',
    about_text: 'EVO Server Launcher Web — reimplementazione browser dell\'app desktop Avalonia originale.',
    settings_saved_to: 'Config sessione salvata in:',
    preview_title: 'Anteprima JSON Generato', cmd_line: 'Riga di Comando', copy: '📋 Copia',
    config_json: 'configuration.json', season_json: 'season.json',
    no_exe_set: '(imposta il percorso exe in config.json e seleziona un circuito)',
    saved: 'Configurazione salvata!', copied: 'Comando copiato!',
    server_started: 'Server avviato! PID: ', stop_sent: 'Segnale di stop inviato.',
    error_prefix: 'Errore: ',
    logout: '⎋ Logout',
    theme_settings: 'Tema & Aspetto', btn_apply_theme: 'Applica Tema', btn_reset_theme: 'Ripristina Default',
    theme_applied: 'Tema applicato!', theme_reset: 'Tema ripristinato.',
    server_suffix: 'Suffisso Server',
    pit_slots: 'Max slot pit',
    nav_presets: 'Preset',
    presets_title: 'Preset Evento & Sessioni',
    presets_desc: 'Salva la configurazione attuale di Evento e Sessioni come preset con un nome. Condiviso tra tutti i server.',
    presets_saved: 'Preset Salvati',
    presets_empty: 'Nessun preset salvato.',
    preset_name_placeholder: 'Nome preset...',
    btn_save_preset: '💾 Salva Preset',
    btn_load_preset: '▶ Carica',
    preset_saved: 'Preset salvato!',
    preset_applied: 'Preset applicato',
    preset_deleted: 'Preset eliminato.',
    preset_name_required: 'Inserisci un nome per il preset.',
    preset_overwrite_confirm: 'Sovrascrivere il preset "{name}"?',
    preset_delete_confirm: 'Eliminare il preset "{name}"?',
  },
  de: {
    nav_launch: 'Start', nav_server: 'Server', nav_event: 'Event', nav_sessions: 'Sitzungen', nav_settings: 'Einstellungen', nav_save: 'Speichern',
    server_offline: 'Offline', server_running: 'Läuft',
    select_server: 'Server auswählen',
    start_server: '▶ Server starten', stop_server: '⏹ Server stoppen',
    configure_before_launch: 'Servereinstellungen vor dem Start konfigurieren',
    server_console: 'Server-Konsole', btn_clear: '🗑 Löschen', btn_refresh: '🔄 Aktualisieren', auto_scroll: 'Auto-Scroll',
    quick_actions: 'Schnellaktionen', preview_json: '👁 JSON-Vorschau',
    server_identity: 'Server-Identität', server_name: 'Servername', server_type: 'Servertyp',
    type_ranked: 'Gewertet', type_unranked: 'Ungewertet',
    network_ports: 'Netzwerkports', tcp_port: 'TCP-Port', udp_port: 'UDP-Port', http_port: 'HTTP-Port',
    ports_note: 'Jeder Server muss unterschiedliche Ports verwenden.',
    passwords: 'Passwörter', driver_password: 'Fahrer-Passwort', spectator_password: 'Zuschauer-Passwort',
    admin_password: 'Admin-Passwort', no_password: '(leer = kein Passwort)',
    paths_urls: 'Pfade & URLs', entry_list_path: 'Entry-List-Pfad', results_path: 'Ergebnispfad',
    cycle_sessions: 'Sitzungen wiederholen', enable_cycle: 'Wiederholung aktivieren',
    session_type_track: 'Sitzungstyp & Strecke', game_mode: 'Spielmodus',
    mode_practice: 'Training', mode_race: 'Rennwochenende',
    track: 'Strecke', track_placeholder: '— Zuerst exe-Pfad in config.json setzen —',
    players: 'Spieler', max_players: 'Max Spieler', max_players_limit: 'Max Spieler Limit',
    weather_conditions: 'Wetter & Bedingungen', weather_type: 'Wettertyp', weather_behavior: 'Wetterverhalten',
    initial_grip: 'Anfänglicher Grip',
    weather_clear: 'Klar', weather_scattered: 'Vereinzelte Wolken', weather_broken: 'Wechselhaft',
    weather_overcast: 'Bedeckt', weather_drizzle: 'Nieselregen', weather_rain: 'Regen',
    weather_heavy_rain: 'Starkregen', weather_damp: 'Feucht',
    behavior_static: 'Statisch', behavior_dynamic: 'Dynamisch',
    grip_green: 'Grün', grip_fast: 'Schnell', grip_optimum: 'Optimal',
    car_selection: 'Fahrzeugauswahl', search_cars: '🔍 Fahrzeuge suchen...',
    filter_road: 'Straße', filter_race: 'Rennen', filter_track: 'Piste',
    filter_modern: 'Modern', filter_vintage: 'Vintage', filter_young: 'Youngtimer',
    filter_ice: 'Verbrenner', filter_ev: 'Elektro', filter_hybrid: 'Hybrid', filter_selected: 'Nur ausgewählte',
    no_cars_match: 'Keine Fahrzeuge entsprechen den Filtern',
    set_exe_first: 'Exe-Pfad in config.json setzen, um Fahrzeuge zu laden',
    duration_type: 'Dauertyp', dur_time: 'Zeit', dur_laps: 'Runden',
    duration_min: 'Dauer (Min)', duration_laps: 'Dauer (Runden)',
    time_multiplier: 'Zeitfaktor', start_hour: 'Startstunde', start_minute: 'Startminute',
    max_wait_box: 'Max Box-Wartezeit', overtime_wait: 'Overtime-Wartezeit',
    min_wait_players: 'Min Spieler-Wartezeit', max_wait_players: 'Max Spieler-Wartezeit',
    launcher_config: 'Launcher-Konfiguration',
    launcher_config_note: 'Bearbeite <code>config.json</code> neben dem Launcher und starte neu.',
    executable: 'Ausführbare Datei', web_port: 'Web-Port', server_count: 'Serveranzahl',
    change_password: 'Passwort ändern', old_password: 'Aktuelles Passwort',
    new_password: 'Neues Passwort', confirm_password: 'Passwort bestätigen',
    btn_change_pwd: 'Passwort ändern',
    pwd_mismatch: 'Neue Passwörter stimmen nicht überein', pwd_too_short: 'Passwort zu kurz (min 4 Zeichen)',
    pwd_changed: 'Passwort geändert! Bitte erneut anmelden.',
    language: 'Sprache',
    about: 'Über', about_text: 'EVO Server Launcher Web — Browser-Reimplementierung der originalen Avalonia-Desktop-App.',
    settings_saved_to: 'Sitzungskonfiguration gespeichert in:',
    preview_title: 'Generierte JSON-Vorschau', cmd_line: 'Befehlszeile', copy: '📋 Kopieren',
    config_json: 'configuration.json', season_json: 'season.json',
    no_exe_set: '(Exe-Pfad in config.json setzen und Strecke auswählen)',
    saved: 'Konfiguration gespeichert!', copied: 'Befehl kopiert!',
    server_started: 'Server gestartet! PID: ', stop_sent: 'Stoppsignal gesendet.',
    error_prefix: 'Fehler: ',
    logout: '⎋ Abmelden',
    theme_settings: 'Design & Aussehen', btn_apply_theme: 'Design anwenden', btn_reset_theme: 'Standard zurücksetzen',
    theme_applied: 'Design angewendet!', theme_reset: 'Design zurückgesetzt.',
    server_suffix: 'Server-Suffix',
    pit_slots: 'Max Boxenplätze',
    nav_presets: 'Vorlagen',
    presets_title: 'Event & Sitzungs-Vorlagen',
    presets_desc: 'Aktuelle Event- und Sitzungskonfiguration als benannte Vorlage speichern. Für alle Server geteilt.',
    presets_saved: 'Gespeicherte Vorlagen',
    presets_empty: 'Keine Vorlagen gespeichert.',
    preset_name_placeholder: 'Vorlagenname...',
    btn_save_preset: '💾 Vorlage speichern',
    btn_load_preset: '▶ Laden',
    preset_saved: 'Vorlage gespeichert!',
    preset_applied: 'Vorlage angewendet',
    preset_deleted: 'Vorlage gelöscht.',
    preset_name_required: 'Bitte einen Namen eingeben.',
    preset_overwrite_confirm: 'Vorlage "{name}" überschreiben?',
    preset_delete_confirm: 'Vorlage "{name}" löschen?',
  },
  fr: {
    nav_launch: 'Lancer', nav_server: 'Serveur', nav_event: 'Événement', nav_sessions: 'Sessions', nav_settings: 'Paramètres', nav_save: 'Sauvegarder',
    server_offline: 'Hors ligne', server_running: 'En cours',
    select_server: 'Sélectionner serveur',
    start_server: '▶ Démarrer le serveur', stop_server: '⏹ Arrêter le serveur',
    configure_before_launch: 'Configurez le serveur avant de le lancer',
    server_console: 'Console serveur', btn_clear: '🗑 Effacer', btn_refresh: '🔄 Actualiser', auto_scroll: 'Défilement auto',
    quick_actions: 'Actions rapides', preview_json: '👁 Aperçu JSON',
    server_identity: 'Identité du serveur', server_name: 'Nom du serveur', server_type: 'Type de serveur',
    type_ranked: 'Classé', type_unranked: 'Non classé',
    network_ports: 'Ports réseau', tcp_port: 'Port TCP', udp_port: 'Port UDP', http_port: 'Port HTTP',
    ports_note: 'Chaque serveur doit utiliser des ports différents.',
    passwords: 'Mots de passe', driver_password: 'Mot de passe pilote', spectator_password: 'Mot de passe spectateur',
    admin_password: 'Mot de passe admin', no_password: '(vide = pas de mot de passe)',
    paths_urls: 'Chemins & URLs', entry_list_path: 'Chemin entry list', results_path: 'Chemin des résultats',
    cycle_sessions: 'Cycle de sessions', enable_cycle: 'Activer le cycle',
    session_type_track: 'Type de session & Circuit', game_mode: 'Mode de jeu',
    mode_practice: 'Essais libres', mode_race: 'Week-end de course',
    track: 'Circuit', track_placeholder: '— Définir le chemin exe dans config.json —',
    players: 'Joueurs', max_players: 'Max joueurs', max_players_limit: 'Limite max joueurs',
    weather_conditions: 'Météo & Conditions', weather_type: 'Type de météo', weather_behavior: 'Comportement météo',
    initial_grip: 'Grip initial',
    weather_clear: 'Dégagé', weather_scattered: 'Nuages épars', weather_broken: 'Nuageux',
    weather_overcast: 'Couvert', weather_drizzle: 'Bruine', weather_rain: 'Pluie',
    weather_heavy_rain: 'Forte pluie', weather_damp: 'Humide',
    behavior_static: 'Statique', behavior_dynamic: 'Dynamique',
    grip_green: 'Vert', grip_fast: 'Rapide', grip_optimum: 'Optimal',
    car_selection: 'Sélection des voitures', search_cars: '🔍 Rechercher...',
    filter_road: 'Route', filter_race: 'Course', filter_track: 'Piste',
    filter_modern: 'Moderne', filter_vintage: 'Vintage', filter_young: 'Youngtimer',
    filter_ice: 'Thermique', filter_ev: 'Électrique', filter_hybrid: 'Hybride', filter_selected: 'Sélectionnées seulement',
    no_cars_match: 'Aucune voiture ne correspond aux filtres',
    set_exe_first: 'Définir le chemin exe dans config.json pour charger les voitures',
    duration_type: 'Type de durée', dur_time: 'Temps', dur_laps: 'Tours',
    duration_min: 'Durée (min)', duration_laps: 'Durée (tours)',
    time_multiplier: 'Multiplicateur de temps', start_hour: 'Heure de départ', start_minute: 'Minute de départ',
    max_wait_box: 'Attente max stand', overtime_wait: 'Attente overtime',
    min_wait_players: 'Attente min joueurs', max_wait_players: 'Attente max joueurs',
    launcher_config: 'Configuration du launcher',
    launcher_config_note: 'Modifiez <code>config.json</code> à côté du launcher et redémarrez.',
    executable: 'Exécutable', web_port: 'Port web', server_count: 'Nombre de serveurs',
    change_password: 'Changer le mot de passe', old_password: 'Mot de passe actuel',
    new_password: 'Nouveau mot de passe', confirm_password: 'Confirmer le mot de passe',
    btn_change_pwd: 'Changer le mot de passe',
    pwd_mismatch: 'Les nouveaux mots de passe ne correspondent pas', pwd_too_short: 'Mot de passe trop court (min 4 caractères)',
    pwd_changed: 'Mot de passe modifié ! Veuillez vous reconnecter.',
    language: 'Langue',
    about: 'À propos', about_text: 'EVO Server Launcher Web — réimplémentation navigateur de l\'app Avalonia originale.',
    settings_saved_to: 'Config session sauvegardée dans :',
    preview_title: 'Aperçu JSON généré', cmd_line: 'Ligne de commande', copy: '📋 Copier',
    config_json: 'configuration.json', season_json: 'season.json',
    no_exe_set: '(définir le chemin exe dans config.json et sélectionner un circuit)',
    saved: 'Configuration sauvegardée !', copied: 'Commande copiée !',
    server_started: 'Serveur démarré ! PID : ', stop_sent: 'Signal d\'arrêt envoyé.',
    error_prefix: 'Erreur : ',
    logout: '⎋ Déconnexion',
    theme_settings: 'Thème & Apparence', btn_apply_theme: 'Appliquer le thème', btn_reset_theme: 'Réinitialiser',
    theme_applied: 'Thème appliqué !', theme_reset: 'Thème réinitialisé.',
    server_suffix: 'Suffixe serveur',
    pit_slots: 'Emplacements pit max',
    nav_presets: 'Préréglages',
    presets_title: 'Préréglages Événement & Sessions',
    presets_desc: 'Sauvegardez la configuration actuelle comme préréglage nommé. Partagé entre tous les serveurs.',
    presets_saved: 'Préréglages sauvegardés',
    presets_empty: 'Aucun préréglage sauvegardé.',
    preset_name_placeholder: 'Nom du préréglage...',
    btn_save_preset: '💾 Sauvegarder',
    btn_load_preset: '▶ Charger',
    preset_saved: 'Préréglage sauvegardé !',
    preset_applied: 'Préréglage appliqué',
    preset_deleted: 'Préréglage supprimé.',
    preset_name_required: 'Entrez un nom pour le préréglage.',
    preset_overwrite_confirm: 'Écraser le préréglage "{name}" ?',
    preset_delete_confirm: 'Supprimer le préréglage "{name}" ?',
  }
};
