import React from "react";
import { Button } from "../components/Button";

interface HomeProps {
  onEnter: () => void;
}

export const Home: React.FC<HomeProps> = ({ onEnter }) => {
  return (
    <div
      className="min-h-screen flex items-center justify-center relative overflow-hidden"
      style={{ backgroundColor: "#B9CF33" }}
    >
      <style>{`
        @keyframes fadeInScale {
          from {
            opacity: 0;
            transform: scale(0.9);
          }
          to {
            opacity: 1;
            transform: scale(1);
          }
        }
        @keyframes float {
          0%, 100% {
            transform: translateY(0px);
          }
          50% {
            transform: translateY(-20px);
          }
        }
        .animate-fade-in-scale {
          animation: fadeInScale 0.6s ease-out forwards;
        }
        .animate-float {
          animation: float 6s ease-in-out infinite;
        }
      `}</style>

      {/* Círculos decorativos animados */}
      <div
        className="absolute top-10 left-10 w-64 h-64 bg-white/20 rounded-full blur-3xl animate-float"
        style={{ animationDelay: "0s" }}
      ></div>
      <div
        className="absolute bottom-20 right-20 w-80 h-80 bg-white/20 rounded-full blur-3xl animate-float"
        style={{ animationDelay: "2s" }}
      ></div>
      <div
        className="absolute top-1/3 right-10 w-48 h-48 bg-white/20 rounded-full blur-2xl animate-float"
        style={{ animationDelay: "4s" }}
      ></div>

      <div className="bg-white rounded-2xl shadow-2xl p-8 sm:p-12 max-w-md w-full mx-4 animate-fade-in-scale relative z-10">
        {/* Logo */}
        <div className="flex justify-center mb-6">
          <img
            src="/logo_preta.png"
            alt="Photum Formaturas"
            className="h-24 sm:h-32 w-auto object-contain"
          />
        </div>

        {/* Botões */}
        <div className="space-y-4">
          <Button onClick={onEnter} className="w-full" size="lg">
            Entrar
          </Button>

          <Button
            onClick={() => (window.location.href = "/cadastro")}
            variant="outline"
            className="w-full"
            size="lg"
          >
            Cadastre-se agora
          </Button>
        </div>
      </div>
    </div>
  );
};
