* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    background: #121212; /* Dark background */
    color: #fff; /* Default text color */
}

.container {
    width: 100%;
    min-height: 100vh;
    padding: 10px;
}

.todo-app {
    width: 100%;
    max-width: 600px;
    background: #1e1e1e; /* Dark card background */
    margin: 100px auto 20px;
    padding: 40px 30px 70px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.todo-app h2 {
    color: #ffffff;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.todo-app h2::before {
    content: '📝';
    margin-right: 10px;
    font-size: 26px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2c2c2c; /* Dark input container */
    border-radius: 30px;
    padding-left: 20px;
    margin-bottom: 25px;
}

input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
    color: #fff;
}

input::placeholder {
    color: #aaa;
}

input[type="datetime-local"] {
    color: #fff;
    flex-basis: 180px;
    max-width: 100%;
    flex-shrink: 1;
    box-sizing: border-box;
    background: #2c2c2c;
    border-radius: 30px;
    padding: 10px 20px;
}

button {
    border: none;
    outline: none;
    padding: 16px 40px;
    background: #ff5945;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 40px;
}

button:hover {
    background: #ff3a22;
}

ul li {
    list-style: none;
    font-size: 17px;
    padding: 12px 8px 12px 50px;
    user-select: none;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #1e1e1e; /* Dark list item */
    margin-bottom: 10px;
    border-radius: 10px;
}

ul li::before {
    content: '';
    position: absolute;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23aaa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>');
    background-size: cover;
    background-position: center;
    top: 12px;
    left: 8px;
}

ul li.checked {
    color: #bbb;
}

ul li.checked .task-text {
    text-decoration: line-through;
}

ul li.checked::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>');
    background-color: #ff5945;
}

.task-details {
    flex-grow: 1;
}

.timestamps {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.completion-date {
    display: none;
    color: #4caf50; /* Green for completed */
    font-weight: bold;
}

li.checked .completion-date {
    display: block;
}

li.checked .due-date {
    display: none;
}

ul li span.delete-btn {
    position: absolute;
    right: 0;
    top: 10px;
    width: 40px;
    height: 40px;
    font-size: 22px;
    color: #fff;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    flex-shrink: 0;
}

ul li span.delete-btn:hover {
    background: #333;
}

@media (max-width: 600px) {
    .todo-app {
        margin-top: 40px;
        padding: 25px 20px 40px;
    }

    .row {
        flex-direction: column;
        background: none;
        padding-left: 0;
        align-items: stretch;
    }

    input {
        width: 100%;
        background: #2c2c2c;
        border-radius: 30px;
        margin-bottom: 10px;
        padding: 10px 20px;
        color: #fff;
    }

    input[type="datetime-local"] {
        flex-basis: auto;
        min-width: 0;
    }

    button {
        width: 100%;
        padding: 16px 20px;
        margin-top: 5px;
    }

    ul li {
        font-size: 16px;
    }
}
