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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(120deg, #1d3557, #457b9d);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 20px;
}

.todo-container {
    background-color: #2c2c54;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 25px 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    text-align: center;
    font-size: 1.9em;
    margin-bottom: 20px;
    color: #f1c40f;
}

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

#taskInput {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #3d3d6b;
    color: white;
    transition: box-shadow 0.3s ease;
}

#taskInput:focus {
    outline: none;
    box-shadow: 0 0 8px #f1c40f;
}

#addTaskBtn {
    background-color: #f1c40f;
    color: black;
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s;
}

#addTaskBtn:hover {
    background-color: #f39c12;
    transform: scale(1.05);
}

/* List Styles */
ul {
    list-style: none;
}

li {
    background-color: #3d3d6b;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.4s ease;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

li.completed {
    text-decoration: line-through;
    background-color: #27ae60;
    opacity: 0.8;
}

li span {
    flex: 1;
    margin-right: 10px;
}

li button {
    margin-left: 5px;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: 14px;
}

li button.edit {
    background-color: #f39c12;
}

li button.edit:hover {
    background-color: #e67e22;
}

li button.remove {
    background-color: #e74c3c;
}

li button.remove:hover {
    background-color: #c0392b;
}

/* Responsive */
@media (max-width: 500px) {
    .todo-container {
        padding: 20px;
    }
}