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

    <Duration x:Key="NexusFastDuration">0:0:0.20</Duration>
    <Duration x:Key="NexusNormalDuration">0:0:0.30</Duration>
    <Duration x:Key="NexusSlowDuration">0:0:0.55</Duration>
    <Duration x:Key="NexusSpotlightDuration">0:0:0.42</Duration>

    <CubicEase x:Key="NexusEaseOut" EasingMode="EaseOut"/>
    <CubicEase x:Key="NexusEaseInOut" EasingMode="EaseInOut"/>

    <Storyboard x:Key="NexusFadeInStoryboard">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="{StaticResource NexusNormalDuration}"/>
    </Storyboard>

    <!-- Launcher entrance -->
    <Storyboard x:Key="NexusSpotlightOpenStoryboard">
        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                         From="0" To="1"
                         Duration="{StaticResource NexusSpotlightDuration}"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)"
                         From="-48" To="0"
                         Duration="{StaticResource NexusSpotlightDuration}"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                         From="0.88" To="1"
                         Duration="{StaticResource NexusSpotlightDuration}"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                         From="0.88" To="1"
                         Duration="{StaticResource NexusSpotlightDuration}"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusNotificationSlideInStoryboard">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                         From="80" To="0"
                         Duration="{StaticResource NexusNormalDuration}"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                         From="0" To="1"
                         Duration="{StaticResource NexusFastDuration}"/>
    </Storyboard>

    <!-- Dock 3.0 -->
    <Duration x:Key="NexusDockDuration">0:0:0.15</Duration>

    <Storyboard x:Key="NexusDockRiseStoryboard">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)"
                         From="24" To="0"
                         Duration="0:0:0.45"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                         From="0.96" To="1"
                         Duration="0:0:0.45"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                         From="0.96" To="1"
                         Duration="0:0:0.45"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                         From="0" To="1"
                         Duration="0:0:0.45"
                         EasingFunction="{StaticResource NexusEaseOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockOuterGlowPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.55" To="1" Duration="0:0:3.2"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockRimShimmerStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.45" To="1" Duration="0:0:2.4"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockFloorBreathStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.25" To="0.55" Duration="0:0:3.6"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockCenterBandPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.65" To="1" Duration="0:0:2.8"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockPrimaryGlowPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.45" To="0.65" Duration="0:0:2.5"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockIconPopStoryboard">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                         From="0.6" To="1" Duration="0:0:0.32" EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                         From="0.6" To="1" Duration="0:0:0.32" EasingFunction="{StaticResource NexusEaseOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.28"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockFloatStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)"
                         From="0" To="-6"
                         Duration="0:0:3.2"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusDockGlowPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.55" To="1" Duration="0:0:2.8"/>
    </Storyboard>

    <!-- Wallpaper engine -->
    <Storyboard x:Key="NexusHorizonPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.35" To="0.75" Duration="0:0:6"/>
    </Storyboard>

    <Storyboard x:Key="NexusLightWaveStoryboard" RepeatBehavior="Forever">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.X)"
                         From="-400" To="400"
                         Duration="0:0:12"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusLightWaveStoryboard2" RepeatBehavior="Forever">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.X)"
                         From="300" To="-300"
                         Duration="0:0:16"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusLogoFloatStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)"
                         From="0" To="-14"
                         Duration="0:0:5"
                         EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusHeroGlowPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.45" To="0.85" Duration="0:0:3.5"/>
    </Storyboard>

    <Storyboard x:Key="NexusWallpaperOrbDriftStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                         From="-30" To="30" Duration="0:0:22" EasingFunction="{StaticResource NexusEaseInOut}"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
                         From="0" To="-22" Duration="0:0:18" EasingFunction="{StaticResource NexusEaseInOut}"/>
    </Storyboard>

    <Storyboard x:Key="NexusParticleTwinkleStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.15" To="0.85" Duration="0:0:2.4"/>
    </Storyboard>

    <Storyboard x:Key="NexusOnlinePulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.5" To="1" Duration="0:0:1.4"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                         From="1" To="1.35" Duration="0:0:1.4"/>
        <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                         From="1" To="1.35" Duration="0:0:1.4"/>
    </Storyboard>

    <Storyboard x:Key="NexusStatusCardPulseStoryboard" RepeatBehavior="Forever" AutoReverse="True">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.7" To="1" Duration="0:0:2"/>
    </Storyboard>

    <!-- Dock 3.0 icons -->
    <Style x:Key="NexusDock3IconStyle" TargetType="Button" BasedOn="{StaticResource NexusIconButtonStyle}">
        <Setter Property="RenderTransformOrigin" Value="0.5,1"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="1" ScaleY="1"/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                             To="1.38" Duration="{StaticResource NexusFastDuration}" EasingFunction="{StaticResource NexusEaseOut}"/>
                            <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                             To="1.38" Duration="{StaticResource NexusFastDuration}" EasingFunction="{StaticResource NexusEaseOut}"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                             To="1" Duration="{StaticResource NexusFastDuration}"/>
                            <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                             To="1" Duration="{StaticResource NexusFastDuration}"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="NexusDock2IconStyle" TargetType="Button" BasedOn="{StaticResource NexusDock3IconStyle}"/>

    <Style x:Key="NexusLauncherResultRowStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{StaticResource NexusTextPrimaryBrush}"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="16,14"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="Row" CornerRadius="14" Background="Transparent" Padding="{TemplateBinding Padding}"
                            BorderBrush="#18FFFFFF" BorderThickness="1">
                        <ContentPresenter/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Row" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                        <GradientStop Color="#338A4FFF" Offset="0"/>
                                        <GradientStop Color="#1800D4FF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="Row" Property="BorderBrush" Value="#4400D4FF"/>
                            <Setter TargetName="Row" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect Color="#8A4FFF" BlurRadius="28" ShadowDepth="0" Opacity="0.5"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
