"use client"
import { motion } from "framer-motion"
import type { ReactNode } from "react"
import { cn } from "@/lib/utils"

interface GlassCardProps {
  children: ReactNode
  className?: string
  glow?: boolean
}

export function GlassCard({ children, className, glow = false }: GlassCardProps) {
  return (
    <motion.div
      whileHover={{ y: -5, boxShadow: "0 12px 45px 0 hsla(var(--foreground), 0.1)" }}
      transition={{ type: "spring", stiffness: 300, damping: 20 }}
      className={cn(
        "relative rounded-2xl p-6 md:p-8 bg-card/80 dark:bg-card/60 backdrop-blur-md border border-white/20 dark:border-white/10 shadow-glass dark:shadow-glass-dark overflow-hidden group", // Adicionado group para o brilho
        className,
      )}
    >
      {glow && (
        <div className="absolute inset-0 -z-10 bg-shiny-gradient animate-shine opacity-30 group-hover:opacity-50 transition-opacity duration-300" />
      )}
      {children}
    </motion.div>
  )
}
