@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Slab&display=swap");

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Roboto Slab", serif;
}

body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(109.6deg, rgb(96, 158, 155) 11.2%, rgb(72, 81, 160) 91.1%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 1rem;
}

.main-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    min-height: 500px;
    perspective: 1000px;
    margin: 0 auto;
}

.form_container {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: whitesmoke;
    box-shadow: 0 0 65px 3px rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.form_container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.form_container form h2 {
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.811);
    margin-bottom: 1rem;
}

.form-field {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin-bottom: 0.5rem;
}

.form-field input {
    width: 100%;
    padding: 0.75rem 2rem;
    border: none;
    border-bottom: 1px solid black;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.form-field i {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
}

.form-field label {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-field input:focus~label,
.form-field input:valid~label {
    top: -0.5rem;
    left: 0;
    font-size: 0.75rem;
    color: rgb(72, 81, 160);
}

.form-options {
    width: 100%;
    max-width: 320px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.show_password {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.7);
}

.form-forget a {
    font-size: 0.875rem;
    color: rgb(72, 81, 160);
    text-decoration: none;
}

.Login_button {
    width: 100%;
    max-width: 320px;
    padding: 0.75rem;
    background: linear-gradient(109.6deg, rgb(95, 186, 181) 11.2%, rgb(72, 81, 160) 91.1%);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.Login_button:hover {
    background: linear-gradient(109.6deg, rgb(68, 142, 137) 11.2%, rgb(62, 70, 148) 91.1%);
}

.signup-link {
    text-align: center;
    font-size: 0.875rem;
}

.signup-link a {
    color: rgb(72, 81, 160);
    text-decoration: none;
    font-weight: 600;
}

/* Animation classes */
.main-container .Sign_Up {
    transform: rotate(7deg);
}

.main-container.animated_signin .form_container.Login {
    animation: signin 0.5s ease-in-out forwards;
}

.main-container.animated_signin .form_container.Sign_Up {
    animation: rotatecard 0.7s ease-in-out forwards;
}

.main-container.animated_signup .form_container.Sign_Up {
    animation: signup 0.5s ease-in-out forwards;
}

.main-container.animated_signup .form_container.Login {
    animation: rotatecard 0.7s ease-in-out forwards;
}

/* Background circles */
.circle1,
.circle2 {
    position: fixed;
    width: 8rem;
    height: 8rem;
    background-color: rgba(245, 245, 245, 0.53);
    border-radius: 50%;
}

.circle1 {
    left: -4rem;
    top: 10%;
}

.circle2 {
    right: -4rem;
    bottom: 10%;
}

.circle1_child1,
.circle1_child2,
.circle2_child1,
.circle2_child2 {
    position: absolute;
    width: 4rem;
    height: 4rem;
    background-color: rgba(245, 245, 245, 0.53);
    border-radius: 50%;
}

.circle1_child1 {
    left: 110%;
    top: -10%;
}

.circle1_child2 {
    left: 80%;
    top: 90%;
}

.circle2_child1 {
    right: 110%;
    bottom: -10%;
}

.circle2_child2 {
    right: 80%;
    bottom: 90%;
}

.circle1_child3,
.circle2_child3 {
    position: fixed;
    width: 2rem;
    height: 2rem;
    background-color: rgba(245, 245, 245, 0.53);
    border-radius: 50%;
}

.circle1_child3 {
    left: -1rem;
    top: 40%;
}

.circle2_child3 {
    right: -1rem;
    bottom: 40%;
}

@keyframes signin {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0) rotate(7deg);
    }
}

@keyframes signup {
    0% {
        transform: translateX(0);
        z-index: 1;
    }

    50% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0) rotate(7deg);
    }
}

@keyframes rotatecard {
    0% {
        transform: rotate(7deg);
    }

    100% {
        transform: rotate(0);
        z-index: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .main-container {
        max-width: 100%;
    }

    .form_container {
        padding: 1.5rem 1rem;
    }

    .form_container form h2 {
        font-size: 1.75rem;
    }

    .form-field {
        max-width: 100%;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}