/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 0;
}

.header-banner {
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    padding: 15px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cross" patternUnits="userSpaceOnUse" width="20" height="20"><path d="M10,0 L10,20 M0,10 L20,10" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23cross)"/></svg>');
    opacity: 0.3;
}

.header-banner h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.main-nav {
    background-color: #f1c40f;
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-item {
    display: block;
    padding: 15px 25px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-item:hover {
    background-color: #f39c12;
    color: white;
    border-bottom-color: #e74c3c;
}

.nav-item.active {
    background-color: #e74c3c;
    color: white;
    border-bottom-color: #c0392b;
}

/* Main Content Styles */
.main-content {
    padding: 30px;
}

/* Language Toggle Styles */
.language-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Navigation Toggle Styles */
.nav-toggle {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Hide toggle on search results page */
body:has(.results-content) .nav-toggle {
    display: none;
}

/* Verse Language Controls */
.verse-language-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.verse-language-controls .checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.verse-language-controls .checkbox-label:hover {
    background-color: #f8f9fa;
}

.verse-language-controls input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.verse-language-controls input[type="checkbox"]:checked+span {
    color: #007bff;
    font-weight: 600;
}

/* Mobile responsive for verse language controls */
@media (max-width: 768px) {
    .verse-language-controls {
        position: static;
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Language tags for search results */
.language-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
}

.tamil-tag {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.english-tag {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Combined verse cards for "Both" mode */
.result-verse.combined-verse {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.result-verse.combined-verse:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.result-verse.combined-verse .verse-reference {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.result-verse.combined-verse .verse-reference .verse-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-verse.combined-verse .verse-reference .verse-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.result-verse.combined-verse .verse-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.7);
    word-break: break-word;
}

.result-verse.combined-verse .tamil-text {
    color: #2c3e50;
    font-weight: 500;
    border-left: 4px solid #28a745;
}

.result-verse.combined-verse .english-text {
    color: #495057;
    font-style: italic;
    border-left: 4px solid #6c757d;
}

.result-verse.combined-verse .no-translation {
    color: #adb5bd;
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
}

/* Regular single language results */
.result-verse:not(.combined-verse) {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.result-verse:not(.combined-verse):hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-verse:not(.combined-verse) .verse-reference {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 8px;
}

.result-verse:not(.combined-verse) .verse-reference .verse-link {
    color: #0d6efd;
    text-decoration: none;
}

.result-verse:not(.combined-verse) .verse-reference .verse-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.result-verse:not(.combined-verse) .verse-text {
    font-size: rem;
    line-height: 1.6;
    color: #6c757d;
}

.nav-toggle .language-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-toggle .toggle-label {
    font-weight: bold;
    color: #495057;
    font-size: 0.8rem;
    margin: 0;
}

.nav-toggle .toggle-switch {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 28px;
}

.nav-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.nav-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 48px;
    left: 0px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


.nav-toggle .toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(48px);
}

.nav-toggle .toggle-text {
    color: #adb5bd;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1;
    transition: color 0.3s ease;
}

.nav-toggle .toggle-switch input:checked+.toggle-slider .toggle-text:first-child {
    color: #2c3e50;
}

.nav-toggle .toggle-switch input:checked+.toggle-slider .toggle-text:last-child {
    color: #2c3e50;
}

.nav-toggle .toggle-switch input:not(:checked)+.toggle-slider .toggle-text:first-child {
    color: #2c3e50;
}

.nav-toggle .toggle-switch input:not(:checked)+.toggle-slider .toggle-text:last-child {
    color: #2c3e50;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 10px 18px;
    border-radius: 22px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.toggle-label {
    font-weight: bold;
    color: #495057;
    font-size: 0.9rem;
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 35px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(135deg, #007bff, #0056b3); */
    transition: 0.4s;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    /* background: linear-gradient(135deg, #28a745, #20c997); */
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(85px);
}

.toggle-text {
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked+.toggle-slider .toggle-text:first-child {
    opacity: 0.5;
}

.toggle-switch input:not(:checked)+.toggle-slider .toggle-text:last-child {
    opacity: 0.5;
}

.testament-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.testament-section {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.testament-title {
    background-color: #6c757d;
    color: white;
    padding: 15px;
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.book-selection {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
}

.book-select,
.chapter-input,
.verse-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.book-select:focus,
.chapter-input:focus,
.verse-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
}

.submit-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto 0;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Search Page Styles */
.search-content {
    padding: 30px;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.search-title {
    background-color: #6c757d;
    color: white;
    padding: 15px;
    margin: 0;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.search-form {
    padding: 30px;
}

.search-row {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-label {
    min-width: 200px;
    font-weight: bold;
    color: #495057;
    font-size: 1rem;
}

.search-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
}

.search-select,
.search-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-select:focus,
.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-right: 20px;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
}

.search-button-container {
    text-align: center;
    margin-top: 30px;
}

.search-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Chapters Page Styles */
.chapters-content {
    padding: 30px;
}

.chapters-container {
    max-width: 1000px;
    margin: 0 auto;
}

.testament-books {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.testament-column {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.testament-header {
    background-color: #6c757d;
    color: white;
    padding: 15px;
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.books-list {
    padding: 20px;
}

.book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.book-item:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    transform: translateX(5px);
}

.book-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.book-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.chapter-count {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    text-decoration: none;
}

.chapter-count:hover {
    text-decoration: underline;
}

/* Search Results Styles */
.results-content {
    padding: 30px;
}

.search-info {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
}

.search-query {
    font-size: 1.1rem;
    color: #495057;
}

.results-stats {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.results-list {
    margin-bottom: 30px;
}

.result-verse {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.result-verse:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.verse-reference {
    margin-bottom: 10px;
}

.verse-link {
    color: #007bff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

.verse-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.verse-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
}

.highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.pagination-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.nav-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.page-info {
    font-weight: bold;
    color: #495057;
}

.goto-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.goto-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    text-align: center;
}

.goto-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.goto-btn:hover {
    background-color: #218838;
}

/* Main Menu Styles */
.main-menu-content {
    padding: 40px;
}

.menu-container {
    max-width: 1000px;
    margin: 0 auto;
}

.menu-title {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.menu-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: #007bff;
}

.menu-card h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.menu-card p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.menu-link {
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.menu-link:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.language-info,
.features-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.language-info h3,
.features-info h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.language-list {
    display: grid;
    gap: 15px;
}

.language-item {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    background-color: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
    position: relative;
}

.features-list li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

/* Reader additions */
.reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
}

.btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn.secondary {
    background: #6c757d;
}

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

.select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.reader-container.slate {
    background: #f1f5f9;
    border-radius: 10px;
}

.verse {
    padding: 8px 10px;
    border-radius: 6px;
}

.verse-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.verse:hover {
    background: rgba(13, 110, 253, 0.08);
}

.verse .actions {
    margin-left: 8px;
    display: inline-flex;
    gap: 6px;
}

.icon-btn {
    background: #eef2ff;
    color: #0d6efd;
    border: 1px solid #c7d2fe;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.icon-btn:hover {
    background: #e0e7ff;
}

.reader-title {
    font-size: 24px;
    font-weight: 700;
}

/* Simple loading bar */
.loader {
    height: 4px;
    background: #e9ecef;
    overflow: hidden;
    border-radius: 2px
}

.loader .bar {
    height: 100%;
    width: 40%;
    background: #0d6efd;
    animation: loadSlide 1.2s infinite ease-in-out
}

@keyframes loadSlide {
    0% {
        transform: translateX(-100%)
    }

    50% {
        transform: translateX(150%)
    }

    100% {
        transform: translateX(300%)
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-banner h1 {
        font-size: 1.8rem;
    }

    .testament-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testament-books {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .search-label {
        min-width: auto;
    }

    .pagination-container {
        flex-direction: column;
        text-align: center;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        flex-direction: column;
        gap: 10px;
    }
}



.ml-line {
    margin-bottom: 1em;
}

/* Loading states */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loader {
    width: 40px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.loader .bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-state p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.loading-dots {
    animation: loading-dots 1.5s ease-in-out infinite;
}

@keyframes loading-dots {

    0%,
    20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    80%,
    100% {
        opacity: 0;
    }
}

/* Chapters page styles */
.chapters-content {
    padding: 30px;
}

.chapters-container {
    max-width: 1200px;
    margin: 0 auto;
}

.testament-books {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.testament-column {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.testament-header {
    background-color: #6c757d;
    color: white;
    padding: 15px;
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.books-list {
    padding: 20px 16px;
}

.book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
}

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

.book-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.book-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.chapter-count {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

.chapter-count:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

@media (max-width: 480px) {
    .container {
        margin: 0;
        box-shadow: none;
    }

    .main-nav {
        flex-direction: column;
    }

    .nav-item {
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .main-content,
    .search-content,
    .chapters-content,
    .results-content,
    .main-menu-content {
        padding: 8px 16px;
        margin: 12px 4px;
    }

    .book-selection,
    .search-form {
        padding: 20px;
    }
}

/* Responsive design for chapters page */
@media (max-width: 768px) {
    .testament-books {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .book-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .chapter-count {
        align-self: flex-end;
    }

    /* Language toggle responsive */
    .language-toggle {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .toggle-switch {
        width: 100px;
        height: 30px;
    }

    .toggle-switch input:checked+.toggle-slider:before {
        transform: translateX(70px);
    }

    .toggle-text {
        font-size: 0.9rem;
    }
}

/* Navigation Toggle Responsive */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
    }

    .nav-center {
        position: static;
        transform: none;
        width: 100%;
    }

    .nav-toggle {
        margin-top: 0;
        justify-content: center;
    }

    .nav-toggle .language-toggle {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .nav-toggle .toggle-switch {
        width: 100px;
        height: 26px;
    }

    .nav-toggle .toggle-switch input:checked+.toggle-slider:before {
        transform: translateX(52px);
    }

    .nav-toggle .toggle-text {
        font-size: 0.6rem;
    }
}

@media (min-width: 769px) {
    .main-nav {
        min-height: 60px;
    }
}

.results-container {
    max-width: min(1600px, 80vw);
    margin: 0px auto;
}

@media (max-width: 1024px) {

    /* tablets / small laptops */
    .results-container {
        max-width: 90vw;
    }
}

@media (max-width: 768px) {

    /* phones */
    .results-container {
        max-width: 94vw;
    }
}

/* Responsive text sizing for search results */
@media (max-width: 768px) {
    .result-verse.combined-verse {
        padding: 15px;
        margin-bottom: 15px;
    }

    .result-verse.combined-verse .verse-reference {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .result-verse.combined-verse .verse-text {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 10px;
        padding: 6px 10px;
    }

    .result-verse:not(.combined-verse) {
        padding: 12px;
        margin-bottom: 12px;
    }

    .result-verse:not(.combined-verse) .verse-reference {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .result-verse:not(.combined-verse) .verse-text {
        font-size: 1rem;
        line-height: 1.6;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .result-verse.combined-verse {
        padding: 12px;
        margin-bottom: 12px;
    }

    .result-verse.combined-verse .verse-reference {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .result-verse.combined-verse .verse-text {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 12px;
        padding: 5px 8px;
    }

    .result-verse:not(.combined-verse) {
        padding: 10px;
        margin-bottom: 10px;
    }

    .result-verse:not(.combined-verse) .verse-reference {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .result-verse:not(.combined-verse) .verse-text {
        font-size: 1rem;
        line-height: 1.6;
        word-break: break-word;
    }
}