* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: linear-gradient(135deg #007bff, #00c6ff);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    background: #fff;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.8s ease;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#task-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s;
}

#task-input:focus {
    border-color: #007bff;
    outline: none;
}

#add-btn {
    padding: 10px 20px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s transform 0.2s;
}

#add-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

ul{
    list-style: none;
}


li {
    display: flex;
    justify-content: space-between;
    align-self: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.4s forwards;
    transition: transform 0.3s background-color 0.3s;
}

li:hover {
    transform: scale(1.02);
    background: #eef6ff;
}


li.completed span {
    text-decoration: line-through;
    color: #888;
    transition: color 0.3s;
}

button.delete-btn {
    background: none;
    border: none;
    color: red;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s;
}

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


@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform:  scale(1); }
}

@keyframes slideIn{
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1;  transform:  translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}