﻿.image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px; /* Slightly rounded corners */
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow for visual depth */
    background-color: #f0f0f0; /* Light background color for container */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
}

.homepage-cover-image {
    max-width: 180px;
    max-height: 260px;
    min-width: 180px;
    min-height: 260px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    box-shadow: 5px 8px 15px rgba(0, 0, 0, 0.1);
    background: white;
}

.library-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
}
.cover-image {
    max-width: 80px;
    max-height: 100px;
    min-width: 80px;
    min-height: 100px;
    object-fit: cover;
    display: block;
    opacity: 0; /* Initially hidden to fade in after loading */
    transition: opacity 0.3s ease-in-out; /* Smooth fade-in transition */
}

    .cover-image.loaded {
        opacity: 1; /* Fade in image when it's loaded */
    }

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top: 4px solid #3498db; /* Blue color for the spinner */
    animation: spin 1s linear infinite;
    z-index: 2; /* Ensure the spinner appears above the image */
}

/* Improved spinner animation */
@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Hover effect to scale the image */
.image-container:hover {
    transform: scale(1.05); /* Slight zoom effect on hover */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}
