"use client"

import { motion } from "framer-motion"
import { GatoMascota } from "@/components/child/gato-mascota"

const achievements = [
  { id: "a", label: "Letra A", emoji: "✈️", completed: true },
  { id: "e", label: "Letra E", emoji: "🐘", completed: false },
  { id: "i", label: "Letra I", emoji: "🏔️", completed: false },
  { id: "o", label: "Letra O", emoji: "🐻", completed: false },
  { id: "u", label: "Letra U", emoji: "🍇", completed: false },
  { id: "1", label: "Número 1", emoji: "1️⃣", completed: false },
  { id: "2", label: "Número 2", emoji: "2️⃣", completed: false },
]

export default function LogrosPage() {
  const completedCount = achievements.filter((a) => a.completed).length

  return (
    <div className="flex-1 flex flex-col items-center p-6 gap-6">
      <GatoMascota mood="happy" message="Tus logros" size="sm" />

      <p className="text-lg font-display">
        {completedCount} de {achievements.length} completados
      </p>

      <div className="flex flex-wrap gap-3 justify-center max-w-sm">
        {achievements.map((a, i) => (
          <motion.div
            key={a.id}
            initial={{ opacity: 0, scale: 0.8 }}
            animate={{ opacity: 1, scale: 1 }}
            transition={{ delay: i * 0.05 }}
            className={`rounded-2xl p-4 flex flex-col items-center gap-1 w-24 ${
              a.completed ? "bg-primary/20 border-2 border-primary" : "bg-muted opacity-50"
            }`}
          >
            <span className="text-3xl">{a.emoji}</span>
            <span className="text-xs text-center font-display font-medium">{a.label}</span>
          </motion.div>
        ))}
      </div>
    </div>
  )
}
