import 'package:flutter/material.dart';

class AppColors {
  AppColors._();

  static const bgTop = Color(0xFF0B0F1A);
  static const bgBottom = Color(0xFF141B2E);
  static const accent = Color(0xFF7C5CFF);
  static const accent2 = Color(0xFF19C6E0);
  static const surface = Color(0xFF171E31);
  static const surfaceAlt = Color(0xFF1E2740);
  static const border = Color(0xFF2A3350);
  static const textPrimary = Color(0xFFEAF0FF);
  static const textSecondary = Color(0xFF93A0C4);
  static const danger = Color(0xFFFF5C7A);
  static const warning = Color(0xFFFFB454);
  static const success = Color(0xFF4CE0B3);
}

const backgroundGradient = LinearGradient(
  begin: Alignment.topLeft,
  end: Alignment.bottomRight,
  colors: [AppColors.bgTop, AppColors.bgBottom],
);

ThemeData buildAppTheme() {
  final base = ThemeData(brightness: Brightness.dark, useMaterial3: true);
  return base.copyWith(
    scaffoldBackgroundColor: AppColors.bgTop,
    colorScheme: base.colorScheme.copyWith(
      primary: AppColors.accent,
      secondary: AppColors.accent2,
      surface: AppColors.surface,
      error: AppColors.danger,
    ),
    textTheme: base.textTheme.apply(
      bodyColor: AppColors.textPrimary,
      displayColor: AppColors.textPrimary,
    ),
    dividerColor: AppColors.border,
    cardTheme: CardThemeData(
      color: AppColors.surface,
      elevation: 0,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(16),
        side: const BorderSide(color: AppColors.border),
      ),
    ),
  );
}
