:root {
    --primary-color: #4a6fa5;
    --primary-hover: #3a5a8c;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --success: #2ecc71;
    --warning: #f39c12;
    --light-gray: #f5f7fa;
    --border-color: #e1e4e8;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.todo-form {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn i {
    font-size: 0.9em;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.todo-stats {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.todo-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: var(--transition);
}

.todo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.todo-content {
    padding: 1.25rem;
}

.todo-text {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    word-break: break-word;
}

.todo-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.8;
}

.todo-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.todo-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.priority {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.priority.low {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.priority.medium {
    background-color: #fff8e1;
    color: #f57f17;
}

.priority.high {
    background-color: #ffebee;
    color: #c62828;
}

.status {
    text-transform: capitalize;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status.pending {
    background-color: #e3f2fd;
    color: #1565c0;
}

.status.in-progress {
    background-color: #fff3e0;
    color: #e65100;
}

.status.completed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer i {
    color: #f0db4f;
    margin-left: 0.25rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: var(--success);
}

.notification.error {
    background-color: var(--danger);
}

.notification.info {
    background-color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
    grid-column: 1 / -1;
}

/* Overdue State */
.due-date.overdue {
    color: var(--danger);
    font-weight: 600;
}

/* Active Filter Button */
.filters .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Updated Time */
.todo-meta .updated {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* Todo Item Enhancements */
.todo-item {
    transition: all 0.2s ease;
}

.todo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Priority Badges */
.priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.priority.low {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.priority.medium {
    background-color: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.priority.high {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .todo-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .todo-meta .updated {
        margin-left: 0;
        width: 100%;
        text-align: left;
    }
    
    .todo-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .todo-actions select,
    .todo-actions button {
        width: 100%;
    }
}

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

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