* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #4b6cb7, #182848);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 i {
    color: #FFD700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.app-content {
    padding: 30px;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.task-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.task-input:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
}

.priority-select {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.add-btn {
    background: linear-gradient(to right, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-btn:hover {
    background: linear-gradient(to right, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.add-btn:active {
    transform: translateY(0);
}

.stats-section {
    display: flex;
    justify-content: space-between;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4b6cb7;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #4b6cb7;
    color: white;
}

.filter-btn:hover:not(.active) {
    background-color: #dee2e6;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-btn {
    background-color: #f8d7da;
    color: #721c24;
}

.clear-btn:hover {
    background-color: #f5c6cb;
}

.save-btn {
    background-color: #d4edda;
    color: #155724;
}

.save-btn:hover {
    background-color: #c3e6cb;
}

.task-list {
    list-style-type: none;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.task-item {
    background-color: white;
    padding: 18px 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    border-left: 5px solid #4b6cb7;
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
    opacity: 0.7;
    background-color: #f8f9fa;
    border-left-color: #4CAF50;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    flex-wrap: wrap;
}

.task-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.task-text {
    font-size: 1.1rem;
    flex: 1;
    min-width: 200px;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #6c757d;
}

.task-priority {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.priority-high {
    background-color: #f8d7da;
    color: #721c24;
}

.priority-medium {
    background-color: #fff3cd;
    color: #856404;
}

.priority-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn {
    color: #ffc107;
}

.edit-btn:hover {
    background-color: rgba(255, 193, 7, 0.1);
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #adb5bd;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eaeaea;
}

@media (max-width: 768px) {
    .container {
        border-radius: 15px;
    }
    
    header {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .app-content {
        padding: 20px;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .task-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .controls {
        flex-direction: column;
    }
    
    .action-buttons {
        justify-content: center;
    }
}