/* ========================================
   JOURNAL SYSTEM STYLES
   Rustic/Vintage Aesthetic with Old Paper
   ======================================== */

/* Import Baskerville font */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ========================================
   JOURNAL ORB
   ======================================== */

.journal-orb {
    position: fixed;
    bottom: 80px;
    left: 80px;
    z-index: 50;
    cursor: grab;
    transition: transform 0.3s ease;
}

.journal-orb:active {
    cursor: grabbing;
}

.journal-orb .orb-glow {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(139, 115, 85, 0.9) 0%,
        rgba(101, 67, 33, 0.7) 30%,
        rgba(101, 67, 33, 0.4) 60%,
        rgba(101, 67, 33, 0.1) 100%
    );
    box-shadow: 
        0 0 30px rgba(139, 115, 85, 0.6),
        0 0 60px rgba(139, 115, 85, 0.4),
        0 0 90px rgba(139, 115, 85, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.journal-orb .orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        #d4c5a9 0%,
        #a0826d 30%,
        #8b7355 60%,
        #654321 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f4f1e8;
    box-shadow: 
        inset -5px -5px 10px rgba(0, 0, 0, 0.3),
        inset 5px 5px 10px rgba(255, 255, 255, 0.2);
}

.journal-orb .orb-core svg {
    width: 24px;
    height: 24px;
}

.journal-orb .orb-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    color: #8b7355;
    white-space: nowrap;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(139, 115, 85, 0.4);
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(20, 15, 10, 0.7);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(139, 115, 85, 0.4);
}

.journal-orb:hover .orb-label {
    opacity: 1;
}

.journal-orb:hover .orb-glow {
    box-shadow: 
        0 0 40px rgba(139, 115, 85, 0.8),
        0 0 80px rgba(139, 115, 85, 0.6),
        0 0 120px rgba(139, 115, 85, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

/* ========================================
   JOURNAL MODAL
   ======================================== */

.journal-modal {
    position: fixed;
    width: 1000px;
    height: 700px;
    max-width: 90vw;
    max-height: 90vh;
    background: rgba(244, 241, 232, 0.98);
    backdrop-filter: blur(10px);
    border: 3px solid #8b7355;
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 115, 85, 0.3),
        inset 0 0 100px rgba(101, 67, 33, 0.05);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Old paper texture overlay */
.journal-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.03) 2px,
            rgba(139, 115, 85, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   MODAL HEADER
   ======================================== */

.journal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(139, 115, 85, 0.15);
    border-bottom: 2px solid rgba(139, 115, 85, 0.3);
    cursor: grab;
    position: relative;
    z-index: 2;
}

.journal-modal-header:active {
    cursor: grabbing;
}

.journal-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #654321;
    letter-spacing: 2px;
}

.journal-modal-title svg {
    color: #8b7355;
}

.journal-modal-controls {
    display: flex;
    gap: 8px;
}

.journal-modal-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(139, 115, 85, 0.4);
    background: rgba(244, 241, 232, 0.8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #654321;
}

.journal-modal-controls button:hover {
    background: rgba(139, 115, 85, 0.2);
    border-color: #8b7355;
    transform: translateY(-1px);
}

.journal-modal-controls button:active {
    transform: translateY(0);
}

/* ========================================
   MODAL CONTENT (Two-Panel Layout)
   ======================================== */

.journal-modal-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* ========================================
   SIDEBAR (Left Panel)
   ======================================== */

.journal-sidebar {
    width: 320px;
    background: rgba(224, 217, 200, 0.5);
    border-right: 2px solid rgba(139, 115, 85, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
}

.journal-sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
}

.journal-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
    position: relative;
}

.journal-toggle-sidebar-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(139, 115, 85, 0.4);
    background: rgba(244, 241, 232, 0.8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #654321;
    z-index: 10;
}

.journal-toggle-sidebar-btn:hover {
    background: rgba(139, 115, 85, 0.2);
    border-color: #8b7355;
    transform: scale(1.05);
}

.journal-toggle-sidebar-btn:active {
    transform: scale(0.95);
}

.journal-search-container {
    position: relative;
    margin-bottom: 16px;
    padding-right: 40px;
}

.journal-search-container svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b7355;
    pointer-events: none;
}

#journal-search {
    width: 100%;
    padding: 10px 12px 10px 38px;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
    background: rgba(244, 241, 232, 0.9);
    border: 1px solid rgba(139, 115, 85, 0.3);
    border-radius: 6px;
    color: #3a2820;
    transition: all 0.2s ease;
}

#journal-search:focus {
    outline: none;
    border-color: #8b7355;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

#journal-search::placeholder {
    color: rgba(101, 67, 33, 0.5);
}

.journal-new-entry-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8b7355, #a0826d);
    border: 1px solid rgba(101, 67, 33, 0.4);
    border-radius: 6px;
    color: #f4f1e8;
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(101, 67, 33, 0.2);
}

.journal-new-entry-btn:hover {
    background: linear-gradient(135deg, #a0826d, #8b7355);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(101, 67, 33, 0.3);
}

.journal-new-entry-btn:active {
    transform: translateY(0);
}

/* ========================================
   ENTRIES LIST
   ======================================== */

.journal-entries-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.journal-entries-list::-webkit-scrollbar {
    width: 8px;
}

.journal-entries-list::-webkit-scrollbar-track {
    background: rgba(139, 115, 85, 0.1);
}

.journal-entries-list::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.4);
    border-radius: 4px;
}

.journal-entries-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.6);
}

.journal-year-group {
    margin-bottom: 24px;
}

.journal-year-header {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #654321;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(139, 115, 85, 0.15);
    border-left: 4px solid #8b7355;
    border-radius: 4px;
}

.journal-month-group {
    margin-bottom: 16px;
    margin-left: 12px;
}

.journal-month-header {
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    font-style: italic;
    color: #8b7355;
    padding: 6px 12px;
    margin-bottom: 6px;
}

.journal-entry-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(244, 241, 232, 0.6);
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.journal-entry-item:hover {
    background: rgba(244, 241, 232, 0.9);
    border-color: #8b7355;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(101, 67, 33, 0.15);
}

.journal-entry-item.active {
    background: rgba(139, 115, 85, 0.2);
    border-color: #8b7355;
    border-left-width: 3px;
}

.entry-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.entry-item-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #3a2820;
    flex: 1;
    line-height: 1.4;
}

.entry-item-day {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #8b7355;
    margin-left: 8px;
}

.entry-item-preview {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    color: rgba(58, 40, 32, 0.7);
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.entry-item-time {
    font-family: 'IM Fell English', serif;
    font-size: 0.8rem;
    color: rgba(139, 115, 85, 0.8);
    font-style: italic;
}

.entry-author-badge {
    font-family: 'IM Fell English', serif;
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(139, 115, 85, 0.2);
    color: #654321;
    border-radius: 4px;
    font-weight: 600;
}

.journal-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: rgba(101, 67, 33, 0.5);
}

.journal-empty-state svg {
    margin-bottom: 20px;
    opacity: 0.3;
}

.journal-empty-state p {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    margin: 8px 0;
}

.journal-empty-state .empty-state-hint {
    font-size: 0.85rem;
    font-style: italic;
}

/* ========================================
   EDITOR PANEL (Right Panel)
   ======================================== */

.journal-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(254, 252, 246, 0.8);
    position: relative;
}

.journal-show-sidebar-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(139, 115, 85, 0.4);
    background: rgba(244, 241, 232, 0.95);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #654321;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(101, 67, 33, 0.2);
}

.journal-show-sidebar-btn:hover {
    background: rgba(139, 115, 85, 0.2);
    border-color: #8b7355;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(101, 67, 33, 0.3);
}

.journal-show-sidebar-btn:active {
    transform: scale(0.95);
}

.journal-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
}

.journal-entry-meta {
    flex: 1;
}

.journal-entry-title-input {
    flex: 1;
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3a2820;
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 0;
}

.journal-entry-title-input::placeholder {
    color: rgba(58, 40, 32, 0.3);
}

.journal-author-select {
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    padding: 8px 12px;
    border: 1px solid rgba(139, 115, 85, 0.3);
    border-radius: 4px;
    background: rgba(254, 252, 246, 0.9);
    color: #3a2820;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    height: 36px;
}

.journal-author-select:hover {
    border-color: rgba(139, 115, 85, 0.5);
    background: rgba(254, 252, 246, 1);
}

.journal-author-select:focus {
    outline: none;
    border-color: #8b7355;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.journal-editor-actions {
    display: flex;
    gap: 8px;
}

.journal-save-btn,
.journal-delete-btn {
    padding: 10px 16px;
    border: 1px solid rgba(139, 115, 85, 0.4);
    border-radius: 6px;
    font-family: 'IM Fell English', serif;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.journal-save-btn {
    background: linear-gradient(135deg, #8b7355, #a0826d);
    color: #f4f1e8;
    box-shadow: 0 2px 8px rgba(101, 67, 33, 0.2);
}

.journal-save-btn:hover {
    background: linear-gradient(135deg, #a0826d, #8b7355);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(101, 67, 33, 0.3);
}

.journal-delete-btn {
    background: rgba(244, 241, 232, 0.8);
    color: #c53030;
    border-color: rgba(197, 48, 48, 0.3);
}

.journal-delete-btn:hover {
    background: rgba(197, 48, 48, 0.1);
    border-color: #c53030;
    transform: translateY(-1px);
}

/* ========================================
   TOOLBAR
   ======================================== */

.journal-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(224, 217, 200, 0.3);
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
    flex-wrap: wrap;
    align-items: center;
}

.journal-editor-toolbar button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(139, 115, 85, 0.3);
    background: rgba(244, 241, 232, 0.8);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #654321;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
}

.journal-editor-toolbar button:hover {
    background: rgba(139, 115, 85, 0.2);
    border-color: #8b7355;
}

.journal-editor-toolbar button.is-active {
    background: rgba(139, 115, 85, 0.3);
    border-color: #8b7355;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: rgba(139, 115, 85, 0.3);
    margin: 0 4px;
    align-self: center;
}

/* Reading Mode Button in Toolbar */
#journal-reading-mode-btn {
    width: 36px;
    height: 36px;
}

#journal-reading-mode-btn.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    color: #d4af37;
}

/* ========================================
   READING MODE - Translucent with Starry BG
   ======================================== */

.journal-modal.reading-mode::before {
    opacity: 0;
}

.journal-modal.reading-mode {
    background: transparent;
    backdrop-filter: none;
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(212, 175, 55, 0.3);
}

.journal-modal.reading-mode .journal-modal-header {
    background: transparent;
    border-bottom-color: rgba(212, 175, 55, 0.4);
}

.journal-modal.reading-mode .journal-modal-title {
    color: #f4d03f;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

.journal-modal.reading-mode .journal-modal-title svg {
    color: #d4af37;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.journal-modal.reading-mode .journal-modal-controls button {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.4);
    color: #d4af37;
}

.journal-modal.reading-mode .journal-modal-controls button:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.journal-modal.reading-mode .journal-sidebar {
    display: none;
}

.journal-modal.reading-mode .journal-sidebar-header {
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

.journal-modal.reading-mode .journal-toggle-sidebar-btn,
.journal-modal.reading-mode .journal-show-sidebar-btn {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.4);
    color: #d4af37;
}

.journal-modal.reading-mode #journal-search {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f4d03f;
}

.journal-modal.reading-mode #journal-search::placeholder {
    color: rgba(212, 175, 55, 0.5);
}

.journal-modal.reading-mode .journal-new-entry-btn {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
    color: #f4d03f;
}

.journal-modal.reading-mode .journal-year-header {
    background: rgba(0, 0, 0, 0.3);
    color: #f4d03f;
    border-left-color: #d4af37;
}

.journal-modal.reading-mode .journal-month-header {
    color: #d4af37;
}

.journal-modal.reading-mode .journal-entry-item {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(212, 175, 55, 0.2);
}

.journal-modal.reading-mode .journal-entry-item:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
}

.journal-modal.reading-mode .journal-entry-item.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
}

.journal-modal.reading-mode .entry-item-title {
    color: #f4d03f;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.journal-modal.reading-mode .entry-item-day {
    color: #d4af37;
}

.journal-modal.reading-mode .entry-item-preview {
    color: rgba(244, 208, 63, 0.7);
}

.journal-modal.reading-mode .entry-item-time {
    color: rgba(212, 175, 55, 0.8);
}

.journal-modal.reading-mode .entry-author-badge {
    background: rgba(212, 175, 55, 0.3);
    color: #f4d03f;
}

.journal-modal.reading-mode .journal-editor-panel {
    background: transparent;
}

.journal-modal.reading-mode .journal-show-sidebar-btn {
    display: none !important;
}

.journal-modal.reading-mode .journal-editor-header {
    background: transparent;
    border-bottom-color: rgba(212, 175, 55, 0.3);
}

.journal-modal.reading-mode .journal-editor-actions {
    display: none;
}

.journal-modal.reading-mode .journal-entry-title-input {
    color: #f4d03f;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    pointer-events: none;
    border: none;
    background: transparent;
}

.journal-modal.reading-mode .journal-entry-title-input::placeholder {
    color: rgba(212, 175, 55, 0.4);
}

.journal-modal.reading-mode .journal-save-btn,
.journal-modal.reading-mode .journal-delete-btn {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f4d03f;
}

.journal-modal.reading-mode .journal-save-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
}

.journal-modal.reading-mode .journal-delete-btn {
    color: #ff8866;
    border-color: rgba(255, 136, 102, 0.4);
}

.journal-modal.reading-mode .journal-delete-btn:hover {
    background: rgba(255, 136, 102, 0.2);
    border-color: #ff8866;
}

.journal-modal.reading-mode .journal-editor-toolbar {
    display: none;
}

.journal-modal.reading-mode .journal-editor-toolbar button {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.3);
    color: #d4af37;
}

.journal-modal.reading-mode .journal-editor-toolbar button:hover,
.journal-modal.reading-mode .journal-editor-toolbar button.is-active {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.journal-modal.reading-mode .journal-author-select {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f4d03f;
}

.journal-modal.reading-mode .journal-author-select:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(212, 175, 55, 0.6);
}

.journal-modal.reading-mode .journal-editor-container {
    background: transparent;
}

.journal-modal.reading-mode .journal-tiptap-editor {
    color: #f4d03f;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.journal-modal.reading-mode .journal-tiptap-editor h1,
.journal-modal.reading-mode .journal-tiptap-editor h2,
.journal-modal.reading-mode .journal-tiptap-editor h3 {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
}

.journal-modal.reading-mode .journal-tiptap-editor strong {
    color: #ffd700;
    font-weight: 700;
}

.journal-modal.reading-mode .journal-tiptap-editor a {
    color: #d4af37;
}

.journal-modal.reading-mode .journal-entry-info {
    background: transparent;
    border-top-color: rgba(212, 175, 55, 0.3);
    color: rgba(212, 175, 55, 0.9);
}

.journal-modal.reading-mode .entry-author {
    color: #f4d03f;
}

/* ========================================
   TIPTAP EDITOR
   ======================================== */

.journal-editor-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px 48px 32px 64px;
    min-height: 0; /* Ensure it shrinks to fit parent */
}

.journal-editor-container::-webkit-scrollbar {
    width: 10px;
}

.journal-editor-container::-webkit-scrollbar-track {
    background: rgba(139, 115, 85, 0.1);
}

.journal-editor-container::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.3);
    border-radius: 5px;
}

.journal-editor-container::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.5);
}

.journal-tiptap-editor {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #3a2820;
    /* min-height: 100%; Removed to fix scrolling issue */
    outline: none;
}

.journal-tiptap-editor p,
.journal-tiptap-editor h1,
.journal-tiptap-editor h2,
.journal-tiptap-editor h3,
.journal-tiptap-editor ul,
.journal-tiptap-editor ol {
    padding-left: 32px;
}

.journal-tiptap-editor p {
    margin-bottom: 1em;
}

.journal-tiptap-editor h1 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #654321;
    margin: 1.5em 0 0.5em;
    line-height: 1.3;
}

.journal-tiptap-editor h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #654321;
    margin: 1.3em 0 0.5em;
    line-height: 1.3;
}

.journal-tiptap-editor h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #8b7355;
    margin: 1.2em 0 0.5em;
    line-height: 1.3;
}

.journal-tiptap-editor strong {
    font-weight: 700;
    color: #2d1f15;
}

.journal-tiptap-editor em {
    font-style: italic;
}

.journal-tiptap-editor u {
    text-decoration: underline;
}

.journal-tiptap-editor ul,
.journal-tiptap-editor ol {
    padding-left: 48px;
    margin-bottom: 1em;
}

.journal-tiptap-editor li {
    margin-bottom: 0.5em;
}

.journal-tiptap-editor a {
    color: #8b7355;
    text-decoration: underline;
}

.journal-tiptap-editor a:hover {
    color: #654321;
}

.journal-tiptap-editor .is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: rgba(58, 40, 32, 0.3);
    pointer-events: none;
    height: 0;
    font-style: italic;
}

/* ========================================
   ENTRY INFO FOOTER
   ======================================== */

.journal-entry-info {
    padding: 12px 24px;
    background: rgba(224, 217, 200, 0.3);
    border-top: 1px solid rgba(139, 115, 85, 0.2);
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    color: rgba(101, 67, 33, 0.7);
    font-style: italic;
}

.entry-author {
    color: #8b7355;
    font-weight: 600;
    font-style: normal;
}

/* ========================================
   NOTIFICATIONS
   ======================================== */

.journal-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: rgba(139, 115, 85, 0.95);
    backdrop-filter: blur(10px);
    color: #f4f1e8;
    border: 1px solid rgba(244, 241, 232, 0.3);
    border-radius: 8px;
    font-family: 'IM Fell English', serif;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.journal-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   EXIT READING MODE BUTTON
   ======================================== */

.journal-exit-reading-mode-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 6px;
    color: #f4d03f;
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.journal-exit-reading-mode-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    transform: translateY(-1px);
}

.journal-exit-reading-mode-btn:active {
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .journal-modal {
        width: 95vw;
        height: 95vh;
    }
    
    .journal-sidebar {
        width: 250px;
    }
    
    .journal-editor-container {
        padding: 20px 24px;
    }
    
    .journal-tiptap-editor {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .journal-modal-content {
        flex-direction: column;
    }
    
    .journal-sidebar {
        width: 100%;
        max-height: 40%;
        border-right: none;
        border-bottom: 2px solid rgba(139, 115, 85, 0.3);
    }
    
    .journal-editor-container {
        padding: 16px;
    }
}
