[ 'page_title' => 'My Profile & Favorites | FlixCooks', 'meta_desc' => 'Manage your profile, dietary goals, and saved seasonal recipes on FlixCooks.', 'login' => 'Login', 'signup' => 'Register', 'email' => 'Email Address', 'password' => 'Password', 'confirm_pass' => 'Confirm Password', 'goal' => 'Dietary Goal', 'goal_placeholder' => 'Select your dietary goal', 'goal_loose' => 'Weight Loss / Low-Carb', 'goal_gain' => 'Muscle Gain / High-Protein', 'goal_healthy' => 'Healthy & Balanced', 'no_account' => "Don't have an account yet?", 'have_account' => 'Already have an account?', 'welcome' => 'Welcome back,', 'your_goal' => 'Your dietary goal', 'saved_recipes' => 'Your Saved Favorites', 'no_favorites' => "You haven't saved any recipes yet. Explore our collection and tap the heart icon!", 'logout' => 'Log Out', 'err_pass_match' => 'Passwords do not match.', 'err_fill_fields'=> 'Please fill in all fields.', ], 'de' => [ 'page_title' => 'Mein Profil & Favoriten | FlixCooks', 'meta_desc' => 'Verwalte dein Profil, deine Ernährungsziele und gespeicherten Rezepte auf FlixCooks.', 'login' => 'Anmelden', 'signup' => 'Registrieren', 'email' => 'E-Mail-Adresse', 'password' => 'Passwort', 'confirm_pass' => 'Passwort bestätigen', 'goal' => 'Ernährungsziel', 'goal_placeholder' => 'Wähle dein Ernährungsziel', 'goal_loose' => 'Abnehmen / Low-Carb', 'goal_gain' => 'Muskelaufbau / High-Protein', 'goal_healthy' => 'Gesund & Ausgewogen', 'no_account' => "Noch kein Konto?", 'have_account' => 'Bereits registriert?', 'welcome' => 'Willkommen zurück,', 'your_goal' => 'Dein Ernährungsziel', 'saved_recipes' => 'Deine gespeicherten Favoriten', 'no_favorites' => "Du hast noch keine Rezepte gespeichert. Entdecke unsere Küche und klicke auf das Herz-Symbol!", 'logout' => 'Abmelden', 'err_pass_match' => 'Die Passwörter stimmen nicht überein.', 'err_fill_fields'=> 'Bitte fülle alle Felder aus.', ] ]; $t = $copy[$lang]; $pageTitle = $t['page_title']; $description = $t['meta_desc']; // Check PHP session state $user = $_SESSION['fc_user'] ?? null; $allRecipes = load_recipes(); $allRecipesLocal = localize_recipes($allRecipes, $lang); // Formatter helper for JS usage $recipesJson = json_encode(array_values(array_map(function($r) use ($lang) { return [ 'slug' => $r['slug'], 'title' => $r['title'], 'hero' => $r['hero'], 'difficulty' => $r['difficulty'], 'total_time' => (int)($r['total_time'] ?? 0), 'url' => '/recipe.php?slug=' . urlencode($r['slug']) . '&lang=' . $lang ]; }, $allRecipesLocal))); include __DIR__ . '/partials/head.php'; include __DIR__ . '/partials/header.php'; ?>