import 'package:flutter/material.dart';
import 'package:get/get.dart';

class AppColor {
  // --- Core Brand Colors ---
  static const Color primaryColor = Color(0xFF1A2340); // Navy Blue
  static const Color secondaryColorStatic = Color(0xFF8C9CF8); // Periwinkle Blue
  static const Color accentColor = Color(0xFF8C9CF8);

  // --- Dynamic Colors (Light / Dark Mode Support) ---
  static Color get writeColor => Get.isDarkMode ? Colors.white : const Color(0xFF0F172A); // Primary Text
  static Color get secondaryColor => Get.isDarkMode ? const Color(0xFF1E1E1E) : const Color(0xFFF8FAFC); // Background
  static Color get cardColor => Get.isDarkMode ? const Color(0xFF2C2C2E) : const Color(0xFFFFFFFF); // Card Background
  static Color get surfaceColor => cardColor; // Added back for backwards compatibility

  // --- Neutral & Status Colors ---
  static Color get grayColor => Get.isDarkMode ? Colors.grey[400]! : const Color(0xFF64748B); // Secondary Text
  static Color get borderColor => Get.isDarkMode ? const Color(0xFF3A3A3C) : const Color(0xFFE2E8F0); // Border

  static const Color redColor = Color(0xFFEF4444); // Error
  static const Color greenColor = Color(0xFF22C55E); // Success
  static const Color yellowColor = Color(0xFFF59E0B); // Warning

  // --- Legacy / Maps Colors (Kept for compatibility) ---
  static const Color blueColor = Color(0xFF1A2340);
  static const Color gold = Color(0xFFFFD700);
  static const Color bronze = Color(0xFFCD7F32);
  static const Color goldenBronze = Color(0xFFB87333); 
  
  static Color get cyanBlue => const Color(0xFF1A2340);
  static Color get cyanAccent => const Color(0xFF1A2340).withOpacity(0.12);
  static Color get deepPurpleAccent => const Color(0xFF8C9CF8).withOpacity(0.1);

  // --- Theme Helpers ---
  static Brightness get brightness => Get.isDarkMode ? Brightness.dark : Brightness.light;
}
