:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f77f00;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --transition: all 0.3s ease;
}

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

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

.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.app-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.app-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.language-selector, .theme-toggle {
    border: none;
    background: var(--light-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 500;
    transition: var(--transition);
}

.language-selector:hover, .theme-toggle:hover {
    background: var(--gray-color);
    color: white;
}

.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
}

.notification {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    overflow: hidden;
    animation: slideInRight 0.5s ease;
    transition: all 0.3s ease;
    border-left: 5px solid var(--danger-color);
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

.notification-header {
    display: flex;
    align-items: center;
    padding: 15px 15px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.notification-icon {
    font-size: 1.5rem;
    color: var(--danger-color);
    margin-right: 10px;
}

.notification-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.notification-body {
    padding: 15px;
}

.notification-message {
    margin-bottom: 15px;
    color: var(--gray-color);
}

.notification-task {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-task:last-child {
    margin-bottom: 0;
}

.notification-task-title {
    font-weight: 500;
}

.notification-task-date {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px;
    background: #f8f9fa;
}

.notification-btn {
    padding: 5px 15px;
    border-radius: 5px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 10px;
}

.notification-dismiss {
    background: transparent;
    color: var(--gray-color);
}

.notification-dismiss:hover {
    background: #e9ecef;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: var(--transition);
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 5px 0;
}

.stat-label {
    color: var(--gray-color);
    font-weight: 500;
}

.task-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #ced4da;
    padding: 12px 15px;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(67, 97, 238, 0.3);
}

.tasks-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tasks-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    border: none;
    background: var(--light-color);
    border-radius: 8px;
    padding: 8px 15px;
    font-weight: 500;
    transition: var(--transition);
}

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

.filter-btn:hover:not(.active) {
    background: var(--gray-color);
    color: white;
}

.task-list {
    list-style: none;
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
}

.task-item {
    background: var(--light-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    animation: slideIn 0.4s ease;
    border-left: 5px solid transparent;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.task-item.priority-high {
    border-left-color: var(--danger-color);
}

.task-item.priority-medium {
    border-left-color: var(--warning-color);
}

.task-item.priority-low {
    border-left-color: var(--success-color);
}

.task-item.completed {
    opacity: 0.7;
    background: #e9ecef;
}

.task-item.overdue {
    background: #fff5f5;
    border-left-color: var(--danger-color);
}

.task-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.task-checkbox {
    width: 22px;
    height: 22px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.task-details {
    flex: 1;
}

.task-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.task-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--gray-color);
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.task-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

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

.task-btn:hover {
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.modal-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.modal-title {
    font-weight: 700;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* Dark theme */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f8f9fa;
}

body.dark-theme .app-header,
body.dark-theme .stat-card,
body.dark-theme .task-form-container,
body.dark-theme .tasks-container,
body.dark-theme .notification {
    background: rgba(30, 30, 50, 0.9);
    color: #f8f9fa;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background: #212529;
    border-color: #495057;
    color: #f8f9fa;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background: #212529;
    border-color: var(--primary-color);
    color: #f8f9fa;
}

body.dark-theme .task-item {
    background: #212529;
    color: #f8f9fa;
}

body.dark-theme .task-item.completed {
    background: #343a40;
}

body.dark-theme .task-item.overdue {
    background: #3a1f1f;
}

body.dark-theme .filter-btn,
body.dark-theme .language-selector,
body.dark-theme .theme-toggle {
    background: #212529;
    color: #f8f9fa;
}

body.dark-theme .filter-btn:hover:not(.active) {
    background: #495057;
}

body.dark-theme .notification-task {
    background: #212529;
}

body.dark-theme .notification-actions {
    background: #212529;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .tasks-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .task-actions {
        flex-direction: column;
    }

    .notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}