import 'package:flutter/material.dart';

class AppBackground extends StatelessWidget {
  final Widget child;

  const AppBackground({super.key, required this.child});

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        /// 1️⃣ BASE GRADIENT (Exact Figma: #434343 -> #00382A)
        Container(
          decoration: const BoxDecoration(
            gradient: LinearGradient(
              begin: Alignment.topCenter,
              end: Alignment.bottomCenter,
              colors: [
                Color.fromARGB(255, 41, 41, 41), // top dark gray
                Color.fromARGB(255, 0, 20, 15), // bottom deep green
              ],
            ),
          ),
        ),

  
        Positioned(
          top: -250,
          left: 100,
          right: -200,
          child: Container(
            height: 300,
            decoration: const BoxDecoration(
              shape: BoxShape.circle,
              // very soft inner fill
              color: Color.fromARGB(0, 62, 254, 203), 
              boxShadow: [
                BoxShadow(
                  // wide soft bloom
                  color: Color.fromARGB(69, 62, 254, 190), 
                  blurRadius: 140,
                  spreadRadius: 160,
                ),
              ],
            ),
          ),
        ),

        Positioned(
          bottom: 100,
          left: -140,
          right: -120,
          child: Container(
            height: 320,
            decoration: const BoxDecoration(
              shape: BoxShape.circle,
              color: Color.fromARGB(0, 62, 254, 203), 
              boxShadow: [
                BoxShadow(
                  color: Color.fromARGB(83, 62, 254, 190), 
                  blurRadius: 180,
                  spreadRadius: 60,
                ),
              ],
            ),
          ),
        ),

        /// 4️⃣ CONTENT LAYER
        child,
      ],
    );
  }
}
