/* =========================================================
   GLOBAL: Page Body
========================================================= */

.books-body {
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
    color: var(--ink);
    font-family: 'Georgia', 'Libre Baskerville', serif;
  }
  
  
  /* =========================================================
     GRID LAYOUT: All Book Cards Container
  ========================================================= */
  
  .books-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    padding: 40px 20px;
  }
  
  
  /* =========================================================
     BOOK CARD: Wrapper & Entrance Animation
  ========================================================= */
  
  .book-container {
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    width: 260px;
    padding: 20px;
    border: 2px none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
  
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
  
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  /* reveal animation class */
  .book-container.animated {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* hover effect */
  .book-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  
  
  /* =========================================================
     BOOK CARD: Cover Image
  ========================================================= */
  
  .books-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
  }
  
  .books-image:hover {
    transform: scale(1.03);
  }
  
  
  /* =========================================================
     BOOK CARD: Description Text
  ========================================================= */
  
  .book-description {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-top: 12px;
    background-color: var(--muted);
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  
  /* =========================================================
     SEARCH BAR: Container + Animation
  ========================================================= */
  
  .search-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(-30px);
    animation-delay: 0.3s;
  }
  
  /* search drop animation */
  @keyframes smoothDropIn {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  
  /* =========================================================
     SEARCH BAR: Input Field
  ========================================================= */
  
  #searchBar {
    width: 280px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background-color: var(--panel-0);
    color: var(--ink);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border: none;
  }
  
  #searchBar:focus {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    outline: none;
  }
  
  /* mobile search responsiveness */
  @media (max-width: 600px) {
    #searchBar {
      width: 220px;
      padding: 8px 12px;
      font-size: 13px;
      border-width: 1.5px;
      border-radius: 6px;
    }
  }
  
  
  /* =========================================================
     FEATURED BOOK STAMP (Header Badge)
  ========================================================= */
  
  .featured-book-stamp {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
  
    background: var(--panel-0);
    border-radius: 14px;
    padding: 8px 16px;
  
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
  
    cursor: pointer;
    animation: slideInStamp .8s ease forwards;
    z-index: 1050;
    height: 50px;
  }
  
  
  /* text inside stamp */
  .stamp-text {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--ink);
    white-space: nowrap;
    opacity: 0;
    animation: fadeInStampText .6s ease forwards .4s;
  }
  
  /* stamp book image */
  .stamp-image {
    width: 36px;
    height: auto;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-2px) scale(.96);
    animation: fadeInStampImage .7s ease forwards .6s;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
  }
  
  /* hover effect */
  .featured-book-stamp:hover .stamp-image {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
  }
  
  
  /* featured stamp animations */
  @keyframes slideInStamp {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  
  @keyframes fadeInStampText {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  
  @keyframes fadeInStampImage {
    from { opacity: 0; transform: translateY(-4px) scale(.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  
  
  /* mobile stamp adjustments */
  @media (max-width: 600px) {
    .featured-book-stamp {
      padding: 6px 10px;
      gap: 10px;
    }
    .stamp-text {
      font-size: 13px;
      max-width: 120px;
      line-height: 1.2;
    }
    .stamp-image {
      width: 26px;
      border-radius: 4px;
    }
  }
  
  
  /* =========================================================
     MODAL: Book Image (Carousel)
  ========================================================= */
  

  .carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
  }
  
  .carousel-slide {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
  }
  
  .carousel-item {
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 10px 0;
  }
  
  .carousel-arrow {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--ink);
    position: absolute;
    top: 20%;
    transform: translateY(-50%);
    z-index: 50;
  }
  
  .left-arrow {
    left: 10px;
  }
  
  .right-arrow {
    right: 10px;
  }
  

  .modal-book-image {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 12px auto 16px auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  /* modal mobile tweaks */
  @media screen and (max-width: 480px) {
    .carousel-arrow {
      font-size: 1.5rem;
      top: 10%;
    }
    .left-arrow { left: 4px; }
    .right-arrow { right: 4px; }
    .modal-book-image { max-width: 150px; }
  }
  

  /* welcome modal styles*/

  .modal-ok-btn {
    font-size: 14px;
    font-weight: bold;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background-color: var(--muted); /* Light neutral */
    color: var(--ink);
    padding: 10px 16px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
   
}

.modal-ok-btn:hover {
    background-color: var(--muted-2); /* Gentle blue tone */
    transform: scale(1.01);
}

@media (max-width: 600px) {
  
  .modal-ok-btn {
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 8px;
  }
}
