*{
    box-sizing: border-box;
}

body{
    font-family: Arial, Helvetica, sans-serif;
    background: url(https://preview.redd.it/dark-blue-abstract-layers-ai-generated-1920x1080-v0-u1nz31xiawdb1.jpg?auto=webp&s=d6bba946781c68c7850a223a35051daae43605e8) no-repeat center center/cover;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow-x: hidden;
}

.container{
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    min-height: 500px;
}

.container p{
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span{
    font-size: 12px;
}

.form-container {
    position: absolute;
    justify-items: center;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transition: all 0.6s ease-in-out;
}

.sign-in{
    left: 0;
    z-index: 2;
}

.sign-up{
    left: 0;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-in{
    transform: translateX(100%);
}

.container.right-panel-active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

.toggle-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(to right, #58afdd, #77bde2);
    transition: transform 0.6s ease-in-out, background 0.6s ease-in-out, border-radius 0.6s ease-in-out;
    z-index: 100;
    border-radius: 120px 0 0 120px;
}

.container.right-panel-active .toggle-container{
    background: linear-gradient(to right, #425ac4, #5d6fc4);
    transform: translateX(-100%);
    border-radius: 0 120px 120px 0;
}

.overlay{
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
    border-radius: inherit;
}

.container.right-panel-active .overlay{
    transform: translateX(50%);
}

.overlay-left, .overlay-right{
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
}

.overlay-left{
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left{
    transform: translateX(0);
}

.overlay-right{
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right{
    transform: translateX(20%);
}

input {
    display: flex;
    width: 100%;
    padding: 0.6rem;
    border-radius: 0.4rem;
    box-shadow: 0 2px 2px 2px rgba(128, 128, 128, 0.35);
    transition: border 0.3s ease-in-out;
    border: none;
    margin: 8px 0;
}

input:focus{
    border: 2px solid #58afdd;
    outline: none;
}

form{
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

.form-group {
    justify-items: center;
    margin-bottom: 1rem;
}

input:focus{
    border-color: #58afdd;
    border: 2px solid #58afdd;
}

.submitBtn{
    display: flex;
    padding: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    position: relative;
    margin: 0;
    border-radius: 0.4rem;
    border: 3px solid #58afdd;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16),
        0 3px 6px rgba(0, 0, 0, 0.1);
    color: #58afdd;
    font-size: 0.9rem;
    transition: transform 80ms ease-in;
}

.ghost{
    background: transparent;
    border: 2px solid #fff;
    border-radius: 5px;
    color: #fff;
    padding: 0.5rem;
    font-size: 1.2rem;
    width: 50%;
}

.ghost:hover{
    background: #fff;
    color: #58afdd;
}

.overlay p{
    font-size: 1.2rem;
}

.submitBtn:hover:before{
    left: 0;
    right: 0;
    opacity: 1;
}

.submitBtn::before{
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    right: 50%;
    opacity: 0;
    z-index: -1;
    background: #58afdd;
    transition: 0.5s all ease;
}

.submitBtn:hover{
    background: white;
    color: whitesmoke;
}

.submitBtn:active{
    background-color: #58afdd;
    box-shadow: 0 4px #999;
    transform: translateY(4px);
}

.error-message {
    color: red;
    font-size: 12px;
    margin-top: 5px;
}

/*@media (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: auto;
    }

    .form-container {
        width: 100%;
        height: auto;
    }

    .toggle-container {
        position: relative;
        width: 100%;
        height: auto;
        transform: none !important;
        border-radius: 0 0 20px 20px;
        margin-top: 20px;
    }

    .overlay {
        width: 100%;
        height: 100%;
        position: relative;
        transform: none !important;
        border-radius: 0;
    }


    .overlay-left, .overlay-right {
        position: static;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}*/