* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.todo-app {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.app-header p {
    opacity: 0.9;
    font-weight: 300;
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input Section */
.input-section {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#taskInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

#taskInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    width: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Task List */
.task-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 25px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-item:last-child {
    border-bottom: none;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.task-checkbox.checked {
    background: #28a745;
    border-color: #28a745;
}

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.task-text {
    flex: 1;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.task-text.completed {
    text-decoration: line-through;
    color: #6c757d;
    opacity: 0.7;
}

.task-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    color: #6c757d;
}

.edit-btn:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.delete-btn:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 25px;
    color: #6c757d;
    display: none;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-weight: 500;
}

/* Footer */
.app-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.clear-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clear-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.clear-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Scrollbar */
.task-list::-webkit-scrollbar {
    width: 6px;
}

.task-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .app-header {
        padding: 20px;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .input-section, .task-list, .app-footer {
        padding: 15px;
    }
    
    .stats {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
}