* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.todo-card {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
}

.todo-card h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 26px;
    color: #1e293b;
    font-weight: 600;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
    background: #f9fafb;
}

input:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

button {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.25s ease;
}

#addBtn {
    padding: 12px 16px;
    background: #4f46e5;
    color: white;
}

#addBtn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

ul {
    list-style: none;
    margin-bottom: 16px;
}

li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    transition: 0.2s ease;
}

li:hover {
    background: #e2e8f0;
}

.task-text {
    flex: 1;
    cursor: pointer;
    font-size: 15px;
    color: #334155;
}

.completed {
    text-decoration: line-through;
    color: #94a3b8;
}

.edit-btn {
    background: #e2e8f0;
    color: #1e293b;
    padding: 6px 10px;
    font-size: 13px;
    margin-right: 6px;
}

.edit-btn:hover {
    background: #cbd5e1;
}

.delete-btn {
    background: #ef4444;
    color: white;
    padding: 6px 10px;
    font-size: 13px;
}

.delete-btn:hover {
    background: #dc2626;
}

.clear-btn {
    width: 100%;
    padding: 11px;
    background: #4f46e5;
    color: white;
    margin-top: 5px;
}

.clear-btn:hover {
    background: #4338ca;
}


@media (max-width: 480px) {
    .todo-card {
        padding: 20px;
    }

    .input-section {
        flex-direction: column;
    }

    #addBtn {
        width: 100%;
    }

    li {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .task-text {
        width: 100%;
    }

    li div {
        display: flex;
        justify-content: flex-end;
        gap: 6px;
    }

    .edit-btn,
    .delete-btn {
        flex: 1;
    }
}


@media (min-width: 768px) {
    .todo-card {
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    .todo-card {
        max-width: 650px;
    }
}