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

class AppTheme {
  // Colors
  static const Color background = Color(0xFFFAF9F6); // Off-white / Beige wash
  static const Color primary = Color(0xFF6B9AC4); // Muted blue
  static const Color primaryDark = Color(0xFF5A81A3);
  static const Color textMain = Color(0xFF2D3142);
  static const Color textSecondary = Color(0xFF7D818A);
  static const Color cardColor = Colors.white;
  static const Color surface = Color(0xFFF0EFE9);

  static const Color energyLow = Color(0xFFE8D5B5); // Beige/Yellowish
  static const Color energyMed = Color(0xFFB5CDE8); // Light Blue
  static const Color energyHigh = Color(0xFFB5E8C8); // Light Green

  // Dimensions
  static const double radius = 24.0;
  static const double spacing = 20.0;

  // Shadows
  static List<BoxShadow> get shadow => [
    BoxShadow(
      color: Colors.black.withOpacity(0.04),
      blurRadius: 16,
      offset: const Offset(0, 4),
    ),
  ];

  static List<BoxShadow> get shadowHover => [
    BoxShadow(
      color: Colors.black.withOpacity(0.08),
      blurRadius: 24,
      offset: const Offset(0, 8),
    ),
  ];

  // Typography
  static TextTheme textTheme = TextTheme(
    displayLarge: GoogleFonts.outfit(
      fontSize: 32,
      fontWeight: FontWeight.w600,
      color: textMain,
    ),
    displayMedium: GoogleFonts.outfit(
      fontSize: 24,
      fontWeight: FontWeight.w600,
      color: textMain,
    ),
    bodyLarge: GoogleFonts.inter(
      fontSize: 18,
      fontWeight: FontWeight.w400,
      color: textMain,
    ),
    bodyMedium: GoogleFonts.inter(
      fontSize: 16,
      fontWeight: FontWeight.w400,
      color: textSecondary,
    ),
    labelLarge: GoogleFonts.outfit(
      fontSize: 16,
      fontWeight: FontWeight.w600,
      color: Colors.white,
    ),
  );

  static ThemeData get themeData {
    return ThemeData(
      useMaterial3: true,
      scaffoldBackgroundColor: background,
      colorScheme: ColorScheme.fromSeed(
        seedColor: primary,
        secondary: const Color(0xFF9AC46B), // Soft Sage
        surface: surface,
      ),
      textTheme: textTheme,
      appBarTheme: AppBarTheme(
        backgroundColor: background,
        elevation: 0,
        iconTheme: const IconThemeData(color: textMain),
        titleTextStyle: textTheme.displayMedium,
      ),
    );
  }
}
