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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #4b6cb7, #182848);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.8;
    font-size: 1.1em;
}

main {
    padding: 20px;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#taskInput {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#taskInput:focus {
    outline: none;
    border-color: #4b6cb7;
}

#addBtn {
    padding: 15px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#addBtn:hover {
    background-color: #45a049;
}

.filter-section {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #4b6cb7;
    color: white;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    font-weight: bold;
}

#taskList {
    list-style-type: none;
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in;
    transition: transform 0.2s;
}

.task-item:hover {
    transform: translateY(-2px);
}

.task-item.completed {
    background-color: #e8f5e9;
}

.task-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 18px;
    word-break: break-word;
}

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

.delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.delete-btn:hover {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

@media (max-width: 600px) {
    .container {
        margin: 10px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .input-section {
        flex-direction: column;
    }

    .filter-section {
        flex-wrap: wrap;
    }

    .stats {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
