/* livres.css - Styles pour la page des livres - VERSION RESPONSIVE OPTIMISEE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: url('../images/wallpapersden.com_dune-2021-new-movie_1920x1080.jpg');
    background-size: cover;
    background-position: center center;
    /* FIX PRINCIPAL : background-attachment: fixed est casse sur iOS et la plupart
       des navigateurs mobiles (le fond ne suit pas le scroll et apparait mal cadre).
       On utilise scroll par defaut, et on remet fixed uniquement sur desktop large
       via media query ci-dessous. */
    background-attachment: scroll;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Overlay avec effet futuriste */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(213, 2, 65, 0.3));
    z-index: 0;
    pointer-events: none;
}

/* ================== HEADER ================== */
header {
    background-image: url("../images/marvel.jpg");
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

header h1 {
    color: white;
    text-align: center;
    padding: 30px;
    margin: 0;
    font-family: 'Audiowide', cursive;
    font-size: clamp(1.2rem, 4vw, 2rem);
    letter-spacing: clamp(0.2rem, 1vw, 0.5rem);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.encadrer {
    padding: 7px;
    color: white;
    font-family: 'Audiowide', cursive;
}

/* ================== ICONES HEADER ================== */
.home-icon-container {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 20;
}

.user-icon-container {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 20;
}

.home-icon-link,
.user-icon-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.home-icon-link:hover,
.user-icon-link:hover {
    background: rgba(213, 2, 65, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: #D50241;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(213, 2, 65, 0.5);
}

.home-icon,
.user-icon {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #D50241, #ff1744);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: transform 0.3s ease;
}

.home-icon-link:hover .home-icon,
.user-icon-link:hover .user-icon {
    transform: rotate(360deg);
}

/* ================== NAVIGATION ================== */
.menu {
    height: auto;
    min-height: 60px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-top: #D50241 6px solid;
    border-bottom: #D50241 6px solid;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

ul {
    display: flex;
    justify-content: center;
    padding: 10px;
    gap: clamp(20px, 5vw, 70px);
    list-style: none;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
    color: black;
    font-family: 'Space Mono', sans-serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    transition: all 0.3s ease;
    padding: 5px 10px;
}

.livre:hover,
#musique:hover,
#films:hover,
#jeux:hover {
    border-bottom: 2px solid #0890E4;
}

.livre.active {
    border-bottom: 2px solid #D50241;
}

/* ================== CONTAINER PRINCIPAL ================== */
.container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) clamp(10px, 2vw, 20px);
    position: relative;
    z-index: 5;
    flex: 1;
}

.page-header {
    text-align: center;
    margin-bottom: clamp(20px, 4vw, 40px);
    padding: clamp(15px, 3vw, 30px);
}

.page-header h1 {
    color: white;
    font-family: 'Audiowide', cursive;
    font-size: clamp(1.5em, 5vw, 2.5em);
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

.page-header p {
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.9em, 2.5vw, 1.1em);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
    padding: 0 15px;
}

/* ================== RECHERCHE ET FILTRES ================== */
.search-section {
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    max-width: 700px;
    width: calc(100% - 30px);
    padding: clamp(20px, 4vw, 30px);
    margin: 0 auto clamp(25px, 4vw, 40px) auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

.searchBox {
    display: flex;
    max-width: 100%;
    width: 100%;
    margin: 0 auto 20px auto;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding-right: 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.searchInput {
    border: none;
    background: none;
    outline: none;
    color: black;
    font-size: clamp(14px, 2.5vw, 15px);
    padding: clamp(12px, 2vw, 14px) clamp(20px, 3vw, 26px);
    flex: 1;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.filters {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 2vw, 15px);
    flex-wrap: wrap;
    width: 100%;
}

.filter-btn {
    padding: clamp(8px, 1.5vw, 10px) clamp(15px, 3vw, 25px);
    border: 2px solid #D50241;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #D50241;
    border-radius: 25px;
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    background: rgba(213, 2, 65, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(213, 2, 65, 0.3);
}

.filter-btn.active {
    background: linear-gradient(45deg, #D50241, #ff1744);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(213, 2, 65, 0.4);
}

/* ================== ALERTES ================== */
.alert-box {
    padding: clamp(12px, 2vw, 15px) clamp(15px, 3vw, 20px);
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.8em, 2vw, 0.9em);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.alert-success {
    color: #2e7d32;
    border: 2px solid #66bb6a;
}

.alert-error {
    color: #c62828;
    border: 2px solid #ef5350;
}

/* ================== GRILLE DES LIVRES - RESPONSIVE ================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: clamp(20px, 3vw, 35px);
    margin-bottom: 40px;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(15px, 5vw, 80px);
}

.book-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px rgba(213, 2, 65, 0.5);
    background: rgba(255, 255, 255, 0.95);
    border-color: #D50241;
}

.book-cover {
    position: relative;
    background: linear-gradient(135deg, rgba(213, 2, 65, 0.2), rgba(255, 23, 68, 0.1));
    padding: clamp(30px, 5vw, 40px) clamp(15px, 3vw, 20px);
    text-align: center;
    border-bottom: 3px solid rgba(213, 2, 65, 0.3);
    height: clamp(300px, 40vw, 600px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.1);
}

.book-icon {
    font-size: clamp(3em, 8vw, 4.5em);
    margin-bottom: 10px;
    color: #D50241;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.available-badge,
.borrowed-badge {
    position: absolute;
    top: clamp(10px, 2vw, 15px);
    right: clamp(10px, 2vw, 15px);
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 2.5vw, 18px);
    border-radius: 25px;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.7em, 1.8vw, 0.8em);
    font-weight: bold;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.available-badge {
    background: rgba(76, 175, 80, 0.95);
    color: white;
    border: 2px solid #4caf50;
}

.borrowed-badge {
    background: rgba(244, 67, 54, 0.95);
    color: white;
    border: 2px solid #f44336;
}

.book-info {
    padding: clamp(18px, 3vw, 25px);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-family: 'Audiowide', cursive;
    color: #D50241;
    font-size: clamp(1.1em, 2.5vw, 1.4em);
    margin-bottom: 12px;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.book-author {
    font-family: 'Space Mono', monospace;
    color: #444;
    font-size: clamp(0.9em, 2vw, 1em);
    margin-bottom: 15px;
    font-weight: 500;
}

.book-isbn,
.book-date {
    font-family: 'Space Mono', monospace;
    color: #888;
    font-size: clamp(0.75em, 1.8vw, 0.85em);
    margin: 5px 0;
}

.book-stats {
    margin-top: auto;
    padding-top: 15px;
    border-top: 2px solid rgba(213, 2, 65, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.8em, 2vw, 0.9em);
    color: #666;
    font-weight: 600;
}

.stat-icon {
    font-size: 1.2em;
}

.book-actions {
    padding: 0 clamp(18px, 3vw, 25px) clamp(18px, 3vw, 25px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-borrow,
.btn-login,
.btn-unavailable,
.btn-details {
    padding: clamp(12px, 2vw, 14px);
    border: none;
    border-radius: 12px;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    font-size: clamp(0.8em, 2vw, 0.95em);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-borrow {
    background: linear-gradient(135deg, #D50241, #ff1744);
    color: white;
    box-shadow: 0 6px 20px rgba(213, 2, 65, 0.4);
}

.btn-borrow:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(213, 2, 65, 0.6);
    background: linear-gradient(135deg, #ff1744, #D50241);
}

.btn-login {
    background: linear-gradient(135deg, #0890E4, #0563a8);
    color: white;
    box-shadow: 0 6px 20px rgba(8, 144, 228, 0.4);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(8, 144, 228, 0.6);
}

.btn-unavailable {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    color: #757575;
    cursor: not-allowed;
}

.btn-details {
    background: transparent;
    color: #D50241;
    border: 2px solid #D50241;
}

.btn-details:hover {
    background: rgba(213, 2, 65, 0.15);
    transform: translateY(-2px);
}

.no-books {
    grid-column: 1 / -1;
    text-align: center;
    padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.no-books h2 {
    font-size: clamp(2.5em, 8vw, 4em);
    margin-bottom: 20px;
    color: #D50241;
}

.no-books p {
    font-family: 'Space Mono', monospace;
    color: #666;
    font-size: clamp(1em, 3vw, 1.3em);
}

/* ================== MODAL ================== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: clamp(20px, 5vh, 5%) auto;
    padding: clamp(25px, 5vw, 40px);
    border-radius: 20px;
    width: calc(100% - 30px);
    max-width: 600px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: clamp(24px, 5vw, 28px);
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #D50241;
}

/* ================== FOOTER ================== */
footer {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: clamp(30px, 5vw, 50px);
}

.footer-container {
    position: relative;
    width: 100%;
    height: clamp(80px, 15vw, 120px);
}

.foot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.footer-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 15px;
}

.footer-text h2 {
    color: #ff1744;
    font-family: 'Audiowide', cursive;
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: clamp(5px, 1vw, 8px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.footer-text p {
    font-family: 'Space Mono', sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    line-height: 1.4;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    padding: 0 10px;
}

/* ================== RESPONSIVE BREAKPOINTS ================== */

/* Desktop Large uniquement : on remet background-attachment fixed
   car c'est la seule plateforme ou ca fonctionne correctement */
@media (min-width: 1200px) {
    body {
        background-attachment: fixed;
    }
}

/* Desktop Large (1600px et plus) */
@media (min-width: 1600px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop Standard (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 40px;
    }

    .container {
        padding: 30px 15px;
    }
}

/* Tablettes Landscape et petits desktops (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 30px;
    }

    .book-cover {
        height: 400px;
    }

    ul {
        gap: 40px;
    }
}

/* Tablettes Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 20px;
    }

    .book-cover {
        height: 350px;
    }

    header h1 {
        padding: 25px 100px;
    }

    ul {
        gap: 30px;
    }

    .home-icon-container {
        left: 20px;
        top: 25px;
    }

    .user-icon-container {
        right: 20px;
        top: 25px;
    }
}

/* Smartphones Landscape et petites tablettes (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 15px;
    }

    .book-cover {
        height: 280px;
    }

    .home-icon-container {
        left: 15px;
        top: 15px;
    }

    .user-icon-container {
        right: 15px;
        top: 15px;
    }

    .home-icon-link span,
    .user-icon-link span {
        font-size: 12px;
    }

    header h1 {
        padding: 20px 80px;
    }

    ul {
        gap: 20px;
        padding: 15px 10px;
    }

    .search-section {
        padding: 20px;
    }
}

/* Smartphones Portrait (480px - 575px) */
@media (min-width: 480px) and (max-width: 575px) {
    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .book-cover {
        height: 350px;
    }

    .home-icon-link,
    .user-icon-link {
        padding: 8px 15px;
        gap: 8px;
    }

    .home-icon-link span,
    .user-icon-link span {
        font-size: 11px;
    }

    header h1 {
        padding: 18px 70px;
    }

    ul {
        gap: 15px;
        padding: 12px 8px;
    }

    .menu a {
        padding: 8px 12px;
    }
}

/* Tres petits smartphones (320px - 479px) */
@media (max-width: 479px) {
    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .book-cover {
        height: 300px;
    }

    .home-icon-container {
        left: 10px;
        top: 15px;
    }

    .user-icon-container {
        right: 10px;
        top: 15px;
    }

    .home-icon-link,
    .user-icon-link {
        padding: 8px;
        border-radius: 50%;
        gap: 0;
    }

    .home-icon-link span,
    .user-icon-link span {
        display: none;
    }

    .home-icon,
    .user-icon {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    header h1 {
        padding: 15px 50px;
        font-size: 1rem;
    }

    ul {
        gap: 10px;
        padding: 10px 5px;
        justify-content: space-around;
    }

    .menu a {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .search-section {
        padding: 15px;
        border-radius: 15px;
    }

    .searchBox {
        border-radius: 25px;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.75rem;
    }

    .book-actions {
        gap: 10px;
    }

    .btn-borrow,
    .btn-login,
    .btn-unavailable,
    .btn-details {
        padding: 10px;
        font-size: 0.75em;
        letter-spacing: 0.5px;
    }
}

/* Extra petits ecrans (max 359px) */
@media (max-width: 359px) {
    .container {
        padding: 15px 8px;
    }

    .books-grid {
        padding: 8px;
        gap: 15px;
    }

    .book-cover {
        height: 250px;
        padding: 20px 10px;
    }

    header h1 {
        padding: 12px 45px;
        font-size: 0.9rem;
        letter-spacing: 0.15rem;
    }

    .page-header h1 {
        font-size: 1.3em;
    }

    .page-header p {
        font-size: 0.85em;
    }

    .menu {
        border-top-width: 4px;
        border-bottom-width: 4px;
    }

    ul {
        gap: 8px;
        padding: 8px 5px;
    }

    .menu a {
        font-size: 0.75rem;
        padding: 5px 6px;
    }
}

/* Optimisations pour ecrans tactiles */
@media (hover: none) and (pointer: coarse) {
    .book-card:hover {
        transform: none;
    }

    .btn-borrow:hover,
    .btn-login:hover,
    .btn-details:hover {
        transform: none;
    }

    .filter-btn:hover {
        transform: none;
    }

    .btn-borrow,
    .btn-login,
    .btn-unavailable,
    .btn-details {
        min-height: 44px;
    }

    .filter-btn {
        min-height: 40px;
    }

    .menu a {
        min-height: 40px;
        display: flex;
        align-items: center;
    }
}

/* Mode paysage pour smartphones */
@media (max-height: 500px) and (orientation: landscape) {
    .book-cover {
        height: 200px;
    }

    header h1 {
        padding: 15px 60px;
        font-size: 1.1rem;
    }

    .page-header {
        margin-bottom: 20px;
        padding: 15px;
    }

    .search-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .books-grid {
        padding: 15px;
        gap: 15px;
    }

    .footer-container {
        height: 70px;
    }
}

/* Optimisation pour iPhone SE et petits ecrans */
@media (max-width: 375px) {
    .book-info {
        padding: 15px;
    }

    .book-title {
        font-size: 1.05em;
        margin-bottom: 10px;
    }

    .book-author {
        font-size: 0.85em;
    }

    .available-badge,
    .borrowed-badge {
        top: 8px;
        right: 8px;
        padding: 5px 12px;
        font-size: 0.65em;
    }
}

/* Optimisation pour iPad et tablettes */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Accessibility - Preference de mouvement reduit */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .book-card:hover,
    .btn-borrow:hover,
    .btn-login:hover,
    .btn-details:hover,
    .filter-btn:hover {
        transform: none;
    }

    .home-icon-link:hover .home-icon,
    .user-icon-link:hover .user-icon {
        transform: none;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .book-cover-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print styles */
@media print {
    .home-icon-container,
    .user-icon-container,
    .menu,
    .search-section,
    .filters,
    .book-actions,
    footer {
        display: none;
    }

    body::before {
        display: none;
    }

    .book-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}