/* Library2 Page - Structured like work/dreamers with sidebar + content area */

/* Fullscreen Background */
.fullscreen-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background-color: #1a1a2e;
    pointer-events: none;
}

.scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a2e;
}

.scene-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    animation: subtle-breathing 6s ease-in-out infinite;
    background-color: #1a1a2e;
}

@keyframes subtle-breathing {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.02); 
    }
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Main Container - Two Column Layout */
.library-page-container {
    position: fixed;
    top: var(--content-top-spacing);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    max-width: 1200px;
    width: calc(100% - 4rem);
    height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .library-page-container {
        position: relative;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: var(--content-top-spacing) 1rem 4rem 1rem;
        overflow-y: auto;
        height: auto;
    }
    
    .library-sidebar {
        position: relative;
        height: auto;
    }
    
    .library-content {
        height: auto;
    }
}

@media (max-width: 768px) {
    .library-page-container {
        padding-top: var(--content-top-spacing-mobile);
    }
}

/* ===== LEFT SIDEBAR ===== */
.library-sidebar {
    background: white;
    border: 2px solid var(--user-color, #8b60af);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    overflow-y: auto;
}

/* Sidebar Header */
.sidebar-header {
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.sidebar-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 0.5rem;
}

.sidebar-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.sidebar-title h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--user-color, #8b60af);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.title-icon {
    width: 18px;
    height: 18px;
}

.sidebar-subtitle {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Library Philosophy */
.sidebar-philosophy {
    padding: 0.5rem 0.6rem;
    background: #fafafa;
    border: 2px solid #f0f0f0;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #555;
}

.sidebar-philosophy p {
    margin: 0 0 0.3rem 0;
}

.sidebar-philosophy p:last-child {
    margin-bottom: 0;
}

.sidebar-philosophy .emphasis {
    font-weight: 600;
    color: var(--user-color, #8b60af);
    font-style: italic;
    margin-top: 0.5rem;
}

/* View Controls */
.sidebar-controls {
    padding-top: 0.5rem;
    border-top: 2px solid #f0f0f0;
}

.control-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.view-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.view-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.view-btn:hover {
    background: #f9f9f9;
    border-color: var(--user-color, #8b60af);
    color: var(--user-color, #8b60af);
}

.view-btn.active {
    background: var(--user-color, #8b60af);
    border-color: var(--user-color, #8b60af);
    color: white;
}

.view-btn svg {
    flex-shrink: 0;
}

/* Filter Controls */
.sidebar-filters {
    padding-top: 0.5rem;
    border-top: 2px solid #f0f0f0;
}

.filter-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.filter-option:hover {
    color: var(--user-color, #8b60af);
}

.filter-option input[type="checkbox"] {
    cursor: pointer;
}

/* Quick Links */
.sidebar-links {
    padding-top: 0.5rem;
    border-top: 2px solid #f0f0f0;
}

.links-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--user-color, #8b60af);
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: #f9f9f9;
    border-color: #e0e0e0;
}

.sidebar-link svg {
    flex-shrink: 0;
}

/* ===== RIGHT CONTENT AREA ===== */
.library-content {
    background: white;
    border: 2px solid #d0d0d0;
    height: 100%;
    overflow-y: auto;
    position: relative;
    max-width: 900px;
}

/* Bookshelf View */
.bookshelf-view {
    padding: 2rem;
    transition: opacity 0.3s ease;
}

.list-view {
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.book-spine {
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.book-spine:hover {
    transform: translateY(-8px);
}

.book-spine-cover {
    width: 100%;
    aspect-ratio: 2/3;
    border: 2px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    object-fit: cover;
}

.book-spine:hover .book-spine-cover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.book-spine[data-book="seekers-reverie"]:hover .book-spine-cover {
    border-color: var(--book-seeker-primary);
}

.book-spine[data-book="princes-reverie"]:hover .book-spine-cover {
    border-color: var(--book-princes-primary);
}

.book-spine-info {
    margin-top: 0.75rem;
    text-align: center;
    width: 100%;
}

.book-spine-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.book-spine-author {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

.book-spine-status {
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.book-spine[data-book="seekers-reverie"] .book-spine-status.available {
    background: var(--book-seeker-primary);
    color: white;
}

.book-spine[data-book="princes-reverie"] .book-spine-status.available {
    background: var(--book-princes-primary);
    color: white;
}

.book-spine[data-book="seekers-reverie"] .book-spine-status.coming-soon {
    background: var(--book-seeker-secondary);
    color: #333;
}

.book-spine[data-book="princes-reverie"] .book-spine-status.coming-soon {
    background: var(--book-princes-secondary);
    color: #333;
}

/* List View */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-list-item {
    display: grid;
    grid-template-columns: 100px 1fr 180px;
    gap: 1.5rem;
    padding: 0.85rem 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-list-item:hover {
    background: #f9f9f9;
}

.book-list-item[data-book="seekers-reverie"]:hover {
    border-color: var(--book-seeker-primary);
}

.book-list-item[data-book="princes-reverie"]:hover {
    border-color: var(--book-princes-primary);
}

.book-list-cover {
    width: 100px;
    height: auto;
    border: 1px solid #ddd;
    object-fit: cover;
}

.book-list-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}

.book-list-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
}

.book-list-author {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

.book-list-excerpt {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 0.3rem 0 0 0;
}

.book-list-stats-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #666;
}

.stat-detail {
    display: flex;
    gap: 0.35rem;
}

.stat-detail strong {
    color: #444;
    font-weight: 600;
}

.book-list-meta {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-direction: column;
    gap: 0;
}

.book-list-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.list-action-btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: #555;
}

.list-action-btn:last-child {
    border-bottom: none;
}

.book-list-item[data-book="seekers-reverie"] .list-action-btn:hover:not(:disabled) {
    background: var(--book-seeker-primary);
    color: white;
}

.book-list-item[data-book="princes-reverie"] .list-action-btn:hover:not(:disabled) {
    background: var(--book-princes-primary);
    color: white;
}

.list-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

/* Book Details Panel - Fades in/out in place */
.book-details-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-details-panel.active {
    display: block;
    opacity: 1;
}

.book-details-content {
    padding: 2rem;
    position: relative;
    height: 100%;
    overflow-y: auto;
}

.book-details-content::-webkit-scrollbar {
    width: 10px;
}

.book-details-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.book-details-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.book-details-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.book-details-panel[data-book="seekers-reverie"] .book-details-content::-webkit-scrollbar-thumb {
    background: var(--book-seeker-primary);
}

.book-details-panel[data-book="seekers-reverie"] .book-details-content::-webkit-scrollbar-thumb:hover {
    background: var(--book-seeker-primary-dark);
}

.book-details-panel[data-book="princes-reverie"] .book-details-content::-webkit-scrollbar-thumb {
    background: var(--book-princes-primary);
}

.book-details-panel[data-book="princes-reverie"] .book-details-content::-webkit-scrollbar-thumb:hover {
    background: var(--book-princes-primary-dark);
}

/* Book-specific theming for details panel */
.book-details-panel[data-book="seekers-reverie"] {
    background: var(--book-seeker-bg);
}

.book-details-panel[data-book="seekers-reverie"] .book-details-content {
    color: var(--book-seeker-text);
}

.book-details-panel[data-book="princes-reverie"] {
    background: var(--book-princes-bg);
}

.book-details-panel[data-book="princes-reverie"] .book-details-content {
    color: var(--book-princes-text);
}

.close-details-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 2px solid #e0e0e0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.book-details-panel[data-book="seekers-reverie"] .close-details-btn:hover {
    background: var(--book-seeker-primary);
    border-color: var(--book-seeker-primary);
    color: white;
}

.book-details-panel[data-book="princes-reverie"] .close-details-btn:hover {
    background: var(--book-princes-primary);
    border-color: var(--book-princes-primary);
    color: white;
}

.book-details-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    align-items: flex-start;
}

.book-details-panel[data-book="seekers-reverie"] .book-details-header {
    border-bottom: 2px solid var(--book-seeker-border);
}

.book-details-panel[data-book="princes-reverie"] .book-details-header {
    border-bottom: 2px solid var(--book-princes-border);
}

.details-cover {
    width: 260px;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-details-panel[data-book="seekers-reverie"] .details-cover {
    border: 2px solid var(--book-seeker-primary);
}

.book-details-panel[data-book="princes-reverie"] .details-cover {
    border: 2px solid var(--book-princes-primary);
}

.details-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.details-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.book-details-panel[data-book="seekers-reverie"] .details-title {
    color: #8b60af;
}

.book-details-panel[data-book="princes-reverie"] .details-title {
    color: var(--book-princes-primary);
}

.details-author {
    flex: 1;
    font-size: 1.1rem;
    font-style: italic;
    margin: 0.25rem 0 0 0;
}

.book-details-panel[data-book="seekers-reverie"] .details-author {
    color: #7a5a8f;
}

.book-details-panel[data-book="princes-reverie"] .details-author {
    color: #8b6666;
}

.details-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-status.available {
    background: #4CAF50;
    color: white;
}

.details-status.coming-soon {
    background: #999;
    color: white;
}

.book-details-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.details-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-details-panel[data-book="seekers-reverie"] .details-section h3 {
    color: var(--book-seeker-primary);
}

.book-details-panel[data-book="princes-reverie"] .details-section h3 {
    color: var(--book-princes-primary);
}

.details-synopsis {
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0.5rem 0 0 0;
    white-space: pre-line;
}

.book-details-panel[data-book="seekers-reverie"] .details-synopsis {
    color: var(--book-seeker-text-light);
}

.book-details-panel[data-book="princes-reverie"] .details-synopsis {
    color: var(--book-princes-text-light);
}

/* Format buttons under synopsis - styled like order.html */
.header-format-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    align-items: center;
}

.format-buttons-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.order-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.order-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.order-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.order-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Seeker's Reverie button colors */
.book-details-panel[data-book="seekers-reverie"] .format-print {
    background: var(--book-seeker-primary);
    border-color: var(--book-seeker-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(92, 61, 94, 0.3);
}

.book-details-panel[data-book="seekers-reverie"] .format-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 61, 94, 0.4);
    filter: brightness(1.1);
}

.book-details-panel[data-book="seekers-reverie"] .format-kindle {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.book-details-panel[data-book="seekers-reverie"] .format-kindle:hover {
    border-color: #FFB84D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 77, 0.3);
}

.book-details-panel[data-book="seekers-reverie"] .format-epub {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.book-details-panel[data-book="seekers-reverie"] .format-epub:hover {
    border-color: #00cc88;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 136, 0.3);
}

/* Princes' Reverie button colors */
.book-details-panel[data-book="princes-reverie"] .format-print {
    background: var(--book-princes-primary);
    border-color: var(--book-princes-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(165, 42, 42, 0.3);
}

.book-details-panel[data-book="princes-reverie"] .format-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(165, 42, 42, 0.4);
    filter: brightness(1.1);
}

.book-details-panel[data-book="princes-reverie"] .format-kindle {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.book-details-panel[data-book="princes-reverie"] .format-kindle:hover {
    border-color: #FFB84D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 77, 0.3);
}

.book-details-panel[data-book="princes-reverie"] .format-epub {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.book-details-panel[data-book="princes-reverie"] .format-epub:hover {
    border-color: #00cc88;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 136, 0.3);
}

.details-toc {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.toc-chapter {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.book-details-panel[data-book="seekers-reverie"] .toc-chapter {
    background: var(--book-seeker-bg-alt);
    border-left: 3px solid var(--book-seeker-secondary);
}

.book-details-panel[data-book="seekers-reverie"] .toc-chapter:hover {
    background: var(--book-seeker-primary-light);
    padding-left: 1.25rem;
    border-left-color: var(--book-seeker-primary);
}

.book-details-panel[data-book="princes-reverie"] .toc-chapter {
    background: var(--book-princes-bg-alt);
    border-left: 3px solid var(--book-princes-secondary);
}

.book-details-panel[data-book="princes-reverie"] .toc-chapter:hover {
    background: var(--book-princes-primary-light);
    padding-left: 1.25rem;
    border-left-color: var(--book-princes-primary);
}

.toc-chapter-number {
    font-weight: 700;
    font-size: 0.85rem;
}

.book-details-panel[data-book="seekers-reverie"] .toc-chapter-number {
    color: var(--book-seeker-primary);
}

.book-details-panel[data-book="princes-reverie"] .toc-chapter-number {
    color: var(--book-princes-primary);
}

.toc-chapter-title {
    flex: 1;
    font-size: 0.9rem;
}

.book-details-panel[data-book="seekers-reverie"] .toc-chapter-title {
    color: var(--book-seeker-text);
}

.book-details-panel[data-book="princes-reverie"] .toc-chapter-title {
    color: var(--book-princes-text);
}

/* Unreleased chapters - blurred and non-interactive */
.toc-chapter-unreleased {
    filter: blur(3px);
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.toc-chapter-unreleased:hover {
    background: transparent !important;
    padding-left: 0.75rem !important;
}

.toc-part-header {
    padding: 1rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    user-select: none;
}

.toc-part-header .arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.book-details-panel[data-book="seekers-reverie"] .toc-part-header {
    background: var(--book-seeker-primary);
}

.book-details-panel[data-book="seekers-reverie"] .toc-part-header:hover {
    background: var(--book-seeker-primary-dark);
}

.book-details-panel[data-book="princes-reverie"] .toc-part-header {
    background: var(--book-princes-primary);
}

.book-details-panel[data-book="princes-reverie"] .toc-part-header:hover {
    background: var(--book-princes-primary-dark);
}

.toc-part-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

/* Format Buttons */
.details-formats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.format-btn {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.book-details-panel[data-book="seekers-reverie"] .format-btn:hover:not(:disabled) {
    background: var(--book-seeker-primary);
    border-color: var(--book-seeker-primary);
    color: white;
}

.book-details-panel[data-book="princes-reverie"] .format-btn:hover:not(:disabled) {
    background: var(--book-princes-primary);
    border-color: var(--book-princes-primary);
    color: white;
}

.format-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.format-btn svg {
    flex-shrink: 0;
}

/* Full-width CC0 Notice */
.cc0-notice-full {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    background: #f9f9f9;
    border: 1px solid #ddd;
    font-size: 0.85rem;
    line-height: 1.7;
    text-align: center;
}

.book-details-panel[data-book="seekers-reverie"] .cc0-notice-full {
    color: var(--book-seeker-text-light);
    border-color: var(--book-seeker-border);
}

.book-details-panel[data-book="princes-reverie"] .cc0-notice-full {
    color: var(--book-princes-text-light);
    border-color: var(--book-princes-border);
}

.book-details-panel[data-book="seekers-reverie"] .cc0-notice-full a {
    color: var(--book-seeker-primary);
    text-decoration: none;
}

.book-details-panel[data-book="princes-reverie"] .cc0-notice-full a {
    color: var(--book-princes-primary);
    text-decoration: none;
}

.cc0-notice-full a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bookshelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .book-spine {
        max-width: 150px;
    }

    .book-list-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .book-list-cover {
        width: 80px;
    }

    .book-list-meta {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
    }

    .book-details-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .details-cover {
        width: 150px;
    }

    .details-formats {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.library-sidebar::-webkit-scrollbar,
.library-content::-webkit-scrollbar,
.book-details-panel::-webkit-scrollbar {
    width: 8px;
}

.library-sidebar::-webkit-scrollbar-track,
.library-content::-webkit-scrollbar-track,
.book-details-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.library-sidebar::-webkit-scrollbar-thumb,
.library-content::-webkit-scrollbar-thumb,
.book-details-panel::-webkit-scrollbar-thumb {
    background: #87408d;
    border-radius: 4px;
}

.library-sidebar::-webkit-scrollbar-thumb:hover,
.library-content::-webkit-scrollbar-thumb:hover,
.book-details-panel::-webkit-scrollbar-thumb:hover {
    background: #734179;
}
