/* ==========================================
   Quran Research & Translation Project
   Global Dark Theme Stylesheet (style.css)
   ========================================== */

/* 1. Reset & Global Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. Base Setup (Dark Theme) */
body {
    font-family: 'SolaimanLipi', 'Kalpurush', 'Segoe UI', Arial, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    line-height: 1.8;
    padding: 15px;
}

/* 3. Main Container */
.container {
    max-width: 850px;
    margin: 0 auto;
    background: #161b22;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #30363d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 4. Surah Header Section */
.header {
    text-align: center;
    border-bottom: 2px solid #21262d;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 26px;
    color: #58a6ff;
    margin-bottom: 8px;
    font-weight: 700;
}

.header .meta-info {
    color: #8b949e;
    font-size: 14px;
    margin-top: 6px;
}

/* 5. Bismillah Box */
.bismillah-box {
    background-color: #1c2128;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 25px;
}

.bismillah-arabic {
    font-family: 'Meaney', 'Amiri', 'Traditional Arabic', serif;
    font-size: 24px;
    color: #2ea043;
    margin-bottom: 8px;
    display: block;
    line-height: 1.6;
}

.bismillah-meaning {
    font-size: 15px;
    color: #3fb950;
    font-weight: bold;
}

/* 6. Verse Card (Optimized for 200+ Ayah Performance) */
.verse-card {
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #161b22;
    content-visibility: auto;
    contain-intrinsic-size: 0 250px;
    scroll-margin-top: 20px;
}

.verse-num {
    font-size: 14px;
    font-weight: bold;
    color: #58a6ff;
    margin-bottom: 12px;
}

/* 7. Word-by-Word Grid (Strictly 3 boxes per row) */
.word-by-word-container {
    display: flex;
    flex-wrap: wrap;
    direction: rtl;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 15px;
}

.word-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1c2128;
    border: 1px solid #30363d;
    padding: 10px 4px;
    border-radius: 6px;
    width: calc(33.333% - 6px);
    max-width: calc(33.333% - 6px);
    box-sizing: border-box;
    transition: background-color 0.2s;
}

.word-box:hover {
    background-color: #2d333b;
}

.arabic-word {
    font-family: 'Meaney', 'Amiri', 'Traditional Arabic', serif;
    font-size: 22px;
    color: #e6edf3;
    margin-bottom: 4px;
    direction: rtl;
    text-align: center;
}

.verified-meaning {
    font-size: 13.5px;
    color: #3fb950;
    font-weight: bold;
    direction: ltr;
    text-align: center;
    line-height: 1.4;
}

/* 8. Transliteration (Pronunciation) Box */
.transliteration-box {
    display: none;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #1f242c;
    border-left: 3px solid #d29922;
    border-radius: 4px;
    font-style: italic;
    font-size: 14.5px;
    color: #e6edf3;
}

.trans-toggle-btn {
    background-color: #21262d;
    color: #3fb950;
    border: 1px solid #30363d;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.2s;
    margin-top: 4px;
    margin-bottom: 6px;
}

.trans-toggle-btn:hover {
    background-color: #30363d;
    color: #ffffff;
}

/* 9. Full Sentence Translation */
.full-translation {
    background-color: #1c2128;
    border-left: 4px solid #2ea043;
    padding: 12px 15px;
    border-radius: 0 6px 6px 0;
    font-size: 15.5px;
    color: #f0f6fc;
    direction: ltr;
    line-height: 1.8;
}

/* 10. Copy / Share Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-buttons .trans-toggle-btn {
    margin: 0;
    color: #c9d1d9;
}

/* 11. Navigation Buttons */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 2px solid #21262d;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    text-decoration: none;
    color: #ffffff;
    background-color: #238636;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}

.nav-btn:hover {
    background-color: #2ea043;
}
