content: import 'package:flutter/material.dart';
  import 'package:flutter_riverpod/flutter_riverpod.dart';
  import 'package:shonenx/features/anime/view_model/player_provider.dart';
  import 'package:shonenx/features/settings/view_model/subtitle_notifier.dart';
  
  class SubtitleOverlay extends ConsumerWidget {
    const SubtitleOverlay({super.key});
  
    @override
    Widget build(BuildContext context, WidgetRef ref) {
      final subtitleText =
          ref.watch(playerStateProvider.select((s) => s.subtitle.firstOrNull));
      final subtitleStyle = ref.watch(subtitleAppearanceProvider);
  
      if (subtitleText == null || subtitleText.isEmpty) {
        return const SizedBox.shrink();
      }
  
      return Center(
        child: Container(
          padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
          decoration: BoxDecoration(
            color: Colors.black.withOpacity(0.6),
            borderRadius: BorderRadius.circular(8),
          ),
          child: Text(
            subtitleText,
            textAlign: TextAlign.center,
            style: const TextStyle(fontSize: 16, color: Colors.white),
          ),
        ),
      );
    }
  }
  