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

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #0f172a;
    color: white;
}

.container {
    width: 90%;
    max-width: 500px;

    background: #1e293b;
    padding: 30px;

    border-radius: 15px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
}

.input-area {
    display: flex;
    gap: 10px;
}

input {
    flex: 1;

    padding: 12px;

    border: none;
    border-radius: 8px;

    outline: none;

    font-size: 16px;
}

button {
    padding: 12px 18px;

    border: none;
    border-radius: 8px;

    background: #6366f1;
    color: white;

    font-size: 16px;

    cursor: pointer;
}

button:hover {
    background: #4f46e5;
}

#taskList {
    list-style: none;
    margin-top: 25px;
}

#taskList li {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #334155;

    padding: 12px;
    margin-bottom: 10px;

    border-radius: 8px;
}

.completed {
    text-decoration: line-through;
    opacity: 0.5;
    cursor: pointer;
}

#taskCounter {
    text-align: center;
    margin-top: 20px;
    color: #94a3b8;
    font-size: 14px;
}

#clearCompleted {
    display: block;
    margin: 15px auto 0;

    background: #475569;
    font-size: 14px;
}

#clearCompleted:hover {
    background: #64748b;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .input-area {
        flex-direction: column;
    }

    input,
    .input-area button {
        width: 100%;
    }
}