'use client'

import { motion } from 'framer-motion'
import { ReactNode } from 'react'
import { ANIMATION } from '@/lib/constants'

interface GlassCardProps {
  children: ReactNode
  className?: string
  delay?: number
  hover?: boolean
}

export default function GlassCard({ children, className = '', delay = 0, hover = true }: GlassCardProps) {
  return (
    <motion.div
      initial={{ opacity: 0, y: 20 }}
      whileInView={{ opacity: 1, y: 0 }}
      viewport={{ once: true, margin: '100px 0px -60px 0px' }}
      transition={{ duration: ANIMATION.duration, delay }}
      whileHover={hover ? { scale: 1.02, backgroundColor: 'rgba(255, 255, 255, 0.10)' } : undefined}
      className={`
        bg-white/[0.06] backdrop-blur-xl
        border border-white/[0.08] rounded-2xl
        p-6 transition-colors duration-200
        ${className}
      `}
    >
      {children}
    </motion.div>
  )
}
