.book-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: minmax(100px, auto);
    grid-gap: 25px;
    margin-bottom: 3rem;
}

.book-item {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.book-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.book-content {
    display: flex;
    height: 100%;
}

.book-spine {
    width: 30px;
    background: linear-gradient(to right, #0d47a1, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.book-spine::after {
    content: '';
    position: absolute;
    right: 0;
    height: 100%;
    width: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.book-spine-text {
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1px;
    opacity: 0.9;
    text-transform: uppercase;
}

.book-details {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.book-author {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.book-meta {
    display: flex;
    align-items: center;
    margin-top: auto;
    justify-content: space-between;
}

.book-id {
    font-size: 0.75rem;
    color: #adb5bd;
    font-family: monospace;
}

.book-stock {
    display: flex;
    align-items: center;
}

.stock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.stock-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.high-stock .stock-indicator { background-color: #28a745; }
.high-stock .stock-text { color: #28a745; }

.medium-stock .stock-indicator { background-color: #ffc107; }
.medium-stock .stock-text { color: #856404; }

.low-stock .stock-indicator { background-color: #dc3545; }
.low-stock .stock-text { color: #dc3545; }

.genre-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.7rem;
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 500;
    z-index: 2;
}

/* Enhanced header styling */
.library-header {
    position: relative;
    padding: 3rem 0 2rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(120deg, #1976d2, #0d47a1);
}

.library-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.8;
}

.library-header-content {
    position: relative;
    z-index: 1;
    padding: 0 2rem;
    text-align: center;
}

.library-title {
    color: white;
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.library-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Enhanced search bar styling */
.search-container {
    position: relative;
    margin: -30px auto 2.5rem;
    max-width: 800px;
    z-index: 10;
}

.search-inner {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input-group {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.search-icon {
    color: #6c757d;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.search-input {
    border: none;
    box-shadow: none;
    font-size: 1rem;
    padding: 0.75rem 0;
    flex-grow: 1;
    background: transparent;
}

.search-input:focus {
    box-shadow: none;
    outline: none;
}

.search-btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    border: none;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.3);
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(25, 118, 210, 0.4);
    background: linear-gradient(135deg, #1565c0, #0a3d8f);
}

/* Pagination styling */
.pagination-container {
    margin-top: 3rem;
}

.pagination .page-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    border: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--primary-color);
}

/* Empty state styling */
.empty-state {
    background-color: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.empty-state-icon {
    font-size: 3rem;
    color: #e9ecef;
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.empty-state-text {
    color: #6c757d;
    max-width: 400px;
    margin: 0 auto;
}