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

body {
    font-family: Arial, sans-serif;
    background: #f4f6fb;
    color: #333;
    min-height: 100vh;
}

.header {
    background: #4f46e5;
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.header p {
    font-size: 15px;
    opacity: 0.9;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 35px auto;
}

.task-form,
.task-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.task-form h2,
.task-section h2 {
    font-size: 20px;
    margin-bottom: 18px;
}

#taskForm {
    display: flex;
    gap: 12px;
}

#taskTitle {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
}

#taskTitle:focus {
    border-color: #4f46e5;
}

button {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

button:hover {
    background: #3730a3;
}

.task-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#taskCount {
    color: #666;
    font-size: 14px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow-wrap: anywhere;
}

.task-info input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-info.completed span {
    text-decoration: line-through;
    color: #888;
}

.delete-btn {
    background: #ef4444;
    padding: 8px 12px;
}

.delete-btn:hover {
    background: #dc2626;
}

.loading,
.empty-message {
    text-align: center;
    color: #777;
    padding: 20px;
}

footer {
    text-align: center;
    color: #777;
    padding: 20px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 22px;
    }

    #taskForm {
        flex-direction: column;
    }

    .task-item {
        align-items: flex-start;
    }
}

