<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:fluent="clr-namespace:Avalonia.Themes.Fluent;assembly=Avalonia.Themes.Fluent"
             RequestedThemeVariant="Light"
             x:Class="OF_DL.Gui.App">
  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.ThemeDictionaries>
        <!-- Light Theme -->
        <ResourceDictionary x:Key="Light">
          <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#F8FAFC" />
          <SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="#FFFFFF" />
          <SolidColorBrush x:Key="SurfaceBorderBrush" Color="#E2E8F0" />

          <!-- Primary Button -->
          <SolidColorBrush x:Key="PrimaryButtonBackgroundBrush" Color="#3B82F6" />
          <SolidColorBrush x:Key="PrimaryButtonBackgroundHoverBrush" Color="#2563EB" />
          <SolidColorBrush x:Key="PrimaryButtonBackgroundPressedBrush" Color="#1D4ED8" />
          <SolidColorBrush x:Key="PrimaryButtonForegroundBrush" Color="#FFFFFF" />

          <!-- Secondary Button -->
          <SolidColorBrush x:Key="SecondaryButtonBackgroundBrush" Color="#FFFFFF" />
          <SolidColorBrush x:Key="SecondaryButtonBackgroundHoverBrush" Color="#F1F5F9" />
          <SolidColorBrush x:Key="SecondaryButtonBackgroundPressedBrush" Color="#E2E8F0" />
          <SolidColorBrush x:Key="SecondaryButtonForegroundBrush" Color="#1E293B" />
          <SolidColorBrush x:Key="SecondaryButtonBorderBrush" Color="#CBD5E1" />

          <!-- Top Bar -->
          <SolidColorBrush x:Key="TopBarBackgroundBrush" Color="#EFF6FF" />
          <SolidColorBrush x:Key="TopBarBorderBrush" Color="#DBEAFE" />
          <SolidColorBrush x:Key="TopBarTextBrush" Color="#1E40AF" />

          <!-- Text Colors -->
          <SolidColorBrush x:Key="TextPrimaryBrush" Color="#0F172A" />
          <SolidColorBrush x:Key="TextSecondaryBrush" Color="#475569" />

          <!-- Help Badge -->
          <SolidColorBrush x:Key="HelpBadgeBackgroundBrush" Color="#EFF6FF" />
          <SolidColorBrush x:Key="HelpBadgeBorderBrush" Color="#BFDBFE" />

          <!-- Error -->
          <SolidColorBrush x:Key="ErrorTextBrush" Color="#EF4444" />

          <!-- Preview/Item Background -->
          <SolidColorBrush x:Key="PreviewBackgroundBrush" Color="#F8FAFC" />
          <SolidColorBrush x:Key="PreviewBorderBrush" Color="#E2E8F0" />

          <!-- Danger Button -->
          <SolidColorBrush x:Key="DangerSoftBackgroundBrush" Color="#FEE2E2" />
          <SolidColorBrush x:Key="DangerSoftBorderBrush" Color="#FECACA" />
          <SolidColorBrush x:Key="DangerButtonBackgroundBrush" Color="#EF4444" />
          <SolidColorBrush x:Key="DangerButtonBackgroundHoverBrush" Color="#DC2626" />
          <SolidColorBrush x:Key="DangerButtonBackgroundPressedBrush" Color="#B91C1C" />

          <!-- Modal -->
          <SolidColorBrush x:Key="OverlayBackgroundBrush" Color="#99000000" />
          <SolidColorBrush x:Key="ModalBackgroundBrush" Color="#FFFFFF" />
          <SolidColorBrush x:Key="ModalBorderBrush" Color="#E2E8F0" />
        </ResourceDictionary>

        <!-- Dark Theme -->
        <ResourceDictionary x:Key="Dark">
          <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#0F172A" />
          <SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="#1E293B" />
          <SolidColorBrush x:Key="SurfaceBorderBrush" Color="#334155" />

          <!-- Primary Button -->
          <SolidColorBrush x:Key="PrimaryButtonBackgroundBrush" Color="#3B82F6" />
          <SolidColorBrush x:Key="PrimaryButtonBackgroundHoverBrush" Color="#2563EB" />
          <SolidColorBrush x:Key="PrimaryButtonBackgroundPressedBrush" Color="#1D4ED8" />
          <SolidColorBrush x:Key="PrimaryButtonForegroundBrush" Color="#FFFFFF" />

          <!-- Secondary Button - Fixed for dark theme -->
          <SolidColorBrush x:Key="SecondaryButtonBackgroundBrush" Color="#334155" />
          <SolidColorBrush x:Key="SecondaryButtonBackgroundHoverBrush" Color="#475569" />
          <SolidColorBrush x:Key="SecondaryButtonBackgroundPressedBrush" Color="#1E293B" />
          <SolidColorBrush x:Key="SecondaryButtonForegroundBrush" Color="#F1F5F9" />
          <SolidColorBrush x:Key="SecondaryButtonBorderBrush" Color="#475569" />

          <!-- Top Bar -->
          <SolidColorBrush x:Key="TopBarBackgroundBrush" Color="#1E293B" />
          <SolidColorBrush x:Key="TopBarBorderBrush" Color="#334155" />
          <SolidColorBrush x:Key="TopBarTextBrush" Color="#93C5FD" />

          <!-- Text Colors -->
          <SolidColorBrush x:Key="TextPrimaryBrush" Color="#F1F5F9" />
          <SolidColorBrush x:Key="TextSecondaryBrush" Color="#94A3B8" />

          <!-- Help Badge -->
          <SolidColorBrush x:Key="HelpBadgeBackgroundBrush" Color="#1E3A8A" />
          <SolidColorBrush x:Key="HelpBadgeBorderBrush" Color="#3B82F6" />

          <!-- Error -->
          <SolidColorBrush x:Key="ErrorTextBrush" Color="#F87171" />

          <!-- Preview/Item Background -->
          <SolidColorBrush x:Key="PreviewBackgroundBrush" Color="#0F172A" />
          <SolidColorBrush x:Key="PreviewBorderBrush" Color="#334155" />

          <!-- Danger Button -->
          <SolidColorBrush x:Key="DangerSoftBackgroundBrush" Color="#7F1D1D" />
          <SolidColorBrush x:Key="DangerSoftBorderBrush" Color="#991B1B" />
          <SolidColorBrush x:Key="DangerButtonBackgroundBrush" Color="#EF4444" />
          <SolidColorBrush x:Key="DangerButtonBackgroundHoverBrush" Color="#DC2626" />
          <SolidColorBrush x:Key="DangerButtonBackgroundPressedBrush" Color="#B91C1C" />

          <!-- Modal -->
          <SolidColorBrush x:Key="OverlayBackgroundBrush" Color="#CC000000" />
          <SolidColorBrush x:Key="ModalBackgroundBrush" Color="#1E293B" />
          <SolidColorBrush x:Key="ModalBorderBrush" Color="#334155" />
        </ResourceDictionary>
      </ResourceDictionary.ThemeDictionaries>
    </ResourceDictionary>
  </Application.Resources>
  <Application.Styles>
    <fluent:FluentTheme />
  </Application.Styles>
</Application>
