/* Bible Reader Styles - Shared CSS for all Bible books */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary, #2c3e50);
    background: linear-gradient(135deg, var(--bg-gradient-start, #f5f7fa) 0%, var(--bg-gradient-end, #c3cfe2) 100%);
    min-height: 100vh;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-primary, white);
    box-shadow: 0 10px 30px var(--shadow-color, rgba(0,0,0,0.1));
    border-radius: 10px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Extended to 1200px for landing page */
.container.wide {
    max-width: 1200px;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid #3498db;
}

.title {
    font-size: 2.5rem;
    color: var(--text-primary, #2c3e50);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: #5a6c7d;
    font-style: italic;
}

/* Translation selector from legacy index.html */
.translation-selector {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.translation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.translation-select {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary, white);
    color: var(--text-primary, #2c3e50);
    cursor: pointer;
    min-width: 200px;
}

.translation-select:focus {
    outline: 2px solid #f39c12;
}

.active-translation {
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
}

/* Book grid styles from legacy */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.book-card {
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.book-card.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--chapter-link-bg, #f5f5f5);
}

.book-card.unavailable:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.book-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2471a3;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.book-card.unavailable .book-title {
    color: #6c7a89;
}

.book-meta {
    color: #5a6c7d;
    font-size: 0.875rem;
    margin-bottom: 0.8rem;
}

.book-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-primary, #2c3e50);
}

.book-card.unavailable .book-stats {
    color: #6c7a89;
}

.testament-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.nt {
    background: #e8f5e8;
    color: #27ae60;
}

.ot {
    background: #fdf2e9;
    color: #e67e22;
}

.book-card.unavailable .testament-badge {
    background: #ecf0f1;
    color: #6c7a89;
}

.testament-section {
    margin-bottom: 3rem;
}

.testament-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.testament-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.testament-stats {
    font-size: 1rem;
    opacity: 0.9;
}

.stats-summary {
    background: var(--bg-secondary, #f8f9fa);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    border: 3px solid #27ae60;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: var(--bg-primary, white);
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #ecf0f1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2471a3;
}

.stat-label {
    font-size: 0.875rem;
    color: #5a6c7d;
}

.quick-nav {
    background: var(--bg-secondary, #f8f9fa);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid #e9ecef;
}

.quick-nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.quick-nav-links a {
    color: #2471a3;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.quick-nav-links a:hover {
    background: #e8f4fd;
}

/* Chapter styles for Bible pages */
.chapter {
    margin-bottom: 2rem;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chapter-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.chapter-header:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

.chapter-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
}

.chapter-toggle {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.chapter-toggle.expanded {
    transform: rotate(180deg);
}

.chapter-content {
    padding: 2rem;
    background: #fafbfc;
    display: none;
    border-top: 1px solid #ecf0f1;
}

.chapter-content.expanded {
    display: block;
}

.chapter-text {
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: left;
    color: var(--text-primary, #2c3e50);
    max-width: 65ch;
    margin: 0 auto;
}

.verse-number {
    font-size: 0.875rem;
    color: #2471a3;
    font-weight: 600;
    vertical-align: super;
    margin-right: 0.3rem;
}

.chapter-stats {
    background: #e8f4fd;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    color: #1a5490;
    border-top: 1px solid #d6eaf8;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
    color: #5a6c7d;
    font-style: italic;
}

.footer-links {
    margin-top: 1rem;
    font-style: normal;
}

.footer-links a {
    color: #2471a3;
    text-decoration: none;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1a5490;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .chapter-content {
        padding: 1.5rem;
    }
    
    .chapter-text {
        font-size: 1rem;
        max-width: 100%;
    }
}

/* Improved contrast for better legibility */
.verse {
    display: inline;
}

.verse-text {
    display: inline;
}

/* Ensure proper spacing between verses */
.verses {
    text-align: left;
}

/* Better link contrast */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Improved focus states for accessibility */
*:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .container {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .title {
        color: #ecf0f1;
    }
    
    .subtitle {
        color: #bdc3c7;
    }
    
    .book-info {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .chapter {
        border-color: #2c3e50;
    }
    
    .chapter-content {
        background: #2c3e50;
        border-color: #34495e;
    }
    
    .chapter-text {
        color: #ecf0f1;
    }
    
    .chapter-stats {
        background: #2c3e50;
        border-color: #34495e;
    }
    
    .footer {
        border-color: #2c3e50;
        color: #bdc3c7;
    }
}