import 'package:flutter/material.dart';

class AppColorScheme {
  // Primary Colors - Modern Blue
  static const Color _primaryLight = Color(0xFF2563EB);
  static const Color _primaryDark = Color(0xFF3B82F6);

  // Secondary Colors - Purple
  static const Color _secondaryLight = Color(0xFF7C3AED);
  static const Color _secondaryDark = Color(0xFF8B5CF6);

  // Tertiary Colors - Teal
  static const Color _tertiaryLight = Color(0xFF0D9488);
  static const Color _tertiaryDark = Color(0xFF14B8A6);

  // Light Color Scheme
  static const ColorScheme lightColorScheme = ColorScheme(
    brightness: Brightness.light,
    primary: _primaryLight,
    onPrimary: Color(0xFFFFFFFF),
    primaryContainer: Color(0xFFDBEAFE),
    onPrimaryContainer: Color(0xFF001E3C),
    secondary: _secondaryLight,
    onSecondary: Color(0xFFFFFFFF),
    secondaryContainer: Color(0xFFEDE9FE),
    onSecondaryContainer: Color(0xFF21005D),
    tertiary: _tertiaryLight,
    onTertiary: Color(0xFFFFFFFF),
    tertiaryContainer: Color(0xFFCCFBF1),
    onTertiaryContainer: Color(0xFF00201C),
    error: Color(0xFFDC2626),
    onError: Color(0xFFFFFFFF),
    errorContainer: Color(0xFFFEE2E2),
    onErrorContainer: Color(0xFF7F1D1D),
    background: Color(0xFFFAFAFA),
    onBackground: Color(0xFF1A1A1A),
    surface: Color(0xFFFFFFFF),
    onSurface: Color(0xFF1A1A1A),
    surfaceVariant: Color(0xFFF3F4F6),
    onSurfaceVariant: Color(0xFF6B7280),
    outline: Color(0xFFD1D5DB),
    outlineVariant: Color(0xFFE5E7EB),
    shadow: Color(0xFF000000),
    scrim: Color(0xFF000000),
    inverseSurface: Color(0xFF1F2937),
    onInverseSurface: Color(0xFFF9FAFB),
    inversePrimary: Color(0xFF93C5FD),
    surfaceTint: _primaryLight,
  );

  // Dark Color Scheme
  static const ColorScheme darkColorScheme = ColorScheme(
    brightness: Brightness.dark,
    primary: _primaryDark,
    onPrimary: Color(0xFF000000),
    primaryContainer: Color(0xFF1E3A8A),
    onPrimaryContainer: Color(0xFFDBEAFE),
    secondary: _secondaryDark,
    onSecondary: Color(0xFF000000),
    secondaryContainer: Color(0xFF4C1D95),
    onSecondaryContainer: Color(0xFFEDE9FE),
    tertiary: _tertiaryDark,
    onTertiary: Color(0xFF000000),
    tertiaryContainer: Color(0xFF0F766E),
    onTertiaryContainer: Color(0xFFCCFBF1),
    error: Color(0xFFEF4444),
    onError: Color(0xFF000000),
    errorContainer: Color(0xFF7F1D1D),
    onErrorContainer: Color(0xFFFEE2E2),
    background: Color(0xFF0F172A),
    onBackground: Color(0xFFF8FAFC),
    surface: Color(0xFF1E293B),
    onSurface: Color(0xFFF8FAFC),
    surfaceVariant: Color(0xFF334155),
    onSurfaceVariant: Color(0xFFCBD5E1),
    outline: Color(0xFF64748B),
    outlineVariant: Color(0xFF475569),
    shadow: Color(0xFF000000),
    scrim: Color(0xFF000000),
    inverseSurface: Color(0xFFF8FAFC),
    onInverseSurface: Color(0xFF1E293B),
    inversePrimary: Color(0xFF1E40AF),
    surfaceTint: _primaryDark,
  );

  // Additional Custom Colors
  static const Color success = Color(0xFF10B981);
  static const Color warning = Color(0xFFF59E0B);
  static const Color info = Color(0xFF3B82F6);

  // Convenience getters for commonly used colors
  static Color get primary => _primaryLight;
  static Color get secondary => _secondaryLight;
  static Color get tertiary => _tertiaryLight;
  static Color get error => Color(0xFFDC2626);

  // Gradient Colors
  static const List<Color> primaryGradient = [
    Color(0xFF2563EB),
    Color(0xFF1D4ED8),
    Color(0xFF1E40AF),
  ];

  static const List<Color> secondaryGradient = [
    Color(0xFF7C3AED),
    Color(0xFF6D28D9),
    Color(0xFF5B21B6),
  ];

  static const List<Color> successGradient = [
    Color(0xFF10B981),
    Color(0xFF059669),
    Color(0xFF047857),
  ];

  static const List<Color> errorGradient = [
    Color(0xFFEF4444),
    Color(0xFFDC2626),
    Color(0xFFB91C1C),
  ];

  // Get color scheme based on brightness
  static ColorScheme getColorScheme(Brightness brightness) {
    return brightness == Brightness.dark ? darkColorScheme : lightColorScheme;
  }
}
