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

body {
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 50px 20px;
}

.task-manager {
    background: #ffffff;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.header {
    text-align: center;
    margin-bottom: 35px;
}

.header h1 {
    font-size: 38px;
    margin-bottom: 10px;
    color: #111827;
}

.header p {
    font-size: 17px;
    color: #6b7280;
}

.task-input {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.task-input input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.task-input input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.task-input button {
    padding: 14px 22px;
    border: none;
    border-radius: 10px;
    background: #010101;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.task-input button:hover {
    background: #1d4ed8;
}

.task-input button:active {
    transform: scale(0.98);
}
.message {
    min-height: 22px;
    margin-bottom: 20px;
    color: #dc2626;
    font-size: 14px;
}

.tasks-section {
    margin-top: 10px;
}
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.tasks-header h2 {
    font-size: 23px;
    color: #111827;
}
#taskCount {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.empty-message {
    text-align: center;
    padding: 35px 10px;
    color: #9ca3af;
    font-size: 15px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 16px;
    color: #374151;
    word-break: break-word;
    transition: background 0.2s;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.task-text {
    flex: 1;
}

.delete-btn {
    border: none;
    background: #fee2e2;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.delete-btn:hover {
    background: #fecaca;
    color: #b91c1c;
}
.task-item.completed {
    background: #f3f4f6;
}
.task-item.completed .task-text {
    text-decoration: line-through;
    color: #9ca3af;
}

@media (max-width: 600px) {
    .container {
        padding: 25px 15px;
    }
    .task-manager {
        padding: 25px 20px;
        border-radius: 14px;
    }
    .header h1 {
        font-size: 30px;
    }
    .header p {
        font-size: 15px;
    }
    .task-input {
        flex-direction: column;
    }
    .task-input button {
        width: 100%;
    }
    .tasks-header h2 {
        font-size: 20px;
    }
}