Write a function to shuffle a deck of cards thoroughly and explain the time and space complexity of your approach.
Use the signature def shuffle_deck(deck, seed):. deck is a list of card identifiers, and seed makes the result reproducible for testing. Return a new list containing the same cards in uniformly randomized order, leaving the input list unchanged. Implement the shuffle rather than calling a library shuffle function.
The input is a list of values and an integer seed. The output is a permutation of the input list. For a fixed seed, the output must be deterministic.
def shuffle_deck(deck, seed):