html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
}

.spinner-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.spinner-center {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #ccc;
    border-top-color: #445F87;
    animation: spin 1s linear infinite;
    background-color: transparent;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Books Container */
.books-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Book List Grid */
.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

@media (min-width: 480px) {
    .book-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (min-width: 600px) {
    .book-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 900px) {
    .book-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Card Styles */
.card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Accessibility: Focus styles for keyboard navigation */
.card:focus-visible {
    outline: 3px solid #445F87;
    outline-offset: 3px;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card * {
    margin: 5px 0;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-image {
    width: 125px;
    height: 150px;
    border-radius: 5px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8);
    transition: box-shadow 0.3s ease;
}

.card:hover .book-image {
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.8);
}

.text-container {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    margin: 0;
}

/* Next Button Styles */
.nextBtn {
    display: none;
    margin-top: 1rem;
    margin-right: 0;
    margin-bottom: 1.5rem;
    margin-left: auto;
    font-family: inherit;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid #eaedf1;
    border-radius: 4px;
    color: #445F87;
    background-color: #ffffff;
}

.nextBtn:hover {
   box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8);
}


