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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: white;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    padding: 30px;
}

.input-section {
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

#taskInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

#taskInput:focus {
    outline: none;
    border-color: #8e2de2;
    box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.2);
}

.btn-add {
    background: linear-gradient(to right, #4a00e0, #8e2de2);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(142, 45, 226, 0.4);
}

.instruction {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.stats-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: #4a00e0;
}

.filters-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background-color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #4a00e0;
    color: white;
    border-color: #4a00e0;
}

.filter-btn:hover:not(.active) {
    border-color: #4a00e0;
    color: #4a00e0;
}

.btn-clear {
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear:hover {
    background-color: #ff3742;
    transform: translateY(-2px);
}

.tasks-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    min-height: 300px;
}

#taskList {
    list-style-type: none;
}

.task-item {
    background-color: white;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.task-item.removing {
    animation: slideOut 0.3s ease-out;
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

.task-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #4a00e0;
}

.task-text {
    flex: 1;
    font-size: 1.1rem;
    transition: all 0.3s;
}

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

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

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-complete {
    background-color: #e9f7ef;
    color: #2ecc71;
}

.btn-complete:hover {
    background-color: #2ecc71;
    color: white;
}

.btn-delete {
    background-color: #ffeaea;
    color: #ff4757;
}

.btn-delete:hover {
    background-color: #ff4757;
    color: white;
}

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

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

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

footer {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .btn-clear {
        align-self: center;
    }
    
    .stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .task-actions {
        align-self: flex-end;
    }
}