/* ==========================================================================
   SPOILTHEPLOT - BOOTSTRAP 5 REFACTORED STYLESHEET
   Contains only the custom elements not handled natively by Bootstrap
   ========================================================================== */

/* --- BRAND COLOR PALETTE --- */
:root {
    /* The 5 Core Brand Colors */
    --brand-blue: #4A56B9;         /* Primary text, links, and borders */
    --brand-purple: #9B5DE5;       /* Secondary purple for accents/gradients */
    --brand-purple-hover: #8A4DDE; /* Hover states for buttons */
    --brand-purple-deep: #7E3CE0;  /* Ribbons, bands, and deep accents */
    --brand-bg-light: #F8F7FC;     /* Primary light background panels */

    /* Extended UI Colors */
    --brand-heading: #2C3999;      /* Dark blue for H1/H2 Page Titles */
    --brand-border: #C9CDF2;       /* Light purple for subtle borders */
}

/* --- BASE & TYPOGRAPHY --- */
body {
    margin: 0;
    overflow-x: hidden;
    background-color: #FFFFFF;
    font-size: 1rem;
    font-family: 'Crimson Pro', serif;
}

.main-content {
    font-family: 'Crimson Pro', sans-serif;
    position: relative;
    background: transparent;
    z-index: 10;
    flex: 1;
}

.page-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.intro-text {
    font-family: 'Crimson Pro', sans-serif;
    font-size: 1.2rem;
    text-align: center;
    color: black;
    max-width: 800px;
    font-weight: 300;
    margin: 1rem auto 20px auto;
    line-height: 1.3;
}

@media (max-width: 640px) {
    .page-title { font-size: 1.5rem; margin-top: 1rem; margin-bottom: .5rem; }
    .intro-text { font-size: .9rem; margin-bottom: 10px; }
}


/* --- NAVIGATION & SIDEBAR --- */
.sidebar-nav-list .nav-link {
    font-family: 'Crimson Pro', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--brand-blue) !important;
    padding: 8px 16px;
    margin-bottom: 2px;
}

.sidebar-nav-list .nav-link:hover,
.sidebar-nav-list .nav-link.active {
    background-color: #FFFFFF !important;
    color: var(--brand-heading) !important;
    box-shadow: 0 2px 5px rgba(101, 42, 191, 0.08);
    transform: translateX(4px);
}


/* --- GENERAL UTILITIES --- */
.book-hover {
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-hover:hover { transform: translateY(-4px); }

.hover-opacity { transition: opacity 0.2s ease; }
.hover-opacity:hover { opacity: 0.7; }

/* Custom Horizontal Scrollbar (Trending Shelf) */
.custom-scrollbar::-webkit-scrollbar { height: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--brand-border); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--brand-blue); }

@media (max-width: 768px) {
    .custom-scrollbar::-webkit-scrollbar { display: none; }
    .custom-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
}


/* --- SOCIAL ICONS --- */
.social-icon {
    width: 28px;
    height: 28px;
    transition: all 0.2s ease;
}
.social-icon:hover { transform: translateY(-3px); }
.icon-instagram:hover { filter: brightness(1.1); }
.icon-tiktok { fill: #000000; }
.icon-tiktok:hover { fill: #333333; }
.icon-pinterest { fill: #E60023; }
.icon-pinterest:hover { fill: #bd081c; }


/* --- ALL BOOKS: FILTERING & GRID --- */
.sort-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 100%;
    margin-bottom: 30px;
    padding: 15px 10px;
    background-color: var(--brand-bg-light);
    border-radius: 8px;
    border: 1px solid #E0E0E0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-container label {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--brand-blue);
    margin: 0;
}

.sort-container select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--brand-border);
    font-family: 'Crimson Pro', sans-serif;
    font-size: 1rem;
    background-color: #FFFFFF;
    cursor: pointer;
    color: #333;
}
.sort-container select:hover { border-color: var(--brand-blue); }

.allbooks-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 across on large screens */
    gap: 30px 20px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
    max-width: 100%;
}

/* 1. Large Tablets / iPads */
@media (max-width: 1200px) {
    .allbooks-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 across */
    }
}

/* 2. Small Tablets */
@media (max-width: 768px) {
    .allbooks-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 across */
    }
}

/* 3. Large Mobile (Sort Container Overrides) */
@media (max-width: 600px) {
    .sort-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 5px 0;
        background-color: transparent;
        border: none;
        margin-bottom: 20px;
    }
    .filter-group { flex-direction: row; flex: 1; width: 50%; margin: 0; }
    .filter-group label { display: none; }
    .sort-container select {
        width: 100%;
        font-size: 0.85rem;
        border-radius: 50px;
        background-color: var(--brand-bg-light);
        color: var(--brand-blue);
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .allbooks-grid {
        grid-template-columns: repeat(3, 1fr); /* Stays 3 across but updates gap */
        gap: 15px;
    }
}

/* 4. Small Mobile */
@media (max-width: 400px) {
    .allbooks-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 across */
        gap: 15px;
    }
}

/* --- ALL BOOKS: BOOK CARDS --- */
.series-book-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.2s ease-in-out;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.series-book-card:hover { transform: translateY(-4px); }
.series-book-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
    background-color: var(--brand-bg-light);
}

.book-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 326 / 522;
    object-fit: cover;
    background-color: #f0f0f0;
}

.advent-ribbon { 
    position: absolute;
    top: 0;
    left: 0;
    background-color: #D90429;
    color: white;
    padding: 0.25rem 0.75rem;
    font-weight: 700;
    font-size: 0.975rem;
    border-bottom-right-radius: 0.5rem;
    z-index: 10;
}

.book-card-body {
    padding: 0.5rem;
    padding-bottom: .2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-card-title {
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1;
    font-family: 'Crimson Pro', sans-serif;
    color: var(--brand-blue);
}
.book-card-title:hover { color: #6366f1; }

.holiday-author {
    color: #374151;
    margin-top: -.1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
}

.meta-data {
    font-size: 1.2rem;
    color: var(--brand-blue);
    margin-top: auto;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 500;
    font-family: 'Crimson Pro', sans-serif;
    width: 100%;
}

.star-rating {
    --star-color: #ffc700;
    --star-empty-color: #ccc;
    --star-size: 1.5rem;
    --rating: 0;
    font-size: var(--star-size);
    font-family: Arial, sans-serif;
    display: inline-block;
    position: relative;
    letter-spacing: 2px;
}
.star-rating::before { content: '☆☆☆☆☆'; color: var(--star-empty-color); }
.star-rating::after {
    content: '★★★★★';
    color: var(--star-color);
    position: absolute;
    top: 0;
    left: 0;
    width: calc(var(--rating) / 5 * 100%);
    overflow: hidden;
}

@media (max-width: 600px) {
    .series-book-card { min-width: 0 !important; width: 100%; }
    .book-card-image { max-width: 100%; }
    .book-card-title { font-size: 0.95rem; line-height: 1.1; margin-bottom: 4px; }
    .holiday-author { font-size: 0.8rem; }
}


/* --- CARD ACTION BUTTONS (AMAZON / DETAILS) --- */
.card-action-row {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding-top: 12px;
}

.btn-card-action {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 4px;
    border-radius: 6px;
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1;
}

.btn-review {
    background-color: transparent;
    border: 1px solid var(--brand-border);
    color: var(--brand-blue);
}
.btn-review:hover {
    background-color: var(--brand-bg-light);
    color: var(--brand-heading);
}

.btn-amazon {
    background-color: #FFA41C;
    border: 1px solid #FF8F00;
    color: #111;
}
.btn-amazon:hover {
    background-color: #FA8900;
    border-color: #e37b00;
}

@media (max-width: 600px) {
    .card-action-row { flex-direction: column; gap: 8px; padding-top: 10px; }
    .btn-card-action { width: 100%; padding: 10px 0; font-size: 1rem; border-radius: 8px; }
    .btn-amazon { font-weight: 700; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
    .btn-review { background-color: #fff; border: 1px solid var(--brand-border); color: var(--brand-blue); font-weight: 600; }
}


/* --- PAGINATION --- */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Reduced from 20px for a tighter grouping */
    margin-top: 30px;
    margin-bottom: 40px;
    font-family: 'Playfair Display', serif;
}
.pagination-btn {
    background: var(--brand-bg-light);
    color: var(--brand-blue);
    border: 2px solid var(--brand-border);
    padding: 6px 16px; /* Reduced from 10px 24px */
    border-radius: 6px; /* Reduced from 8px to match the smaller size */
    font-size: 0.95rem; /* Reduced from 1.1rem */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.pagination-btn:hover {
    background: var(--brand-border);
    color: #FFFFFF;
    transform: translateY(-2px);
}


/* --- EMPTY RESULTS STATE --- */
.results-empty {
    max-width: 720px;
    margin: 32px auto;
    padding: 20px 18px;
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    text-align: center;
    font-family: 'Crimson Pro', sans-serif;
}

.result-title {
    font-family: 'Playfair Display', sans-serif;
    color: var(--brand-blue);
    font-size: 1.5rem;
    margin-top: -.1px;
}


/* --- BACK TO TOP BUTTON --- */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 90;
    display: none;
    opacity: 0;
    visibility: hidden;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(74, 86, 185, 0.7);
    color: #fff;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.back-to-top-btn.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}
.back-to-top-btn:hover {
    background-color: rgba(74, 86, 185, 1);
    transform: translateY(-2px);
}
.back-to-top-btn svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2.5;
}
@media (max-width: 400px) {
    .back-to-top-btn {
        width: 35px;
        height: 35px;
        right: 15px;
        bottom: 15px;
        background-color: rgba(74, 86, 185, 0.5);
    }
}

/* --- BREADCRUMBS --- */
.breadcrumb {
    /* 1. Globally override Bootstrap's default '/' divider with your '>' */
    --bs-breadcrumb-divider: '>'; 
    
    /* 2. Set the global font and size for all breadcrumbs */
    font-family: 'Crimson Pro', serif;
    font-size: 0.95rem;
}

/* 3. Clean up the links (Removes default blue and underline) */
.breadcrumb-item a {
    color: #555; /* Clean, muted dark gray */
    text-decoration: none; /* Removes the underline */
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--brand-blue); /* Subtle change to brand purple/blue on hover */
    text-decoration: underline;
}

/* 4. Style the active/current page text */
.breadcrumb-item.active {
    color: #111;
    font-weight: 600;
}

/* --- BOOK SETTINGS: JUMP NAVIGATION --- */
.pill-select-nav {
    width: 100%;
    max-width: 500px;
    padding: 12px 40px 12px 20px;
    border: 2px solid var(--brand-border);
    background-color: var(--brand-bg-light);
    color: var(--brand-blue);
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A56B9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
    transition: all 0.3s ease;
}
.pill-select-nav:focus {
    border-color: var(--brand-blue);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 86, 185, 0.15);
}

/* --- BOOK SETTINGS: SECTION TITLES --- */
.settings-page .series-section {
    scroll-margin-top: 80px;
}
.section-title-settings {
    font-family: 'Playfair Display', serif;
    color: var(--brand-blue);
    font-size: 2rem;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--brand-border);
    padding-bottom: 10px;
    display: inline-block;
}

/* --- KINDLE UNLIMITED BANNER --- */
.ku-banner {
    display: block;
    max-width: 800px;
    margin: 0 auto 30px;
    background: var(--brand-bg-light);
    border: 2px dashed var(--brand-blue);
    border-radius: 12px;
    padding: 15px 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.ku-banner:hover {
    background: #fff;
    transform: translateY(-2px);
    border-color: var(--brand-purple-hover);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.ku-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--brand-blue);
}
.ku-icon { font-size: 2rem; }
.ku-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-family: 'Crimson Pro', sans-serif;
}
.ku-text strong {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
}
.ku-text span {
    font-size: 1rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-top: 2px;
}
@media (max-width: 600px) {
    .ku-banner { margin-left: 15px; margin-right: 15px; padding: 12px; }
    .ku-icon { font-size: 1.5rem; }
    .ku-text strong { font-size: 1rem; }
    .ku-text span { font-size: 0.9rem; }
}

/* --- TAB NAVIGATION --- */
.tab-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.tab-button {
    background: var(--brand-bg-light);
    border: 2px solid var(--brand-border);
    color: var(--brand-blue);
    padding: 12px 24px;
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tab-button:hover {
    background: #ECECEC;
    transform: translateY(-2px);
}
.tab-button.active {
    background: var(--brand-blue);
    color: #FFFFFF;
    border-color: var(--brand-blue);
    box-shadow: 0 4px 10px rgba(74, 86, 185, 0.3);
}
.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
.tab-content.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
    .tab-container { flex-wrap: nowrap; gap: 8px; }
    .tab-button {
        flex: 1;
        padding: 8px 4px;
        font-size: 0.9rem;
        line-height: 1.1;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 45px;
    }
}

/* --- GENRE HEADINGS --- */
.letter-heading {
    margin: 20px 0 20px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-heading);
    border-bottom: 2px solid var(--brand-border);
    padding-bottom: 6px;
    font-family: 'Playfair Display', serif;
    scroll-margin-top: 160px; 
}

/* --- SECONDARY TOGGLE BUTTON (Used at bottom of tabs) --- */
.btn-toggle-sec {
    background: transparent; 
    color: var(--brand-blue);
    border: 2px solid var(--brand-border); 
    padding: 12px 25px;
    border-radius: 8px; 
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 20px;
}

.btn-toggle-sec:hover {
    background: var(--brand-bg-light); 
    color: var(--brand-heading);
    transform: translateY(-2px);
}

/* --- SERIES & ANTHOLOGY HEADERS --- */
.series-section {
    scroll-margin-top: 120px; 
    margin-bottom: 2rem;
}
.anthologies-page .series-section {
    scroll-margin-top: 145px;
}
.series-header {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    font-family: 'Playfair Display', serif;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--brand-blue);
}
.series-top-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 10px;
}
.series-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin: 0;
}
.series-meta {
    color: #475569;
    font-family: 'Crimson Pro', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.series-about {
    color: #475569;
    font-family: 'Crimson Pro', sans-serif;
    line-height: 1.5;
    margin-top: 1rem;
}
.btn-amazon-primary {
    background-color: #FFA41C;
    border: 1px solid #FF8F00;
    color: #111 !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}
.btn-amazon-primary:hover {
    background-color: #FA8900;
    border-color: #e37b00;
    transform: translateY(-2px);
}
@media (max-width: 600px) {
    .series-top-line { 
        flex-direction: row;     /* Forces them onto the same line */
        flex-wrap: nowrap;       /* Prevents the button from wrapping to the next line */
        align-items: flex-start; /* Aligns button with the top of the title */
        gap: 10px;
    }
    
    .series-title { 
        font-size: 1.3rem; 
        line-height: 1.2;
        flex-grow: 1;            /* Lets the title take up the available space and wrap text if needed */
        margin-bottom: 0;
    }
    
    .btn-amazon-primary { 
        flex-shrink: 0;          /* Prevents the button from getting squished by long titles */
        width: auto;             /* Removes full-width overrides */
        font-size: 0.8rem;       /* Shrinks the text to fit mobile better */
        padding: 6px 10px;       /* Tighter box padding */
        white-space: nowrap;     /* Keeps the button text on a single line */
        margin-top: 3px;         /* Slight nudge to align perfectly with the first line of the title */
    }
}

/* --- NOVELLA TAG (On Book Covers) --- */
.novella-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--brand-blue);
    color: white;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-family: 'Crimson Pro', serif;
    z-index: 10;
    border-top-left-radius: 10px;
}
@media (max-width: 600px) {
    .novella-tag { font-size: 0.65rem; padding: 3px 6px; border-top-left-radius: 6px; }
}

/* --- READ MORE TOGGLE (Mobile Truncation) --- */
.read-more-btn { display: none; }
@media (max-width: 600px) {
    .series-about.expandable {
        max-height: 5em;
        overflow: hidden;
        position: relative;
        -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
        mask-image: linear-gradient(180deg, #000 60%, transparent);
        transition: max-height 0.3s ease;
        margin-bottom: 0.5rem;
    }
    .series-about.expandable.expanded {
        max-height: none;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .read-more-btn {
        display: inline-block;
        background: none;
        border: none;
        color: var(--brand-blue);
        font-family: 'Crimson Pro', serif;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        padding: 0;
        margin-bottom: 1rem;
        text-decoration: underline;
    }
}

/* ==========================================================================
   RESULT CARDS (Used on ARC Reviews & Search Results)
   ========================================================================== */

/* --- DESKTOP LAYOUT --- */
.result-card {
    display: grid;
    position: relative; 
    grid-template-columns: 100px 1fr; 
    gap: 24px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    scroll-margin-top: 140px; 
}

.result-image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.result-cover {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 6px;
    background: var(--brand-bg-light);
}

.result-body {
    font-family: 'Crimson Pro', sans-serif;
    color: #222;
}

.results-meta {
    margin: 0 0 10px;
    color: #444;
    font-size: 1rem;
    font-weight: 800;
    margin-top: 10px;
}

.book_about {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* --- PRE-ORDER / COUNTDOWN STYLES --- */
.preorder-wrapper, 
.preorder-container {
    width: 100%;
    text-align: center;
}

.countdown-text {
    font-family: 'Crimson Pro', serif;
    font-size: 0.85rem;  
    color: #555;
    margin-bottom: 6px;  
    font-weight: 600;
    line-height: 1.2;
}

.countdown-text .urgent {
    color: #D90429;
    font-weight: 800;
}

.btn-preorder {
    display: inline-block;
    background-color: #FF9900; 
    color: #111;
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;    
    padding: 6px 15px;      
    line-height: 1.1;        
    margin-bottom: 8px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
    width: auto;            
    max-width: 100%;        
    white-space: normal;    
    box-sizing: border-box; 
}

.btn-preorder:hover {
    background-color: #FA8900;
    transform: translateY(-2px);
    color: #111;
}

/* --- MOBILE LAYOUT (Wrapping Text Around Image) --- */
@media (max-width: 600px) {
    .result-card {
        display: block; /* Switch from Grid to Block to allow text wrapping */
        padding: 16px;
        overflow: visible; 
    }

    .result-image-column {
        float: left; /* Floats the image left so text wraps around it */
        width: 110px; /* Fixed width for mobile float */
        margin-right: 15px; 
        margin-bottom: 5px; 
        display: block;
    }

    .result-cover {
        max-width: 110px; /* Ensure image respects the float column */
        margin: 0 auto;
    }

    .result-body {
        display: block; 
    }

    /* Force metadata items to their own lines to prevent awkward wrapping */
    .results-meta {
        font-size: 0.9rem;
        line-height: 1.3;      
        margin-bottom: 12px;
        display: block; 
    }

    .results-meta > span {
        display: block;
        margin-bottom: 4px;
        width: auto; 
    }

    .results-meta .separator {
        display: none; /* Hide the bullets since items are stacked now */
    }

    /* Force the Actions/Review to drop BELOW the floated image column */
    .result-actions {
        clear: both; 
        width: 100%; 
        padding-top: 10px;
    }
    
    /* Make buttons scale to mobile width */
    .btn-preorder, .btn-amazon {
        width: 100%;
        padding: 8px 4px;
        font-size: 0.8rem;
    }
}

/* --- FIX: Desktop Review Box Full Width --- */
@media (min-width: 601px) {
    .result-card .result-actions {
        grid-column: 1 / -1; /* Forces the review to span both the image and text columns */
        width: 100%;
        margin-top: 15px; 
    }
}

/* ==========================================================================
   SERIES & ANTHOLOGIES (Restored & Safe)
   ========================================================================== */

/* --- SAFELY FIX NOVELLA TAG & IMAGE ALIGNMENT --- */
.book-card-image {
    display: block; /* Removes white gap under images safely without breaking Bootstrap */
}

/* --- SERIES ORDER RIBBON --- */
.order-ribbon {
    position: absolute;
    top: -12px;
    left: -12px;
    background-color: var(--brand-purple-deep);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 10;
    border: 2px solid #fff; 
}

/* --- NOVELLA TAG --- */
.novella-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--brand-blue);
    color: white;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-family: 'Crimson Pro', serif;
    z-index: 10;
    border-top-left-radius: 10px;
    line-height: 1.2;
}

/* --- AUDIBLE PROMO BAND (Restored Original) --- */
.tw-band {
    color: var(--brand-purple-deep);
    background-color: var(--brand-bg-light); 
    border: 1px solid var(--brand-border); 
    text-align: center;
    border-radius: 12px;       
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Crimson Pro', sans-serif;
    margin: 8px auto 30px auto; 
    padding: 15px 10px; 
    max-width: 700px;          
    box-sizing: border-box;    
    width: 100%;
}
.search-options-link {
    background: transparent;
    border: none;
    color: var(--brand-blue);               
    font-weight: 600;           
    font-size: 1.1rem;             
    text-decoration: underline;
    text-decoration-thickness: 1px; 
    text-underline-offset: 4px;   
    cursor: pointer;
    font-family: 'Crimson Pro', serif;
    flex-basis: 100%;
    text-align: center;
    margin-top: 12px;
    width: 100%;
    transition: all 0.2s ease;
    display: inline-block;
}
.search-options-link:hover {
    color: var(--brand-heading);
    background: transparent;
}

/* --- SERIES SEARCH BAR (Restored Original Pill Shape & Colors) --- */
#seriesJumpSearch {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid var(--brand-border); 
    background-color: var(--brand-bg-light); 
    color: var(--brand-blue);            
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    border-radius: 50px;       
    box-sizing: border-box;    
    outline: none;
    transition: all 0.3s ease;
}
#seriesJumpSearch:focus {
    box-shadow: 0 0 8px rgba(74, 86, 185, 0.2);
    border-color: var(--brand-blue);
}

/* --- LARGE AMAZON HEADER BUTTON (Restored Original Size) --- */
.btn-amazon-primary {
    background-color: #FFA41C;
    border: 1px solid #FF8F00;
    color: #111 !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: normal;      
    text-align: center;
    max-width: 100%;          
    box-sizing: border-box;   
}
.btn-amazon-primary:hover {
    background-color: #FA8900;
    border-color: #e37b00;
    transform: translateY(-2px);
}
@media (max-width: 600px) {
    .btn-amazon-primary {
        align-self: flex-start;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

/* --- SERIES PAGE AUDIO BOOK PROMO --- */
.promo-banner {
    background: linear-gradient(135deg, #FFF8F0 0%, #fff 100%);
    border: 1px solid #FF9900;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0 30px 0;
    display: flex;
    align-items: center;
    
    /* --- KEY CHANGES FOR DESKTOP --- */
    justify-content: center; /* Centers the Text + Button group */
    gap: 40px; /* Adds nice breathing room between text and button */
    /* ------------------------------ */

    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.promo-icon {
    font-size: 2.2rem;
    flex-shrink: 0; /* Prevents emoji from getting squished */
}

.promo-text strong {
    display: block;
    color: #2C3999; /* Your Brand Blue */
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 4px;
}

.promo-text span {
    color: #444;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    line-height: 1.3;
}

/* The Button */

.promo-btn {
    background-color: #FF9900; 
    color: #111;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background-color 0.2s;
    text-align: center;
    
    /* --- THE FIX IS BELOW --- */
    box-sizing: border-box; 
    display: inline-block; /* Ensures consistent sizing */
}

.promo-btn:hover {
    background-color: #e88b00;
    transform: translateY(-2px);
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 600px) {
    .promo-banner {
        flex-direction: column; /* Stack top-to-bottom */
        text-align: center;
        padding: 20px 15px;
    }
    
    .promo-content {
        flex-direction: column; /* Stack icon above text */
        gap: 10px;
    }
    
    .promo-btn {
        width: 100%; /* Full width button for easy tapping */
        font-size: 1.1rem; /* Larger text for fingers */
        margin-top: 5px;
    }
}

/* ==========================================================================
   GIFT & ACCESSORY CARDS 
   ========================================================================== */

/* Gives the cards a clean visual lift on hover and highlights the border */
.card-hover-effect {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border: 1px solid transparent !important;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--brand-border) !important;
}

/* Forces images to maintain scale inside the Bootstrap cards */
.product-img-contain {
    height: 12rem;
    object-fit: contain;
    background-color: transparent;
}


/* ==========================================================================
   WHAT'S NEXT PAGE
   ========================================================================== */

/* Brand Purple Button (Used in the What's Next Forms) */
.btn-brand-purple {
    background-color: rgba(126, 60, 224, 0.9); /* #7E3CE0D9 */
    color: #fff !important;
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--brand-purple-deep);
    transition: all 0.2s ease;
}

.btn-brand-purple:hover {
    background-color: var(--brand-purple-deep);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* What's Next Page Navigation */
.whatnext-nav .nav-link {
    background: var(--brand-bg-light);
    border: 1px solid var(--brand-border);
    color: var(--brand-blue);
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.whatnext-nav .nav-link:hover {
    background-color: #ECECEC;
    color: var(--brand-heading);
}

/* ==========================================================================
   SEARCH RESULTS FIXES (Buttons, Stars, Links, & Recs)
   ========================================================================== */

/* --- 1. SPOILERS / REVIEW TEXT TABS --- */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;           
    padding-bottom: 1px;
    margin-top: 10px;
}

.js-toggle {
    white-space: nowrap;     
    flex-shrink: 0;          
    background: none !important;
    border: none !important;
    padding: 8px 0 !important; 
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-blue) !important;
    cursor: pointer;
    border-bottom: 3px solid transparent !important;
    transition: all 0.2s ease;
}

.js-toggle.active {
    opacity: 1 !important;
    border-bottom: 3px solid var(--brand-blue) !important;
}

/* Adds the subtle "|" separator between tabs */
.result-actions .js-toggle:not(:last-child)::after {
    content: "|";            
    margin-left: 15px;      
    margin-right: -5px;      
    color: var(--brand-border);         
    font-weight: 300;       
    pointer-events: none;    
}

@media (max-width: 600px) {
    .result-actions {
        gap: 15px;
        justify-content: center;
    }
    .js-toggle {
        font-size: 1rem;
        line-height: .7;
    }
}


/* --- 2. MOBILE STAR RATING FIX --- */
@media (max-width: 600px) {
    /* Forces the star rating to wrap its content tightly rather than spanning full screen width */
    .results-meta > span.star-rating {
        display: inline-block !important;
        width: auto !important;
        margin-top: 2px;
    }
}


/* --- 3. YOU MAY ALSO LIKE (Rec Covers) FIX --- */
.recommendations-container .row .col img {
    max-width: 120px; /* Restores your original size cap */
    width: 100%;
    object-fit: cover;
}


/* --- 4. AUDIO LINKS & NARRATOR TRUNCATION --- */
.audio-link {
    color: var(--brand-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.audio-link:hover {
    color: #000000;
    text-decoration-thickness: 2px;
}

.narrator-truncate {
    display: inline-block;
    max-width: 150px; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;   
    margin-top: -3px; 
    line-height: normal;
    cursor: pointer;
    transition: max-width 0.3s ease;
}

.narrator-truncate.is-expanded {
    max-width: 100%;          
    white-space: normal;      
    overflow: visible;
    margin-top: 0;            
    vertical-align: baseline; 
}

@media (max-width: 600px) {
    .narrator-truncate {
        max-width: 100px; 
    }
}


/* --- 5. KEY PLAYERS LIST STYLING --- */
.keyplayers li {
    margin: 2px 0;
    padding-left: 8px;
    list-style-type: square;  
    color: black;            
    font-weight: 600;  
    font-size: 1.1rem; 
    margin-bottom: 2px;
    font-family: 'Crimson Pro', sans-serif;
    padding-bottom: 7px; 
}

/* ==========================================================================
   FINAL BRANDING OVERRIDES (Overrides Bootstrap Defaults)
   ========================================================================== */

/* 1. Force Expandable Sections to use the Custom Light Purple */
.result-spoilers {
    background-color: var(--brand-bg-light) !important;
    border: 1px solid var(--brand-border) !important;
}

/* 2. Force Amazon Buttons to be Extra Bold */
.btn-amazon, 
.amazonurl, 
.btn-amazon-primary {
    font-weight: 800 !important; 
}

/* 3. Fix the "If You Liked" Recommendations Header */
.recommendations-container h3 {
    color: var(--brand-heading) !important;
    font-family: 'Playfair Display', serif !important;
    text-align: center !important;
    width: 100%;
}

/* Ensure the border color matches the brand */
.recommendations-container.border-top {
    border-top-color: var(--brand-border) !important;
    border-top-width: 2px !important;
}

/* ==========================================================================
   CHECKLISTS & SUBSCRIPTIONS
   ========================================================================== */

/* --- 1. SIGNUP ALERTS & MESSAGES --- */
.msg {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-family: 'Crimson Pro', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}
.msg.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.msg.error, .msg.warning { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- 2. SIGNUP HOW-IT-WORKS BOX --- */
.how-it-works {
    background: var(--brand-bg-light);
    border: 1px dashed var(--brand-blue);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}
.how-it-works h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-top: 0;
    color: var(--brand-heading);
    font-weight: 700;
}
.how-it-works ul {
    margin: 15px 0 0 20px;
    padding: 0;
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
}
.how-it-works li { margin-bottom: 10px; color: #333; }

/* --- 3. CHECKBOX GROUPS (Signup) --- */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 15px;
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 4px 0 0 0;
    flex-shrink: 0;
    accent-color: var(--brand-purple-deep);
}
.checkbox-group span {
    font-size: 1.05rem;
    line-height: 1.4;
    color: #444;
}

/* --- 4. CHECKLIST PREVIEW IMAGE --- */
.checklist-preview-container {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid var(--brand-border);
    padding-top: 25px;
}
.preview-label {
    font-family: 'Playfair Display', serif;
    color: var(--brand-heading);
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.checklist-preview-img {
    width: 100%;
    max-width: 250px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}
.checklist-preview-img:hover { transform: scale(1.03); }
.caption {
    font-size: 0.95rem;
    color: #666;
    margin-top: 12px;
    font-style: italic;
}

/* --- 5. CUSTOM MODALS (Signup Page) --- */
/* Renamed to avoid breaking standard Bootstrap Modals */
.custom-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(2px);
}
.custom-modal-content {
    background: #fff; 
    margin: 10vh auto; 
    padding: 35px; 
    border-radius: 16px; 
    width: 90%; 
    max-width: 450px; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.custom-close {
    position: absolute; 
    right: 20px; 
    top: 15px; 
    font-size: 28px; 
    cursor: pointer; 
    color: #999; 
    line-height: 1;
}
.custom-close:hover { color: #333; }

/* --- 6. AUTOCOMPLETE LIST (Create Checklist) --- */
.autocomplete-list {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid var(--brand-border);
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.autocomplete-list li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-family: 'Crimson Pro', sans-serif;
    font-size: 1.1rem;
    color: #333;
}
.autocomplete-list li:hover {
    background: var(--brand-bg-light);
    color: var(--brand-purple-deep);
    font-weight: 600;
}

/* --- 7. THEME SELECTORS (Create Checklist) --- */
.theme-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.theme-option:hover { border-color: var(--brand-border); }
.theme-input:checked + .theme-option {
    border-color: var(--brand-blue);
    background: var(--brand-bg-light);
    box-shadow: 0 0 0 1px var(--brand-blue);
}

/* --- 8. INTERACTIVE TRACKER UI (View Checklist) --- */
.cl-container {
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 40px;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    min-height: 800px;
    background: #ffffff;
}
.cl-header { text-align: center; border-bottom: 2px solid #ccc; margin-bottom: 30px; padding-bottom: 15px; }
.cl-series-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--brand-heading);
    margin-top: 35px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 8px;
    font-weight: 600;
}

.cl-group-wrapper { display: flex; flex-direction: column; gap: 15px; }
.cl-group-wrapper.grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cl-group-wrapper.landscape-layout { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }

@media (max-width: 850px) {
    .cl-group-wrapper.grid-layout, .cl-group-wrapper.landscape-layout { grid-template-columns: 1fr; }
    .cl-container { padding: 20px; }
}

.cl-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.cl-cover { width: 65px; height: 100px; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex-shrink: 0; }
.cl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.cl-title { font-weight: bold; font-size: 1.15rem; color: var(--brand-heading); line-height: 1.2; margin-bottom: 6px; font-family: 'Crimson Pro', serif; }
.cl-meta { font-size: 0.95rem; color: #666; margin-bottom: 5px; }

.cl-controls { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 15px; align-items: center; }
.cl-check-label { font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 1rem; color: #333; }
.cl-check-input { width: 20px; height: 20px; accent-color: var(--brand-purple-deep); cursor: pointer; }

.cl-stars { display: inline-block; white-space: nowrap; }
.star-btn { cursor: pointer; color: #ddd; font-size: 1.6rem; line-height: 1; transition: color 0.1s; text-shadow: 0 1px 1px rgba(0,0,0,0.1); }
.star-btn:hover { color: #ffe55c; }
.star-btn.active { color: #FFD700; }
.star-btn.half-active { 
    background: linear-gradient(to right, #FFD700 50%, #ddd 50%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: transparent; 
}

.cl-date-input { border: none; border-bottom: 2px solid #ccc; background: transparent; font-family: 'Crimson Pro', serif; font-size: 0.95rem; width: 120px; color: #333; outline: none; padding-bottom: 2px; }
.cl-date-input:focus { border-bottom-color: var(--brand-blue); }

.cl-formats { display: flex; gap: 10px; }
.cl-formats label { font-size: 0.9rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 4px; color: #444; }
.cl-formats input { width: 16px; height: 16px; accent-color: var(--brand-purple-deep); cursor: pointer; }

/* --- 9. CHECKLIST THEMES --- */
.theme-blue { background: #E3F4FC !important; }
.theme-purple { background: linear-gradient(to bottom right, var(--brand-bg-light), #E6E6FA) !important; }
.theme-warm { background: #f5ebe1 !important; }

/* Dark Theme specific overrides */
.theme-dark { background: #1e1e23 !important; color: #ffffff !important; border-color: #444 !important; }
.theme-dark .cl-title { color: #ffffff !important; }
.theme-dark .cl-meta { color: #bbbbbb !important; }
.theme-dark .cl-series-title { color: #9FA8DA !important; border-bottom-color: #444 !important; }
.theme-dark .cl-header { border-bottom-color: #444 !important; }
.theme-dark .cl-header h1 { color: #ffffff !important; }
.theme-dark .cl-header p { color: #bbbbbb !important; }
.theme-dark .cl-item { background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(255,255,255,0.1) !important; }
.theme-dark .cl-check-label { color: #fff !important; }
.theme-dark .cl-formats label { color: #ccc !important; }
.theme-dark .cl-date-input { color: #fff !important; border-bottom-color: #666 !important; }
.theme-dark .star-btn { color: #555 !important; }

/* --- RECOVERED 'ALREADY HAVE AN ACCOUNT' BUTTON STYLE --- */
.btn-brand-outline {
    background-color: #F2F2F2;
    color: var(--brand-heading); 
    border: 2px solid var(--brand-purple); 
    transition: all 0.2s ease;
}

.btn-brand-outline:hover {
    background-color: var(--brand-purple-hover); 
    color: #fff;
    border-color: var(--brand-purple-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- SPOILER WARNING BLUR --- */
.spoiler-blur-container {
    filter: blur(14px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.6s ease;
}

.spoiler-blur-container.revealed {
    filter: blur(0);
    pointer-events: auto;
    user-select: auto;
}

/* --- THEME PILL NAVIGATION BUTTONS --- */
.theme-pill {
    background-color: #ffffff;
    color: var(--brand-blue); /* Forces your brand navy/purple */
    border: 2px solid var(--brand-border); /* Uses your light purple border */
    font-family: 'Crimson Pro', serif;
    font-size: 1.05rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(74, 86, 185, 0.05); /* Very subtle shadow */
}

.theme-pill:hover, 
.theme-pill:focus {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #ffffff;
    transform: translateY(-2px); /* Gives it a tactile "lift" on hover */
    box-shadow: 0 4px 8px rgba(74, 86, 185, 0.15);
}

/* --- THEMES HUB DASHBOARD STYLING --- */
.theme-section-card {
    background-color: var(--brand-bg-light);
}

.theme-hub-title {
    font-family: 'Playfair Display', serif;
    color: var(--brand-heading);
    font-size: 1.75rem;
}

/* Base Theme Pill Styling (Desktop) */
.theme-pill {
    background-color: #ffffff;
    color: var(--brand-blue) !important;
    border: 2px solid var(--brand-border);
    font-family: 'Crimson Pro', serif;
    font-size: 1.05rem;
    padding: 8px 24px; /* Standard desktop padding */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(74, 86, 185, 0.05);
}

.theme-pill:hover, 
.theme-pill:focus {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 86, 185, 0.15);
}

/* --- MOBILE OPTIMIZATIONS FOR THEMES HUB --- */
@media (max-width: 600px) {
    .theme-hub-title {
        font-size: 1.4rem; /* Shrinks the giant headers so they fit the screen */
    }
    .theme-pill {
        font-size: 0.9rem; /* Smaller text */
        padding: 6px 14px; /* Tighter padding so buttons can sit side-by-side */
        white-space: normal; /* Allows very long words to wrap inside the button if needed */
        line-height: 1.2;
    }
}

.btn-arc-banner {
    color: #2C3999;
    background-color: #ffffff;
    border: 2px solid #2C3999;
    border-radius: 50px;
    padding: 6px 16px; /* Smaller padding to reduce box height */
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem; /* Slightly smaller text */
}

.btn-arc-banner:hover, 
.btn-arc-banner:focus {
    background-color: #2C3999;
    color: #ffffff;
    border-color: #2C3999;
    box-shadow: 0 4px 8px rgba(44, 57, 153, 0.2);
}

/* --- SERIES HUB: 3-COVER PREVIEW --- */
.series-covers-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Space between the covers */
    width: 100%;
}

.preview-cover {
    width: calc(33.333% - 6px); /* Perfectly splits the container for 3 covers */
    max-width: 90px;
    aspect-ratio: 326 / 522;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    transition: transform 0.2s ease;
}

.series-covers-preview:hover .preview-cover {
    transform: translateY(-3px);
}

/* --- SERIES HUB: 3-LINE BLURB CLAMP --- */
.series-blurb {
    font-size: 1rem;
    line-height: 1.4;
    font-family: 'Crimson Pro', serif;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limits the blurb to exactly 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

/* --- SERIES & ANTHOLOGY HUB: TITLES --- */
.hub-card-title {
    font-size: 1.3rem; 
    color: var(--brand-heading);
    font-family: 'Crimson Pro', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    /* We removed all the hidden overflow and line-clamp rules */
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .hub-card-title {
        font-size: 0.95rem; /* Shrunk the text so full titles fit gracefully */
    }
}

/* --- HUB CARD BUTTONS --- */
.btn-hub-action {
    font-family: 'Crimson Pro', sans-serif;
    white-space: normal;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .btn-hub-action {
        font-size: 0.85rem !important;
        padding: 8px 4px !important;
    }
}