* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.task-app {
    background: white;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.loader-box {
    text-align: center;
    margin-bottom: 25px;
}

.loader {
    font-size: 14px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}


.todo-form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.todo-input {
    flex: 2; 
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.todo-input:focus {
    border-color: #3b82f6;
}

.todo-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.filter-priority {
    flex: 1; 
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
}

.add-btn {
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-btn:hover {
    background: #2563eb;
}


.task-list {
    min-height: 200px;
}

.task-container {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 5px solid #cbd5e1; 
    transition: transform 0.2s, box-shadow 0.2s;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}


.task-item[data-priority="low"] { border-left-color: #10b981; }   
.task-item[data-priority="medium"] { border-left-color: #f59e0b; } 
.task-item[data-priority="hard"] { border-left-color: #ef4444; }   

.task-name {
    font-size: 16px;
    color: #334155;
    word-break: break-all; 
}


.task-name.done {
    text-decoration: line-through;
    color: #94a3b8;
}


.task-actions {
    display: flex;
    gap: 8px;
}

.task-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

.task-actions button:hover {
    opacity: 0.8;
}

.done-btn {
    background: #e6f4ea;
    color: #137333;
}

.delete-btn {
    background: #fce8e6;
    color: #c5221f;
}

@media (max-width: 500px) {
    .task-app {
        padding: 20px;
    }

    .todo-form {
        flex-direction: column;
    }

    .todo-input, .filter-priority, .add-btn {
        width: 100%;
    }
}