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

body {
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure the body takes full viewport height */
    overflow: auto; /* Allow full-page scrolling */
}

.container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    margin: 20px; /* Add margin to ensure the container is not flush with the viewport edges */
}

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

h2 {
    margin: 20px 0 10px;
    font-size: 1.2rem;
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    outline: none;
}

textarea {
    resize: none;
    height: 80px;
}

button {
    padding: 10px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

li {
    padding: 10px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s;
}

li:hover {
    background-color: #f1f1f1;
}

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

li .task-heading {
    font-weight: bold;
    margin-bottom: 5px;
}

li .task-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

li .task-date {
    font-size: 12px;
    color: #999;
    align-self: flex-end;
}

.delete-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 5px;
    align-self: flex-end;
    margin-top: 10px;
}

.delete-btn:hover {
    background-color: #ff1a1a;
}

@media (max-width: 500px) {
    .container {
        padding: 15px;
    }

    h2 {
        font-size: 1rem;
    }

    button {
        padding: 10px 5px;
    }

    .delete-btn {
        padding: 5px;
    }
}
