/* 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: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex: 1;
}

.tts-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover,
.nav-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Main Content */
main {
    padding: 2rem 0;
}

.section {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
}

/* Books Section */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.book-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
}

.book-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.book-phonetic {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Times New Roman', serif;
}

.book-paleo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chapter-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.chapter-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.chapter-card:hover {
    transform: scale(1.05);
}

/* Verses */
.verses-container {
    margin-top: 2rem;
}

.verse-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.verse-number {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.verse-paleo {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

.verse-hebrew {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    direction: rtl;
    text-align: right;
    font-family: 'Times New Roman', serif;
}

.verse-transliteration {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

.verse-english {
    color: #333;
}

.verse-paleo-transliteration {
    font-style: italic;
    color: #d63384;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.verse-modern-transliteration {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

.verse-literal {
    color: #495057;
    font-size: 0.9rem;
    font-style: italic;
    padding: 0.5rem;
    background: #f8f9fa;
    border-left: 3px solid #6f42c1;
    border-radius: 3px;
    margin-top: 0.5rem;
}

/* Alphabet Section */
.alphabet-intro {
    text-align: center;
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.letter-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.letter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(252, 182, 159, 0.3);
}

.letter-symbols {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.hebrew-letter {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.paleo-symbol {
    font-size: 2rem;
    color: #d63384;
}

.letter-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.letter-meaning {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Search Section */
.search-container {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-wrap: wrap;
}

#search-input {
    flex: 2;
    min-width: 250px;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #667eea;
}

#search-type {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.search-btn:hover {
    transform: translateY(-2px);
}

.search-results {
    margin-top: 2rem;
}

.search-result {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
}

.result-reference {
    font-weight: bold;
    color: #28a745;
    margin-bottom: 0.5rem;
}

/* Converter Section */
.converter-container {
    max-width: 800px;
    margin: 0 auto;
}

.converter-form {
    margin-bottom: 2rem;
}

.converter-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

#hebrew-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    resize: vertical;
    direction: rtl;
    text-align: right;
}

.convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: transform 0.3s ease;
}

.convert-btn:hover {
    transform: translateY(-2px);
}

.conversion-result {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
}

.result-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.result-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.hebrew-text {
    font-size: 1.3rem;
    direction: rtl;
    text-align: right;
    font-family: 'Times New Roman', serif;
}

.paleo-text {
    font-size: 1.3rem;
    direction: rtl;
    text-align: right;
    color: #d63384;
}

.pronunciation-text {
    font-size: 1.1rem;
    font-style: italic;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.letter-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 1rem;
}

.letter-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 10px;
}

.letter-display .hebrew-letter,
.letter-display .paleo-symbol {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.letter-info .info-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.letter-info .info-item strong {
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

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

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: #5a6268;
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 2px solid #e9ecef;
    gap: 1rem;
}

.nav-chapter-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 50px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-chapter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.nav-chapter-btn:active {
    transform: translateY(0);
}

.nav-chapter-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nav-chapter-btn i {
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .main-nav .container {
        flex-wrap: wrap;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    #search-input {
        min-width: auto;
    }
    
    .letter-details {
        grid-template-columns: 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tts-controls {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

/* ==================== TTS CONTROLS ==================== */

.tts-control-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tts-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.tts-control-btn.tts-disabled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.tts-control-btn.tts-disabled:hover {
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.tts-speed-select {
    padding: 0.5rem;
    border: 2px solid #28a745;
    border-radius: 10px;
    background: white;
    color: #28a745;
    font-size: 0.9rem;
    cursor: pointer;
}

.tts-speed-select:focus {
    outline: none;
    border-color: #20c997;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.tts-btn {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tts-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.tts-btn.playing {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.tts-btn i {
    font-size: 0.8rem;
}

/* Verse Header with TTS */
.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.verse-number {
    font-weight: bold;
    color: #667eea;
    margin: 0;
}

/* Search Result Header with TTS */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.result-reference {
    font-weight: bold;
    color: #28a745;
    margin: 0;
}

/* Letter Card TTS Button */
.letter-card {
    position: relative;
}

.letter-tts {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.letter-card:hover .letter-tts {
    opacity: 1;
}

/* TTS Status Indicator */
.tts-playing {
    border-left: 4px solid #ffc107 !important;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
}

/* TTS Instructions */
.tts-instructions {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    font-size: 0.9rem;
}

.tts-instructions h4 {
    color: #1976d2;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.tts-instructions ul {
    margin-left: 1.5rem;
    color: #424242;
}

.tts-instructions li {
    margin-bottom: 0.3rem;
}

/* Loading state for TTS */
.tts-loading {
    opacity: 0.6;
    cursor: wait;
}

.tts-loading i::before {
    content: "\f110";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Strong's Concordance Styles */
.strongs-container {
    max-width: 1000px;
    margin: 0 auto;
}

.strongs-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.strongs-search input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.strongs-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.strongs-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab-btn.active,
.tab-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.strongs-entries {
    display: grid;
    gap: 1.5rem;
}

.strongs-entry {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.strongs-entry:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.strongs-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.strong-number {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.language-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.language-badge.hebrew {
    background: #e8f5e8;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.language-badge.greek {
    background: #e8f4fd;
    color: #3498db;
    border: 1px solid #3498db;
}

.word-display {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.hebrew-word {
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: bold;
    direction: rtl;
    text-align: right;
}

.greek-word {
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: bold;
}

.paleo-word {
    font-family: 'Times New Roman', serif;
    font-size: 1.4rem;
    color: #8b4513;
    font-weight: bold;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.transliteration {
    color: #7f8c8d;
    font-style: italic;
    font-size: 1.1rem;
    direction: ltr;
    text-align: left;
}

.separator {
    color: #bdc3c7;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0.2rem;
}

.strongs-content {
    line-height: 1.6;
}

.meaning {
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.definition {
    color: #34495e;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.root-meaning-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.root-meaning-label {
    font-weight: bold;
    color: #495057;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.root-meaning-label::before {
    content: "🌱";
    margin-right: 0.5rem;
}

.root-meaning-content {
    line-height: 1.5;
}

.pictographic-analysis {
    color: #6f42c1;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.formation-explanation {
    color: #198754;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.original-concept {
    color: #fd7e14;
    font-size: 0.95rem;
    padding: 0.5rem;
    background: rgba(253, 126, 20, 0.1);
    border-radius: 4px;
    border-left: 3px solid #fd7e14;
}

.usage-count {
    color: #95a5a6;
    font-size: 0.9rem;
    font-style: italic;
}

.loading-message,
.error-message,
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.error-message {
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Dictionary Styles */
.dictionary-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dictionary-intro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.dictionary-intro p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.dictionary-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dictionary-search input {
    flex: 1;
    min-width: 250px;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.dictionary-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dictionary-analyzer {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.dictionary-analyzer h4 {
    color: #495057;
    margin-bottom: 1rem;
}

.analyzer-input {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.analyzer-input input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
}

.analyze-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dictionary-entries {
    display: grid;
    gap: 1.5rem;
}

.dictionary-entry {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dictionary-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.entry-header {
    margin-bottom: 1rem;
}

.english-meaning {
    font-weight: 600;
    color: #27ae60;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.pictographic-preview {
    color: #6c757d;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.strong-ref {
    font-size: 0.9rem;
    color: #007bff;
    font-weight: 500;
}

.analysis-result {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.word-analysis {
    line-height: 1.6;
}

.analysis-header {
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.root-analysis {
    margin-bottom: 2rem;
}

.root-analysis h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.letter-breakdown {
    display: grid;
    gap: 0.75rem;
}

.letter-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
    border-left: 4px solid #667eea;
}

.letter-paleo-primary {
    font-size: 2rem;
    color: #e67e22;
    font-family: 'Noto Sans Old South Arabian', serif;
    text-align: center;
    min-width: 50px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.letter-hebrew {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    min-width: 30px;
}

.letter-paleo {
    font-size: 1.4rem;
    color: #e67e22;
    font-family: 'Noto Sans Old South Arabian', serif;
    text-align: center;
    min-width: 30px;
}

.letter-meaning {
    color: #495057;
    font-weight: 500;
}

.pictographic-section,
.original-concept,
.formation-explanation {
    margin-bottom: 2rem;
}

.pictographic-section h4,
.original-concept h4,
.formation-explanation h4 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.pictographic-section p,
.original-concept p,
.formation-explanation p {
    color: #6c757d;
    line-height: 1.6;
}

.usage-examples {
    margin-bottom: 1.5rem;
}

.usage-examples h4 {
    color: #495057;
    margin-bottom: 1rem;
}

.example-item {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 8px 8px 0;
}

.example-item strong {
    color: #007bff;
}

.first-occurrence,
.frequency {
    background: #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #495057;
}

.hidden {
    display: none;
}

/* Word Overlay Styles */
.word-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.word-overlay-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: wordOverlaySlideIn 0.3s ease-out;
    padding-top: 1rem;
}

@keyframes wordOverlaySlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.word-overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1001;
}

.word-overlay-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: scale(1.1);
}

.word-overlay-header {
    background: white;
    color: #1f2937;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid #e5e7eb;
}

.word-overlay-header .word-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.word-overlay-header .hebrew-word {
    font-size: 1.8rem;
    font-weight: bold;
}

.word-overlay-header .paleo-word {
    font-size: 1.8rem;
    font-family: 'Noto Sans Old South Arabian', serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.word-overlay-header .transliteration {
    font-size: 1.1rem;
    font-style: italic;
}

.word-overlay-header .english-meaning {
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.95;
}

.word-overlay-header .arrow {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.word-overlay-body {
    padding: 2rem;
    background: white;
}

/* Word display sequence in white area */
.word-display-sequence {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    flex-wrap: wrap;
}

.word-display-sequence .hebrew-word {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1f2937;
}

.word-display-sequence .paleo-word {
    font-size: 1.8rem;
    font-family: 'Noto Sans Old South Arabian', serif;
    color: #f59e0b;
    text-shadow: none;
}

.word-display-sequence .transliteration {
    font-size: 1.1rem;
    font-style: italic;
    color: #6b7280;
}

.word-display-sequence .english-word {
    font-size: 1.2rem;
    font-weight: 600;
    color: #10b981;
}

.word-display-sequence .arrow {
    color: #9ca3af;
    font-size: 1rem;
}

/* New overlay styles matching the design */
.strong-number-badge {
    background: #6366f1;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.word-overlay-header .english-meaning {
    font-size: 1.4rem;
    color: #10b981;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
}

.word-overlay-header .definition {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.root-meaning-section {
    background: rgba(243, 244, 246, 0.5);
    border-left: 4px solid #10b981;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.pictographic-breakdown {
    font-size: 1.1rem;
    color: #8b5cf6;
    margin: 0.5rem 0;
    font-weight: 500;
}

.formation-explanation {
    font-size: 1rem;
    color: #10b981;
    margin: 0.5rem 0;
    font-weight: 500;
}

.formation-summary {
    background: #f97316;
    color: white;
    padding: 0.5rem;
    border-left: 4px solid #ea580c;
    margin: 0.5rem 0;
    border-radius: 4px;
}

.formation-summary-text {
    font-size: 1rem;
    font-weight: 500;
}

.usage-info {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.usage-count {
    font-size: 0.9rem;
    color: #9ca3af;
    font-style: italic;
}

.root-analysis-section {
    margin-bottom: 2rem;
}

.root-analysis-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.root-analysis-section .pictographic-analysis {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.75rem;
    color: #6f42c1;
    font-weight: 500;
    font-style: italic;
}

.root-analysis-section .formation-explanation {
    color: #198754;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.root-analysis-section .original-concept {
    background: rgba(253, 126, 20, 0.1);
    border-left: 3px solid #fd7e14;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    color: #fd7e14;
    font-size: 0.95rem;
    line-height: 1.5;
}

.letter-breakdown-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.letters-container {
    display: grid;
    gap: 0.5rem;
}

.overlay-letter-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    border-left: 3px solid #667eea;
}

.overlay-letter-paleo {
    font-size: 1.5rem;
    color: #e67e22;
    font-family: 'Noto Sans Old South Arabian', serif;
    font-weight: bold;
    text-align: center;
    min-width: 35px;
}

.overlay-letter-meaning {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Interactive Hebrew words */
.paleo-word-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 0.1rem 0.2rem;
    margin: 0 1px;
}

.paleo-word-interactive:hover {
    background-color: rgba(128, 128, 128, 0.3) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Keep the old styles for backwards compatibility */
.hebrew-word-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 0.1rem 0.2rem;
}

.hebrew-word-interactive:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .word-overlay-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .word-display-sequence {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .word-overlay-body {
        padding: 1.5rem;
    }
    
    .overlay-letter-item {
        grid-template-columns: auto 1fr;
        gap: 0.75rem;
    }
}

/* Responsive design for Dictionary */
@media (max-width: 768px) {
    .dictionary-search {
        flex-direction: column;
    }
    
    .dictionary-search input {
        min-width: 100%;
    }
    
    .analyzer-input {
        flex-direction: column;
    }
    
    .analyzer-input input {
        min-width: 100%;
    }
    
    .letter-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    .letter-paleo-primary {
        font-size: 1.8rem;
        min-width: 40px;
    }
    
    .analysis-result {
        padding: 1.5rem;
    }
}

/* Chapter navigation responsive */
@media (max-width: 768px) {
    .chapter-navigation {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .nav-chapter-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 0.95rem;
    }
}

/* Responsive design for Strong's */
@media (max-width: 768px) {
    .strongs-search {
        flex-direction: column;
    }
    
    .strongs-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .strongs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hebrew-word {
        font-size: 1.3rem;
    }
}

/* Authentication Styles */
.auth-controls {
    text-align: right;
    margin-bottom: 1rem;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background: #dc2626;
}

.login-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.login-prompt p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
}

.login-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.login-btn:hover {
    background: #5856eb;
}

/* Admin Authentication Responsive */
@media (max-width: 768px) {
    .auth-controls {
        text-align: center;
    }
    
    .login-prompt {
        padding: 2rem 1rem;
        margin: 0 1rem;
    }
    
    .login-btn {
        width: 100%;
        text-align: center;
    }
}