/* --- Base Styles & Variables --- */
:root {
    /* --bg-gradient: linear-gradient(120deg,rgba(228, 230, 237, 1) 25%, rgba(242, 225, 237, 1) 49%, rgba(237, 243, 245, 1) 71%); */
    --bg-color: rgba(255, 255, 255, 0.95);
    --card-bg-color: #ffffff;
    --text-color: #2e3338;
    --site-title-color: #000000;
    --text-muted-color: #5c6773;
    --read-more-bg: rgba(255,255,255,1);
    --genre-bg: #ececec;
    --accent-color: #5865f2;
    --border-color: #fff;
    --link-color: #0069e1;
    --shadow-color: rgba(0, 0, 0, 0.18);
    --book-shadow: 0 2px 5px rgba(0, 0, 0, 0.08), 0 7px 20px rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --border-radius-xs: 0.375rem;
    --border-radius-sm: 0.65rem;
    --border-radius-lg: 0.975rem;
    --btn-dropsynop: #dffff3;
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: "Geist", sans-serif, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

    --text-primary: #F9FAFB;     /* Light grey for main text */
    --text-secondary: #626262;  /* Slightly darker grey for subheading */
    --button-primary-bg: #4B5568;  /* Blueish-grey button */
    --button-secondary-bg: #D1D5DB;/* Light grey button */
    --button-secondary-text: #1F2937; /* Dark text for light button */
    --hero-border-color: #e2e2e4;
    --hero-background: #ffffff;
    --hero-gradient-color: linear-gradient(45deg,rgba(255, 255, 255, 1) 78%, rgba(115, 235, 201, 1) 90%, rgba(252, 176, 69, 1) 99%);

    --tooltip-title-color: #2e3338;
    --tooltip-title-author: #5a6064;
    --tooltip-border-arrow: #ffeb3b;
    --tooltip-bg-color: #fcf7e4;

    --search-focus-bg-color: #fff;
    --search-icon-color: #95a5a6;
    --search-border-color: #465a6e;
    --search-bg-color: #f2f2f2;
    --search-color: #2e3338;
    --search-results-bg-color: #ffffff;
    --search-results-border-color: #e2e2e4;
    --search-results-title-color: #2e3338;
    --search-results-author-color: #464b4e;
    --search-results-bott-border: #e2e2e4;
    --search-result-item-hover: #ededf1;
}

[data-theme="dark"] {
    /* --bg-gradient: linear-gradient(120deg,rgba(102, 136, 134, 1) 0%, rgba(54, 55, 62, 1) 23%, rgba(54, 55, 62, 1) 63%, rgba(115, 90, 142, 1) 90%); */
    /* --bg-color: rgba(44, 52, 64, 1);  softer*/
    --bg-color: rgba(17, 24, 39, 1);
    --card-bg-color: #141b2b;
    --text-color: #a7b8c9; /* nov26 #cddded */
    --site-title-color: #ffffff;
    --text-muted-color: #96989c;
    --read-more-bg: rgba(20,27,43, 1);
    --genre-bg: #515550;
    --accent-color: #7289da;
    --border-color: #443f50;
    --link-color: #8cb4ff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --book-shadow: none;
    --header-bg: #2f3136;
    --border-radius-xs: 0.375rem;
    --border-radius-sm: 0.65rem;
    --border-radius-lg: 0.975rem;
    --btn-dropsynop: #2b5137;
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: "Geist", sans-serif, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

    --text-primary: #F9FAFB;     /* Light grey for main text */
    --text-secondary: #D1D5DB;  /* Slightly darker grey for subheading */
    --button-primary-bg: #4B5568;  /* Blueish-grey button */
    --button-secondary-bg: #D1D5DB;/* Light grey button */
    --button-secondary-text: #1F2937; /* Dark text for light button */
    --hero-border-color: #000;
    --hero-background: #171F30;
    --hero-gradient-color: linear-gradient(45deg,rgba(23, 31, 48, .5) 78%, rgba(115, 235, 201, .5) 90%, rgba(252, 176, 69, 1) 99%);

    --tooltip-title-color: #ecf0f1;
    --tooltip-title-author: #bdc3c7;
    --tooltip-border-arrow: #8d979e;
    --tooltip-bg-color: #2c3e50; 

    --search-focus-bg-color: #34495e;
    --search-icon-color: #95a5a6;
    --search-border-color: #465a6e;
    --search-bg-color: #2c3e50;
    --search-color: #ecf0f1;
    --search-results-bg-color: #2c3e50;
    --search-results-border-color: #465a6e;
    --search-results-title-color: #ecf0f1;
    --search-results-author-color: #bdc3c7;
    --search-results-bott-border: #3e5060;
    --search-result-item-hover: #34495e;
}

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

html {
    font-size: 15px; /* Mobile base font size */
}

body {
    font-family: var(--font-family-sans);
    background: var(--bg-gradient);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    /* transition: background-color 0.3s ease, color 0.3s ease; */ /* cancel white flash */
    /* display: flex;
    flex-direction: column; */
    min-height: 100vh;
    /* display: grid; */
    /* grid-template-rows: auto 1fr auto; */
}

/* index revert update */
.indexmain {
    max-width: 100%;
    margin: 0 auto;
    /* background: var(--bg-color); */
    border-radius: 10px;
    /* margin-right: 8px ; */
    /* margin-left: 8px; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); */
}
/* fix for Trending h2 */
.indexmain h2 {
    padding-right: 0.5rem;
    /* padding-left: 0.5rem; */ 
}

@media screen and (min-width: 53rem) {
    .indexmain {
        max-width: 90rem; /* nov16 68.75 */
        margin: 0 auto;
        padding: 1.25rem;
        padding-top: 0;
        /* margin-top: 2rem; */
    }
    /* .indexmain img {
        border-radius: var(--border-radius-sm);
    } */
}

.wrap404 {
    display: grid;
    place-items: center;
    height: 100%;
}
.center404 {
    width: 50%;
    height: 50%;
}

/* start sections */
.featured {
    max-width: 840px;
}


section {
    --min: 12ch;
    --gap: 0.7rem;
    display: grid;
    grid-gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min)), 1fr));
    margin: 0.875rem 0;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}
@media (min-width: 51.5rem) {
    section .featured {
        --min: 16ch;
        margin: 0.875rem 0.5rem;
        margin: 0;
        padding: 0;
        max-width: 500px;
    }
    section {
        --min: 14ch;
        margin: 0.875rem 0.5rem;
        margin: 0;
        padding: 0;
    }
}

section > span {
    padding: 4px;
    border: 2px solid #212529;
    background-color: var(--nav-bg-color);
    border-radius: var(--border-radius-sm);
}
section > div {
    border-radius: 0.75rem;
    background-color: var(--section-bg);
    /* padding: 0.75rem; */
}
section > p {
    /* border-radius: 0.75rem; */
    margin: 0;
    /* padding: 4px; */
    /* border: 1px solid grey; */
    /* background-color: var(--nav-bg-color); */
    padding-bottom: 0.25rem;
}
section p a {
    text-decoration: none;
    color: black;
}
section p a img { 
    width: 100%;/* 100  */
    height: 80%; /* 90 70 */
    /* object-fit: cover; */ /* removed rr */
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    /* box-shadow: var(--book-shadow); */
    /* box-shadow: inset 0 0 0 1px rgba(221, 238, 255, .1); */
    /* border: 0.5px solid #484e54; */
}

section p a:hover img {
    opacity: 0.6;
    text-decoration: none;
}

section .hov {
    /* text-align: center; */
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;  
    font-weight: 600;
    line-height: 1rem;
    transition: opacity 0.5s ease-in-out;
    margin-bottom: 1.6rem;
    /* background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm); */
}

section .hov span {
    padding: 0 0.375rem 0 0.375rem;
    color: var(--text-color);
    text-decoration: none;
}

section p a:hover {
    text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/* NEW: Style for the Insertion Date */
/* -------------------------------------------------------------------------- */
.book-insertion-date {
    display: block; /* Ensure it takes its own line */
    font-size: 0.75rem;
    color: #7f8c8d; /* A subtle grey */
    margin-bottom: 4px; /* Space between date and cover */
    text-align: center; /* Center above the image */
}

/* -------------------------------------------------------------------------- */
/* MOBILE-FIRST BASE STYLES (Applies to all screens: Below and Centered)        */
/* -------------------------------------------------------------------------- */

.hov {
    position: relative;
    transition: z-index 0s; 
}

/* FIX: Bring the hovered item forward in the stacking order */
.hov:hover {
    z-index: 100; /* Ensures the hovered book and its tooltip stack above neighbors */
}

/* Tooltip Box */
.book-tooltip {
    display: none;
}

@media screen and (min-width: 96.2rem) {
    .book-tooltip {
        display: block;
        width: 280px;
        /* CONSTRAINT: Prevents tooltip from stretching beyond the viewport on small screens */
        max-width: 90vw; 
        background-color: var(--tooltip-bg-color);
        /* color: #fff; */
        color: var(--text-color);
        text-align: left;
        border-radius: 6px;
        padding: 12px;
        border: 4px solid var(--tooltip-border-arrow);
        
        /* NEW POSITIONING: Below and Horizontally Centered */
        position: absolute;
        z-index: 1001; 
        top: 76%; /* 100 Position below the container */
        left: 50%;
        transform: translateX(-50%); /* Centers the wide box relative to the narrow cover */
        margin-top: 5px; /* Small space below cover */
        
        /* DELAY: Instant disappearance (0s delay) */
        opacity: 0;
        transition: opacity 0.3s 0s, visibility 0.3s 0s;
        
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        font-size: 0.85rem;
        line-height: 1.4;
        pointer-events: none;
    }
    .hov:hover .book-tooltip {
    visibility: visible;
    opacity: 1;
    /* DELAY: Activation delay (0.5s) when mouse enters */
    transition-delay: 0.5s; 
    pointer-events: auto;
    }

    /* RE-INSTATED ARROW: Points UP */
    .book-tooltip::after {
        content: "";
        position: absolute;
        bottom: 100%; /* Positions the arrow at the top edge of the tooltip */
        left: 50%;
        transform: translateX(-50%); /* Centers the arrow */
        margin-left: 0; /* Reset margins */
        
        border-width: 10px;
        border-style: solid;
        /* Arrow points UP (Solid color on the bottom edge of the triangle) */
        border-color: transparent transparent var(--tooltip-border-arrow) transparent; 
    }

    /* -------------------------------------------------------------------------- */
    /* CONTENT STYLES (No change needed)                                           */
    /* -------------------------------------------------------------------------- */
    .book-tooltip .tooltip-title {
        display: block;
        margin: 8px 0 5px 0;
        font-size: 1rem;
        font-weight: bold;
        /* color: #ecf0f1; */
        color: var(--tooltip-title-color);
        border-bottom: 1px solid var(--tooltip-border-arrow);
        padding-bottom: 4px;
    }

    .book-tooltip .tooltip-author {
        font-style: italic;
        color: var(--tooltip-title-author);
        margin-bottom: 8px;
        display: block;
    }
    .book-tooltip .tooltip-desc {
        margin-bottom: 10px;
        display: block;
    }
    .book-tooltip .tooltip-link {
        display: block;
        background-color: #3498db;
        color: white;
        padding: 4px 8px;
        text-decoration: none;
        border-radius: 3px;
        font-size: 0.8rem;
        float: right;
    }
    .book-tooltip .tooltip-link:hover {
        background-color: #2980b9;
    }
}
/* END TOOLTIP */



/* Search Bar */
.search-wrapper {
    position: relative;
    margin-left: 20px;
    width: 280px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: var(--search-icon-color);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 10px 8px 34px; /* Space for icon */
    border-radius: var(--border-radius-xs);
    border: 1px solid var(--search-border-color);
    background-color: var(--search-bg-color);
    color: var(--search-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    background-color: var(--search-focus-bg-color);
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.8); 
    /* 255, 235, 59, 0.8 */
}

.search-input::placeholder {
    color: #7f8c8d;
}

/* Loading Indicator */
#search-loading {
    position: absolute;
    right: 12px;
    display: none;
}
#search-loading.htmx-request {
    display: block;
}

/* Dropdown Results */
.search-results-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 320px; /* Wider than input for better display */
    background-color: var(--search-results-bg-color);
    /* border: 1px solid var(--search-results-border-color); */
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 2000;
    max-height: 400px;
    overflow-y: auto;
    display: none; /* Hidden by default */
}

/* Show dropdown when it has content */
.search-results-dropdown:not(:empty) {
    display: block;
}

/* Individual Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--search-results-bott-border);
    text-decoration: none;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--search-result-item-hover);
}

.search-result-img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 12px;
    background-color: #1a252f;
}

.search-result-info {
    display: flex;
    flex-direction: column;
}

.search-result-title {
    color: var(--search-results-title-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.search-result-author {
    color: var(--search-results-author-color);
    font-size: 0.8rem;
    font-style: italic;
}

.search-no-results {
    padding: 12px;
    color: #95a5a6;
    text-align: center;
    font-size: 0.9rem;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .search-wrapper {
        display: none; /* Often hidden or moved to menu on mobile, adjust as needed */
    }
}

/* ---STYLES FOR CATEGORY PILLS --- */
.cat-wrapper {
    position: relative;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cat-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 5px 15px 5px; /* Extra bottom padding for scrollbar spacing */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    scrollbar-width: none; /* Firefox: Hide scrollbar */
    -ms-overflow-style: none; /* IE/Edge: Hide scrollbar */
}

/* Hide scrollbar for Chrome/Safari/Webkit */
.cat-scroll-container::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    flex: 0 0 auto; /* Don't shrink */
    padding: 8px 18px;
    border-radius: 50px;
    background-color: #f3f4f6;
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.cat-pill:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.cat-pill.active {
    background-color: #2563eb; /* Adjust to your brand color */
    color: white;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Simple loading indicator for HTMX */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
    margin-left: 10px;
    font-size: 0.9rem;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}
.htmx-request.cat-pill {
    opacity: 0.7;
    cursor: wait;
}

/* Animation for new items */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-item {
    animation: fadeIn 0.4s ease-out forwards;
}

.fade-in {
    opacity: 1; /* Rows are visible by default */
    transition: opacity 0.5s ease-in-out; /* Smooth transition */
}

.truncate {
    display: inline-block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    resize: none;
}
.truncate-description {
    display: inline-block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    resize: none;
}
.orange {
    color: #ff7066;
}

/* for font awesome menu or... */
.green {
    color: #87ba41;
}

.load-more-style {
    background: #374151;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    margin-left: 1rem;
    margin-top: 0.5rem;
}

/* .mouse-memoirs-regular {
    font-family: "Mouse Memoirs", sans-serif;
    font-weight: 400;
    font-style: normal;
} */
/* END index revert update */

/* start Hero Section Container */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* gap: 2rem; */
    width: 100%;
    max-width: var(--max-page-width);
    /* padding: 2rem; */ /* update to pad-left below */
    padding-left: 2rem;
    margin-bottom: 1rem;
    box-sizing: border-box;

    border: 1px solid var(--hero-border-color);
    border-radius: var(--border-radius-sm);

    background: var(--hero-background);
    background: var(--hero-gradient-color);
}

/* Left side: Text content */
.hero-text {
    flex-basis: 50%;
    max-width: 500px;
}

.hero-text h1 {
    margin: 0;
    /* Using clamp for fluid typography: min, preferred, max size */
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
}

.hero-text h1 span {
    display: block;
    font-size: 0.5em; /* Relative to the h1 font size */
    font-weight: 400;
    color: var(--text-secondary);
}

/* .colored-dot {
    color: #73EBC9;
} */

/* .hero-text h1 .dot1 {
    display: inline;
    color: #dcddde;
    font-size: 3.6rem;
    font-weight: 900;
} */
.hero-text h1 .dot2 {
    display: inline;
    color: #73EBC9;
    font-size: 3.6rem;
    font-weight: 900;
    /* margin-left: -3px; */
}
/* .hero-text h1 .dot3 {
    display: inline;
    color: #fcb045;
    font-size: 3.6rem;
    font-weight: 900;
    margin-left: -3px;
} */

.hero-text .subheading {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

/* Container for the action buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-buttons .btn {
    /* padding: 0.75rem 1.5rem; */
    border: none;
    border-radius: 0.375rem; /* 6px */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--text-primary);
}

.btn.btn-secondary {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
}

/* Right side: Image */
.hero-image {
    flex-basis: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    min-width: 280px; /* Prevents image from becoming too small */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 48rem) {
    .hero-container {
        flex-direction: column; /* Stack text and image vertically */
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center; /* Center buttons on mobile */
    }

    .hero-image {
        margin-top: 2rem;
    }
}

/* End Hero Section Container */



.container {
     /* width: 100%; */ /* More width on mobile */
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 0; /* Base padding */
}

main.container {
    flex-grow: 1;
}

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

/* a:hover {
    text-decoration: underline;
} */

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-sm);
}

.hidden {
    display: none;
}

.ellipsis {
    display: inline;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    /* background-color: var(--card-bg-color); */
}

.header-container {
    display: flex;
    /* Mobile: Header Left (Logo) left, Header Right (Theme Toggle + Burger) right */
    justify-content: space-between;
    align-items: center;
    /* padding: 0.75rem 1rem;  */
    padding: 0 1.5rem;
    background-color: var(--bg-color);
}

.headblurp {
    background-color: var(--bg-color);
    /* width: 100%; */
    border: 4px solid #fff;
    padding: 0.4rem;
    /* border-radius: none; */
    margin: 0 auto;
    margin-bottom: 1rem;
    /* text-align: center; */
}
@media screen and (min-width: 53rem) {
    .headblurp {
        padding: 0.7rem;
        border-radius: var(--border-radius-lg);
    }
}

/* Mobile: Header Left (Logo) */
.header-left {
    display: flex;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-area img {
    width: 47px;
    height: auto;
    /* margin-right: 0.5rem; */
    margin-left: -1.35rem;
}

.site-title {
    font-family: "Just Another Hand", cursive;
    font-size: 1.9rem;
    font-weight: 400;
    color: var(--site-title-color);
    /* letter-spacing: 0.5px; */
    text-decoration: none;
}

/* Mobile: Header Right (Theme Toggle + Burger) */
.header-right {
    display: flex; /* Show on mobile */
    align-items: center;
    margin-left: auto; /* Push header-right to the far right */
}

/* Theme Toggle Button Wrapper */
.header-align-right {
    display: flex; /* Show the toggle button */
    align-items: center;
    margin-right: 1rem; /* Space between theme toggle and burger */
}

/* Burger Menu Button and Icon (Mobile Only) */
.burger-menu-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex; /* Show on mobile */
    align-items: center;
    justify-content: center;
    width: 30px; /* Adjust size as needed */
    height: 30px;
    z-index: 11; /* Ensure it's above mobile menu */
}

.burger-icon {
    width: 24px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;
    transition: transform 0.3s ease; /* For rotation animation */
}
.burger-icon.open {
    transform: rotate(90deg);
}

.burger-line {
    display: block;
    height: 2px;
    background-color: var(--text-color); /* Burger lines color */
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger-icon.open .burger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger-icon.open .burger-line:nth-child(2) {
    opacity: 0; /* Fade out middle line */
}
.burger-icon.open .burger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Navigation Menu (Positioned Below Header) */
.mobile-nav-menu {
    position: fixed; 
    top: 0;
    right: 0;
    width: 100%;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 0 15px;
    /* padding: 1rem; */
    display: flex; 
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 9;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out, transform 0.5s ease-out;
    pointer-events: none; 
    padding-left: 25%; 
    height: 100vh; 
}
.mobile-nav-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
     pointer-events: auto;
}

.mobile-nav-menu .nav-link { /* Styles for links within the mobile menu */
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: left;
}

.mobile-nav-menu .nav-link:hover,
.mobile-nav-menu .nav-link:focus {
    background-color: var(--bg-color);
}

.mobile-nav-menu a:hover {
    color: #87ba41;
}


/* Desktop Nav Links & Dropdown (Hidden on Mobile) */
.dropdown,
.header-nav-links {
    display: none; /* Hide on mobile */
    font-weight: 400;
}

/* Theme Toggle Button styles */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted-color);
    cursor: pointer;
    padding: 0.4rem 0.6rem; /* Smaller padding on mobile */
    border-radius: 5px;
    font-size: 0.9rem; /* Smaller size on mobile */
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* .theme-toggle-btn i {
     transition: transform 0.3s ease-out;
} */
/* dropdown moved from 62rem plus media */
.dropdown-button {
    background: none;
    border: none;
    border-radius: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    align-items: center;
    gap: 5rem;
    color: var(--text-color);
    width: 100%;
    margin-left: 1rem;
    font-family: var(--font-family-mono);
  }
  
  .dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-right: 1rem;
  }

/* Styles for the actual dropdown menu content (when shown) */
 .dropdown-menu {
    position: absolute;
    top: 90%;
    left: 2.275rem;
    background-color: var(--card-bg-color);
    border: 1px solid #eeeeee;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    min-width: 150px; /* Minimum width for dropdown */
    z-index: 10;
    opacity: 0; /* Hidden initially */
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out, transform 0.2s ease-out;
    pointer-events: none; /* Disable clicks when hidden */
 }

 .booktag {
    /* color: var(--book-synop-head); */
    /* padding: 0.5rem; */
    /* padding: 0.5rem; */
    /* border-radius: var(--border-radius-sm); */
    /* font-size: 1rem; */
    /* font-weight: 400; */
    /* border: 0.1rem solid #0b8556; */
    border-color: #0b8556;
    /* margin-top: 1rem; */
 }

 #bookPageDropdownMenu { /* Targeting by ID for specificity */
    top: 100%; /* Position below the button */
    left: 0;   /* Align with the left edge of its relative container */
    margin-top: 5px; /* Small gap */
    /* Override other specific properties if needed */
    background-color: var(--card-bg-color);
    border: 2px solid #d7d7d7;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    min-width: 180px; /* Minimum width for dropdown */
    z-index: 10;
}

.dropdown-menu.show { /* Controlled by JS */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
   pointer-events: auto; /* Enable clicks when shown */
}

 .dropdown-item {
    /* display: block; */
    display: flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
    text-align: left;
    white-space: nowrap;
 }
 .dropdown-item:hover,
 .dropdown-item:focus {
    background-color: var(--bg-color);
    /* color: var(--text-color); */
    color: #87ba41;
 }

/* Override styles for the book page dropdown */

.dropdown-button.active .dropdown-arrow {
    transform: rotate(180deg);
}
.book-actions-dropdown {
    position: relative; /* Crucial for the absolute positioning of .dropdown-menu */
    display: inline-block; /* Or 'block' depending on layout needs */
}

/* Drop down synopsis variation */
.buybook {
    /* display: inline; */
    /* display: inline-flex; */
    /* align-items: center; */
    /* margin-top: 5px; */
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    background-color: #1f3b17;
    /* border: 1px solid rgba(253, 167, 10, 1); */
    /* padding: 0; */
    font: inherit;
    text-align: left;
    padding: 0 0.5rem 0 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    margin-left: auto;
}

/* --- General Page Enhancements --- */
main.container > h1,
main.container > h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 1.3rem; /* Base heading size */
}

.section-title { /* For headings like "Featured Books" */
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 500;
    /* border-bottom: 1px solid var(--hero-border-color); */
}

.cat-display {
    display: inline-block;
    margin-bottom: 1rem;
}
.cat-button {
    padding: 6px;
    border: 1px solid var(--hero-border-color);
    border-radius: 8px;
}

/* --- Buttons (Base styles) --- */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem; /* Base button padding */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem; /* Base button font size */
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #fff; /* White text on hover */
}

/* Show more */
#long-paragraph {
    overflow: hidden;
    transition: max-height 0.7s ease-in-out;
    margin-bottom: 0;
    will-change: max-height;
    position: relative; /* For gradient */
     /* Default max-height set via JS after calculation */
     /* Set an initial small value just in case */
     max-height: 5px;
}

/* Set height based on class and CSS Var */
#long-paragraph.is-collapsed {
    max-height: var(--collapsed-height);
}
#long-paragraph.is-expanded {
    max-height: var(--full-height);
}

/* --- Gradient Fade Styles --- */
#long-paragraph::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3em;
    /* Make sure this matches page background */
    /* background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%); */
    /* background: linear-gradient(to bottom, hsla(0, 0%, 100%, 0), rgba(255,255,255,1) 16px); */ 
    background: linear-gradient(to bottom, hsla(0, 0%, 100%, 0), var(--read-more-bg) 16px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
    z-index: 1; /* Ensure it's above text if needed */
}
#long-paragraph.is-collapsed::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.1s;
}
#long-paragraph.is-expanded::after {
     opacity: 0;
     visibility: hidden;
     transition: opacity 0.1s ease-in-out, visibility 0s linear 0.1s;
}
/* --- End Gradient Styles --- */

/* two col index */
.display-twocol {
    display: none;
}


.ellipsis {
    display: block;
    text-align: left;
    padding-left: 0;
    /* margin-top: -0.6em; */
    margin-top: -1rem;
    margin-bottom: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s linear, visibility 0s linear 0.2s;
}
#long-paragraph.is-collapsed + .ellipsis {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s linear 0.1s, visibility 0s linear 0s;
}


.word-toggle-link {
    display: block;
    margin-top: 5px;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: 1px solid rgba(253, 167, 10, 1);
    /* padding: 0; */
    font: inherit;
    text-align: left;
    /* font-weight: 600; */

    /* background: #fda70a; */
    padding: 0 0.5rem 0 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}
 .word-toggle-link:hover {
     /* color: #2f43b3; */
     /* text-decoration: underline; */
     border: 1px solid rgba(253, 167, 10, 0.5);
     transition: border-color 0.3s ease;
 }

/* End Show more */


/* --- Book Details Card (Single Book Page - Mobile Base) --- */
.book-details-card {
    background-color: var(--card-bg-color);
    /* border: 1px solid var(--border-color); */
    border-radius: 1rem;
    padding: 1rem; /* Base padding */
    margin-bottom: 0.25rem; /* Base margin */
    box-shadow: 0 2px 5px var(--shadow-color);
    /* transition: background-color 0.3s ease, border-color 0.3s ease; */
}

/* Mobile: Stack cover and details */
.book-main-info {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: left; /* --- center/left --- */
    text-align: left; /* --- center/left --- */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.book-cover-container {
    flex-basis: auto;
    width: 50%;
    max-width: 200px;
    margin-bottom: 1.5rem;
    align-self: left; /* --- center/left --- */
}

.book-cover {
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.book-core-details {
    flex: 1;
    min-width: 0;
    text-align: left; /* Override parent's text-align */
    width: 100%;
}

.book-title {
    font-family: "Noto Serif", serif;
    font-size: 1.6rem; /* Base title size */
    font-weight: 500;
    margin-bottom: 2.25rem;
    line-height: 1.2;
    /* color: var(--text-color); */
    color: #fff;
}

.book-author {
    font-size: 1rem; /* Base author size */
    /* color: var(--text-muted-color); */
    /* margin-bottom: 1rem; */
}

.book-rating {
    font-size: 0.9rem; /* Base rating size */
    color: var(--text-muted-color);
    margin-bottom: 1.5rem;
    text-align: left; /* Align rating left */
}
.book-rating span {
    font-weight: 600;
    color: var(--text-color);
}

/* --- Synopsis (Mobile Base) --- */
.book-synopsis h2 {
    font-size: 1.1rem; /* Base synopsis heading */
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0; /* Remove border/padding initially */
    border-bottom: none;
    display: block;
    text-align: left;
}

.book-synopsis p {
    margin-bottom: 1rem;
    text-align: left;
}

div.book-synop {
    font-size: 1.2rem;
}

.book-synop-head {
    color: var(--text-color);
    padding: 0.5rem 1rem  0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 400;
    border: 0.1rem solid var(--text-color);
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: transparent;

    /* font-size: 1.2rem;
    font-weight: 500;
    margin-top: 1rem;
    margin-bottom: 1rem;     */
}

/* --- Meta Info (Single Book Page - Mobile Base) --- */

.book-meta-info h2 {
    font-size: 1.2rem; /* Base meta heading */
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Mobile: Single column list, label above value */
.details-list {
    display: grid;
    grid-template-columns: 1fr; /* Single column */
    gap: 0; /* Remove gap between dt/dd, add margin below dd instead */
    color: var(--text-muted-color);
}

.details-list dt {
    font-weight: 600;
    color: var(--text-muted-color);
    grid-column: 1; /* Ensure in first column */
    text-align: left;
    font-size: 0.9rem;
    /* No bottom margin needed here */
}

.details-list dd {
    grid-column: 1; /* Ensure in first column */
    margin-left: 0;
    margin-bottom: 0.75rem; /* Space after the value, before next dt */
    color: var(--text-color);
    text-align: left;
}


/* --- Book Grid (Homepage - Mobile Base) --- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Base: 2 columns */
    gap: 1rem 0.75rem; /* Base gap */
    margin-bottom: 2rem;
}

.book-grid-item {
    text-align: center;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem; /* Base padding */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.book-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.book-grid-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-grid-item img {
    width: 100%;
    max-width: 150px; /* Limit image size within item */
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 auto 0.5rem auto; /* Base margin */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.book-grid-item .book-info {
   margin-top: auto;
   padding-top: 0.5rem;
}

.book-grid-item h3 {
    font-size: 0.85rem; /* Base title size */
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    color: var(--text-color);
}

.book-grid-item p {
    font-size: 0.75rem; /* Base author size */
    color: var(--text-muted-color);
    line-height: 1.3;
}

/* --- Book List (Discovery Page - Mobile Base) --- */
.book-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Base gap */
}

.book-list-item {
    display: flex; /* Flex container for cover, details, and want-to-read */
    gap: 1rem; /* Base gap between items */
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem; /* Base padding */
    transition: background-color 0.3s ease, border-color 0.3s ease;
    /* box-shadow: 0 1px 3px var(--shadow-color); */
    box-shadow: var(--book-shadow);
    align-items: center; /* flex-start - Align items to the top by default */
}

.book-list-cover {
    flex: 0 0 60px; /* Smaller base cover width */
    align-self: flex-start; /* Ensure cover stays at the top */
}

.book-list-cover img {
    width: 100%; /* Fill the flex container */
    height: auto;
    aspect-ratio: 2 / 3;
    /* object-fit: cover; */
    border-radius: 0.25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.book-list-details {
    flex: 1; /* Takes remaining space */
    min-width: 0; /* Prevent overflow */
}

.book-list-details h2 {
    font-size: 1rem; /* Base title size */
    font-weight: 600;
    margin-bottom: 0.2rem;
}
/* import from bmark */
.booklist-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    text-decoration: none;
}
.booklist-meta {
    font-size: 0.875rem;
    color: var(--text-muted-color); /*  #202021 */
    /* margin: 0.25rem 0; */
}
.booklist-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* END import from bmark */

.book-list-details h2 a {
     color: var(--text-color);
}

.book-list-details .author {
    font-size: 0.85rem; /* Base author size */
    color: var(--text-muted-color);
    margin-bottom: 0.5rem; /* Base margin */
}
.book-list-details .author a {
     color: var(--text-muted-color);
}
.book-list-details .author a:hover {
     color: var(--link-color);
}

.book-list-details .description {
    font-size: 0.85rem; /* Base description size */
    color: var(--text-color);
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.625rem;
    margin-bottom: 0.875rem;
}
.tags h2 {
    color: var(--book-synop-head);
    width: 100%;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    /* font-size: 1rem; */
    font-weight: 500;
    border: 0.1rem solid #333;
}
.tags span {
    color: var(--book-synop-head);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 400;
    border: 0.1rem solid var(--text-color);
}
.genre {
    padding: 0.5rem;
    /* color: #2e3338; */
    background: var(--genre-bg);
    border-radius: var(--border-radius-sm);
    width: 100%;
    margin-top: 1.5rem;
}
.where-to-watch {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
ul.nodeco {
    list-style-type: none;
    padding: 0;
    margin: 0;
    line-height: 1.1rem;
}
/* Want to Read Button/Element (Mobile Base - aligns right) */
.want-to-read {
    /* margin-left: auto;
    align-self: center;
    display: flex; 
    align-items: center; */
    /* Base styling for the button itself should come from .btn or .btn-secondary */
    background: #374151;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    margin-left: auto;
}
.want-to-read .btn {
    white-space: nowrap; /* Prevent button text from wrapping */
}


/* --- Footer --- */
.site-footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.8rem; /* Smaller base footer text */
    color: var(--text-muted-color);
    margin-top: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-footer p {
    margin-bottom: 0.25rem; /* Add slight spacing in footer */
}

.available-btn {
    border: 2px solid #0b8556;
}


/* === Media Query for Tablet and up (768px - 48rem) === */
@media (min-width: 48rem) {
    html {
        font-size: 16px; /* Increase base font size */
    }
    .container {
        padding: 1.5rem 0; /* Increase container padding */
    }
     .site-title {
        font-size: 1.9rem;
    }
    .theme-toggle-btn {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    main.container > h1,
    main.container > h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
    }
    .section-title {
        font-size: 1.4rem;
        /* margin-bottom: 1.5rem; */
        text-transform: capitalize;
    }

    /* two col index */
    .display-twocol {
        display: flex;
        gap: 1rem;
        transition: background-color 0.3s ease, border-color 0.3s ease;
        align-items: center;
        font-size: 1.2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #f1cdab;
    }
    .display-twocol div img {
        max-width: 14rem;
        height: auto;
        display: block;
    }

    /* Single Book Page Adjustments */
    .book-details-card {
        padding: 1rem; /* Increase card padding */
        border-radius: 0.5rem;
    }

    /* Side-by-side layout for cover/details */
    .book-main-info {
        flex-direction: row;
        align-items: flex-start; /* Align items top */
        text-align: left; /* Reset text align */
        gap: 2rem;
    }
    .book-cover-container {
        flex: 0 0 180px; /* Give cover a fixed width */
        width: auto; /* Override percentage width */
        align-self: flex-start; /* Override 'center' to align left/top */
        margin-bottom: 0; /* Remove bottom margin */
    }
    .book-title {
        font-size: 1.8rem;
    }
    .book-author {
        font-size: 1.1rem;
    }
    .book-rating {
         font-size: 0.95rem;
    }

    div.book-synop {
        font-size: 1rem;
        /* border: 2px solid #e6e6e6; */
        /* padding: 0.75rem; */
        /* border-radius: var(--border-radius-sm); */
    }

     .book-synopsis h2 {
        font-size: 1.2rem;
        display: inline-block; /* Allow border bottom again */
        padding-bottom: 0.25rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.75rem;
    }

    /* Two-column layout for meta details */
    .details-list {
        grid-template-columns: auto 1fr;
        gap: 0.7rem 1rem;
    }
    .details-list dt {
        grid-column: 1;
        text-align: right;
        font-size: 1rem;
        color: var(--text-color);
        margin-bottom: 0;
    }
    .details-list dd {
        grid-column: 2;
        text-align: left;
        margin-bottom: 0;
    }

    /* Book Grid Adjustments */
    .book-grid {
        /* More columns on tablet */
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1.5rem 1rem;
    }
    .book-grid-item {
         padding: 1rem;
    }
    .book-grid-item img {
         margin: 0 auto 0.75rem auto;
    }
     .book-grid-item h3 {
        font-size: 0.9rem;
     }
      .book-grid-item p {
        font-size: 0.8rem;
     }

    /* Book List Adjustments */
     .book-list {
         gap: 0.6rem; /* Increase gap */
     }
    .book-list-item {
        /* padding: 1rem; */
        gap: 1rem; /* Increase item gap 1.5 */
        align-items: center; /* Vertically center items in list on tablet+ */
    }
    .book-list-cover {
        flex-basis: 70px; /* Larger cover */
         align-self: center; /* Vertically center cover on tablet+ */
    }
    .book-list-details {
        /* flex: 1; <-- Already in base */
         min-width: 0;
    }
    .book-list-details h2 {
        font-size: 1.1rem;
    }
     .book-list-details .author {
        font-size: 0.9rem;
         margin-bottom: 0.6rem;
    }
     .book-list-details .description {
        font-size: 0.9rem;
    }
    .want-to-read {
        /* margin-left: auto; <-- Already in base */
        align-self: center; /* Ensure center alignment */
    }

     .site-footer {
         font-size: 0.85rem;
     }

}


/* === Media Query for Desktop and up (62rem = 992px) === */
@media screen and (min-width: 62rem) {
    .header-container {
        /* Desktop: Header Left (Logo + Nav + Dropdown) left, Header Right (Theme Toggle) right */
        justify-content: space-between; /* Pushes left group and right group apart */
        padding: 0.25rem 2rem; /* Wider horizontal padding */
        /* border-radius: var(--border-radius-lg); */
        /* margin: 0.6rem; */
        max-width: 98rem;
        margin: 0 auto;
    }

    /* Desktop: Header Left (Logo + Nav + Dropdown) */
    .header-left {
        display: flex; /* Ensure flex */
        align-items: center; /* Vertically align items within header-left */
        /* No margin auto needed here */
    }

    .logo-area {
         margin-right: 1.5rem; /* Space after logo area on desktop */
    }

    /* Hide Burger Menu Button on Desktop */
    .burger-menu-button {
        display: none;
    }
     /* Hide Mobile Header Right (Theme Toggle + Burger) on Desktop */
    .header-right {
        display: flex; /* Keep as flex to contain the theme toggle */
        align-items: center; /* Vertically center content */
        margin-left: 0; /* Reset margin auto */
        font-family: var(--font-family-mono);
        font-size: 0.85rem;
        font-weight: 600;
    }

    /* Desktop Nav Links & Dropdown (Show on Desktop) */
    .dropdown,
    .header-nav-links {
        display: flex; /* Show and use flex for horizontal layout */
        align-items: center; /* Vertically align links/dropdown */
        /* Spacing managed by margins */
        font-weight: 400;
    }

     .dropdown {
        position: relative; /* Keep relative for its own menu */
        margin-right: 1.5rem; /* Space after dropdown */
     }

    .header-nav-links {
         /* No margin needed here, follows dropdown */
         gap: 0.5rem; /* Gap between nav links */
    }


    .nav-link { /* Styles for links within header-nav-links */
        display: inline-block; /* Inline for horizontal layout */
        padding: 0.5rem 1rem;
        /* margin: 0 0.5rem; <-- Use gap on parent header-nav-links */
        width: auto; /* Auto width for links */
        text-align: center;
        font-family: var(--font-family-mono);
        font-weight: 600;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    /* Remove margin adjustments if using gap on parent
    .nav-link:first-child { margin-left: 0; }
    .nav-link:last-child { margin-right: 0; }
    */

    /* from here */

    /* Theme Toggle Button Wrapper (Desktop: Part of header-right, pushed right) */
     .header-align-right {
        /* Display and alignment already handled in header-right */
        margin-left: 1.5rem; /* Space before theme toggle on desktop */
     }
     .theme-toggle-btn {
        /* Desktop specific styles for the button */
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
     }

    /* Book List Adjustments for larger screens */
    .book-list-item {
        align-items: center; /* Re-center items vertically */
    }
     .book-list-cover {
         align-self: center; /* Re-center cover */
     }
     .want-to-read {
         align-self: center; /* Re-center want-to-read */
     }
     .load-more-style {
        margin-left: 0;
    }
    .section-title {
        font-size: 1.4rem;
        /* margin-bottom: 1.5rem; */
        text-transform: capitalize;
        padding-left: 0;
    }
}
