<UserControl x:Class="GsConfigTool.Views.HomePage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:vm="clr-namespace:GsConfigTool.ViewModels"
             Background="{StaticResource BgBrush}">

    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel Margin="40,36">

            <!-- Header -->
            <TextBlock Text="GS Config Tool" FontSize="32" FontWeight="Bold"
                       Foreground="{StaticResource AccentBrush}"/>
            <TextBlock Text="Erstelle vollständige Gameserver-Konfigurationen einfach und schnell."
                       FontSize="14" Foreground="{StaticResource TextMutedBrush}" Margin="0,6,0,0"/>

            <Separator Margin="0,24,0,28"/>

            <!-- Game Cards -->
            <TextBlock Text="NEUES PROJEKT ERSTELLEN" Style="{StaticResource SectionHeader}" Margin="0,0,0,16"/>

            <WrapPanel>

                <!-- ARK SE Card -->
                <Border Style="{StaticResource CardBorder}" Margin="0,0,16,16" Width="280"
                        Cursor="Hand">
                    <Border.InputBindings>
                        <MouseBinding MouseAction="LeftClick" Command="{Binding NewArkSECommand}"/>
                    </Border.InputBindings>
                    <StackPanel>
                        <Border Height="6" CornerRadius="3,3,0,0" Background="{StaticResource ArkBrush}"
                                Margin="-16,-16,-16,12"/>
                        <StackPanel Orientation="Horizontal" Margin="0,6,0,0">
                            <Border Width="36" Height="36" CornerRadius="8"
                                    Background="#1A0F08" Margin="0,0,12,0">
                                <TextBlock Text="🦕" FontSize="18" HorizontalAlignment="Center"
                                           VerticalAlignment="Center"/>
                            </Border>
                            <StackPanel>
                                <TextBlock Text="ARK: Survival Evolved"
                                           FontWeight="SemiBold" FontSize="14"/>
                                <TextBlock Text="ASE · Game.ini + GameUserSettings.ini"
                                           Foreground="{StaticResource TextMutedBrush}" FontSize="11"/>
                            </StackPanel>
                        </StackPanel>
                        <TextBlock Margin="0,12,0,0" FontSize="12" Foreground="{StaticResource TextMutedBrush}"
                                   TextWrapping="Wrap"
                                   Text="Konfiguriere Raten, Loot-Drops, Engrams, Kreatur-Multiplikatoren und mehr."/>
                        <Button Style="{StaticResource PrimaryButton}" Margin="0,16,0,0"
                                Background="{StaticResource ArkBrush}"
                                Command="{Binding NewArkSECommand}"
                                Content="Neues ASE-Projekt"/>
                    </StackPanel>
                </Border>

                <!-- ARK SA Card -->
                <Border Style="{StaticResource CardBorder}" Margin="0,0,16,16" Width="280"
                        Cursor="Hand">
                    <Border.InputBindings>
                        <MouseBinding MouseAction="LeftClick" Command="{Binding NewArkSACommand}"/>
                    </Border.InputBindings>
                    <StackPanel>
                        <Border Height="6" CornerRadius="3,3,0,0" Background="{StaticResource ArkSABrush}"
                                Margin="-16,-16,-16,12"/>
                        <StackPanel Orientation="Horizontal" Margin="0,6,0,0">
                            <Border Width="36" Height="36" CornerRadius="8"
                                    Background="#1A0808" Margin="0,0,12,0">
                                <TextBlock Text="🦖" FontSize="18" HorizontalAlignment="Center"
                                           VerticalAlignment="Center"/>
                            </Border>
                            <StackPanel>
                                <TextBlock Text="ARK: Survival Ascended"
                                           FontWeight="SemiBold" FontSize="14"/>
                                <TextBlock Text="ASA · Game.ini + GameUserSettings.ini"
                                           Foreground="{StaticResource TextMutedBrush}" FontSize="11"/>
                            </StackPanel>
                        </StackPanel>
                        <TextBlock Margin="0,12,0,0" FontSize="12" Foreground="{StaticResource TextMutedBrush}"
                                   TextWrapping="Wrap"
                                   Text="Gleiche Features wie ASE, optimiert für Unreal Engine 5 Server."/>
                        <Button Style="{StaticResource PrimaryButton}" Margin="0,16,0,0"
                                Background="{StaticResource ArkSABrush}"
                                Command="{Binding NewArkSACommand}"
                                Content="Neues ASA-Projekt"/>
                    </StackPanel>
                </Border>

                <!-- Palworld Card -->
                <Border Style="{StaticResource CardBorder}" Margin="0,0,0,16" Width="280"
                        Cursor="Hand">
                    <Border.InputBindings>
                        <MouseBinding MouseAction="LeftClick" Command="{Binding NewPalworldCommand}"/>
                    </Border.InputBindings>
                    <StackPanel>
                        <Border Height="6" CornerRadius="3,3,0,0" Background="{StaticResource PalworldBrush}"
                                Margin="-16,-16,-16,12"/>
                        <StackPanel Orientation="Horizontal" Margin="0,6,0,0">
                            <Border Width="36" Height="36" CornerRadius="8"
                                    Background="#0A1A0A" Margin="0,0,12,0">
                                <TextBlock Text="🐾" FontSize="18" HorizontalAlignment="Center"
                                           VerticalAlignment="Center"/>
                            </Border>
                            <StackPanel>
                                <TextBlock Text="Palworld"
                                           FontWeight="SemiBold" FontSize="14"/>
                                <TextBlock Text="PW · PalWorldSettings.ini"
                                           Foreground="{StaticResource TextMutedBrush}" FontSize="11"/>
                            </StackPanel>
                        </StackPanel>
                        <TextBlock Margin="0,12,0,0" FontSize="12" Foreground="{StaticResource TextMutedBrush}"
                                   TextWrapping="Wrap"
                                   Text="Konfiguriere alle Palworld-Serveroptionen, Raten und PvP-Einstellungen."/>
                        <Button Style="{StaticResource PrimaryButton}" Margin="0,16,0,0"
                                Background="{StaticResource PalworldBrush}" Foreground="White"
                                Command="{Binding NewPalworldCommand}"
                                Content="Neues Palworld-Projekt"/>
                    </StackPanel>
                </Border>
            </WrapPanel>

            <Separator Margin="0,12,0,24"/>

            <!-- Quick Access -->
            <TextBlock Text="GESPEICHERTE PROJEKTE" Style="{StaticResource SectionHeader}" Margin="0,0,0,12"/>
            <Button Style="{StaticResource SecondaryButton}" HorizontalAlignment="Left"
                    Command="{Binding OpenProjectsCommand}">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="📁 " FontSize="13"/>
                    <TextBlock Text="Alle Projekte anzeigen"/>
                </StackPanel>
            </Button>

            <Separator Margin="0,28,0,20"/>

            <!-- Features -->
            <TextBlock Text="FEATURES" Style="{StaticResource SectionHeader}" Margin="0,0,0,16"/>
            <WrapPanel>
                <Border Style="{StaticResource CardBorder}" Width="240" Margin="0,0,12,12">
                    <StackPanel>
                        <TextBlock Text="📋" FontSize="24" Margin="0,0,0,8"/>
                        <TextBlock Text="Vollständige Config" FontWeight="SemiBold"/>
                        <TextBlock Text="Game.ini, GameUserSettings.ini, PalWorldSettings.ini"
                                   Foreground="{StaticResource TextMutedBrush}" FontSize="11"
                                   TextWrapping="Wrap" Margin="0,4,0,0"/>
                    </StackPanel>
                </Border>
                <Border Style="{StaticResource CardBorder}" Width="240" Margin="0,0,12,12">
                    <StackPanel>
                        <TextBlock Text="💾" FontSize="24" Margin="0,0,0,8"/>
                        <TextBlock Text="Projekte speichern" FontWeight="SemiBold"/>
                        <TextBlock Text="Alle Projekte werden lokal in einer SQLite-Datenbank gespeichert."
                                   Foreground="{StaticResource TextMutedBrush}" FontSize="11"
                                   TextWrapping="Wrap" Margin="0,4,0,0"/>
                    </StackPanel>
                </Border>
                <Border Style="{StaticResource CardBorder}" Width="240" Margin="0,0,0,12">
                    <StackPanel>
                        <TextBlock Text="📤" FontSize="24" Margin="0,0,0,8"/>
                        <TextBlock Text="Export" FontWeight="SemiBold"/>
                        <TextBlock Text="Config als Datei speichern oder direkt in die Zwischenablage kopieren."
                                   Foreground="{StaticResource TextMutedBrush}" FontSize="11"
                                   TextWrapping="Wrap" Margin="0,4,0,0"/>
                    </StackPanel>
                </Border>
            </WrapPanel>

        </StackPanel>
    </ScrollViewer>
</UserControl>
