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

    <!-- 媒体控制图标定义 -->
    
    <!-- 快退10帧图标 <<  -->
    <Geometry x:Key="FastBackwardIcon">
        M11,6L2,12L11,18V6M20,6L11,12L20,18V6Z
    </Geometry>
    
    <!-- 上一帧图标 <| -->
    <Geometry x:Key="StepBackwardIcon">
        M6,6V18H8V6H6M9.5,12L18,6V18L9.5,12Z
    </Geometry>
    
    <!-- 反向播放图标 ◀ -->
    <Geometry x:Key="ReversePlayIcon">
        M8,6V18L19,12L8,6Z
    </Geometry>
    
    <!-- 暂停图标 || -->
    <Geometry x:Key="PauseIcon">
        M14,18H18V6H14M6,18H10V6H6V18Z
    </Geometry>
    
    <!-- 正向播放图标 ▶ -->
    <Geometry x:Key="PlayIcon">
        M8,6V18L19,12L8,6Z
    </Geometry>
    
    <!-- 下一帧图标 |> -->
    <Geometry x:Key="StepForwardIcon">
        M16,18H18V6H16M6,18L14.5,12L6,6V18Z
    </Geometry>
    
    <!-- 快进10帧图标 >> -->
    <Geometry x:Key="FastForwardIcon">
        M13,6V18L22,12M4,18L12.5,12L4,6V18Z
    </Geometry>
    
    <!-- 停止图标 ■ -->
    <Geometry x:Key="StopIcon">
        M18,18H6V6H18V18Z
    </Geometry>

    <!-- 媒体控制按钮基础样式 -->
    <Style x:Key="MediaControlButtonStyle" TargetType="Button">
        <Setter Property="Width" Value="32"/>
        <Setter Property="Height" Value="32"/>
        <Setter Property="Margin" Value="2"/>
        <Setter Property="Background" Value="#FF404040"/>
        <Setter Property="BorderBrush" Value="#FF606060"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="border" 
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3">
                        <ContentPresenter HorizontalAlignment="Center" 
                                        VerticalAlignment="Center"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#FF5A5A5A"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="#FF4472C4"/>
                            <Setter Property="RenderTransform">
                                <Setter.Value>
                                    <ScaleTransform ScaleX="1.05" ScaleY="1.05"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#FF2B579A"/>
                            <Setter Property="RenderTransform">
                                <Setter.Value>
                                    <ScaleTransform ScaleX="0.95" ScaleY="0.95"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="border" Property="Background" Value="#FF2A2A2A"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="#FF3A3A3A"/>
                            <Setter Property="Foreground" Value="#FF666666"/>
                            <Setter Property="Opacity" Value="0.6"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 停止按钮样式（红色主题） -->
    <Style x:Key="StopButtonStyle" TargetType="Button" BasedOn="{StaticResource MediaControlButtonStyle}">
        <Setter Property="Background" Value="#FF8B0000"/>
        <Setter Property="BorderBrush" Value="#FFAA0000"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="3">
                        <ContentPresenter HorizontalAlignment="Center"
                                        VerticalAlignment="Center"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#FFAA0000"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="#FFCC0000"/>
                            <Setter Property="RenderTransform">
                                <Setter.Value>
                                    <ScaleTransform ScaleX="1.05" ScaleY="1.05"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#FF660000"/>
                            <Setter Property="RenderTransform">
                                <Setter.Value>
                                    <ScaleTransform ScaleX="0.95" ScaleY="0.95"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="border" Property="Background" Value="#FF2A2A2A"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="#FF3A3A3A"/>
                            <Setter Property="Foreground" Value="#FF666666"/>
                            <Setter Property="Opacity" Value="0.6"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 播放状态指示样式 -->
    <Style x:Key="ActivePlayButtonStyle" TargetType="Button" BasedOn="{StaticResource MediaControlButtonStyle}">
        <Setter Property="Background" Value="#FF4472C4"/>
        <Setter Property="BorderBrush" Value="#FF5A82D4"/>
    </Style>

    <!-- 滑块按钮样式（必须在TimelineSliderStyle之前定义） -->
    <Style x:Key="SliderButtonStyle" TargetType="RepeatButton">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border BorderThickness="1"
                            BorderBrush="#FF606060"
                            Background="#FF404040"
                            Height="6"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 滑块拇指样式（必须在TimelineSliderStyle之前定义） -->
    <Style x:Key="SliderThumbStyle" TargetType="Thumb">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Height" Value="14"/>
        <Setter Property="Width" Value="14"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Ellipse x:Name="Ellipse"
                             Fill="#FF4472C4"
                             Stroke="#FF2B579A"
                             StrokeThickness="1"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Ellipse" Property="Fill" Value="#FF5A82D4"/>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Setter TargetName="Ellipse" Property="Fill" Value="#FF2B579A"/>
                            <Setter TargetName="Ellipse" Property="StrokeThickness" Value="2"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 时间轴滑块样式 -->
    <Style x:Key="TimelineSliderStyle" TargetType="Slider">
        <Setter Property="Height" Value="20"/>
        <Setter Property="Background" Value="#FF404040"/>
        <Setter Property="Foreground" Value="#FF4472C4"/>
        <Setter Property="BorderBrush" Value="#FF606060"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Slider">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Track Grid.Row="1" x:Name="PART_Track">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Style="{StaticResource SliderButtonStyle}"
                                            Command="Slider.DecreaseLarge"/>
                            </Track.DecreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Style="{StaticResource SliderThumbStyle}"/>
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Style="{StaticResource SliderButtonStyle}"
                                            Command="Slider.IncreaseLarge"/>
                            </Track.IncreaseRepeatButton>
                        </Track>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 时间显示文本样式 -->
    <Style x:Key="TimeDisplayStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontFamily" Value="Consolas, Courier New"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

</ResourceDictionary>