@import url('https://fonts.googleapis.com/css2?family=Sour+Gummy:ital,wght@0,100..900;1,100..900&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:cursive
}
ul{
    list-style: none;
}
body{
    height: 100vh;
    max-width: 100vw;
    background-image: linear-gradient(0deg,  rgb(162, 112, 112),rgb(12, 59, 160));
    display: flex;
    align-items: center;
    justify-content: center;
}

main{
    min-height: 67vh;
    width: 50vh;
    max-height: 550px;
    border-radius: 1.5rem;
    border: 2px solid black;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);
}

#task-heading{
    padding: 1rem;
}

.task-section{
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}
.tasks{
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    justify-content: space-between;
}
.task-section::-webkit-scrollbar {
    width: 8px;
}

.task-section::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.task-section::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.check-button{
    height: 2rem;
    width: 2rem;
    margin-top: 1.3rem;
    margin-right: .1rem;
    border-radius: 50%;
    background-image: url(unchecked.png);
    background-size: cover;
    background-position: center;
    
}
.check-button.checked{
    background-image: url(checked.png);
}
.check-button:hover{
    cursor: pointer;
}
.task{
    border: 1px solid grey;
    border-radius: 1.5rem 0  0 1.5rem;
    margin: 1rem 0 1rem 0 ;
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    height: auto;
    width: 80%;
    overflow-wrap: break-word;


}

.task .task-text {
    flex-grow: 1;  /* Ensures text takes available space */
}
.task.checked-task{
    text-decoration: line-through;
    color: rgba(0, 0, 0, 0.516);
}

.delete-task-btn{
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    width: 10%;
    margin: 1rem 0 1rem 0 ;
    height: 2.5rem;
    border-radius: 0 50% 50% 0;
    background-color: rgb(147, 18, 18);
    border: none;
    text-align: center;
    transition: background-color 0.3s ease;
    

}
.delete-task-btn:hover{
    background-color: rgb(200, 30, 30);

}
.delete-task-btn:active{
    background-color: rgb(147, 18, 18);

}
.add-section{
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
}

#task-input{
    outline: none;
    border: none;
    border-radius: 1.5rem;
    padding: 0rem 0.5rem;
    margin: 1rem 1rem 0 1rem;
    width: 70%;
    font-size: 1rem;
    height: 2.5rem;

}
.add-button{
    font-size: 1rem;

    width: 30%;
    outline: none;
    border: none;
    border-radius: 1.5rem;
    padding: 0.5rem;
    margin: 1rem 1rem 1rem 0;
}

.add-button:hover{
    background-color: cadetblue;
    cursor: pointer;
}
.add-button:active{
    cursor: pointer;
    background-color: rgb(63, 104, 104);
}


@media (max-width: 600px) {
    *{
        font-family: "Sour Gummy", serif;
    }
    main {
        width: 90%;
    }

    .add-section {
        flex-direction: column;
        align-items: center;
    }

    #task-input, .add-button {
        width: 90%;
        margin: 0.5rem 0;
    }
    
    .tasks img{
        width: 10%;
        height: 1.5rem;
        width: 1.5rem;
        margin-top: 1.5rem;
    }
    .tasks li{
        min-height: 1rem;
        
    }
    .tasks button{
        width: 10%;    
    }
}