

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    font-family:Arial, Helvetica, sans-serif;
    background:linear-gradient(135deg,#d32828,#fbf7ff);
}



.container{
    width:100%;
    max-width:650px;
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.2);
}



.header{
    padding:35px;
    text-align:center;
    background:linear-gradient(135deg,#ff6a00,#ee0979);
    color:#fff;
}

.header h1{
    font-size:2.2rem;
    margin-bottom:10px;
}

.header p{
    opacity:.9;
}


.todo-app{
    padding:25px;
}


.add-task{
    display:flex;
    gap:10px;
    margin-bottom:20px;
}

.add-task input{
    flex:1;
    padding:14px;
    border:2px solid #ddd;
    border-radius:10px;
    outline:none;
    font-size:16px;
    transition:.3s;
}

.add-task input:focus{
    border-color:#ff4e50;
}

.add-task button{
    padding:14px 22px;
    border:none;
    border-radius:10px;
    background:#ff4e50;
    color:white;
    cursor:pointer;
    font-weight:bold;
    transition:.3s;
}

.add-task button:hover{
    background:#e63946;
}



.search-box{
    margin-bottom:20px;
}

.search-box input{
    width:100%;
    padding:14px;
    border:2px solid #ddd;
    border-radius:10px;
    outline:none;
    font-size:15px;
}

.search-box input:focus{
    border-color:#667eea;
}


.task-info{
    display:flex;
    justify-content:space-between;
    margin-bottom:20px;
    font-weight:bold;
    color:#555;
}


.filters{
    display:flex;
    gap:10px;
    margin-bottom:25px;
}

.filter-btn{
    flex:1;
    padding:10px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    background:#ececec;
    transition:.3s;
    font-weight:bold;
}

.filter-btn:hover{
    background:#ddd;
}

.filter-btn.active{
    background:#ff4e50;
    color:white;
}

.empty-state{
    text-align:center;
    color:#777;
    margin:30px 0;
}

.empty-state h3{
    margin-bottom:8px;
}


#task-list{
    list-style:none;
}

.task-item{
    display:flex;
    align-items:center;
    gap:12px;
    background:#f8f8f8;
    padding:15px;
    border-radius:10px;
    margin-bottom:12px;
    transition:.3s;
    border:1px solid #eee;
}

.task-item:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.08);
}


.task-text{
    flex:1;
    word-break:break-word;
    font-size:16px;
}

.completed{
    text-decoration:line-through;
    color:#888;
}


.task-item input[type="checkbox"]{
    width:18px;
    height:18px;
    cursor:pointer;
}

.edit-input{
    flex:1;
    padding:8px;
    border:1px solid #ddd;
    border-radius:8px;
    outline:none;
    font-size:15px;
}


.delete-btn{
    background:#ff4e50;
    color:white;
    border:none;
    padding:8px 12px;
    border-radius:8px;
    cursor:pointer;
    transition:.3s;
}

.delete-btn:hover{
    background:#d90429;
}

#delete-all{
    width:100%;
    margin-top:20px;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#222;
    color:white;
    cursor:pointer;
    transition:.3s;
}

#delete-all:hover{
    background:black;
}


footer{
    text-align:center;
    padding:18px;
    color:#666;
    font-size:14px;
    border-top:1px solid #eee;
}


@media(max-width:600px){

    .add-task{
        flex-direction:column;
    }

    .add-task button{
        width:100%;
    }

    .filters{
        flex-direction:column;
    }

    .task-info{
        flex-direction:column;
        gap:8px;
    }

}

.delete-btn:hover{
    transform:scale(1.08);
}

.task-item input[type="checkbox"]{

    accent-color:#ff4e50;

}

.task-item{

    animation:fadeIn .3s ease;

}

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(12px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

