/* Base Reset & Variables */
body.bible-body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--line-height);
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: auto !important;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}
a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Index Page (Books List) */
.index-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0;
}
.col-old, .col-new {
    flex: 1;
    min-width: 300px;
}
.book-group-title {
    font-weight: bold;
    font-size: 1.2em;
    margin: 20px 0 10px 0;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}
.index-bullet-group {
    margin: 5px 0;
    padding-left: 20px;
    position: relative;
}
.index-bullet-group::before {
    content: "•";
    position: absolute;
    left: 5px;
    color: var(--accent-color);
}
.book-title {
    color: var(--text-color);
}
.book-title:hover {
    color: var(--accent-color);
}

/* Top Navigation (Cloud) */
.cloud-nav {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.cloud-nav .nav-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Translations Popup */
.lang-select-btn {
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 4px;
    background: var(--bg-color);
    cursor: pointer;
}
.lang-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--popup-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--popup-shadow);
    padding: 15px;
    z-index: 1000;
    min-width: 250px;
}
.lang-popup.active {
    display: block;
}

/* Reader Container & Columns */
.reader-container {
    margin-top: 20px;
    padding-bottom: 80px;
}
.verse-row {
    display: flex;
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.verse-row.highlight {
    background-color: var(--highlight-bg);
}
.verse-col {
    flex: 1;
    padding: 0 10px;
    max-width: var(--col-width);
}
.verse-col:only-child {
    max-width: 100%;
}
.verse-number {
    font-weight: bold;
    color: var(--verse-number-color);
    font-size: 0.9em;
    margin-right: 5px;
}

/* Bottom Menu */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.bottom-nav .chapters-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 0 20px;
}
.bottom-nav .chapter-link {
    padding: 5px 10px;
    border-radius: 4px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}
.bottom-nav .chapter-link.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Utility */
.hidden { display: none !important; }

/* --- Premium Theme Updates & Navigation Drawer --- */

.nav-brand {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--accent-color) !important;
}

.nav-back-link:hover {
    background: var(--bg-color);
    border-color: var(--accent-color) !important;
    text-decoration: none !important;
}

.menu-trigger-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(139,0,0,0.15);
}

.menu-trigger-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,0,0,0.25);
}

/* Dynamic Books Drawer Sidebar */
.books-drawer {
    position: fixed;
    top: 0;
    left: -320px; /* Hidden initially */
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.books-drawer.active {
    left: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    display: block;
    opacity: 1;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
}

.drawer-header h3 {
    margin: 0;
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.25rem;
    color: var(--accent-color);
}

.close-drawer-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.close-drawer-btn:hover {
    color: #333;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Drawer tabs */
.testament-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.test-tab-btn {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid var(--border-color);
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.test-tab-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

#tab-bookmarks-btn {
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

/* Accordion Book Row */
.drawer-book-row {
    border-bottom: 1px solid #f0f0f0;
}

.drawer-book-title {
    padding: 12px 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s ease;
}

.drawer-book-title:hover {
    background-color: #fafafa;
    color: var(--accent-color);
}

.drawer-book-arrow {
    font-size: 0.75rem;
    color: #bbb;
    transition: transform 0.2s ease;
}

.drawer-book-row.expanded .drawer-book-arrow {
    transform: rotate(180deg);
}

.drawer-book-row.expanded .drawer-book-title {
    color: var(--accent-color);
    font-weight: 600;
}

.drawer-chapters-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 10px 8px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.drawer-chap-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 32px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.drawer-chap-link:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

/* Index Page Banner */
.index-header-banner {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 35px;
    margin-top: 20px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}

.index-header-banner h1 {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 2.25rem;
    margin: 0 0 10px 0;
    color: var(--accent-color);
}

.index-header-banner p {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    color: #666;
    margin: 0;
    font-size: 1rem;
}

.index-eye-hint {
    margin-top: 12px !important;
    font-size: 0.9rem !important;
    color: #888 !important;
    background: rgba(187, 157, 75, 0.06);
    border: 1px solid rgba(187, 157, 75, 0.2);
    border-radius: 8px;
    padding: 8px 16px !important;
    display: inline-block;
}

/* Groups Layout in Index */
.index-group-block {
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.index-group-name {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

.index-books-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.book-index-link {
    color: #333;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.book-index-link:hover {
    color: var(--accent-color);
    background: #fafafa;
    border-color: #eee;
    text-decoration: none !important;
}

/* Reader Typography Updates */
.reader-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    gap: 12px;
}

.reader-header h2 {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.5rem;
    margin: 0;
    color: var(--accent-color);
}

.reader-header h3 {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-weight: 500;
    font-size: 1.15rem;
    color: #666;
    margin: 0;
}

/* Side by Side Translation Header */
.translation-headers-row {
    display: flex;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 10px;
    gap: 20px;
    margin-bottom: 20px;
    position: sticky;
    top: 140px;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.translation-header-col {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-family: 'Inter', sans-serif;
    padding: 0 10px;
    border-right: 1px solid var(--border-color);
}

.translation-header-col:last-child {
    border-right: none;
}

/* Verse text font & styling */
.verse-row {
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    border-radius: 8px;
}


.verse-content-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
}

.verse-col {
    flex: 1;
    padding: 0 10px;
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    border-right: 1px solid #f4f4f4;
}

.verse-col:last-child {
    border-right: none;
}

.verse-number {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-right: 8px;
}

/* Verse Actions Toggle Eye Button & Num Wrapper */
.verse-num-col {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    user-select: none;
}
.verse-actions-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin: 0;
    opacity: 0.3;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.verse-row:hover .verse-actions-toggle {
    opacity: 0.6;
}
.verse-actions-toggle.active {
    opacity: 1 !important;
}
.verse-actions-toggle:hover {
    transform: scale(1.15);
}

/* Checkbox-triggered Verse Actions */
.verse-actions-bar {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 0;
    padding: 0 10px;
}

.verse-col.show-actions .verse-actions-bar {
    opacity: 1;
    height: auto;
    overflow: visible;
    margin-top: 10px;
    padding: 5px 10px;
}

.verse-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-color, #fdfbf7);
    border: 1px solid var(--border-color, #e5e5e5);
    color: var(--text-color, #333) !important;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    margin-right: 8px;
}

.verse-action-btn:hover {
    border-color: var(--accent-color, #bb9d4b);
    color: var(--accent-color, #bb9d4b) !important;
    background: rgba(187, 157, 75, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none !important;
}

.verse-action-btn:active {
    transform: scale(0.97);
}

/* Bottom Navigation Bar Update */
.bottom-nav-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.nav-prev-btn, .nav-next-btn, .nav-index-btn, .nav-first-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-prev-btn:hover, .nav-next-btn:hover, .nav-index-btn:hover, .nav-first-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--bg-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.nav-prev-btn:disabled, .nav-next-btn:disabled, .nav-first-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.nav-prev-btn:disabled:hover, .nav-next-btn:disabled:hover {
    border-color: var(--border-color);
    color: #333;
    background: #fff;
}

/* Loading & Errors */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
}

.error-container {
    text-align: center;
    padding: 45px 20px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #9b2c2c;
    margin-top: 25px;
}

.error-msg {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* Interpretations Drawer (slides from right) */
.interpretations-drawer {
    position: fixed;
    top: 0;
    right: -520px; /* Hidden initially */
    width: 500px;
    max-width: 90%;
    height: 100vh;
    background: #fdfbf7; /* beige matching the site */
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 10000;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-left: 1px solid var(--border-color);
}

.interpretations-drawer.active {
    right: 0;
}

/* Dark theme support for interpretations drawer */
body.theme-dark .interpretations-drawer {
    background: #1e1e1e;
    border-left: 1px solid #333;
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
}

/* Commentary Styles inside drawer */
.interp-block {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

body.theme-dark .interp-block {
    border-bottom-color: #333;
}

.interp-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.interp-author {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 12px;
    line-height: 1.4;
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
}

.interp-text {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-color);
}

.interp-text p {
    margin: 0 0 12px 0;
}

.interp-text p:last-child {
    margin-bottom: 0;
}

.interp-text strong {
    color: var(--accent-color);
    font-weight: 700;
}

body.theme-dark .interp-text strong {
    color: #e57373;
}

.interp-text a {
    color: var(--accent-color) !important;
    border-bottom: 1px dashed var(--accent-color);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

body.theme-dark .interp-text a {
    color: #e57373 !important;
    border-bottom-color: #e57373;
}

.interp-text a:hover {
    color: var(--accent-hover) !important;
    border-bottom-style: solid;
    text-decoration: none !important;
}

body.theme-dark .interp-text a:hover {
    color: #ff8a80 !important;
    border-bottom-color: #ff8a80;
}

/* Tooltip and extra elements from azbyka we want to make clean */
.bg_data_tooltip {
    display: none !important;
}
.bg_data_title {
}

/* Verse quotation block in Interpretations Drawer */
.interp-verse-quote {
    background: #faf7f2;
    border-left: 4px solid var(--accent-color);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

body.theme-dark .interp-verse-quote {
    background: #252525;
    border-left-color: #e57373;
}

.interp-verse-quote-num {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    line-height: 1.2;
}

body.theme-dark .interp-verse-quote-num {
    color: #e57373;
}

.interp-verse-quote-text {
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--text-color);
    font-style: italic;
}

/* Interactive navigation menu for authors (chips layout) */
.interp-navigation {
    background: #f7f3eb;
    border: 1px solid #e9dfcf;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

body.theme-dark .interp-navigation {
    background: #272727;
    border-color: #383838;
}

.interp-nav-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    color: #8c7f6b;
    margin: 8px 0 6px 0;
}

body.theme-dark .interp-nav-title {
    color: #aaa;
}

.interp-nav-title:first-child {
    margin-top: 0;
}

.interp-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.interp-nav-list:last-child {
    margin-bottom: 0;
}

.interp-nav-link {
    display: inline-block;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e1d8c7;
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none !important;
    font-size: 0.8rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

body.theme-dark .interp-nav-link {
    background: #1e1e1e;
    border-color: #3f3f3f;
    color: #ddd;
}

.interp-nav-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

body.theme-dark .interp-nav-link:hover {
    background: #e57373;
    border-color: #e57373;
    color: #fff !important;
}

/* Back to Top button inside interpretations drawer */
.drawer-back-to-top-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    z-index: 10002;
}

body.theme-dark .drawer-back-to-top-btn {
    background: #e57373;
}

.drawer-back-to-top-btn.visible {
    opacity: 0.9;
    visibility: visible;
    transform: translateY(0);
}

.drawer-back-to-top-btn:hover {
    opacity: 1;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* --- Bible Search Styles --- */
.bible-search-container {
    position: relative;
}

#bible-search-input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px 10px;
    color: var(--text-color, var(--reader-text, inherit));
    width: 150px;
    font-family: var(--font-family);
    transition: width 0.3s ease;
}

#bible-search-input::placeholder {
    color: var(--verse-number-color, #888);
}

#bible-search-input:focus {
    width: 250px;
}

#bible-search-results {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 400px;
    max-height: 450px;
    overflow-y: auto;
    background: var(--bg-color, var(--reader-bg, #fff));
    border: 1px solid var(--border-color, #444);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none;
    z-index: 1001;
}

#bible-search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color, #333);
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.search-result-item:hover {
    background-color: rgba(128,128,128,0.1);
}

.search-result-meta {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent-color, #e57373);
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.search-result-trans {
    font-weight: normal;
    color: #888;
}

.search-result-text {
    font-size: 0.95rem;
    color: var(--text-color, var(--reader-text, #fff));
    line-height: 1.4;
    font-family: "FuturaPT-Medium", Arial, sans-serif;
}

@media (max-width: 768px) {
    #bible-search-input {
        width: 100px;
    }
    #bible-search-input:focus {
        width: 150px;
    }
    #bible-search-results {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 60vh;
    }
    
    .lang-select-btn {
        padding: 6px 8px;
        font-size: 0.85rem;
    }
}

/* Bible Bookmarks Styling */
#bible-bookmark-btn.bookmarked {
    border-color: #b59e7a !important;
    background: rgba(181, 158, 122, 0.1) !important;
    color: #b59e7a !important;
}

.bible-bookmark-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg-color, #fff);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bible-bookmark-item:hover {
    border-color: var(--accent-color, #8b0000);
    background: rgba(139, 0, 0, 0.02);
}

.bible-bookmark-item-title {
    font-weight: 600;
    color: var(--text-color, #333);
    font-size: 0.95rem;
}

.bible-bookmark-item-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

.bible-bookmark-delete-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.bible-bookmark-delete-btn:hover {
    color: #c0392b;
}

/* Chapter Selector Heading Grid Styles */
.chapter-selector-container {
    position: relative;
    display: inline-block;
}

.chapter-select-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    margin: 0 !important;
    font-family: "FuturaPT-Medium", Arial, sans-serif;
    font-size: 1.1rem !important;
    font-weight: 600;
}

.chapter-select-trigger:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(187, 157, 75, 0.05);
}

.chapter-select-trigger .chevron {
    font-size: 0.75rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.7;
}

.chapter-selector-container.active .chapter-select-trigger .chevron {
    transform: rotate(180deg);
}

.chapters-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    right: auto;
    transform: translate(-50%, -10px);
    width: 290px;
    max-width: 90vw;
    background: var(--popup-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
    box-sizing: border-box;
}

.chapter-selector-container.active .chapters-popover {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.chapters-popover-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.chapters-popover-grid::-webkit-scrollbar {
    width: 4px;
}
.chapters-popover-grid::-webkit-scrollbar-track {
    background: transparent;
}
.chapters-popover-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.chapters-popover-grid .chap-box {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    text-decoration: none !important;
}

.chapters-popover-grid .chap-box:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(187, 157, 75, 0.2);
}

.chapters-popover-grid .chap-box.active {
    background: var(--accent-color);
    color: #fff !important;
    border-color: var(--accent-color);
}

/* Psalm Title Styling */
.psalm-title {
    display: block;
    text-align: center;
    font-style: italic;
    font-size: 0.95em;
    color: #8c7355;
    margin: 5px auto 15px auto;
    font-family: 'Lora', 'Playfair Display', serif;
    line-height: 1.4;
    border-bottom: 1px dashed rgba(140, 115, 85, 0.2);
    padding-bottom: 8px;
    max-width: 80%;
}
body.theme-dark .psalm-title {
    color: #c9b195;
    border-bottom-color: rgba(201, 177, 149, 0.2);
}

/* Adaptive Columns with Horizontal Scroll for Multiple Translations on Desktop */
@media screen and (min-width: 769px) {
    .container:has(.multiple-translations) {
        max-width: max-content;
    }

    .bible-reader-scroll-wrapper.multiple-translations {
        width: 100%;
        padding-bottom: 15px;
    }

    /* Header row and verse content wrapper — horizontal flex, stretch to full content width */
    .bible-reader-scroll-wrapper.multiple-translations .translation-headers-row {
        width: max-content;
        min-width: 100%;
        flex-wrap: nowrap;
    }

    /* verse-row is flex-direction:column — just stretch it to max-content width */
    .bible-reader-scroll-wrapper.multiple-translations .verse-row {
        width: 100%;
        min-width: max-content;
    }

    /* verse-content-wrapper — horizontal flex, no wrap */
    .bible-reader-scroll-wrapper.multiple-translations .verse-content-wrapper {
        width: 100%;
        flex-wrap: nowrap;
    }

    /* Each column in both header and verse rows — fixed same width */
    .bible-reader-scroll-wrapper.multiple-translations .verse-col,
    .bible-reader-scroll-wrapper.multiple-translations .translation-header-col {
        min-width: 250px;
        width: 250px;
        flex: 0 0 250px;
        padding: 0 10px;
        text-align: left;
        box-sizing: border-box;
    }
}
