.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Mobile filter overlay */
@media (max-width: 767px) {
    #filters-sidebar {
        transform: translateX(-100%) !important;
        max-width: 85%;
        width: 280px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        top: 0;
        bottom: 0;
        padding-top: 150px;
        z-index: 99;
        position: fixed !important;
        left: 0 !important;
        right: auto !important;
        height: 100vh !important;
    }

    #filters-sidebar.mobile-open {
        transform: translateX(0) !important;
    }
}

/* Filter overlay backdrop for mobile */
#filter-backdrop {
    display: none;
    z-index: 98;
}

#filter-backdrop.active {
    display: block;
}

/* sidebar desktop */
@media (min-width: 1024px) {
    #filters-sidebar {
        position: fixed !important;
        top: 7.3rem; 
        left: 0;
        height: calc(100vh - 7.3rem);
        overflow-y: auto;
        transform: none !important;
    }
    
    #card-container-wrapper {
        margin-left: 16rem; 
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #filters-sidebar {
        position: fixed !important;
        top: 8rem; 
        left: 0;
        height: calc(100vh - 8rem); 
        overflow-y: auto;
        transform: none !important;
    }
        #card-container-wrapper {
        margin-left: 14rem; 
    }
}

/* Ensure main content doesn't shift on mobile when filters are toggled */
@media (max-width: 767px) {
    #card-container-wrapper {
        margin-left: 0;
    }
}

.card-container {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.points-badge {
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(147, 51, 234, 0.9) 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-list-view {
    grid-template-cols: 1fr !important;
}

.card-list-view .card-container {
    flex-direction: row;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem;
    background: #1f2937;
    border-radius: 0.75rem;
}

.card-list-view .card-image-wrapper {
    width: 60px;
    height: 87px;
    flex-shrink: 0;
}

.card-list-view .card-info {
    display: block !important;
}

/* Hide points on list view or adjust them */
.card-list-view .points-badge {
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    padding: 2px 6px;
}

.card-usage-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px 0 rgba(116, 75, 162, 0.4);
    transition: all 0.3s ease;
}

.card-usage-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-usage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(116, 75, 162, 0.6);
}

.card-usage-btn:hover::before {
    opacity: 1;
}

/* Animated border effect */
.card-usage-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff, #5f27cd);
    background-size: 400% 400%;
    z-index: -2;
    border-radius: 10px;
    animation: moving-border 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-usage-btn:hover::after {
    opacity: 1;
}

@keyframes moving-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Pulse animation for attention */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

.card-usage-btn {
    animation: pulse-glow 2s ease-in-out infinite;
}

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

.card-animate {
    animation: fadeIn 0.3s ease forwards;
}

/* Lazy loading styles */
.lazy-loading {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
}


