/* Card Hover Preview */
#card-preview {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    display: none;
    width: 250px;
    height: 350px;
    background: #1a1a1a;
}

#card-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#card-preview.is-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #1a1a1a 0%,
        #2a2a2a 50%,
        #1a1a1a 100%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
}

#card-preview.is-loaded img {
    opacity: 1;
}

#card-preview-404 {
    display: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 30%, transparent 60%);
    color: #c9b99a;
    font-size: 0.78rem;
    font-style: italic;
    text-align: center;
    padding: 16px;
    box-sizing: border-box;
    align-items: flex-end;
    justify-content: center;
}

#card-preview.is-404 #card-preview-404 {
    display: flex;
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
