import 'package:flutter/material.dart';

class El3abColors {
  El3abColors._();

  // Backgrounds
  static const Color bgDeep = Color(0xFF050810);
  static const Color bgBase = Color(0xFF0A1020);
  static const Color bgCard = Color(0xFF121A2E);
  static const Color bgElevated = Color(0xFF1A2440);

  // Brand
  static const Color gold = Color(0xFFE4AC38);
  static const Color goldSoft = Color(0xFFFFCC66);
  static const Color cyan = Color(0xFF00FFFF);
  static const Color blue = Color(0xFF2082F0);

  // Game colors
  static const Color chessPrimary = Color(0xFF2563EB);
  static const Color ludoPrimary = Color(0xFF8B5CF6);
  static const Color dominoPrimary = Color(0xFF10B981);
  static const Color backgammonPrimary = Color(0xFFF59E0B);

  // Text
  static const Color textPrimary = Color(0xFFF8FAFC);
  static const Color textSecondary = Color(0xFF94A3B8);
  static const Color textMuted = Color(0xFF475569);

  // Status
  static const Color success = Color(0xFF34D399);
  static const Color error = Color(0xFFEF4444);
  static const Color warning = Color(0xFFF59E0B);

  // Border
  static const Color border = Color(0x0FFFFFFF);
}

class El3abTheme {
  El3abTheme._();

  static ThemeData get dark => ThemeData(
        brightness: Brightness.dark,
        scaffoldBackgroundColor: El3abColors.bgDeep,
        colorScheme: const ColorScheme.dark(
          primary: El3abColors.gold,
          secondary: El3abColors.cyan,
          surface: El3abColors.bgBase,
          error: El3abColors.error,
        ),
        fontFamily: 'IBM Plex Sans Arabic',
        appBarTheme: const AppBarTheme(
          backgroundColor: El3abColors.bgBase,
          elevation: 0,
          centerTitle: true,
        ),
        navigationBarTheme: NavigationBarThemeData(
          backgroundColor: El3abColors.bgBase,
          indicatorColor: El3abColors.gold.withValues(alpha: 0.15),
          labelTextStyle: WidgetStateProperty.resolveWith((states) {
            if (states.contains(WidgetState.selected)) {
              return const TextStyle(
                fontSize: 11,
                fontWeight: FontWeight.w600,
                color: El3abColors.gold,
                fontFamily: 'IBM Plex Sans Arabic',
              );
            }
            return const TextStyle(
              fontSize: 11,
              fontWeight: FontWeight.w500,
              color: El3abColors.textSecondary,
              fontFamily: 'IBM Plex Sans Arabic',
            );
          }),
          iconTheme: WidgetStateProperty.resolveWith((states) {
            if (states.contains(WidgetState.selected)) {
              return const IconThemeData(color: El3abColors.gold, size: 26);
            }
            return const IconThemeData(color: El3abColors.textSecondary, size: 24);
          }),
        ),
      );
}
