* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    font-weight: 700;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.language-selector select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover,
.language-selector select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    min-height: calc(100vh - 140px);
}

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.books-section h3 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.category {
    margin-bottom: 25px;
}

.category h4 {
    color: #667eea;
    font-size: 1.2rem;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.category h4:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
    padding-right: 10px;
}

.category h4 .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.category h4.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.book-list.collapsed {
    display: none;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.book-item {
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
}

.book-item:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.book-item.active {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.reading-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.book-chapter-selector {
    display: flex;
    gap: 15px;
    flex: 1;
}

.book-chapter-selector select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.book-chapter-selector select:hover,
.book-chapter-selector select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary, .btn-secondary {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reading-area {
    flex: 1;
    margin-bottom: 25px;
}

.chapter-title {
    font-size: 2rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 25px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.chapter-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2d3748;
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.verse {
    margin-bottom: 15px;
    padding: 8px 0;
}

.verse:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

.verse-number {
    font-weight: bold;
    color: #667eea;
    margin-right: 8px;
    font-size: 0.9rem;
}

.verse-text {
    display: inline;
}

.welcome-message {
    text-align: center;
    padding: 50px;
    color: #718096;
}

.welcome-message i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #4a5568;
}

.navigation-controls {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.2rem;
    color: #4a5568;
}

.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.error-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.error-content i {
    font-size: 3rem;
    color: #e53e3e;
    margin-bottom: 20px;
}

.error-content h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 15px;
}

.error-content p {
    color: #718096;
    margin-bottom: 25px;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .reading-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .book-chapter-selector {
        flex-direction: column;
    }
    
    .book-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .navigation-controls {
        flex-direction: column;
    }
}