/* ============================================================
   book.css — A Thought in the Mind of God — Book Landing Page
   Cosmic/cinematic dark theme with deep navy, blues, orange/gold
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --book-hero-bg-start: #0a0e1a;
    --book-hero-bg-mid: #0f1b3d;
    --book-hero-bg-end: #0a0e1a;
    --book-hero-text: #e8e8f0;
    --book-hero-subtext: #b0b8d0;
    --book-accent: #8b5cf6;
    --book-accent-light: #c4b5fd;
    --book-accent-glow: rgba(139, 92, 246, 0.3);
    --book-gold: #d4a24e;
    --book-gold-bg: rgba(212, 162, 78, 0.15);
    --book-gold-border: rgba(212, 162, 78, 0.4);
    --book-section-bg: #f8f9fa;
    --book-section-text: #1a1a2e;
    --book-section-subtext: #495057;
    --book-card-bg: #fff;
    --book-card-border: rgba(0,0,0,0.08);
    --book-card-hover-border: rgba(139, 92, 246, 0.3);
    --book-card-hover-shadow: rgba(139, 92, 246, 0.08);
    --book-toc-part-color: #6c757d;
    --book-toc-link: #1a1a2e;
    --book-toc-hover-bg: #f0ecff;
    --book-bio-bg: #f8f9fa;
    --book-bio-border: #8b5cf6;
    --book-divider: #dee2e6;
}

[data-theme="dark"] {
    --book-section-bg: #1a1a2e;
    --book-section-text: #e0e0e0;
    --book-section-subtext: #a0a0b0;
    --book-card-bg: #252538;
    --book-card-border: rgba(255,255,255,0.1);
    --book-card-hover-border: rgba(139, 92, 246, 0.4);
    --book-card-hover-shadow: rgba(139, 92, 246, 0.15);
    --book-toc-part-color: #a0a0b0;
    --book-toc-link: #e0e0e0;
    --book-toc-hover-bg: rgba(139, 92, 246, 0.12);
    --book-bio-bg: #252538;
    --book-bio-border: #8b5cf6;
    --book-divider: rgba(255,255,255,0.1);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.book-hero {
    position: relative;
    background: linear-gradient(
        170deg,
        var(--book-hero-bg-start) 0%,
        var(--book-hero-bg-mid) 40%,
        #1a1040 70%,
        var(--book-hero-bg-end) 100%
    );
    overflow: hidden;
    padding: 4rem 0 3.5rem;
    text-align: center;
    color: var(--book-hero-text);
}

/* Star twinkle animations */
@keyframes book-twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes book-twinkle2 {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Star field layers */
.book-hero::before,
.book-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Layer 1: Bright white stars, mixed sizes */
.book-hero::before {
    background-image:
        /* Tiny stars (0.5px) */
        radial-gradient(0.5px 0.5px at 3% 8%, rgba(255,255,255,0.4), transparent),
        radial-gradient(0.5px 0.5px at 12% 42%, rgba(255,255,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 22% 78%, rgba(255,255,255,0.35), transparent),
        radial-gradient(0.5px 0.5px at 38% 15%, rgba(255,255,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 47% 63%, rgba(255,255,255,0.4), transparent),
        radial-gradient(0.5px 0.5px at 58% 28%, rgba(255,255,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 67% 87%, rgba(255,255,255,0.35), transparent),
        radial-gradient(0.5px 0.5px at 76% 5%, rgba(255,255,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 83% 52%, rgba(255,255,255,0.4), transparent),
        radial-gradient(0.5px 0.5px at 92% 38%, rgba(255,255,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 31% 92%, rgba(255,255,255,0.35), transparent),
        radial-gradient(0.5px 0.5px at 54% 47%, rgba(255,255,255,0.3), transparent),
        /* Small stars (1px) */
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 25% 60%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 55% 80%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 60% 45%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 5% 40%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 75% 65%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 95% 75%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 42% 33%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 18% 55%, rgba(255,255,255,0.4), transparent),
        /* Medium stars (1.5px) */
        radial-gradient(1.5px 1.5px at 40% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 85% 50%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 35% 70%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 20% 35%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 65% 12%, rgba(255,255,255,0.6), transparent),
        /* Bright stars (2px) */
        radial-gradient(2px 2px at 28% 22%, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 72% 68%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 48% 85%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 88% 15%, rgba(255,255,255,0.8), transparent);
    animation: book-twinkle 4s ease-in-out infinite;
}

/* Layer 2: Purple-tinted stars, offset timing */
.book-hero::after {
    background-image:
        /* Tiny purple stars */
        radial-gradient(0.5px 0.5px at 7% 33%, rgba(200,180,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 24% 67%, rgba(200,180,255,0.25), transparent),
        radial-gradient(0.5px 0.5px at 43% 18%, rgba(200,180,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 57% 72%, rgba(200,180,255,0.25), transparent),
        radial-gradient(0.5px 0.5px at 73% 45%, rgba(200,180,255,0.3), transparent),
        radial-gradient(0.5px 0.5px at 86% 82%, rgba(200,180,255,0.25), transparent),
        radial-gradient(0.5px 0.5px at 94% 58%, rgba(200,180,255,0.3), transparent),
        /* Small purple stars */
        radial-gradient(1px 1px at 8% 55%, rgba(200,180,255,0.4), transparent),
        radial-gradient(1px 1px at 30% 12%, rgba(200,180,255,0.3), transparent),
        radial-gradient(1px 1px at 45% 92%, rgba(200,180,255,0.3), transparent),
        radial-gradient(1px 1px at 78% 42%, rgba(200,180,255,0.4), transparent),
        radial-gradient(1px 1px at 18% 72%, rgba(200,180,255,0.3), transparent),
        radial-gradient(1px 1px at 52% 58%, rgba(200,180,255,0.2), transparent),
        radial-gradient(1px 1px at 42% 5%, rgba(200,180,255,0.5), transparent),
        radial-gradient(1px 1px at 68% 88%, rgba(200,180,255,0.3), transparent),
        radial-gradient(1px 1px at 33% 48%, rgba(200,180,255,0.35), transparent),
        /* Medium purple stars */
        radial-gradient(1.5px 1.5px at 62% 38%, rgba(200,180,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 88% 28%, rgba(200,180,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 15% 18%, rgba(200,180,255,0.45), transparent),
        /* Bright purple stars */
        radial-gradient(2px 2px at 55% 25%, rgba(200,180,255,0.5), transparent),
        radial-gradient(2px 2px at 82% 72%, rgba(200,180,255,0.4), transparent);
    animation: book-twinkle2 5s ease-in-out infinite;
}

.book-hero-content {
    position: relative;
    z-index: 1;
}

/* Cover image with 3D tilt + glow */
.book-cover-wrapper {
    display: inline-block;
    margin-bottom: 2rem;
    perspective: 800px;
}

.book-cover-img {
    width: 320px;
    max-width: 80vw;
    border-radius: 6px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(139, 92, 246, 0.15),
        0 0 80px rgba(139, 92, 246, 0.08);
    transform: rotateY(-4deg) rotateX(2deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.book-cover-img:hover {
    transform: rotateY(0deg) rotateX(0deg);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(139, 92, 246, 0.25),
        0 0 100px rgba(139, 92, 246, 0.12);
}

.book-hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
    color: #fff;
}

.book-hero-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--book-hero-subtext);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.book-hero-author {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--book-accent-light);
    margin-bottom: 2rem;
}

.book-hero-quote {
    max-width: 680px;
    margin: 0 auto 2.2rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--book-hero-subtext);
    border-left: 3px solid var(--book-accent);
    padding-left: 1.25rem;
    text-align: left;
}

/* Download buttons */
.book-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.btn-book {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.btn-book:hover {
    transform: translateY(-2px);
    color: #fff;
}

.btn-book:active {
    transform: translateY(0);
}

.btn-book svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-book-pdf {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-book-pdf:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-book-epub {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-book-epub:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-book-read {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    box-shadow: none;
}

.btn-book-read:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 4px 15px rgba(255,255,255,0.08);
}

/* Download counter */
.book-download-count {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    color: var(--book-hero-subtext);
    margin-bottom: 1rem;
}

.book-download-count strong {
    color: #fff;
}

/* Print notice badge */
.book-print-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--book-gold);
    background: var(--book-gold-bg);
    border: 1px solid var(--book-gold-border);
    border-radius: 50px;
    letter-spacing: 0.02em;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.book-about {
    background: var(--book-section-bg);
    padding: 3rem 0 1.5rem;
}

.book-section-heading {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--book-section-text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.book-about-text {
    max-width: 720px;
    margin: 0 auto;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--book-section-subtext);
}

.book-about-text p {
    margin-bottom: 1.25rem;
}

.book-dedication {
    max-width: 600px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--book-section-subtext);
    border-left: 3px solid var(--book-accent);
    background: var(--book-card-bg);
    border-radius: 0 8px 8px 0;
}

/* ============================================================
   TABLE OF CONTENTS SECTION
   ============================================================ */

.book-toc {
    background: var(--book-card-bg);
    padding: 4rem 0;
    border-top: 1px solid var(--book-divider);
}

.book-toc-container {
    max-width: 780px;
    margin: 0 auto;
}

.book-toc-part {
    margin-bottom: 2rem;
}

.book-toc-part-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--book-toc-part-color);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--book-divider);
}

.book-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.book-toc-item {
    margin: 0;
}

.book-toc-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: var(--book-toc-link);
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.5;
}

.book-toc-link:hover {
    background: var(--book-toc-hover-bg);
    color: var(--book-accent);
}

.book-toc-number {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--book-accent);
    min-width: 2rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.book-toc-title {
    flex: 1;
}

/* ============================================================
   ABOUT THE AUTHOR SECTION
   ============================================================ */

.book-author {
    background: var(--book-section-bg);
    padding: 4rem 0;
    border-top: 1px solid var(--book-divider);
}

.book-author-card {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.book-author-photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.book-author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-author-content {
    flex: 1;
}

.book-author-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--book-section-text);
    margin-bottom: 1rem;
}

.book-author-bio {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--book-section-subtext);
    margin-bottom: 1.5rem;
}

.book-author-bio p {
    margin-bottom: 1rem;
}

.book-author-link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    color: var(--book-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.book-author-link:hover {
    color: var(--book-accent-light);
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .book-hero {
        padding: 2.5rem 0 2rem;
    }

    .book-cover-img {
        width: 240px;
        transform: rotateY(-2deg) rotateX(1deg);
    }

    .book-hero-title {
        font-size: 1.8rem;
    }

    .book-hero-subtitle {
        font-size: 0.95rem;
    }

    .book-hero-quote {
        font-size: 0.95rem;
        padding-left: 1rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .book-hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-book {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .book-section-heading {
        font-size: 1.35rem;
    }

    .book-about-text {
        font-size: 0.98rem;
    }

    .book-dedication {
        padding: 1.2rem 1.5rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .book-author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-author-photo {
        width: 100px;
        height: 100px;
    }

    .book-toc {
        padding: 3rem 0;
    }

    .book-toc-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.95rem;
    }

    .book-author {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .book-cover-img {
        width: 200px;
    }

    .book-hero-title {
        font-size: 1.5rem;
    }

    .book-hero-quote {
        font-size: 0.9rem;
    }

    .book-print-badge {
        font-size: 0.75rem;
        padding: 0.35rem 1rem;
    }
}

/* ============================================================
   SEARCH SECTION
   ============================================================ */

.book-search-section {
    padding: 1.5rem 0;
    background: var(--book-section-bg);
}

/* Search trigger button - command palette style */
.book-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 400px;
    margin: 0 auto;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.06);
    color: #8b5cf6;
    font-size: 0.9rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.book-search-trigger:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.4);
}

.book-search-trigger i {
    font-size: 0.85rem;
}

.book-search-trigger span {
    flex: 1;
    text-align: left;
}

.book-search-trigger kbd {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
    opacity: 0.7;
}

[data-theme="dark"] .book-search-trigger {
    background: rgba(139, 92, 246, 0.08);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .book-search-trigger:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
}

[data-theme="dark"] .book-search-trigger kbd {
    border-color: rgba(139, 92, 246, 0.25);
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

.book-search-section .container {
    text-align: center;
}

/* Search modal */
.book-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.book-search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.book-search-modal-content {
    position: relative;
    width: 90%;
    max-width: 640px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

[data-theme="dark"] .book-search-modal-content {
    background: #1e1e32;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.book-search-modal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

[data-theme="dark"] .book-search-modal-header {
    border-bottom-color: rgba(255,255,255,0.1);
}

.book-search-close {
    flex-shrink: 0;
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.book-search-close:hover {
    color: #374151;
}

[data-theme="dark"] .book-search-close:hover {
    color: #e5e7eb;
}

.book-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.book-search-input-wrap > i {
    position: absolute;
    left: 0.75rem;
    color: #8b5cf6;
    pointer-events: none;
}

.book-search-input-wrap input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: none;
    background: transparent;
    color: #1a1a2e;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    outline: none;
}

[data-theme="dark"] .book-search-input-wrap input {
    color: #e5e7eb;
}

.book-search-input-wrap input::placeholder {
    color: #9ca3af;
}

[data-theme="dark"] .book-search-input-wrap input::placeholder {
    color: #6b7280;
}

#bookSearchSpinner {
    position: absolute;
    right: 0.5rem;
    color: #9ca3af;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

.book-search-results {
    overflow-y: auto;
    flex: 1;
}

.book-search-summary {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] .book-search-summary {
    color: #9ca3af;
    border-bottom-color: rgba(255,255,255,0.1);
}

.book-search-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

[data-theme="dark"] .book-search-empty {
    color: #9ca3af;
}

.book-search-result {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

[data-theme="dark"] .book-search-result {
    border-bottom-color: rgba(255,255,255,0.08);
}

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

.book-search-result-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #7c3aed;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] .book-search-result-title {
    color: #a78bfa;
}

.book-search-result-title:hover {
    color: #6d28d9;
    text-decoration: none;
}

[data-theme="dark"] .book-search-result-title:hover {
    color: #c4b5fd;
}

.book-search-match-count {
    font-size: 0.7rem;
    font-weight: 400;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    white-space: nowrap;
}

[data-theme="dark"] .book-search-match-count {
    color: #9ca3af;
    background: rgba(255,255,255,0.1);
}

.book-search-result-part {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.15rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] .book-search-result-part {
    color: #9ca3af;
}

.book-search-snippet {
    font-size: 0.85rem;
    color: #374151;
    margin-top: 0.4rem;
    line-height: 1.5;
}

[data-theme="dark"] .book-search-snippet {
    color: #d1d5db;
}

.book-search-snippet mark {
    background: rgba(245, 158, 11, 0.3);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

[data-theme="dark"] .book-search-snippet mark {
    background: rgba(245, 158, 11, 0.4);
}
