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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.task-form {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.task-form input,
.task-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.task-form input:focus,
.task-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.task-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

#addTaskBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

#addTaskBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn {
    background: white;
    border: 2px solid #e1e5e9;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.task-list {
    margin-bottom: 25px;
}

.task-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #e1e5e9;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.task-item.completed {
    border-left-color: #28a745;
    opacity: 0.8;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #6c757d;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    margin-right: 15px;
}

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

.task-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.task-btn:hover {
    background: #f8f9fa;
}

.complete-btn {
    color: #28a745;
}

.edit-btn {
    color: #007bff;
}

.delete-btn {
    color: #dc3545;
}

.task-description {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 15px;
}

.task-meta {
    font-size: 12px;
    color: #adb5bd;
    display: flex;
    justify-content: space-between;
}

.stats {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    color: #6c757d;
}

.stats span {
    font-weight: 600;
    color: #667eea;
    margin: 0 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .task-form {
        padding: 20px;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .task-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-actions {
        align-self: flex-end;
    }
}
