.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    list-style: none; /* Removes the default list style (dots) */
text-decoration:none;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    color: #4a5568;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-width: 42px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;

}

.pagination .page-link:hover {
    background: rgba(140, 82, 255, 0.08);
    border-color: rgba(140, 82, 255, 0.3);
    color: rgba(140, 82, 255, 1);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: rgba(140, 82, 255, 1);
    border-color: rgba(140, 82, 255, 1);
    color: white;
    box-shadow: 0 4px 6px rgba(140, 82, 255, 0.1);
}

.pagination .page-item.disabled .page-link {
    color: #cbd5e0;
    background: #f8fafc;
    border-color: #edf2f7;
    cursor: not-allowed;
}

/* Loading indicator */
.pagination .page-link .loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pagination .page-link.loading {
    color: transparent;
}

.pagination .page-link.loading .loading {
    opacity: 1;
}

.pagination .page-link.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.pagination .page-item.active .page-link.loading::after {
    border-top-color: white;
}

.pagination .page-link.loading:not(.active)::after {
    border: 2px solid rgba(140, 82, 255, 0.2);
    border-top-color: rgba(140, 82, 255, 0.8);
}

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

/* Responsive adjustments */
@media (max-width: 640px) {
    .pagination {
        gap: 0;
    }
    .pagination .page-link {
        padding: 6px 12px;
        min-width: 36px;
    }
}
