<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <!-- Rechteckiger Button mit runden Ecken und 3D-Effekt -->
    <Style x:Key="ModernRounded3DButtonStyle" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <!-- 3D Hintergrund mit abgerundeten Ecken -->
                        <Border CornerRadius="20" Background="#FF8B0000"
                                BorderBrush="Transparent"
                                BorderThickness="0">
                            <Border.Effect>
                                <DropShadowEffect Color="Black"
                                                  BlurRadius="20"
                                                  ShadowDepth="7"
                                                  Opacity="0.6" />
                            </Border.Effect>
                        </Border>

                        <!-- Gradient Überlagerung für 3D-Effekt -->
                        <Border CornerRadius="20" Background="#FFB22222" Opacity="0.3" />

                        <!-- Glanzeffekt -->
                        <Border CornerRadius="20">
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.3">
                                    <GradientStop Color="#80FFFFFF" Offset="0.0" />
                                    <GradientStop Color="#00FFFFFF" Offset="0.8" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>

                        <!-- Content (Button-Text) -->
                        <ContentPresenter HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          TextElement.FontSize="32"
                                          TextElement.FontWeight="Bold" />

                        <!-- Ripple-Effekt -->
                        <Ellipse Name="RippleEffect"
                                 Fill="White"
                                 Opacity="0"
                                 Width="0"
                                 Height="0"
                                 RenderTransformOrigin="0.5,0.5">
                            <Ellipse.RenderTransform>
                                <ScaleTransform ScaleX="1" ScaleY="1" />
                            </Ellipse.RenderTransform>
                        </Ellipse>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <!-- Hover-Effekt -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Cursor" Value="Hand" />
                            <Setter Property="Background" Value="#FF4500" />
                            <Setter TargetName="RippleEffect" Property="Opacity" Value="0.2" />
                        </Trigger>

                        <!-- Klick-Effekt mit Wellen -->
                        <Trigger Property="IsPressed" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <!-- Wellenbewegung -->
                                        <DoubleAnimation Storyboard.TargetName="RippleEffect"
                                                         Storyboard.TargetProperty="Opacity"
                                                         From="0.3" To="0" Duration="0:0:0.5" />
                                        <DoubleAnimation Storyboard.TargetName="RippleEffect"
                                                         Storyboard.TargetProperty="Width"
                                                         From="0" To="200" Duration="0:0:0.5" />
                                        <DoubleAnimation Storyboard.TargetName="RippleEffect"
                                                         Storyboard.TargetProperty="Height"
                                                         From="0" To="200" Duration="0:0:0.5" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Setter Property="Background" Value="#D32F2F" />
                        </Trigger>

                        <!-- 3D Effekt beim Loslassen -->
                        <Trigger Property="IsPressed" Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <!-- Bewegung nach oben simulieren -->
                                        <DoubleAnimation
                                            Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)"
                                            To="-2"
                                            Duration="0:0:0.2"
                                            AutoReverse="True" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Icon Button Style Basis -->
    <Style x:Key="IconButtonStyle" TargetType="Button" BasedOn="{StaticResource ModernRounded3DButtonStyle}">
        <Setter Property="Padding" Value="16,12" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <ContentPresenter Content="{TemplateBinding Content}" />
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Nur Icon Buttons (ohne Text) -->
    <Style x:Key="IconOnlyButtonStyle" TargetType="Button" BasedOn="{StaticResource ModernRounded3DButtonStyle}">
        <Setter Property="Width" Value="60" />
        <Setter Property="Height" Value="60" />
        <Setter Property="Padding" Value="0" />
    </Style>

    <!-- Material Design Icon Button Style -->
    <Style x:Key="MaterialIconButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Padding" Value="8" />
        <Setter Property="Width" Value="50" />
        <Setter Property="Height" Value="50" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="FontSize" Value="24" />
        <Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid Background="Transparent">
                        <Ellipse Name="HoverEllipse" Fill="White" Opacity="0" />
                        <ContentPresenter HorizontalAlignment="Center" 
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding Content}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="HoverEllipse" Property="Opacity" Value="0.15" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="HoverEllipse" Property="Opacity" Value="0.25" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Colored Material Icon Button Style -->
    <Style x:Key="MaterialIconButtonColoredStyle" TargetType="Button" BasedOn="{StaticResource MaterialIconButtonStyle}">
        <Setter Property="Width" Value="60" />
        <Setter Property="Height" Value="60" />
        <Setter Property="FontSize" Value="28" />
        <Setter Property="Foreground" Value="#1F1A00" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <Ellipse Name="BackgroundEllipse" Fill="#FFD700" />
                        <ContentPresenter HorizontalAlignment="Center" 
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding Content}"
                                          TextElement.Foreground="{TemplateBinding Foreground}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BackgroundEllipse" Property="Opacity" Value="0.8" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BackgroundEllipse" Property="Opacity" Value="0.6" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Primary Action Button Style (Gold mit Rounded) -->
    <Style x:Key="PrimaryActionButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="#D4AF37" />
        <Setter Property="Foreground" Value="#1F1A00" />
        <Setter Property="BorderBrush" Value="#F6E7A1" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="Padding" Value="16,8" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="8"
                            Padding="{TemplateBinding Padding}">
                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="#F0C847" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="#C49B2E" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Secondary Button Style (Dark mit Border) -->
    <Style x:Key="SecondaryButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="#3C3C3C" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="BorderBrush" Value="#555555" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="16,8" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="6"
                            Padding="{TemplateBinding Padding}">
                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="#4C4C4C" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="#2C2C2C" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Paging Button Style (für Bildergalerie) -->
    <Style x:Key="PagingButtonStyle" TargetType="Button" BasedOn="{StaticResource SecondaryButtonStyle}">
        <Setter Property="Width" Value="60" />
        <Setter Property="Height" Value="50" />
        <Setter Property="FontSize" Value="20" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Margin" Value="5,0" />
    </Style>

</ResourceDictionary>
