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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f7fb;
    color: #333;
    min-height: 100vh;
}

/* ===========================
   Main Container
=========================== */

.app {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
}

.todo-card {
    width: 100%;
    max-width: 700px;
    background: #fff;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ===========================
   Header
=========================== */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 8px;
}

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

.task-counter {
    background: #2563eb;
    color: #fff;
    padding: 15px 22px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
}

.task-counter span {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

.task-counter h2 {
    font-size: 2rem;
}

/* ===========================
   Add Task Section
=========================== */

.add-task {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.add-task input {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
}

.add-task input:focus {
    border-color: #2563eb;
}

.add-task button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 28px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.add-task button:hover {
    background: #1d4ed8;
}

/* ===========================
   Task List
=========================== */

.tasks ul {
    list-style: none;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: 0.3s;
}

.task-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
}

.task-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-left input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-left span {
    font-size: 16px;
    color: #374151;
}

.completed {
    text-decoration: line-through;
    color: #9ca3af;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

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

/* ===========================
   Responsive
=========================== */

@media (max-width: 768px) {

    .todo-card {
        padding: 25px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .task-counter {
        width: 100%;
    }

    .add-task {
        flex-direction: column;
    }

    .add-task button {
        padding: 15px;
    }

    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .delete-btn {
        width: 100%;
    }
} 