* {
    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;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: 90vh;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.project-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.project-header h2 {
    color: #2c3e50;
    font-weight: 600;
}

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

.filters {
    padding: 15px 30px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.stats {
    margin-left: auto;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

select, input[type="text"], input[type="date"], input[type="color"], textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.welcome-message {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.welcome-message h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.tasks-grid {
    padding: 20px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    line-height: 1.3;
    flex: 1;
    margin-right: 10px;
}

.task-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-todo {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d4edda;
    color: #155724;
}

.status-done {
    background: #d1ecf1;
    color: #0c5460;
}

.task-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.85rem;
    color: #888;
    gap: 10px;
}

.task-meta-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.task-deadline {
    font-weight: 500;
}

.deadline-overdue {
    color: #dc3545;
    font-weight: 600;
}

.deadline-soon {
    color: #ffc107;
    font-weight: 600;
}

.task-category {
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.task-assigned {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    color: #555;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    background: #f8f9fa;
    color: #000;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #888;
    font-size: 1.2rem;
}

.empty-state p {
    font-size: 0.95rem;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .tasks-grid {
        grid-template-columns: 1fr;
        padding: 15px 20px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    header {
        padding: 15px 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    body {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .project-actions {
        width: 100%;
        justify-content: space-between;
    }
}
