:root {
    --primary-color: #8b0000;
    --secondary-color: #c0a080;
    --bg-color: #f5f0e1;
    --text-color: #333;
    --page-bg: #fff;
    --sidebar-bg: #e8e0d0;
    --border-color: #d0c0a0;
    --highlight-color: #fffacd;
}

.dark-mode {
    --primary-color: #c44;
    --secondary-color: #d8a878;
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --page-bg: #2a2a2a;
    --sidebar-bg: #333;
    --border-color: #555;
    --highlight-color: #333322;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Georgia', serif;
    line-height: 1.6;
    font-size: 18px;
}

.library-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.user-controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.user-controls button:hover {
    background: #6b0000;
}

.main-content {
    display: flex;
    gap: 5px;
    min-height: 80vh;
}

.books-sidebar {
    flex: 0 0 100px;
    background: var(--sidebar-bg);
    padding: 20px;
    border-radius: 5px;
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.book-card {
    padding: 15px;
    background: var(--page-bg);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-card h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.book-card p {
    font-size: 0.9rem;
    color: #666;
}

.book-viewer {
    flex: 1;
    background: var(--page-bg);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.book-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.book-header h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.book-header h3 {
    color: var(--secondary-color);
    font-size: 1.6rem;
}

.page-content {
    flex: 1;
    padding: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.book-footer {
    margin-top: 20px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nav-buttons button {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
}

.nav-buttons button:hover {
    background: #6b0000;
}

#toc-btn {
    background: var(--secondary-color);
}

#toc-btn:hover {
    background: #a08060;
}

.page-number {
    text-align: right;
    font-style: italic;
    color: #777;
    margin-top: 10px;
}

/* ... (mantenha o código existente) ... */

.books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.book-card {
    background: var(--page-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.book-info {
    padding: 12px;
}

.book-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
    height: 2.5em;
    overflow: hidden;
}

.book-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 3px 0;
}

/* Remova estas seções se existirem */
.editor-notes,
#notes-content,
.note-item,
.notes-actions {
    display: none !important;
}

/* ... (mantenha o resto do CSS) ... */
/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background: var(--page-bg);
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 700px;
    border-radius: 5px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

#toc-list {
    margin-top: 20px;
}

.toc-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.toc-item:hover {
    background: var(--highlight-color);
}

/* Highlight class for editor */
.highlight {
    background-color: var(--highlight-color);
    padding: 2px 4px;
    border-radius: 3px;
}

.editorial-content {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

.lead {
    font-size: 1.2em;
    font-weight: bold;
}

.pull-quote {
    border-left: 4px solid #2c3e50;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #2c3e50;
}

.pull-quote h2 {
    margin: 0;
    font-size: 1.5em;
}

.author {
    font-size: 0.9em;
    text-align: right;
    margin-top: 5px;
}

.dialogue {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

blockquote {
    background-color: #f0f7ff;
    padding: 20px;
    border-left: 5px solid #3498db;
    margin: 25px 0;
}

blockquote footer {
    font-size: 0.9em;
    text-align: right;
    color: #7f8c8d;
}

.highlight-box {
    background-color: #fffde7;
    border: 1px solid #ffe082;
    padding: 15px;
    margin: 25px 0;
    border-radius: 5px;
}

.countdown {
    text-align: center;
    font-size: 1.3em;
    margin: 30px 0;
    color: #e74c3c;
}

.dramatic {
    font-style: italic;
    background-color: #fff0f0;
    padding: 10px;
}

.impact {
    font-size: 1.5em;
    text-align: center;
    font-weight: bold;
    color: #c0392b;
    margin: 30px 0;
}

.newspaper-headlines {
    font-family: 'Times New Roman', serif;
    background-color: #f5f5f5;
    padding: 15px;
    margin: 30px 0;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

.newspaper-headlines h4 {
    margin: 10px 0;
    font-weight: bold;
    color: #222;
}

.closing-dialogue {
    margin-top: 40px;
    font-style: italic;
    border-top: 1px dashed #7f8c8d;
    padding-top: 20px;
}

.time-passage {
    font-style: italic;
    color: #666;
    border-left: 3px solid #ddd;
    padding-left: 15px;
    margin: 20px 0;
}

.reflection {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 25px 0;
    font-family: 'Georgia', serif;
}

.closing-impact {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    margin: 40px 0;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 5px;
    border-left: 4px solid #c0392b;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .books-sidebar, .editor-notes {
        flex: 0 0 auto;
    }
}

.error {
    color: #d00;
    padding: 10px;
    background: #ffecec;
    border: 1px solid #d00;
    border-radius: 4px;
}