:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #1a1a2e;
    --text-color: #333;
    --text-light: #666;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
}

[data-theme="dark"] {
    --light-color: #1a1a2e;
    --dark-color: #0f1123;
    --text-color: #e2e8f0;
    --text-light: #94a3b8;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: var(--transition);
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(40px);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent-color);
    bottom: -50px;
    right: -50px;
    animation-delay: -10s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--secondary-color);
    top: 50%;
    left: 80%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, 50px) rotate(90deg); }
    50% { transform: translate(0, 100px) rotate(180deg); }
    75% { transform: translate(-50px, 50px) rotate(270deg); }
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .header {
    background: rgba(255, 255, 255, 0.05);
}

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

.logo i {
    font-size: 32px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    color: var(--accent-color);
}

.stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Add Task Section */
.add-task-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

[data-theme="dark"] .add-task-section {
    background: rgba(255, 255, 255, 0.05);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#taskInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-radius: 8px;
    font-size: 16px;
    background: var(--light-color);
    color: var(--text-color);
    transition: var(--transition);
}

#taskInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

#addTaskBtn {
    padding: 0 30px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

#addTaskBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.priority-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.priority-selector span {
    color: var(--text-light);
    font-weight: 500;
}

.priority-options {
    display: flex;
    gap: 10px;
}

.priority-btn {
    padding: 8px 20px;
    border: 2px solid rgba(67, 97, 238, 0.2);
    background: transparent;
    border-radius: 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.priority-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.priority-btn[data-priority="low"].active {
    background: #2ecc71;
}

.priority-btn[data-priority="medium"].active {
    background: #f39c12;
}

.priority-btn[data-priority="high"].active {
    background: #e74c3c;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-radius: 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

[data-theme="dark"] .filter-btn {
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.filter-btn:hover:not(.active) {
    border-color: var(--primary-color);
}

/* Tasks Container */
.tasks-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

[data-theme="dark"] .tasks-container {
    background: rgba(255, 255, 255, 0.05);
}

.tasks-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .tasks-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.tasks-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

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

.action-btn {
    padding: 8px 15px;
    background: rgba(67, 97, 238, 0.1);
    border: none;
    border-radius: 6px;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(67, 97, 238, 0.2);
}

.action-btn.danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.action-btn.danger:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* Tasks List */
.tasks-list {
    min-height: 300px;
    padding: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: var(--transition);
    animation: slideIn 0.3s ease;
}

[data-theme="dark"] .task-item {
    background: rgba(255, 255, 255, 0.05);
}

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

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(67, 97, 238, 0.3);
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.task-checkbox.checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

.task-content {
    flex: 1;
}

.task-text {
    font-size: 16px;
    margin-bottom: 5px;
    transition: var(--transition);
}

.task-text.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--text-light);
}

.task-priority {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-priority.low {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.task-priority.medium {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

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

.task-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-state p {
    font-size: 14px;
}

/* Task Summary */
.task-summary {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .task-summary {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.summary-item i {
    color: var(--primary-color);
}

.export-btn {
    padding: 8px 15px;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

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

/* Quick Actions */
.quick-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    transition: var(--transition);
}

.quick-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.4);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gradient);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease;
}

[data-theme="dark"] .modal-content {
    background: var(--dark-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 20px;
}

.tip {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.tip i {
    font-size: 24px;
    color: var(--primary-color);
}

.tip h4 {
    margin-bottom: 5px;
    color: var(--text-color);
}

.tip p {
    font-size: 14px;
    color: var(--text-light);
}

kbd {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #addTaskBtn {
        justify-content: center;
    }
    
    .tasks-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .task-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .quick-actions {
        bottom: 20px;
        right: 20px;
    }
}