:root {
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --high-priority: #ef4444;
    --medium-priority: #f59e0b;
    --low-priority: #10b981;
}

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

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

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes expand {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 200px;
        opacity: 1;
    }
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
    animation: slideInLeft 0.6s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
}

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

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.stat {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease backwards;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }

.stat:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.stat:nth-child(1) .stat-value { animation-delay: 0.2s; }
.stat:nth-child(2) .stat-value { animation-delay: 0.3s; }
.stat:nth-child(3) .stat-value { animation-delay: 0.4s; }

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.sidebar-filters {
    margin-bottom: 25px;
}

.sidebar-filters h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn, .priority-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before, .priority-filter::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:hover::before, .priority-filter:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover, .priority-filter:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(5px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    animation: pulse 0.6s ease;
}

.filter-btn.active::before {
    display: none;
}

.sidebar-action {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.undo-btn, .clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.undo-btn::after, .clear-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.undo-btn:hover::after, .clear-btn:hover::after {
    width: 300px;
    height: 300px;
}

.undo-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-3px);
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateX(3px);
}

.undo-btn:active, .clear-btn:active {
    transform: scale(0.98);
}

/* Main Content */
.main-content {
    flex: 1;
    animation: slideInRight 0.6s ease;
}

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

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

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary), #06b6d4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    letter-spacing: -0.5px;
}

.header h1 i {
    animation: bounce 1s ease infinite;
}

.header-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box, .sort-select {
    padding: 10px 15px;
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-box {
    appearance: textfield;
}

.sort-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.search-box::placeholder {
    color: rgba(203, 213, 225, 0.5);
}

.search-box:focus, .sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

/* Task Input Section */
.task-input-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.8) 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideUp 0.6s ease;
    position: relative;
}

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

.input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
}

.input-group input, .input-group select {
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

.input-group input::placeholder {
    color: rgba(203, 213, 225, 0.5);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-1px);
}

#taskNotes {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

#taskNotes::placeholder {
    color: rgba(203, 213, 225, 0.5);
}

#taskNotes:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-1px);
}

.add-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    grid-column: 5;
    position: relative;
    overflow: hidden;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-btn:hover::before {
    width: 400px;
    height: 400px;
}

.add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.add-btn:active {
    transform: translateY(-1px);
}

.add-btn i {
    transition: transform 0.3s ease;
}

.add-btn:hover i {
    transform: rotate(90deg);
}

/* Task List */
.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fadeIn 0.5s ease backwards;
    cursor: grab;
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.task-item:hover::before {
    left: 100%;
}

.task-list .task-item:nth-child(1) { animation-delay: 0.05s; }
.task-list .task-item:nth-child(2) { animation-delay: 0.1s; }
.task-list .task-item:nth-child(3) { animation-delay: 0.15s; }
.task-list .task-item:nth-child(4) { animation-delay: 0.2s; }
.task-list .task-item:nth-child(5) { animation-delay: 0.25s; }
.task-list .task-item:nth-child(n+6) { animation-delay: 0.3s; }

.task-item:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.25);
    transform: translateY(-4px);
}

.task-item.dragging {
    opacity: 0.5;
    transform: scale(0.95) rotateX(10deg);
}

.task-item.completed {
    opacity: 0.7;
}

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

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    position: relative;
}

.task-item:hover .task-checkbox {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: scale(1.08);
}

.task-item.completed .task-checkbox {
    background: linear-gradient(135deg, var(--success), #10b981);
    border-color: var(--success);
    animation: checkmark 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.task-checkbox::after {
    content: '✓';
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
}

.task-item.completed .task-checkbox::after {
    opacity: 1;
}

.task-content {
    flex: 1;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.task-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.task-item:hover .task-title {
    color: var(--primary);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-secondary);
    animation: none;
}

.priority-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    transition: all 0.3s ease;
}

.priority-badge.high {
    background: rgba(239, 68, 68, 0.2);
    color: var(--high-priority);
}

.priority-badge.high:hover {
    background: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--medium-priority);
}

.priority-badge.medium:hover {
    background: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.priority-badge.low {
    background: rgba(16, 185, 129, 0.2);
    color: var(--low-priority);
}

.priority-badge.low:hover {
    background: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.task-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    animation: slideInUp 0.5s ease backwards;
    transition: all 0.3s ease;
}

.task-item:nth-child(1) .meta-item { animation-delay: 0.1s; }
.task-item:nth-child(2) .meta-item { animation-delay: 0.15s; }
.task-item:nth-child(3) .meta-item { animation-delay: 0.2s; }

.task-item:hover .meta-item {
    color: var(--primary);
}

.meta-item i {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.task-item:hover .meta-item i {
    transform: scale(1.2) rotate(5deg);
}

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

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
    border: 1.5px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-tag:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.task-notes {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    margin-top: 8px;
    animation: expand 0.4s ease;
}

@keyframes expand {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 200px;
        opacity: 1;
    }
}

.due-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.due-date.today {
    color: var(--warning);
    font-weight: 600;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.task-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.task-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.task-btn:hover::before {
    width: 200px;
    height: 200px;
}

.task-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    transform: scale(1.15) rotate(5deg);
}

.task-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    transform: scale(1.15) rotate(-5deg);
}

.task-btn:active {
    transform: scale(0.95);
}

.task-btn i {
    transition: transform 0.3s ease;
}

.task-btn:hover i {
    animation: pulse 0.3s ease;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    display: none;
}

.empty-state.show {
    display: block;
    animation: fadeIn 0.6s ease;
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.empty-state p {
    font-size: 1.2rem;
    animation: fadeIn 0.8s ease 0.2s backwards;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg) scale(1.2);
}

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

.modal-form input, .modal-form textarea, .modal-form select {
    padding: 12px 15px;
    background: var(--dark-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.modal-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form textarea {
    appearance: none;
}

.modal-form textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-form input:focus, .modal-form textarea:focus, .modal-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    background: var(--dark-bg);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.save-btn, .cancel-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.save-btn::before, .cancel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.save-btn:hover::before, .cancel-btn:hover::before {
    width: 300px;
    height: 300px;
}

.save-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.35);
}

.save-btn:active {
    transform: translateY(0);
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateX(3px);
}

.cancel-btn:active {
    transform: translateX(0);
}

/* Dropdown/Select Styling */
select {
    cursor: pointer;
    text-transform: none;
}

select::-ms-expand {
    display: none;
}

select option {
    background: var(--dark-bg);
    color: var(--text-primary);
    padding: 8px;
}

select option:hover {
    background: var(--primary);
    color: white;
}

select option:checked {
    background: linear-gradient(var(--primary), var(--primary));
    color: white;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastExit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: toastEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.hide {
    animation: toastExit 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.success {
    background: linear-gradient(135deg, var(--success), #059669);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.toast.success::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    animation: checkmarkBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
}

.toast.error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    animation: shake 0.5s ease;
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 20px;
    }

    .stats-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .add-btn {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-controls {
        width: 100%;
        flex-direction: column;
    }

    .search-box, .sort-select {
        width: 100%;
    }

    .task-item {
        flex-wrap: wrap;
    }

    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .input-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .app-wrapper {
        padding: 10px;
    }

    .sidebar {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .sidebar-filters {
        margin-bottom: 15px;
    }

    .task-input-section {
        padding: 15px;
    }

    .task-item {
        padding: 12px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}