import React from 'react';
import { useNavigate } from 'react-router-dom';
import ParticleBackground from '../../components/ParticleBackground/ParticleBackground';
import styled from 'styled-components';

const PageContainer = styled.div`
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-family: 'Inter', sans-serif;
`;

const ContentWrapper = styled.div`
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  padding: 2rem;
`;

const GlassCard = styled.div`
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
`;

const CardTitle = styled.h2`
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
`;

const CardBody = styled.p`
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
`;

const BackLink = styled.button`
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.2s ease;

  &:hover {
    color: #fff;
    text-decoration: underline;
  }
`;

const PasswordResetConfirmation = (): JSX.Element => {
  const navigate = useNavigate();

  return (
    <PageContainer>
      <ParticleBackground />
      <ContentWrapper>
        <GlassCard>
          <CardTitle>Check Your Email</CardTitle>
          <CardBody>
            If an account exists for that address, we sent a link to set a new password.
          </CardBody>
          <BackLink onClick={() => navigate('/signin/')}>Back to Sign In</BackLink>
        </GlassCard>
      </ContentWrapper>
    </PageContainer>
  );
};

export default PasswordResetConfirmation;
