/* ==========================================================================
   BOOKSHELF — PAGE-SPECIFIC STYLES
   Styles for the digital library, book shelves, and review modals.
   ========================================================================== */

/* Main container for the bookshelf page */
.bookshelf-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    border: 1px dashed rgba(0, 255, 204, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Fable/Social link logo styling */
.bookshelf-logo {
  width: 50px;
  display: inline-block;
  vertical-align: middle;
  margin: 0 0 0 15px;
  filter:
    drop-shadow(0 0 4px #b142f5)
    drop-shadow(0 0 8px #00ffff);
  transition: filter 0.3s ease;
  animation: float 4s ease-in-out infinite;
}

.bookshelf-logo:hover {
  filter:
    drop-shadow(0 0 6px #b142f5)
    drop-shadow(0 0 12px #00ffff)
    brightness(1.2);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(5deg);
  }
}

/* Individual shelf section (Read, Currently Reading, TBR) */
.shelf {
    margin-bottom: 80px;
    position: relative;
    padding-bottom: 20px;
}

/* Container for the shelf and its navigation buttons */
.shelf-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 10px;
}

/* Navigation buttons for the shelf */
.scroll-btn {
    background: none;
    border: 2px solid #ff00ff;
    color: #ff00ff;
    font-family: 'Silkscreen', sans-serif;
    font-size: 1.5rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0.3;
    transition: all 0.3s ease;
    z-index: 10;
    user-select: none;
    padding: 0;
    flex-shrink: 0;
}

.scroll-btn:hover {
    opacity: 1;
    background-color: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Shelf title styling (e.g., "Read", "Currently Reading") */
.shelf h3 {
    font-family: 'Silkscreen', sans-serif;
    font-size: 1rem;
    color: #00ffcc;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 2px;
    opacity: 0.8;
    text-shadow: 1px 1px #ff00ff;
}

/* The horizontal shelf board visual effect */
.shelf::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -10px;
    right: -10px;
    height: 10px;
    background: linear-gradient(to bottom, #1a1a1a, #000);
    border-top: 2px solid rgba(0, 255, 204, 0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    border-radius: 2px;
}

/* Horizontal list of books on a shelf */
.shelf ul {
    list-style: none;
    padding: 25px 10px 15px 10px;
    margin: 0;
    display: flex;
    overflow-x: auto;
    gap: 20px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
    flex: 0 0 850px; /* Width for 5 books (150px each) + 4 gaps (20px each) + 20px padding */
    width: 850px;
}

/* Custom scrollbar for the horizontal shelf (Webkit) - Hidden */
.shelf ul::-webkit-scrollbar {
    display: none;
}

/* Individual book item styling */
.shelf li {
    box-sizing: border-box;
    flex: 0 0 150px;
    height: 220px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    font-family: 'Silkscreen', sans-serif;
    font-size: 0.8rem;
    color: #00ffcc;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 4px 4px 0px rgba(255, 0, 255, 0.2);
    word-wrap: break-word;
    overflow: hidden;
    line-height: 1.4;
}

/* Hover effect for books */
.shelf li:hover {
    transform: translateY(-15px) scale(1.05);
    border-color: #ff00ff;
    color: #fff;
    box-shadow: 6px 6px 0px #00ffcc, 0 0 20px rgba(255, 0, 255, 0.4);
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

/* Specific styling for the 'Read' shelf (clickable for reviews) */
.read li {
    border-color: rgba(0, 255, 204, 0.4);
}

/* Specific styling for the 'Currently Reading' shelf */
.currently-reading li {
    border-color: rgba(255, 0, 255, 0.4);
    color: #ff00ff;
    box-shadow: 4px 4px 0px rgba(0, 255, 204, 0.2);
}

.currently-reading li:hover {
    border-color: #00ffcc;
    color: #fff;
    box-shadow: 6px 6px 0px #ff00ff;
}

/* Specific styling for the 'To Be Read' shelf (faded look) */
.tbr li {
    opacity: 0.6;
    border-style: dashed;
    filter: grayscale(0.5);
}

.tbr li:hover {
    opacity: 1;
    border-style: solid;
    filter: grayscale(0);
}

/* ==========================================================================
   MODAL STYLES — BOOK REVIEWS
   Styles for the pop-up modal that displays book details and reviews.
   ========================================================================== */

/* Full-screen background overlay for the modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* The actual modal box */
.modal-content {
    background: #0d0d0d;
    border: 2px solid #00ffcc;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    padding: 40px;
    position: relative;
    display: flex;
    gap: 30px;
    box-shadow: 0 0 50px rgba(0, 255, 204, 0.2);
    overflow-y: auto;
    animation: bookOpen 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    perspective: 1000px;
}

/* Animation for opening the modal */
@keyframes bookOpen {
    0% {
        transform: scale(0.5) rotateY(-45deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

/* Close button for the modal */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ff00ff;
    font-size: 2rem;
    font-family: 'Silkscreen', sans-serif;
    z-index: 10;
}

/* Left side of the modal (Book Cover) */
.book-modal-left {
    flex: 0 0 200px;
}

.book-modal-left img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Right side of the modal (Title, Rating, Review) */
.book-modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Modal book title styling */
.book-modal-right h2 {
    font-family: 'Silkscreen', sans-serif;
    color: #00ffcc;
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
}

/* Star rating display */
.star-rating {
    color: #ff00ff;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* Review text styling */
.review-text {
    font-family: 'Space Grotesk', sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 1rem;
}



