/* --- Color Scheme Variables -- */
:root {
    --olive-green: #677C4B;
    --dark-olive: #394C44;
    --lavender: #B4ABCE;
    --off-white: #F9F9FB;
    --white:#FFFFFF;
    --gray-blue: #54626C;
    --light-gray-blue: #B3BDC4;
    --dark-gray: #1F1F1F;
    --black:#000000;
}

/* --- Main Styling --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
    min-width: 250px;
}

html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--dark-gray);
    color: var(--off-white);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    background-color: var(--dark-gray);
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 20px 100px 20px;
    margin-top: 72px;
    margin-bottom: 60px;
}

a {
    color: var(--lavender);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--off-white);
}

a::after {
    color: var(--lavender);
    text-decoration: none;
}

.box-shadow-bottom {
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.8);
}

.box-shadow-top {
    box-shadow: 0px -2px 8px rgba(0, 0, 0, 0.8);
}

.navbar {
    background: var(--dark-olive);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-wrap: nowrap;
    width: 100%;
    border-bottom: 1px solid var(--dark-gray);
    height: 72px;
    z-index: 999; 
}

.navbar-inner {
    padding: 0 20px;
    height: 100%;
    font-family: 'Georgia', 'Times New Roman', serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--off-white);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.8em;
    margin-right: 15px;
}

.navbar-logo {
    vertical-align: middle;
}

.navbar-menu {
    display: flex;
    gap: 15px;
    z-index: 2;
}

.navbar-item {
    margin: 25px 10px 0 10px;
    color: var(--off-white);
    text-decoration: none;
    font-size: 1.25em;
    transition: color 0.3s ease;
}

.navbar-item:hover {
    color: var(--light-gray-blue);
}

.navbar-item.active {
    color: var(--lavender);
    /* border-bottom: 2px solid var(--lavender); */
    padding-bottom: 3px;
}

/* Hamburger menu button (visible on mobile) */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 1.5em;
    cursor: pointer;
}

#navbar-title {
    margin: 5px;
    display:flex; 
    flex-direction:row;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--off-white);
    font-size: 1em;
    transition: color 0.3s ease;
}

#navbar-title:hover {
    color: var(--light-gray-blue);
    text-decoration: none;
    cursor: pointer;
}

#navbar-title:active {
    color: var(--off-white);
    text-decoration: none;  
}

#navbar-title:focus {
    color: var(--off-white);
    text-decoration: none;
}

footer {
    background: var(--dark-olive);
    color: var(--off-white); 
    text-align: center; 
    height: 60px;
    width: 100%;
    border-top: 1px solid var(--dark-gray);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    z-index: 998;
}

.footer-links {
    margin: 5px 20px 0 20px; 
    white-space: nowrap; 
    height: 35px;
    font-size: 1.5em;
}

.footer-links a {
    margin: 0 5px; 
    color: var(--off-white);  
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--lavender);
    text-decoration: none;
    cursor: pointer;
}

.footer-links a:active {
    color: var(--lavender);
    text-decoration: none;  
}

.footer-links a:focus {
    color: var(--lavender);
    text-decoration: none;
}

#main-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0 15px 40px 15px;
    box-sizing: border-box;
    overflow-x: hidden;
}

#about-page-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    max-width: 800px;
    padding: 0 15px 40px 15px;
    box-sizing: border-box;
}

/* Page headers */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

.page-header h1 {
    font-size: 2.8em;
    color: var(--off-white);
    margin: 0 0 10px 0;
    font-weight: 400;
}

.page-header h2 {
    font-size: 1.4em;
    color: var(--light-gray-blue);
    margin: 0;
    font-weight: 400;
    font-style: italic;
}

/* About page sections */
.about-section {
    margin-bottom: 35px;
    width: 100%;
}

.about-section h3 {
    font-size: 1.5em;
    color: var(--off-white);
    margin: 0 0 15px 0;
    font-weight: 500;
    border-bottom: 1px solid var(--dark-olive);
    padding-bottom: 8px;
}

.about-section p {
    font-size: 1.15em;
    color: var(--off-white);
    line-height: 1.8;
    margin: 0 0 15px 0;
}

.about-section ul {
    margin: 0;
    padding-left: 25px;
}

.about-section li {
    font-size: 1.15em;
    color: var(--off-white);
    line-height: 1.8;
    margin: 8px 0;
}

/* --- CHAPTER SUMMARY STYLES --- */

.book-info {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.chapter-count {
    color: var(--light-gray-blue);
    margin-left: 5px;
}

.summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.book-author {
    color: var(--light-gray-blue);
}

/* Summary preview cards with cover images */
.summary-preview-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.summary-cover {
    flex-shrink: 0;
}

.summary-cover img {
    width: 80px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.summary-cover:hover img {
    transform: scale(1.03);
}

.summary-details {
    flex: 1;
    min-width: 0;
}

.summary-rating-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 0.9em;
}

.summary-rating-inline .rating-stars {
    color: var(--lavender);
}

.summary-rating-inline .rating-stars i {
    margin-right: 1px;
}

.summary-rating-inline .rating-score {
    color: var(--lavender);
    font-weight: 600;
}

.summary-rating-inline .rating-count {
    color: var(--gray-blue);
}

.summary-rating-inline .page-count {
    color: var(--gray-blue);
}


/* Book summary intro section */
.book-summary-intro {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #2a2a2a;
}

.book-summary-intro .book-author {
    font-size: 1.5em;
    color: var(--light-gray-blue);
    margin-bottom: 10px;
}

.book-summary-intro .chapter-count {
    font-size: 1.3em;
    color: var(--gray-blue);
}

/* Table of Contents */
.chapter-toc {
    background-color: var(--black);
    border: 1px solid var(--dark-olive);
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 50px;
}

.chapter-toc h2 {
    font-size: 1.6em;
    color: var(--off-white);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dark-olive);
}

.toc-list {
    columns: 2;
    column-gap: 40px;
    list-style: none;
    padding-left: 0;
}

.toc-list li {
    margin: 8px 0;
    break-inside: avoid;
}

.toc-list a {
    color: var(--lavender);
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-list a:hover {
    color: var(--off-white);
}

/* Individual chapter summaries */
.chapter-summaries {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.chapter-summary {
    padding: 30px 0;
    border-bottom: 1px solid var(--dark-olive);
}

.chapter-summary:last-child {
    border-bottom: none;
}

.chapter-summary h2 {
    font-size: 2em;
    color: var(--off-white);
    margin: 0 0 20px 0;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chapter-summary h2 .chapter-number {
    font-size: 0.6em;
    color: var(--lavender);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chapter-summary h2 .chapter-title {
    font-size: 1em;
    color: var(--off-white);
}

.word-count-badge {
    display: inline-block;
    background-color: var(--dark-olive);
    color: var(--light-gray-blue);
    font-size: 1em;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.summary-text {
    margin-bottom: 25px;
}

.summary-text p, .summary-text li, .summary-text blockquote, .summary-text pre,
.summary-text b, .summary-text strong, .summary-text i, .summary-text em,
.summary-text time, .summary-text a {
    color: var(--off-white);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.25em;
}

/* Key events, characters, themes sections */
.key-events,
.characters-introduced,
.chapter-themes {
    margin: 20px 0;
    padding: 15px 20px;
    background-color: var(--black);
    border-left: 3px solid var(--olive-green);
    border-radius: 0 4px 4px 0;
}

.key-events h3,
.characters-introduced h3,
.chapter-themes h3 {
    font-size: 1.3em;
    color: var(--off-white);
    margin: 0 0 12px 0;
    font-weight: 500;
}

.key-events ul,
.characters-introduced ul,
.chapter-themes ul {
    margin: 0;
    padding-left: 20px;
}

.key-events li,
.characters-introduced li,
.chapter-themes li {
    color: var(--light-gray-blue);
    margin: 8px 0;
    line-height: 1.6;
}

.themes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0 !important;
}

.themes-list li {
    background-color: var(--dark-olive);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 1.1em;
}

.back-to-top {
    display: inline-block;
    margin-top: 20px;
    color: var(--lavender);
    font-size: 1.1em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-top:hover {
    color: var(--off-white);
}

/* --- FEATURED SECTIONS (Landing Page) --- */

.featured-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
}

.featured-section h2 {
    font-size: 1.8em;
    color: var(--off-white);
    margin: 0 0 25px 0;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 15px;
}

.featured-section h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--dark-olive), transparent);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.5em;
    color: var(--off-white);
    margin: 0;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: var(--lavender);
}

.view-all-link {
    color: var(--lavender);
    font-size: 1em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--off-white);
}

/* --- BOOK CAROUSEL --- */

.carousel-container {
    position: relative;
    width: 100%;
}

.book-carousel {
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px 20px 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark-olive);
    border: 1px solid var(--gray-blue);
    color: var(--off-white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.carousel-btn:hover {
    background: var(--olive-green);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn.prev {
    left: -20px;
}

.carousel-btn.next {
    right: -20px;
}

/* --- BOOK CARD --- */

.book-card {
    flex: 0 0 180px;
    background: var(--black);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.book-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-cover {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--dark-olive);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.book-cover-placeholder {
    color: var(--gray-blue);
    font-size: 3em;
}

.book-card-cover {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--dark-olive);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.book-card-cover .no-cover {
    color: var(--gray-blue);
    font-size: 3em;
}

.book-card-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.book-card-title {
    font-size: 1em;
    color: var(--off-white);
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-author {
    font-size: 0.85em;
    color: var(--light-gray-blue);
    margin: 0;
}

.book-card-chapters {
    margin-top: auto;
    font-size: 0.8em;
    color: var(--gray-blue);
}

.book-card-meta {
    margin-top: auto;
    display: flex;
    gap: 10px;
    font-size: 0.8em;
    color: var(--gray-blue);
}

/* CTA Section */
.cta-section {
    margin-top: 40px;
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--olive-green);
    color: var(--off-white);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background: var(--dark-olive);
    color: var(--off-white);
    transform: translateY(-2px);
}

.cta-button i {
    margin-right: 10px;
}

/* --- BROWSE PAGE --- */

#browse-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
}

.browse-layout {
    display: flex;
    gap: 30px;
    width: 100%;
}

/* Filter Sidebar */
.filters-sidebar {
    flex: 0 0 280px;
    background: var(--black);
    border-radius: 8px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 92px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--dark-olive);
}

.filters-header h3 {
    font-size: 1.4em;
    color: var(--off-white);
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters-header h3 i {
    color: var(--lavender);
}

.filters-close {
    display: none;
    background: none;
    border: none;
    color: var(--light-gray-blue);
    font-size: 1.2em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filters-close:hover {
    color: var(--off-white);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 0.95em;
    color: var(--light-gray-blue);
    margin-bottom: 8px;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--dark-gray);
    border: 1px solid var(--dark-olive);
    border-radius: 6px;
    color: var(--off-white);
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--olive-green);
}

.filter-group input::placeholder {
    color: var(--gray-blue);
}

.filter-group select option {
    background: var(--dark-gray);
    color: var(--off-white);
}

.search-input-wrapper {
    display: flex;
    gap: 0;
}

.search-input-wrapper input {
    border-radius: 6px 0 0 6px;
    flex: 1;
}

.search-btn {
    padding: 10px 15px;
    background: var(--olive-green);
    border: 1px solid var(--olive-green);
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: var(--off-white);
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--dark-olive);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.filter-apply-btn {
    width: 100%;
    padding: 12px;
    background: var(--olive-green);
    border: none;
    border-radius: 6px;
    color: var(--off-white);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-apply-btn:hover {
    background: var(--dark-olive);
}

.filter-clear-btn {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--lavender);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.filter-clear-btn:hover {
    color: var(--off-white);
}

/* Mobile filter toggle */
.filters-toggle {
    display: none;
    background: var(--dark-olive);
    border: none;
    color: var(--off-white);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.3s ease;
}

.filters-toggle:hover {
    background: var(--olive-green);
}

.filters-toggle i {
    margin-right: 8px;
}

/* Browse Results */
.browse-results {
    flex: 1;
    min-width: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dark-olive);
}

.results-count {
    font-size: 1.1em;
    color: var(--light-gray-blue);
}

.per-page-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-select label {
    color: var(--light-gray-blue);
    font-size: 0.95em;
}

.per-page-select select {
    padding: 8px 12px;
    background: var(--black);
    border: 1px solid var(--dark-olive);
    border-radius: 6px;
    color: var(--off-white);
    font-size: 0.95em;
    cursor: pointer;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.book-card-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
}

.book-card-genres .genre-tag {
    font-size: 0.7em;
    padding: 3px 8px;
    background: var(--dark-olive);
    border-radius: 10px;
    color: var(--light-gray-blue);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--dark-olive);
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 18px;
    background: var(--black);
    border: 1px solid var(--dark-olive);
    border-radius: 6px;
    color: var(--off-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover {
    background: var(--dark-olive);
    border-color: var(--olive-green);
    color: var(--off-white);
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-num {
    padding: 10px 14px;
    background: var(--black);
    border: 1px solid var(--dark-olive);
    border-radius: 6px;
    color: var(--off-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.pagination-num:hover {
    background: var(--dark-olive);
    border-color: var(--olive-green);
    color: var(--off-white);
}

.pagination-num.active {
    background: var(--olive-green);
    border-color: var(--olive-green);
}

.pagination-ellipsis {
    color: var(--gray-blue);
    padding: 0 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--light-gray-blue);
}

.no-results i {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--gray-blue);
    display: block;
}

.no-results h3 {
    font-size: 1.5em;
    color: var(--off-white);
    margin: 0 0 10px 0;
}

.no-results p {
    font-size: 1.1em;
    margin: 0 0 20px 0;
}

/* --- BOOK OVERVIEW PAGE --- */

#book-overview-container,
#chapters-container {
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
}

.book-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--dark-olive);
}

.book-header-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.book-header-compact .book-header-content {
    gap: 20px;
    align-items: center;
}

.book-cover-large {
    flex: 0 0 180px;
}

.book-cover-large img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.book-cover-small {
    flex: 0 0 100px;
}

.book-cover-small img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
}

.book-header-info {
    flex: 1;
}

.book-header-info .book-title {
    font-size: 2.2em;
    color: var(--off-white);
    margin: 0 0 10px 0;
    font-weight: 400;
    line-height: 1.2;
}

.book-header-compact .book-title {
    font-size: 1.8em;
}

.book-header-info .book-author {
    font-size: 1.3em;
    color: var(--light-gray-blue);
    margin: 0 0 15px 0;
}

.book-header-compact .book-author {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.book-header-compact .chapter-count {
    font-size: 1em;
    color: var(--gray-blue);
    margin: 0 0 10px 0;
}

.overview-link {
    color: var(--lavender);
    font-size: 0.95em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.overview-link:hover {
    color: var(--off-white);
}

.overview-link i {
    margin-right: 5px;
}

.book-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.genre-tag {
    background: var(--dark-olive);
    color: var(--off-white);
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.9em;
    text-decoration: none;
    transition: background 0.3s ease;
}

.genre-tag:hover {
    background: var(--olive-green);
    color: var(--off-white);
}

.book-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.book-stats .stat {
    color: var(--light-gray-blue);
    font-size: 1em;
}

.book-stats .stat i {
    margin-right: 8px;
    color: var(--lavender);
}

.book-actions {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--olive-green);
    color: var(--off-white);
}

.btn-primary:hover {
    background: var(--dark-olive);
    color: var(--off-white);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.15em;
}

.btn i {
    margin-right: 10px;
}

/* Book tagline */
.book-tagline {
    margin-bottom: 40px;
    padding: 20px 25px;
    background: var(--black);
    border-left: 4px solid var(--lavender);
    border-radius: 0 8px 8px 0;
}

.book-tagline p {
    font-size: 1.2em;
    font-style: italic;
    color: var(--off-white);
    line-height: 1.7;
    margin: 0;
}

/* Book content sections */
.book-overview-section,
.book-characters-section,
.book-themes-section,
.book-mood-section {
    margin-bottom: 40px;
}

.book-overview-section h2,
.book-characters-section h2,
.book-themes-section h2,
.book-mood-section h2 {
    font-size: 1.5em;
    color: var(--off-white);
    margin: 0 0 20px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.book-overview-section h2 i,
.book-characters-section h2 i,
.book-themes-section h2 i,
.book-mood-section h2 i {
    color: var(--lavender);
}

.book-overview-section p,
.book-mood-section p {
    font-size: 1.15em;
    line-height: 1.8;
    color: var(--off-white);
    margin-bottom: 15px;
}

/* Character list */
.character-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.character-list li {
    background: var(--black);
    padding: 18px;
    border-radius: 8px;
    border-left: 3px solid var(--olive-green);
}

.character-list li strong {
    display: block;
    font-size: 1.05em;
    color: var(--off-white);
    margin-bottom: 6px;
}

.character-list li span,
.character-list li p {
    font-size: 0.95em;
    color: var(--light-gray-blue);
    line-height: 1.5;
    margin: 0;
}

/* Theme list */
.theme-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.theme-list li {
    background: var(--dark-olive);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 1em;
    color: var(--off-white);
}

/* Book CTA section */
.book-cta {
    text-align: center;
    margin: 50px 0 40px;
    padding: 40px 20px;
    background: var(--black);
    border-radius: 8px;
}

/* Similar books section */
.similar-books-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--dark-olive);
}

.similar-books-section h2 {
    font-size: 1.5em;
    color: var(--off-white);
    margin: 0 0 25px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.similar-books-section h2 i {
    color: var(--lavender);
}

.similar-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.book-card-small {
    flex: 0 0 150px;
}

.book-card-small .book-cover {
    height: 200px;
}

/* Book footer navigation */
.book-footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid var(--dark-olive);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav a {
    color: var(--lavender);
    text-decoration: none;
    font-size: 1.05em;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-nav a:hover {
    color: var(--off-white);
}

/* --- Responsive styles --- */
@media (max-width: 900px) {
    .container {
        padding: 10px 10px 100px 10px;
        align-items: flex-start;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--dark-olive);
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    }
    
    .navbar-menu.show {
        display: flex;
    }
    
    .navbar-item {
        margin: 10px 20px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(138, 138, 138, 0.2);
    }

    #main-page-container {
        padding: 20px 10px 20px 10px;
        justify-content: flex-start;
    }
    
    #about-page-container {
        padding: 20px 10px 20px 10px;
    }
    
    .page-header h1 {
        font-size: 2.2em;
    }
    
    .page-header h2 {
        font-size: 1.2em;
    }
    
    /* Chapter summary responsive */
    .toc-list {
        columns: 1;
    }
    
    .chapter-toc {
        padding: 20px;
    }
    
    .chapter-summary h2 {
        font-size: 1.7em;
    }
    
    .key-events,
    .characters-introduced,
    .chapter-themes {
        padding: 12px 15px;
    }
    
    /* Carousel responsive */
    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1em;
    }
    
    .carousel-btn.prev {
        left: -10px;
    }
    
    .carousel-btn.next {
        right: -10px;
    }
    
    .featured-section {
        padding: 0 15px;
    }
    
    /* Browse responsive - sidebar becomes collapsible */
    .browse-layout {
        flex-direction: column;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        border-radius: 0;
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s ease;
    }
    
    .filters-sidebar.show {
        left: 0;
    }
    
    .filters-close {
        display: block;
    }
    
    .filters-toggle {
        display: flex;
        align-items: center;
    }
    
    /* Overlay when filters open */
    body.filters-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
    }
    
    /* Book overview responsive */
    .book-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .book-header-compact .book-header-content {
        flex-direction: row;
        text-align: left;
    }
    
    .book-header-info .book-title {
        font-size: 1.8em;
    }
    
    .book-genres {
        justify-content: center;
    }
    
    .book-stats {
        justify-content: center;
    }
    
    .character-list {
        grid-template-columns: 1fr;
    }
    
    .similar-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-nav {
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 769px) {
    html {
        min-width: 900px;
    }
    
    body {
        min-width: 900px;
    }
}

@media (max-width: 480px) {

    /* Navbar font sizes */
    .navbar-brand {
        font-size: 1.6em;
    }
    
    .navbar-item {
        font-size: 1.05em;
    }
    
    .navbar-toggle {
        font-size: 1.3em;
    }
    
    #navbar-title {
        margin: 5px 2.5px;
        gap: 5px;
        font-size: 0.8em;
    }

    .footer-links {
        margin: 5px 10px 0 10px; 
        height: 25px;
        font-size: 1.1em;
    }
    
    .page-header h1 {
        font-size: 1.8em;
    }
    
    .page-header h2 {
        font-size: 1em;
    }
    
    .about-section h3 {
        font-size: 1.3em;
    }
    
    .about-section p,
    .about-section li {
        font-size: 1.05em;
    }
    
    /* Chapter summary font sizes */
    .book-info {
        font-size: 1.1em;
    }
    
    .book-summary-intro .book-author {
        font-size: 1.3em;
    }
    
    .book-summary-intro .chapter-count {
        font-size: 1.1em;
    }
    
    .chapter-toc h2 {
        font-size: 1.4em;
    }
    
    .chapter-summary h2 {
        font-size: 1.5em;
    }
    
    .word-count-badge {
        font-size: 0.8em;
    }
    
    .summary-text p, .summary-text li, .summary-text blockquote, .summary-text pre,
    .summary-text b, .summary-text strong, .summary-text i, .summary-text em,
    .summary-text time, .summary-text a {
        font-size: 1.05em;
    }
    
    .key-events h3,
    .characters-introduced h3,
    .chapter-themes h3 {
        font-size: 1.1em;
    }
    
    .themes-list li {
        font-size: 0.9em;
    }
    
    .back-to-top {
        font-size: 0.9em;
    }

    .summary-preview-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .summary-cover img {
        width: 100px;
    }
    
    .summary-rating-inline {
        justify-content: center;
    }
    
    /* Carousel responsive */
    .featured-section h2 {
        font-size: 1.4em;
    }
    
    .book-card {
        flex: 0 0 150px;
    }
    
    .book-card-cover {
        height: 200px;
    }
    
    .book-card-info {
        padding: 12px;
    }
    
    .book-card-title {
        font-size: 0.9em;
    }
    
    .book-card-author {
        font-size: 0.8em;
    }
    
    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 1em;
    }
    
    /* Browse responsive */
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .results-count {
        text-align: center;
    }
    
    .per-page-select {
        justify-content: center;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .pagination-num {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    /* Book overview responsive */
    .book-cover-large {
        flex: 0 0 140px;
    }
    
    .book-header-info .book-title {
        font-size: 1.5em;
    }
    
    .book-header-info .book-author {
        font-size: 1.1em;
    }
    
    .book-header-compact .book-title {
        font-size: 1.4em;
    }
    
    .book-cover-small {
        flex: 0 0 80px;
    }
    
    .book-tagline p {
        font-size: 1.05em;
    }
    
    .book-overview-section h2,
    .book-characters-section h2,
    .book-themes-section h2,
    .book-mood-section h2 {
        font-size: 1.3em;
    }
    
    .book-overview-section p,
    .book-mood-section p {
        font-size: 1.05em;
    }
    
    .similar-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .book-card-small .book-cover {
        height: 160px;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 1em;
    }
}

@media (max-width: 250px) {
    html {
        overflow-x: auto;
    }
}
