<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!-- Primary Button Style -->
    <Style x:Key="PrimaryButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{DynamicResource ButtonBg}"/>
        <Setter Property="Foreground" Value="white"/>
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <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="4"
                            Padding="{TemplateBinding Padding}">
                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource ButtonDisabled}"/>
                <Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource ButtonHover}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource ButtonPressed}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource ButtonPressed}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- Secondary Button Style -->
    <Style x:Key="SecondaryButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{DynamicResource SecondaryButtonBg}"/>
        <Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <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="4"
                            Padding="{TemplateBinding Padding}">
                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,1"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="{DynamicResource SecondaryButtonDisabled}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
                <Setter Property="Foreground" Value="{DynamicResource SecondaryButtonTextDisabled}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{DynamicResource SecondaryButtonPressed}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- Hyperlink Style -->
    <Style x:Key="HyperlinkStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource ButtonBg}"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource ButtonHover}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- ProgressBar Style -->
    <Style x:Key="ApplyProgressBarStyle" TargetType="ProgressBar">
        <Setter Property="Background" Value="{DynamicResource ButtonBorderColor}"/>
        <Setter Property="Foreground" Value="{DynamicResource ButtonBg}"/>
        <Setter Property="Height" Value="6"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Grid>
                        <Border x:Name="PART_Track" Background="{TemplateBinding Background}" CornerRadius="3" Height="{TemplateBinding Height}"/>
                        <Border x:Name="PART_Indicator" Background="{TemplateBinding Foreground}" CornerRadius="3" HorizontalAlignment="Left" Height="{TemplateBinding Height}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Modal Title Style -->
    <Style x:Key="ModalTitleStyle" TargetType="TextBlock">
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Margin" Value="0,0,0,8"/>
    </Style>

    <!-- Modal Subtext Style -->
    <Style x:Key="ModalSubtextStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
        <Setter Property="Opacity" Value="0.8"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="TextAlignment" Value="Center"/>
    </Style>

    <!-- ScrollBar Style -->
    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Width" Value="8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid>
                        <Track Name="PART_Track" IsDirectionReversed="true">
                            <Track.Thumb>
                                <Thumb>
                                    <Thumb.Style>
                                        <Style TargetType="Thumb">
                                            <Setter Property="Background" Value="{DynamicResource ScrollBarThumbColor}"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="Thumb">
                                                        <Border Background="{TemplateBinding Background}" CornerRadius="4"/>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                            <Style.Triggers>
                                                <Trigger Property="IsMouseOver" Value="True">
                                                    <Setter Property="Background" Value="{DynamicResource ScrollBarThumbHoverColor}"/>
                                                </Trigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Thumb.Style>
                                </Thumb>
                            </Track.Thumb>
                        </Track>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
