* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent text selection on UI elements */
button,
.floating-header,
.floating-title,
.floating-icon-btn,
.chapter-number,
.book-card,
.book-name,
.book-progress,
.back-btn,
.category-title,
.testament-section h2,
.popup-tab,
.color-circle,
.action-btn,
.settings-btn,
.highlight-filter-btn,
.mode-toggle-label,
.toggle-switch,
.setting-item label,
.note-indicator,
.reading-progress-bar,
.progress-nav-arrow,
.mark-read-btn {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: 'Georgia', serif;
    background: #f8fafc;
    min-height: 100vh;
    padding: 20px;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }
}

.content {
    padding: 30px;
    padding-top: 80px;
    padding-bottom: 120px;
    line-height: 1.6;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .content {
        padding: 15px 0;
        padding-top: 65px;
        padding-bottom: 100px;
    }

    .verse-container.verse-clickable {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Desktop hover effect - lighter gray preview */
    .verse-container.verse-clickable:hover:not(.verse-selected) {
        background: rgba(156, 163, 175, 0.1);
        border-radius: 6px;
    }

    body.night-mode .verse-container.verse-clickable:hover:not(.verse-selected) {
        background: rgba(156, 163, 175, 0.08);
    }

    /* Selected state - MAXIMUM specificity for desktop */
    .content .verse-container.verse-selected,
    .verse-container.verse-selected {
        background: rgba(156, 163, 175, 0.3) !important;
        border-radius: 6px !important;
        padding: 15px 20px !important;
        margin-bottom: 8px !important;
        margin-left: -12px !important;
        margin-right: -12px !important;
        position: relative !important;
        z-index: 1 !important;
        box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.3) !important;
    }

    body.night-mode .content .verse-container.verse-selected,
    body.night-mode .verse-container.verse-selected {
        background: rgba(156, 163, 175, 0.2) !important;
        box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2) !important;
    }
    
    /* Desktop specific - force on larger screens */
    @media (min-width: 769px) {
        .content .verse-container.verse-selected,
        .verse-container.verse-selected,
        div.verse-container.verse-selected {
            background-color: rgba(156, 163, 175, 0.3) !important;
            background: rgba(156, 163, 175, 0.3) !important;
            padding: 15px 20px !important;
            margin: 0 -12px 8px -12px !important;
            border-radius: 6px !important;
            position: relative !important;
            z-index: 10 !important;
            box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.4) inset !important;
        }
        
        body.night-mode .content .verse-container.verse-selected,
        body.night-mode .verse-container.verse-selected,
        body.night-mode div.verse-container.verse-selected {
            background-color: rgba(156, 163, 175, 0.25) !important;
            background: rgba(156, 163, 175, 0.25) !important;
            box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.3) inset !important;
        }
    }
    
    .verse-container.verse-selected .verse-text {
        position: relative !important;
        z-index: 2 !important;
    }
    
    @media (max-width: 768px) {
        .content .verse-container.verse-selected,
        .verse-container.verse-selected {
            padding: 8px 15px !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            box-shadow: none !important;
        }
    }

    /* Mobile only - disable hover to prevent stuck states */
    @media (max-width: 768px) {
        .verse-container.verse-clickable:hover:not(.verse-selected) {
            background: none !important;
        }
    }

    .verse-container {
        padding: 8px 15px;
    }

    .book-selection {
        padding: 15px;
        padding-top: 65px;
    }
}

.verse-container {
    display: block;
    margin-bottom: 2px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
    position: relative;
}

@media (max-width: 768px) {
    .verse-container {
        margin-bottom: 1px;
        padding: 6px 15px;
    }
}

.verse-text {
    display: inline;
}

.verse-container.highlight-yellow .verse-text { 
    background: linear-gradient(to right, rgba(255, 235, 59, 0.25), rgba(255, 235, 59, 0.15));
    padding: 4px 8px 4px 4px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.verse-container.highlight-blue .verse-text { 
    background: linear-gradient(to right, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
    padding: 4px 8px 4px 4px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.verse-container.highlight-green .verse-text { 
    background: linear-gradient(to right, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    padding: 4px 8px 4px 4px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.verse-container.highlight-purple .verse-text { 
    background: linear-gradient(to right, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1));
    padding: 4px 8px 4px 4px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.verse-container.highlight-pink .verse-text { 
    background: linear-gradient(to right, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.1));
    padding: 4px 8px 4px 4px;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Day mode - always background highlights */

/* Night mode + Non-red letter mode - ONLY font color changes */
body.night-mode:not(.red-letter-mode) .verse-container.highlight-yellow .verse-text { 
    background: none !important;
    color: #ffd54f !important;
}
body.night-mode:not(.red-letter-mode) .verse-container.highlight-blue .verse-text { 
    background: none !important;
    color: #64b5f6 !important;
}
body.night-mode:not(.red-letter-mode) .verse-container.highlight-green .verse-text { 
    background: none !important;
    color: #81c784 !important;
}
body.night-mode:not(.red-letter-mode) .verse-container.highlight-purple .verse-text { 
    background: none !important;
    color: #ba68c8 !important;
}
body.night-mode:not(.red-letter-mode) .verse-container.highlight-pink .verse-text { 
    background: none !important;
    color: #f48fb1 !important;
}

/* Night mode + Red letter mode - background + colored text for non-red letters */
body.night-mode.red-letter-mode .verse-container.highlight-yellow .verse-text { 
    background: linear-gradient(to right, rgba(255, 235, 59, 0.15), rgba(255, 235, 59, 0.08)) !important;
    color: #ffd54f !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-yellow .verse-text .jesus-words { 
    color: #f87171 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-blue .verse-text { 
    background: linear-gradient(to right, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.08)) !important;
    color: #64b5f6 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-blue .verse-text .jesus-words { 
    color: #f87171 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-green .verse-text { 
    background: linear-gradient(to right, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08)) !important;
    color: #81c784 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-green .verse-text .jesus-words { 
    color: #f87171 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-purple .verse-text { 
    background: linear-gradient(to right, rgba(156, 39, 176, 0.15), rgba(156, 39, 176, 0.08)) !important;
    color: #ba68c8 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-purple .verse-text .jesus-words { 
    color: #f87171 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-pink .verse-text { 
    background: linear-gradient(to right, rgba(233, 30, 99, 0.15), rgba(233, 30, 99, 0.08)) !important;
    color: #f48fb1 !important;
}
body.night-mode.red-letter-mode .verse-container.highlight-pink .verse-text .jesus-words { 
    color: #f87171 !important;
}

/* Day mode + Red letter mode - always background */
body:not(.night-mode).red-letter-mode .verse-container.highlight-yellow .verse-text { 
    background: linear-gradient(to right, rgba(255, 235, 59, 0.25), rgba(255, 235, 59, 0.15)) !important;
}
body:not(.night-mode).red-letter-mode .verse-container.highlight-blue .verse-text { 
    background: linear-gradient(to right, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1)) !important;
}
body:not(.night-mode).red-letter-mode .verse-container.highlight-green .verse-text { 
    background: linear-gradient(to right, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1)) !important;
}
body:not(.night-mode).red-letter-mode .verse-container.highlight-purple .verse-text { 
    background: linear-gradient(to right, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1)) !important;
}
body:not(.night-mode).red-letter-mode .verse-container.highlight-pink .verse-text { 
    background: linear-gradient(to right, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.1)) !important;
}

.verse-container.blink-highlight {
    animation: blinkVerse 1.5s ease-in-out 3;
}

@keyframes blinkVerse {
    0%, 100% {
        box-shadow: none;
        background: transparent;
    }
    50% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.6);
        background: rgba(37, 99, 235, 0.15);
        transform: scale(1.02);
    }
}

/* Night mode highlight adjustments - no borders */

body.night-mode .verse-container.blink-highlight {
    animation: blinkVerseNight 1.5s ease-in-out 3;
}

@keyframes blinkVerseNight {
    0%, 100% {
        box-shadow: none;
        background: transparent;
    }
    50% {
        box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.7);
        background: rgba(96, 165, 250, 0.2);
        transform: scale(1.02);
    }
}

.verse-number {
    font-weight: bold;
    color: #2563eb;
    cursor: pointer;
    user-select: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.verse-number:hover {
    background: #eff6ff;
}

.verse-number.selected {
    background: #2563eb;
    color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    transform: scale(1.05);
}

.note-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 4px;
    font-size: 13px;
    font-weight: normal;
    line-height: 20px;
    text-align: center;
    color: white;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.note-indicator:hover {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.note-indicator:active {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.7);
}

body.night-mode .note-indicator {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

body.night-mode .note-indicator:hover {
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

body.night-mode .note-indicator:active {
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.7);
}

.word {
    cursor: pointer;
    border-bottom: 2px dotted #2563eb;
    padding: 0 1px;
}

.word:hover {
    background: #eff6ff;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    padding: 0;
    max-width: 90%;
    max-height: 80vh;
    overflow: hidden;
    z-index: 1000;
}

.popup-header {
    background: #1a1a1a;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    margin: 0;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.popup-content {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.popup-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.popup-tab {
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
}

.popup-tab.active {
    background: #2563eb;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;
}

.overlay.no-darken {
    background: transparent;
    pointer-events: none;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.5em;
    color: #2563eb;
}

.strongs-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.strongs-info h4 {
    color: #2563eb;
    margin-bottom: 10px;
}

.verse-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.verse-ref {
    padding: 8px;
    margin: 5px 0;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    cursor: pointer;
    border-radius: 4px;
}

.verse-ref:hover {
    background: #dbeafe;
}

.floating-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    user-select: none;
}

body.popup-open .floating-header {
    z-index: 998;
}

@media (max-width: 768px) {
    .floating-header {
        top: 10px;
        max-width: calc(100% - 20px);
        padding: 8px 15px;
        gap: 12px;
    }

    .floating-title {
        font-size: 0.9em;
        min-width: auto;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        padding: 6px 12px;
    }

    .floating-icon-btn {
        padding: 6px;
        width: 36px;
        height: 36px;
    }

    .floating-icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

.floating-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #1a1a1a;
}

.floating-icon-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.floating-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #1a1a1a;
    min-width: 120px;
    text-align: center;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

.floating-title:active {
    transform: scale(0.98);
}

body.night-mode .floating-title:active {
    transform: scale(0.98);
}

.navigation-arrows {
    display: none !important;
}

.book-selection {
    padding: 30px;
    padding-top: 80px;
}

@media (max-width: 768px) {
    .book-selection {
        padding: 8px;
        padding-top: 25px;
        padding-bottom: 5px;
    }
}

.testament-section {
    margin-bottom: 35px;
}

@media (max-width: 768px) {
    .testament-section {
        margin-bottom: 5px;
    }
}

.testament-section h2 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.category-section {
    margin-bottom: 25px;
}

.category-title {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid;
    color: #1a1a1a;
}

.category-law { border-left-color: #ef4444; }
.category-history { border-left-color: #3b82f6; }
.category-wisdom { border-left-color: #f59e0b; }
.category-major-prophets { border-left-color: #8b5cf6; }
.category-minor-prophets { border-left-color: #6366f1; }
.category-gospels { border-left-color: #ef4444; }
.category-history-nt { border-left-color: #3b82f6; }
.category-paul { border-left-color: #10b981; }
.category-general { border-left-color: #f59e0b; }
.category-prophecy { border-left-color: #8b5cf6; }

.testament-divider {
    height: 2px;
    background: #2563eb;
    margin: 15px 0;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .testament-divider {
        margin: 5px 0;
    }
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

.book-card {
    padding: 16px 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.3s;
    background: white;
    color: #1a1a1a;
    border: 2px solid #e5e7eb;
    word-wrap: break-word;
    min-height: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 768px) {
    .book-card {
        border: none;
    }
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.book-name {
    font-weight: 700;
    line-height: 1.2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05em;
}

.chapter-selection {
    padding: 30px;
    padding-top: 80px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .chapter-selection {
        padding: 15px;
        padding-top: 50px;
        max-width: 100%;
    }
}

.chapter-selection h2 {
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2em;
}

.back-btn {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: #1a1a1a;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

@media (max-width: 768px) {
    .back-btn {
        margin-left: 0;
        margin-bottom: 15px;
    }
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 10px;
}

@media (max-width: 768px) {
    .chapter-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .chapter-number {
        padding: 12px;
        font-size: 1em;
    }
}

.chapter-number {
    padding: 14px;
    text-align: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: #1a1a1a;
    font-size: 1.1em;
}

.chapter-number:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.chapter-number.chapter-read {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.chapter-number.chapter-read:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

body.night-mode .chapter-number {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #374151;
}

body.night-mode .chapter-number:hover {
    background: #2563eb;
    border-color: #2563eb;
}

body.night-mode .chapter-number.chapter-read {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

body.night-mode .chapter-number.chapter-read:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

body.night-mode .book-selection {
    color: #ffffff;
}

body.night-mode .testament-section h2 {
    color: #ffffff !important;
}

body.night-mode .category-title {
    color: #ffffff !important;
}

.settings-panel {
    display: none;
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 25px;
    z-index: 1000;
    min-width: 300px;
    max-width: 90%;
}

.settings-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2563eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.settings-close-btn:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

body.night-mode .settings-close-btn {
    color: #9ca3af;
}

body.night-mode .settings-close-btn:hover {
    background: #374151;
    color: #ffffff;
}

.search-panel {
    display: none;
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 20px;
    z-index: 1000;
    min-width: 350px;
}

.search-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2563eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.search-panel-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #1a1a1a;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
}

.search-panel-close-btn:hover {
    background: #f3f4f6;
}

body.night-mode .search-panel-close-btn {
    color: #ffffff;
}

body.night-mode .search-panel-close-btn:hover {
    background: #374151;
}

.search-panel input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
}

.search-panel button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

body.night-mode .search-panel {
    background: #1a1a1a;
    color: #ffffff;
}

body.night-mode .search-panel h3 {
    color: #60a5fa;
}

body.night-mode .search-panel input {
    background: #000000;
    color: #ffffff;
    border-color: #333333;
}

body.night-mode .search-panel button {
    background: #2563eb;
    color: white;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.setting-item label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    vertical-align: middle;
}

.setting-item p {
    color: #6b7280;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.settings-btn {
    padding: 16px 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.settings-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.settings-btn .btn-icon {
    font-size: 1.3em;
}

.settings-btn .btn-label {
    font-size: 0.85em;
    line-height: 1.2;
}

body.night-mode .settings-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

body.night-mode .settings-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

@media (max-width: 768px) {
    .settings-btn {
        padding: 12px 8px;
        min-height: 60px;
        font-size: 0.85em;
    }
    
    .settings-btn .btn-icon {
        font-size: 1.2em;
    }
    
    .settings-btn .btn-label {
        font-size: 0.8em;
    }
}

/* Toggle Switch for Dark Mode */
.mode-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.mode-toggle-label {
    font-weight: 600;
    color: #374151;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: #2563eb;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(30px);
}

body.night-mode .mode-toggle-label {
    color: #e5e7eb;
}

body.night-mode .toggle-switch {
    background: #374151;
}

body.night-mode .toggle-switch.active {
    background: #3b82f6;
}

body.night-mode .setting-item p {
    color: #9ca3af;
}

/* Verse Action Popup */
.verse-action-popup {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1004;
    animation: popupSlideRight 0.3s ease-out;
}

@keyframes popupSlideRight {
    from {
        opacity: 0;
        right: -80px;
    }
    to {
        opacity: 1;
        right: 20px;
    }
}

.verse-action-header {
    display: none;
}

.verse-action-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.highlight-colors {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.verse-action-divider {
    display: none;
}

.verse-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.action-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.copy-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.08)) !important;
    color: #2563eb !important;
    border: 2px solid #2563eb !important;
}

.copy-btn:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.15)) !important;
    color: #2563eb !important;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.note-btn {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.15), rgba(26, 26, 26, 0.08)) !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
}

.note-btn:hover {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.2), rgba(26, 26, 26, 0.12)) !important;
    border: 2px solid #1a1a1a !important;
}

.note-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.note-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.15), rgba(26, 26, 26, 0.08)) !important;
}

body.night-mode .note-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08)) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    color: #ffffff !important;
}

body.night-mode .note-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.12)) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
}

body.night-mode .copy-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1)) !important;
    border: 2px solid #3b82f6 !important;
    color: #60a5fa !important;
}

body.night-mode .copy-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.15)) !important;
}

@media (max-width: 768px) {
    .verse-action-popup {
        right: 10px;
        bottom: 80px;
    }

    .highlight-colors {
        gap: 8px;
    }

    .color-circle {
        width: 36px;
        height: 36px;
    }

    .color-circle.active::after {
        font-size: 16px;
    }

    .verse-actions-buttons {
        gap: 8px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 8px;
    }
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.verse-action-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.3);
}

.verse-action-header h3 {
    color: #ffffff;
    margin: 0 0 4px 0;
    font-size: 0.95em;
    font-weight: 600;
}

.verse-action-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    margin: 0;
}

.verse-action-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.highlight-colors {
    display: flex;
    gap: 10px;
    flex: 1;
}

.color-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.color-circle.remove:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.color-circle.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.color-circle.active {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
}

.color-circle.yellow { background: linear-gradient(135deg, rgba(255, 235, 59, 0.2), rgba(255, 235, 59, 0.1)); border-color: rgba(255, 235, 59, 0.6); }
.color-circle.blue { background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1)); border-color: rgba(33, 150, 243, 0.6); }
.color-circle.green { background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1)); border-color: rgba(76, 175, 80, 0.6); }
.color-circle.purple { background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1)); border-color: rgba(156, 39, 176, 0.6); }
.color-circle.pink { background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.1)); border-color: rgba(233, 30, 99, 0.6); }
.color-circle.remove { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08)); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    color: #ef4444;
    border: 2px solid #ef4444;
}

body.night-mode .color-circle.yellow { 
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.2), rgba(255, 235, 59, 0.1));
    border-color: rgba(255, 235, 59, 0.4);
}
body.night-mode .color-circle.blue { 
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
    border-color: rgba(33, 150, 243, 0.4);
}
body.night-mode .color-circle.green { 
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border-color: rgba(76, 175, 80, 0.4);
}
body.night-mode .color-circle.purple { 
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1));
    border-color: rgba(156, 39, 176, 0.4);
}
body.night-mode .color-circle.pink { 
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.1));
    border-color: rgba(233, 30, 99, 0.4);
}

body.night-mode .color-circle.remove {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border-color: #ef4444;
    color: #ef4444;
}

@media (max-width: 640px) {
    .verse-action-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .highlight-colors {
        display: flex;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }
    
    .color-circle {
        width: 34px;
        height: 34px;
    }
    
    .verse-action-divider {
        display: none;
    }
    
    .verse-actions-buttons {
        display: flex;
        gap: 8px;
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 14px;
    }
}

.verse-action-divider {
    width: 1px;
    height: 40px;
    background: rgba(37, 99, 235, 0.3);
}

.verse-actions-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.copy-btn {
    background: #2563eb;
    color: white;
}

.copy-btn:hover {
    background: #1d4ed8;
}

.note-btn {
    background: white;
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.note-btn:hover {
    background: #f3f4f6;
}

.note-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.note-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: white;
}

/* Notes Modal */
.notes-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    max-width: 600px;
    width: 90%;
    z-index: 1002;
}

.notes-modal-header {
    background: #1a1a1a;
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-modal-content {
    padding: 25px;
}

#notesVerseRef {
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 15px;
    font-size: 1.1em;
}

body.night-mode #notesVerseRef {
    color: #60a5fa;
}

.notes-modal textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Georgia', serif;
    resize: vertical;
    line-height: 1.6;
}

.notes-modal textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.notes-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: space-between;
    align-items: center;
}

.notes-modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.notes-modal-buttons-right {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.save-note-btn {
    background: #2563eb;
    color: white;
}

.save-note-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.cancel-note-btn {
    background: #f0f0f0;
    color: #333;
}

.cancel-note-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.delete-note-btn {
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.delete-note-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.notes-modal-buttons-right {
    display: flex;
    gap: 10px;
}

body.night-mode {
    background: #000000;
}

@media (max-width: 768px) {
    body.night-mode {
        background: #1a1a1a;
    }
}

body.night-mode .container {
    background: #1a1a1a;
    color: #ffffff;
}

body.night-mode .floating-header {
    background: rgba(26, 26, 26, 0.98);
}

body.night-mode .floating-title {
    color: #ffffff;
}

body.night-mode .floating-title:active {
    transform: scale(0.98);
}

body.night-mode .floating-icon-btn {
    color: #ffffff;
}

body.night-mode .book-card {
    background: #000000;
    color: #ffffff;
    border-color: #333333;
}

body.night-mode .chapter-number {
    background: #000000;
    color: #ffffff;
    border-color: #333333;
}

body.night-mode .testament-section h2 {
    color: #ffffff;
}

body.night-mode .category-title {
    color: #ffffff;
}

body.night-mode .popup {
    background: #1a1a1a;
    color: #ffffff;
}

body.night-mode .popup-header {
    background: #000000;
}

body.night-mode .verse-action-sheet {
    background: #1a1a1a;
}

body.night-mode .notes-modal-header {
    background: #000000;
}

body.night-mode select {
    background: #000000;
    color: #ffffff;
    border-color: #333333;
}

body.night-mode .popup-tab {
    background: #000000;
    color: #ffffff;
}

body.night-mode .popup-tab.active {
    background: #2563eb;
}

body.night-mode .strongs-info {
    background: #000000;
}

body.night-mode .verse-ref {
    background: #000000;
}

body.night-mode .verse-ref:hover {
    background: #2563eb;
}

body.night-mode h2, body.night-mode h3, body.night-mode h4 {
    color: #ffffff !important;
}

body.night-mode .highlight-filter-btn.filter-all.active {
    background: #2563eb;
    color: white;
}

.highlight-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

body.night-mode .highlight-count {
    background: rgba(255,255,255,0.1);
}

body.night-mode .highlight-filter-container {
    background: #0a0a0a;
}

body.night-mode .highlight-filter-btn {
    background: #1a1a1a;
    color: #ffffff;
}

body.night-mode .highlight-filter-btn.filter-all {
    color: #ffffff;
    background: #1a1a1a;
}

body.night-mode .highlight-filter-btn.filter-yellow {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.2), rgba(255, 235, 59, 0.1));
    color: #ffffff;
    border-color: rgba(255, 235, 59, 0.4);
}

body.night-mode .highlight-filter-btn.filter-blue {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
    color: #ffffff;
    border-color: rgba(33, 150, 243, 0.4);
}

body.night-mode .highlight-filter-btn.filter-green {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    color: #ffffff;
    border-color: rgba(76, 175, 80, 0.4);
}

body.night-mode .highlight-filter-btn.filter-purple {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1));
    color: #ffffff;
    border-color: rgba(156, 39, 176, 0.4);
}

body.night-mode .highlight-filter-btn.filter-pink {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.1));
    color: #ffffff;
    border-color: rgba(233, 30, 99, 0.4);
}

body.night-mode .highlight-filter-btn.filter-yellow.active {
    box-shadow: 0 4px 16px rgba(255, 235, 59, 0.3);
    border-color: rgba(255, 235, 59, 0.7);
}

body.night-mode .highlight-filter-btn.filter-blue.active {
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.7);
}

body.night-mode .highlight-filter-btn.filter-green.active {
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.7);
}

body.night-mode .highlight-filter-btn.filter-purple.active {
    box-shadow: 0 4px 16px rgba(156, 39, 176, 0.3);
    border-color: rgba(156, 39, 176, 0.7);
}

body.night-mode .highlight-filter-btn.filter-pink.active {
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
    border-color: rgba(233, 30, 99, 0.7);
}

/* Testament Filter Buttons */
        .testament-filter-btn {
            padding: 12px 20px;
            border: 2px solid #2563eb;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.95em;
            font-weight: 600;
            transition: all 0.3s;
            background: white;
            color: #2563eb;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .testament-filter-btn:hover {
            background: #2563eb;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        }

        body.night-mode .testament-filter-btn {
            background: #1a1a1a;
            color: #60a5fa;
            border-color: #3b82f6;
        }

        body.night-mode .testament-filter-btn:hover {
            background: #3b82f6;
            color: white;
        }

        /* Clear All Button */

/* Clear All Button */
/* Clear All Button */
    .clear-all-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .85em;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    margin-left: 10px;
}

.clear-all-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

body.night-mode .clear-all-btn {
    background: #dc2626;
}

body.night-mode .clear-all-btn:hover {
    background: #b91c1c;
}

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 500;
    background: rgba(26, 26, 26, 0.95);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 95%;
}

.progress-nav-arrow {
    background: white;
    color: #1a1a1a;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-weight: bold;
}

.progress-nav-arrow:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.1);
}

.progress-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.progress-nav-arrow:disabled:hover {
    background: white;
    color: #1a1a1a;
    transform: scale(1);
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: white;
    font-size: 0.85em;
}

.progress-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.75em;
}

.progress-value {
    font-weight: bold;
    font-size: 1.1em;
}

.current-chapter-display {
    color: white;
    font-weight: bold;
    padding: 0 15px;
    border-left: 2px solid rgba(255,255,255,0.3);
    border-right: 2px solid rgba(255,255,255,0.3);
    font-size: 1em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mark-read-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.mark-read-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.mark-read-btn.read {
    background: #6b7280;
}

.mark-read-btn.read:hover {
    background: #4b5563;
}

.book-progress {
    font-size: 0.8em;
    color: #2563eb;
    font-weight: 700;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 8px;
    background: #eff6ff;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
}

.book-progress-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.book-progress .progress-bar-mini {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.book-progress .progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.book-card:hover .book-progress {
    background: rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
}

body.night-mode .book-card {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #374151;
}

body.night-mode .book-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 6px 16px rgba(96, 165, 250, 0.3);
}

body.night-mode .book-progress {
    color: #60a5fa;
    background: #1e3a8a;
    border-color: #1e40af;
}

body.night-mode .book-progress .progress-bar-mini {
    background: #1f2937;
}

body.night-mode .book-card:hover .book-progress {
    background: #1e40af;
    border-color: #60a5fa;
}

body.night-mode .testament-divider {
    background: #3b82f6;
}

@media (max-width: 768px) {
    body.night-mode .book-card {
        border: none;
    }
}

@media (max-width: 1024px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }

    .book-card {
        padding: 6px 3px;
        min-height: 42px;
        font-size: 0.85em;
        border: none !important;
    }

    .book-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .book-name {
        font-size: 0.95em;
        font-weight: 700;
    }

    .book-progress {
        display: none;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .book-card {
        padding: 5px 2px;
        font-size: 0.85em;
        min-height: 40px;
    }

    .book-name {
        font-size: 0.9em;
    }

    .chapter-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .chapter-number {
        padding: 10px;
        font-size: 0.95em;
    }
}

/* Reading Stats Modal */
.stats-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    max-width: 600px;
    width: 90%;
    z-index: 1002;
    max-height: 80vh;
    overflow-y: auto;
}

.stats-modal-header {
    background: #1a1a1a;
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-modal-content {
    padding: 25px;
}

.stat-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #2563eb;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    color: #1a1a1a;
    font-size: 2em;
    font-weight: bold;
}

.history-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #2563eb;
}

body.night-mode .stats-modal {
    background: #1a1a1a;
}

body.night-mode .stats-modal-header {
    background: #000000;
}

body.night-mode .stat-card {
    background: #0a0a0a;
    border-left-color: #3b82f6;
}

body.night-mode .stat-label {
    color: #9ca3af;
}

body.night-mode .stat-value {
    color: #ffffff;
}

body.night-mode .history-item {
    background: #0a0a0a;
    border-left-color: #3b82f6;
    color: #e5e7eb;
}

body.night-mode .history-item span {
    color: #9ca3af !important;
}

body.night-mode .history-item span:last-child {
    color: #60a5fa !important;
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    max-width: 400px;
    width: 90%;
    z-index: 1002;
}

.auth-modal-header {
    background: #2563eb;
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-content {
    padding: 25px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-tab.active {
    background: #2563eb;
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
}

.auth-input:focus {
    outline: none;
    border-color: #2563eb;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: #1d4ed8;
}

.auth-error {
    color: #dc2626;
    font-size: 0.9em;
    margin-top: 10px;
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #eff6ff;
    border-radius: 8px;
    margin-bottom: 15px;
}

.user-email {
    flex: 1;
    font-weight: 600;
    color: #2563eb;
}

.sync-status {
    font-size: 0.85em;
    color: #10b981;
    margin-top: 10px;
    text-align: center;
}

body.night-mode .auth-modal {
    background: #1a1a1a;
}

body.night-mode .auth-modal-header {
    background: #1e40af;
}

body.night-mode .auth-input {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #374151;
}

body.night-mode .auth-tab {
    background: #374151;
    color: #e5e7eb;
}

body.night-mode .auth-tab.active {
    background: #2563eb;
}

body.night-mode .delete-note-btn {
    background: #dc2626;
}

body.night-mode .delete-note-btn:hover {
    background: #b91c1c;
}

body.night-mode .cancel-note-btn {
    background: #374151;
    color: #e5e7eb;
}

body.night-mode .cancel-note-btn:hover {
    background: #4b5563;
}

body.night-mode .save-note-btn {
    background: #2563eb;
}

body.night-mode .save-note-btn:hover {
    background: #1d4ed8;
}

body.night-mode .user-info {
    background: #1e3a8a;
}

body.night-mode .user-email {
    color: #60a5fa;
}

body.night-mode #userContent > div[style*="background: #f0fdf4"] {
    background: #052e16 !important;
    border-left-color: #16a34a !important;
}

body.night-mode #userContent > div[style*="background: #f0fdf4"] div[style*="color: #15803d"] {
    color: #86efac !important;
}

body.night-mode .stats-modal h3 {
    color: #ffffff !important;
}

body.night-mode .stats-modal h4 {
    color: #e5e7eb !important;
}

body.night-mode .stats-modal strong {
    color: #ffffff !important;
}

body.night-mode .stats-modal-content {
    --card-bg: #0a0a0a;
    --text-color: #ffffff;
    --progress-bg: #1f2937;
}

.stats-modal-content {
    --card-bg: #f8fafc;
    --text-color: #1a1a1a;
    --progress-bg: #e5e7eb;
}

@media (max-width: 768px) {
    .stats-modal {
        max-width: 95%;
        max-height: 85vh;
    }

    .stats-modal-content {
        padding: 20px;
    }

    .stats-modal-content > div > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .reading-progress-bar {
        flex-direction: row;
        padding: 12px 15px;
        gap: 12px;
        bottom: 10px;
    }

    .progress-nav-arrow {
        display: none;
    }

    .progress-stats.mobile-stat {
        display: flex;
        border: none;
        padding: 0;
    }

    .mark-read-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
}

body.night-mode .back-btn {
    background: #000000;
    color: #ffffff;
    border-color: #333333;
}

body.night-mode .back-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

body.night-mode .settings-panel {
    background: #1a1a1a;
    color: #ffffff;
}

body.night-mode .settings-panel h3 {
    color: #ffffff !important;
}

body.night-mode .setting-item label {
    color: #e5e7eb;
}

body.night-mode .mode-btn {
    background: #0a0a0a;
    color: #e5e7eb;
}

body.night-mode .mode-btn:hover {
    background: #374151;
}

body.night-mode .mode-btn.active {
    background: #2563eb;
    color: white;
}

body.night-mode mark {
    background: #ffeb3b;
    color: #1a1a1a;
}

.copy-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #22c55e;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1005;
    display: none;
    text-align: center;
    min-width: 180px;
    font-weight: 600;
    animation: slideDownToast 0.3s ease-out;
}

@keyframes slideDownToast {
    from {
        top: 0;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .copy-toast {
        min-width: 150px;
    }
}

.text-small { font-size: 0.9em !important; }
.text-medium { font-size: 1.2em !important; }
.text-large { font-size: 1.5em !important; }
.text-xlarge { font-size: 1.8em !important; }

/* Jesus' Words in Red */
.jesus-words {
    color: #dc2626;
    font-weight: 500;
}

body.night-mode .jesus-words {
    color: #f87171;
}

.italic-word {
    font-style: italic;
    opacity: 0.85;
}

/* Psalm Title Styling */
.psalm-title {
    text-align: center;
    font-style: italic;
    color: #6b7280;
    font-size: 0.95em;
    margin: 20px 0 25px 0;
    padding: 12px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #2563eb;
    line-height: 1.6;
}

body.night-mode .psalm-title {
    color: #9ca3af;
    background: #0a0a0a;
    border-left-color: #3b82f6;
}

@media (max-width: 768px) {
    .psalm-title {
        font-size: 0.9em;
        margin: 15px 0 20px 0;
        padding: 10px 15px;
    }
}

/* Highlight Color Filter Buttons */
.highlight-filter-container {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.highlight-filter-btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: .85em;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.highlight-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.highlight-filter-btn.filter-yellow:hover {
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.3);
}

.highlight-filter-btn.filter-blue:hover {
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.highlight-filter-btn.filter-green:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.highlight-filter-btn.filter-purple:hover {
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.highlight-filter-btn.filter-pink:hover {
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.highlight-filter-btn.active {
    border-color: currentColor;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.highlight-filter-btn.filter-all {
    color: #1a1a1a;
}

.highlight-filter-btn.filter-yellow {
    color: #f59e0b;
}

.highlight-filter-btn.filter-blue {
    color: #2563eb;
}

.highlight-filter-btn.filter-green {
    color: #10b981;
}

.highlight-filter-btn.filter-purple {
    color: #8b5cf6;
}

.highlight-filter-btn.filter-pink {
    color: #ec4899;
}

.highlight-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

body.night-mode .highlight-filter-container {
    background: #0a0a0a;
}

body.night-mode .highlight-filter-btn {
    background: #1a1a1a;
    color: #ffffff;
}

body.night-mode .highlight-filter-btn.filter-all {
    color: #ffffff;
    background: #1a1a1a;
}

body.night-mode .highlight-filter-btn.filter-yellow {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.2), rgba(255, 235, 59, 0.1));
    color: #ffffff;
    border-color: rgba(255, 235, 59, 0.4);
}

body.night-mode .highlight-filter-btn.filter-blue {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
    color: #ffffff;
    border-color: rgba(33, 150, 243, 0.4);
}

body.night-mode .highlight-filter-btn.filter-green {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    color: #ffffff;
    border-color: rgba(76, 175, 80, 0.4);
}

body.night-mode .highlight-filter-btn.filter-purple {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1));
    color: #ffffff;
    border-color: rgba(156, 39, 176, 0.4);
}

body.night-mode .highlight-filter-btn.filter-pink {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.1));
    color: #ffffff;
    border-color: rgba(233, 30, 99, 0.4);
}

/* Notes styling improvements */
.note-card {
    margin: 15px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #2563eb;
    transition: all 0.3s;
}

.note-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.note-reference {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.2s;
}

.note-reference:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.note-edit-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s;
}

.note-edit-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.note-verse-preview {
    color: #6b7280;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    font-style: italic;
}

.note-content {
    background: #fefefe;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    white-space: pre-wrap;
    line-height: 1.7;
    color: #1f2937;
}

body.night-mode .note-card {
    background: #1a1a1a;
    border-left-color: #3b82f6;
}

body.night-mode .note-reference {
    color: #60a5fa;
}

body.night-mode .note-reference:hover {
    color: #93c5fd;
}

body.night-mode .note-verse-preview {
    background: #0a0a0a;
    color: #9ca3af;
}

body.night-mode .note-content {
    background: #0a0a0a;
    border-color: #333333;
    color: #e5e7eb;
}

body.night-mode .note-edit-btn {
    background: #3b82f6;
}

body.night-mode .note-edit-btn:hover {
    background: #2563eb;
}