import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../components/ui/card';
import { Button } from '../components/ui/button';
import { Label } from '../components/ui/label';
import { Input } from '../components/ui/input';
import { useNavigate } from 'react-router';

function Login() {
  let navigate = useNavigate();

  return (
    <div className="w-full grow bg-gradient-to-br from-gray-100 to-gray-300/20 shadow-xl shadow-gray-400/10 flex flex-col items-center justify-center p-5 gap-20 rounded-lg backdrop-blur-lg">
      <Card className="w-full max-w-md p-6 bg-white rounded-xl shadow-lg">
        <CardHeader className="text-center">
          <CardTitle className="font-display text-2xl font-bold">Iniciar Sesión</CardTitle>
          <CardDescription className="text-gray-500">Accede a tu cuenta para continuar</CardDescription>
        </CardHeader>
        <CardContent>
          <form>
            <div className="grid gap-4">
              <div className="flex flex-col space-y-2">
                <Label htmlFor="clave" className="font-semibold text-gray-700">Clave La Salle</Label>
                <Input id="clave" type="clave" placeholder={`al${new Date().getFullYear().toString().slice(-2)}0000`} />
              </div>
              <div className="flex flex-col space-y-2">
                <Label htmlFor="password" className="font-semibold text-gray-700">Contraseña</Label>
                <Input id="password" type="password" placeholder="••••••••" />
              </div>
            </div>
          </form>
        </CardContent>
        <CardFooter className="flex flex-col gap-4">
          <Button
            className="font-display px-6 py-3 text-lg font-bold text-white bg-gradient-to-b from-blue-500 to-blue-700 rounded-lg shadow-lg shadow-blue-500/50 transform transition-all duration-300 hover:shadow-xl hover:scale-105 active:translate-y-1 active:shadow-md cursor-pointer" onClick={() => {
              navigate("/");
            }}
          >
            Iniciar sesión
          </Button>
        </CardFooter>
      </Card>
    </div>
  );
}

export default Login;
