* {
    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;
    color: #333;
    transition: all 0.3s ease;
}

body.dark-theme {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
}

body.dark-theme .add-task-section,
body.dark-theme .stat,
body.dark-theme .tasks-container,
body.dark-theme .progress-section {
    background: #34495e;
    color: #ecf0f1;
}

body.dark-theme .task-item {
    background: #2c3e50;
    color: #ecf0f1;
}

body.dark-theme #taskInput {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a6741;
}

body.dark-theme #taskInput:focus {
    border-color: #3498db;
}

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

header {
    margin-bottom: 30px;
    color: white;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.theme-toggle span {
    font-size: 1.5em;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

.add-task-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.task-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#taskInput {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#categorySelect, #prioritySelect {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 140px;
}

#categorySelect:focus, #prioritySelect:focus {
    outline: none;
    border-color: #667eea;
}

#taskInput:focus {
    outline: none;
    border-color: #667eea;
}

#addTaskBtn {
    padding: 15px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
}

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

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

.stat {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.progress-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
}

.progress-bar {
    background: #e1e5e9;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(45deg, #4CAF50, #81C784);
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tasks-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

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

.tasks-header h2 {
    margin: 0;
    color: #333;
}

.task-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#filterSelect {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

#exportBtn {
    padding: 8px 15px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#exportBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.keyboard-shortcuts {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
    text-align: center;
    border-left: 4px solid #667eea;
}

kbd {
    background: #e9ecef;
    color: #495057;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    font-family: monospace;
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.task-item.priority-high {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.task-item.priority-low {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

.task-item.priority-medium {
    border-left-color: #667eea;
    background: #f8f9ff;
}

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

.task-item.completed {
    opacity: 0.7;
    text-decoration: line-through;
    animation: completeTask 0.6s ease-in-out;
    background: linear-gradient(45deg, #4CAF50, #81C784) !important;
    color: white;
}

.task-item.completed .task-text {
    color: white;
}

@keyframes completeTask {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: #4CAF50; }
    100% { transform: scale(1); }
}

@keyframes slideInFromRight {
    0% { 
        transform: translateX(100px); 
        opacity: 0; 
    }
    100% { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

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

.task-item.removing {
    animation: slideOut 0.3s ease-in-out forwards;
}

@keyframes slideOut {
    0% { 
        transform: translateX(0) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translateX(-100px) scale(0.8); 
        opacity: 0; 
    }
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.task-text {
    font-size: 16px;
    font-weight: 500;
}

.task-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #666;
    align-items: center;
}

.task-category, .task-priority {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.task-category {
    background: #e3f2fd;
    color: #1976d2;
}

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

.task-priority.medium {
    background: #e8eaf6;
    color: #512da8;
}

.task-priority.low {
    background: #f3e5f5;
    color: #7b1fa2;
}

.task-delete {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.task-delete:hover {
    background: #ff5252;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state p {
    font-size: 1.1em;
}

.footer {
    margin-top: 50px;
    padding: 30px 0;
    text-align: center;
    color: white;
    opacity: 0.8;
}

.footer p {
    font-size: 14px;
    line-height: 1.6;
}

.footer a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.footer a:hover {
    border-bottom-color: white;
    opacity: 1;
}

body.dark-theme .footer {
    color: #bbb;
}

body.dark-theme .footer a {
    color: #bbb;
}

@media (max-width: 600px) {
    .add-task-section {
        flex-direction: column;
    }
    
    .task-input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .tasks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .footer {
        margin-top: 30px;
        padding: 20px 0;
    }
}