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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    border-radius: 10px;
}

header h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}

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

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    main {
        grid-template-columns: 2fr 1fr;
    }
}

.input-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.input-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

#taskForm {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

#taskForm input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

#taskForm input[type="text"]:focus {
    outline: none;
    border-color: #6a11cb;
}

#taskForm select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

#taskForm button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

#taskForm button:hover {
    transform: translateY(-2px);
}

.tasks-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tasks-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.filters button.active,
.filters button:hover {
    background: #6a11cb;
    color: white;
    border-color: #6a11cb;
}

#taskList {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 1.1rem;
}

.task-priority {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.priority-low {
    background: #e8f4f8;
    color: #3498db;
}

.priority-medium {
    background: #fcf3cf;
    color: #f39c12;
}

.priority-high {
    background: #fadbd8;
    color: #e74c3c;
}

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

.task-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
}

.edit-btn {
    background: #3498db;
    color: white;
}

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

.stats-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stats-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat h3 {
    margin-bottom: 10px;
    color: #7f8c8d;
    font-size: 1rem;
}

.stat p {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Animation for adding tasks */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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