:root {
    --bg: #faf8f5;
    --bg-dark: #1a1a2e;
    --text: #2d2d2d;
    --text-light: #666;
    --gold: #c9a227;
    --sacred: #8b0000;
    --link: #1a5276;
    --border: #e0e0e0;
    --selected: #e8f4f8;
    --selected-border: #3498db;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.9;
    font-size: 19px;
}

/* Header */
header {
    background: var(--bg-dark);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    color: var(--gold);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
}

/* Navigation breadcrumb */
.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.nav-breadcrumb select {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.nav-breadcrumb select:hover {
    background: rgba(255,255,255,0.2);
}

.nav-breadcrumb span {
    color: #666;
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    width: 180px;
}

.search-box button {
    background: var(--gold);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 15px;
}

nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

nav a:hover { color: var(--gold); }

/* Main Content */
main {
    max-width: 750px;
    margin: 0 auto;
    padding: 25px 20px 100px;
}

h1 {
    font-size: 1.8rem;
    color: var(--bg-dark);
    margin-bottom: 5px;
}

.page-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gold);
}

h2 {
    font-size: 1.3rem;
    color: var(--bg-dark);
    margin: 25px 0 12px;
}

/* Chapter Content */
.chapter-content {
    background: white;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Verses */
.verse {
    display: block;
    margin-bottom: 0.6em;
    position: relative;
    padding: 4px 8px 4px 2.8em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.verse:hover {
    background: #f5f5f5;
}

.verse.selected {
    background: var(--selected);
    border-left: 3px solid var(--selected-border);
    margin-left: -3px;
}

.verse-num {
    position: absolute;
    left: 0;
    color: var(--text-light);
    font-size: 0.75em;
    text-decoration: none;
    width: 2.2em;
    text-align: right;
    user-select: none;
}

.verse-num:hover {
    color: var(--gold);
}

.verse:target {
    background: #fffacd;
    animation: highlight-fade 3s ease;
}

@keyframes highlight-fade {
    0% { background: #fff3a0; }
    100% { background: transparent; }
}

.sacred { color: var(--sacred); }

/* Selection Toolbar */
.selection-toolbar {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    padding: 12px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: bottom 0.3s ease;
    z-index: 200;
}

.selection-toolbar.visible {
    bottom: 25px;
}

.selection-toolbar .count {
    color: white;
    font-size: 0.9rem;
}

.selection-toolbar button {
    background: var(--gold);
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.selection-toolbar button.secondary {
    background: transparent;
    color: #aaa;
    border: 1px solid #666;
}

.selection-toolbar button.secondary:hover {
    color: white;
    border-color: white;
}

/* Book Grid */
.book-section {
    margin-bottom: 35px;
}

.book-section h2 {
    background: white;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    border-left: 4px solid var(--gold);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    background: white;
    padding: 15px;
    border-radius: 0 0 8px 8px;
}

.book-grid a {
    display: block;
    padding: 10px 12px;
    background: #f8f8f8;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    font-size: 0.95rem;
}

.book-grid a:hover {
    background: var(--gold);
    color: white;
}

.book-grid a span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 2px;
}

.book-grid a:hover span {
    color: rgba(255,255,255,0.8);
}

/* Chapter Grid */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 6px;
    margin: 15px 0;
}

.chapter-grid a {
    display: block;
    padding: 10px;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    text-align: center;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s;
}

.chapter-grid a:hover, .chapter-grid a.current {
    background: var(--gold);
    color: white;
}

/* Chapter Navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.chapter-nav a {
    color: var(--bg-dark);
    text-decoration: none;
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.chapter-nav a:hover {
    background: var(--gold);
    color: white;
}

/* Reading Controls */
.reading-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.85rem;
}

.reading-controls label {
    color: var(--text-light);
}

.reading-controls button {
    background: var(--bg-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.reading-controls .hint {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-left: auto;
}

/* Ministry Network */
.ministry-network {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 50px 20px;
    text-align: center;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.ministry-network h3 {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: normal;
}

.ministry-network .network-desc {
    color: #999;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.network-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.network-site {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(201, 162, 39, 0.2);
    border-radius: 12px;
    padding: 25px 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
    flex: 1;
    max-width: 280px;
}

.network-site:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.network-site.current {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--gold);
}

.network-site .site-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
}

.network-site .site-name {
    display: block;
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.network-site .site-desc {
    display: block;
    color: #888;
    font-size: 0.85rem;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: #888;
    text-align: center;
    padding: 35px 20px;
    font-size: 0.85rem;
}

footer a {
    color: var(--gold);
    text-decoration: none;
}

footer .links {
    margin-bottom: 15px;
}

footer .links a {
    margin: 0 12px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    display: none;
    z-index: 1000;
    font-size: 0.9rem;
}

.toast.show {
    display: block;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Homepage */
.homepage {
    max-width: 900px;
}

.hero-banner {
    text-align: center;
    padding: 30px 20px 25px;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero-banner h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.hero-banner .tagline {
    color: var(--sacred);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.sacred-names-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.sacred-names-list span {
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
}

/* Quick Find */
.quick-find {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-find label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
}

.quick-find select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.quick-find select:focus {
    border-color: var(--gold);
    outline: none;
}

.pdf-btn {
    background: var(--sacred);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.pdf-btn:hover {
    background: #a00;
}

/* Testament Tabs */
.testament-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    border-color: var(--gold);
}

.tab-btn.active {
    background: var(--bg-dark);
    color: white;
    border-color: var(--bg-dark);
}

.testament-content {
    display: none;
}

.testament-content.active {
    display: block;
}

.about-note {
    text-align: center;
    padding: 25px;
    background: white;
    border-radius: 10px;
    margin-top: 25px;
}

.about-note p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.about-note a {
    color: var(--sacred);
    font-weight: 600;
    text-decoration: none;
}

.about-note a:hover {
    text-decoration: underline;
}

/* Verse Number Toggle */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}

.reading-controls .divider {
    color: var(--border);
}

/* Hide verse numbers when toggled off */
body.hide-verse-nums .verse-num {
    display: none;
}

body.hide-verse-nums .verse {
    padding-left: 8px;
}

/* Legacy Intro Box (for other pages) */
.intro-box {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.intro-box p {
    margin-bottom: 12px;
}

.download-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--sacred);
    font-weight: bold;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid var(--sacred);
    border-radius: 25px;
    transition: all 0.2s;
}

.download-link:hover {
    background: var(--sacred);
    color: white;
}

/* Verse Page Styles */
.verse-page {
    max-width: 700px;
    margin: 0 auto;
}

.verse-header {
    margin-bottom: 20px;
}

.back-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--gold);
}

.verse-main {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.main-verse {
    font-size: 1.4rem;
    line-height: 1.9;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--text);
}

.verse-attribution {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.verse-actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.action-btn {
    background: var(--bg-dark);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.action-btn:hover {
    background: var(--gold);
}

.verse-context {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.verse-context h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.context-verses {
    border-left: 3px solid var(--border);
    padding-left: 20px;
}

.context-verse {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-light);
}

.context-verse.current {
    color: var(--text);
    font-weight: 500;
    background: #fffde7;
    margin-left: -20px;
    padding-left: 17px;
    border-left: 3px solid var(--gold);
}

.context-num {
    color: var(--text-light);
    font-size: 0.8em;
    margin-right: 8px;
    text-decoration: none;
}

a.context-num:hover {
    color: var(--gold);
}

.read-chapter-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--bg-dark);
    font-weight: 500;
    text-decoration: none;
}

.read-chapter-link:hover {
    color: var(--gold);
}

.verse-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.verse-nav a {
    color: var(--bg-dark);
    text-decoration: none;
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
}

.verse-nav a:hover {
    background: var(--gold);
    color: white;
}

/* About/Content Page Styles */
.about-content h2 {
    margin-top: 30px;
}

.about-content p {
    margin-bottom: 15px;
}

.names-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.names-table th, .names-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.names-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.scripture-quote {
    background: #f8f8f8;
    padding: 20px 25px;
    border-left: 4px solid var(--gold);
    margin: 20px 0;
    font-style: italic;
}

.scripture-quote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* FAQ Styles */
.faq-content .faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

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

.faq-content h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--bg-dark);
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: 10px 15px;
        gap: 10px;
    }
    .logo { font-size: 1rem; }
    .nav-breadcrumb { order: 3; width: 100%; }
    .search-box { order: 2; }
    .search-box input { width: 120px; }
    nav { display: none; }
    main { padding: 15px 12px 80px; }
    h1 { font-size: 1.4rem; }
    body { font-size: 17px; }
    .chapter-content { padding: 15px; }
    .verse { padding-left: 2.2em; }
    .verse-num { width: 1.8em; font-size: 0.7em; }
    .book-grid { grid-template-columns: repeat(2, 1fr); }
    .reading-controls .hint { display: none; }
    .main-verse { font-size: 1.2rem; }
    .verse-main { padding: 20px; }
    .verse-actions-bar { flex-direction: column; }
}
