@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", serif;
    text-transform: capitalize;
}

body{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #000000;
}

.logo{
   display: flex;
   align-items: center;
   justify-content: start;
   box-sizing: border-box;
   width: 100%;
   height: 80px;
   padding: 20px;
}

.logo h1{
    margin-left: 10px;
    color: #f0f8ff;
    font-size: 30px;
    font-weight: 500;
    text-transform: none;
}

.main{
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    width: 100%;
    min-height: calc( 100vh - 80px );
    gap: 30px;
    background-color:  rgb(29, 54, 61);
}

.style1{
    display: flex;
    align-items: center;
    justify-content: start;
    flex-direction: column;
    max-width: 500px;
    width: 90%;
    height: 500px;
    gap: 30px;
}
.style2{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    max-width: 500px;
    width: 90%;
    height: 500px;
    gap: 20px;
}

.style2 span{
    color: #000000;
}

#loading{
    filter: drop-shadow(2px 2px 10px #000000);
    display: none;
}

.image{
    position: relative;
    display: flex;
    width: 300px;
    height: 300px;
    background-image: url("./img/transparent.jpg");
    border-radius: 10px;
    box-shadow: 2px 2px 10px #000000;
}

.image1{
    width: 300px;
    border-radius: 10px;
    animation: remove 15s linear infinite;
    overflow: hidden;
}

#withbg{
    width: 300px;
}

.image2{
    position: absolute;
    width: 300px;
    overflow: hidden;

}

#withoutbg{
    width: 300px;
}

.text{
    width: 100%;
    height: 25%;
    background: linear-gradient(to right , white,rgb(34, 149, 162),rgb(212, 89, 153),white);
    text-align: center;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5vmax;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-weight: 600;
}

.upload-image{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    width: 90%;
    height: 85%;
    background: url('./img/star.avif');
    box-shadow: 2px 2px 10px #000000;
    border-radius: 10px;
}

.inner-upload-image{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 90%;
    height: 70%;
    gap: 10px;
    color: aliceblue;
    font-size: 20px;
    background-color: #fff;
    box-shadow: 2px 2px 10px #4d4d4d;
    border-radius: 10px;
    cursor: pointer;
}

.inner-upload-image:hover{
    background-color: rgb(240, 242, 245);
}

#input-image{
    width: 100%;
    height: 100%;
    display: none;
}

#upload-btn{
   width: 60%;
   height: 12%;
   background: linear-gradient(to right ,rgb(34, 149, 162),rgb(212, 89, 153));
   color: #f0f8ff;
   border: none;
   outline: none;
   border-radius: 10px;
   font-size: 15px;
   letter-spacing: 2px;
   cursor: pointer;
   transition: all 0.3s;
   text-transform: uppercase;
}

#upload-btn:hover{
    color: rgb(29, 30, 31);
    font-size: 18px;
    background:  linear-gradient(to left , rgb(34, 149, 162),rgb(212, 89, 153));
}

.result{
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 50%;
    height: 100%;
    gap: 30px;
}

.mainbox{
    position: relative;
    width: 400px;
    background-image: url("transparent.jpg");
    border-radius: 10px;
    box-shadow: 2px 2px 10px black;
}

.resultImg1{
   width: 0px;
   animation: remove1 8s linear 1;
   overflow: hidden;

}

.resultImg2{
    position: absolute;
    width: 400px;
    top: 0;
}

.resultImg1 img{
    width: 400px; 
 }

.resultImg2 img{
     width: 400px;
 }

 .btns{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
 }

 #download{
    padding: 12px 20px;
    background:  linear-gradient(to right , rgb(34, 149, 162),rgb(212, 89, 153));
    color: #f0f8ff;
    border: none;
    outline: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
 }

 #reset{
    padding: 12px 20px;
    background:  linear-gradient(to right , rgb(34, 149, 162),rgb(212, 89, 153));
    color: #f0f8ff;
    border: none;
    outline: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
 }

@keyframes remove {
    0%,100%{
        width: 100%;
    }
    50%{
        width: 0%;
    }
}
@keyframes remove1 {
    0%{
        width: 400px;
    }
    100%{
        width: 0px;
    }
}

@media (max-width:1150px){
    .main{
        padding: 2rem;
    }
    
    .style2{
        margin-top: -8rem;
    }
}

@media (max-width:430px) {
    .logo{
        justify-content: center;
    }

    .main{
        padding: 2rem;
    }

    .style2{
        margin-top: -8rem;
    }

    .mainbox{
        width: 250px;
    }
    .resultImg1{
       width: 0px;
       animation: remove2 8s linear 1;
       overflow: hidden;
    }

    .resultImg2{
        width: 250px;
    }

    .resultImg1 img{
        width: 250px; 
     }

     .resultImg2 img{
        width: 250px;
     }

    .btns{
        flex-direction: column;
        gap: 10px;
    }
}

@keyframes remove2 {
    0%{
        width: 250px;
    }
    100%{
        width: 0px;
    }
}
