/* ============================================
   📚 BOOK ENHANCED STYLES
   الداء والدواء - تصميم بصري محسن
   ============================================ */

/* ============================================
   🎨 CSS VARIABLES
   ============================================ */
:root {
    /* Primary Colors */
    --color-purple: #8b5cf6;
    --color-purple-dark: #7c3aed;
    --color-pink: #ec4899;
    --color-blue: #3b82f6;
    --color-green: #10b981;
    --color-green-dark: #059669;
    --color-amber: #f59e0b;
    --color-amber-dark: #d97706;
    --color-red: #ef4444;
    --color-brown: #8c6b3d;
    --color-gold: #d4af37;
    --color-gold-light: #f4d03f;

    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
}

/* ============================================
   🧭 SITE NAVIGATION BAR - شريط التنقل الموحد
   ============================================ */
.site-nav {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}

.nav-logo i {
    color: #d4af37;
    font-size: 1.3rem;
}

.nav-logo:hover {
    color: #d4af37;
}

.site-nav .nav-links {
    display: flex;
    gap: 1.5rem;
}

.site-nav .nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.site-nav .nav-links a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
}

.site-nav .nav-links a i {
    font-size: 0.9rem;
}

/* Mobile Navigation */
@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 0.8rem;
    }

    .site-nav .nav-links {
        gap: 0.5rem;
    }

    .site-nav .nav-links a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }
}

/* ============================================
   📊 READING PROGRESS BAR
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-purple), var(--color-pink));
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* ============================================
   📖 QURAN MIHRAB - المحراب الرقمي للآيات
   (اللون الأخضر - مثل بطاقة باب القدر)
   ============================================ */
/* ============================================
   📖 QURAN MIHRAB - المحراب الرقمي للآيات
   (اللون الأخضر - تصميم نظيف وعصري)
   ============================================ */
.quran-mihrab {
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-right: 6px solid #10b981;
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    margin: 2.5rem 0;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08);
}

.quran-mihrab::before {
    content: '📖';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 1.4rem;
    background: #10b981;
    color: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    z-index: 10;
}

.quran-mihrab p {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #064e3b;
    line-height: 2.4;
    margin: 0;
}

/* ============================================
   📿 HADITH SHRINE - محراب الأحاديث النبوية
   (اللون العنبري - مثل بطاقة باب القدر والأسباب)
   ============================================ */
/* ============================================
   📿 HADITH SHRINE - محراب الأحاديث النبوية
   (اللون العنبري - تصميم نظيف وعصري)
   ============================================ */
.hadith-shrine {
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-right: 6px solid #f59e0b;
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    margin: 2.5rem 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.08);
}

.hadith-shrine::before {
    content: '📿';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 1.4rem;
    background: #f59e0b;
    color: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    z-index: 10;
}

.hadith-shrine p {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #78350f;
    line-height: 2.2;
    margin: 0;
    text-align: center;
}

/* ============================================
   💎 GEM CALLOUT - بطاقة الجوهر
   (اللون البنفسجي - مثل بطاقة المقدمة)
   ============================================ */
.gem-callout {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    position: relative;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.08) !important;
    color: inherit !important;
}

.gem-callout::before {
    content: '💎';
    position: absolute;
    top: -12px;
    right: 20px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.gem-callout p {
    font-family: 'Cairo', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #7c3aed;
    margin: 0;
    text-align: center;
    line-height: 1.8;
}

/* ============================================
   🎭 POETRY STAGE - مسرح الشعر
   ============================================ */
.poetry-stage {
    background: linear-gradient(135deg, rgba(140, 107, 61, 0.06) 0%, rgba(176, 141, 85, 0.03) 100%);
    border-right: 5px solid var(--color-brown);
    border-radius: 0 16px 16px 0;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    position: relative;
}

.poetry-stage::before {
    content: '🪶';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 1.5rem;
    background: white;
    padding: 0.3rem 0.6rem;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(140, 107, 61, 0.2);
}

.poetry-verse {
    font-family: 'Cairo', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #5e482d;
    line-height: 2.2;
    font-style: italic;
}

/* ============================================
   📝 CONTENT STRUCTURE - هيكل المحتوى المحسن
   ============================================ */

/* عناوين الفصول الرئيسية */
.book-content h2.chapter-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #8b5cf6;
    margin: 3rem 0 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.04) 100%);
    border-radius: 16px;
    border-right: 6px solid #8b5cf6;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.book-content h2.chapter-title:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.15);
}

.book-content h2.chapter-title i {
    color: #8b5cf6;
    font-size: 1.5rem;
}

/* العناوين الفرعية */
.book-content h3.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
    margin: 2.5rem 0 1.25rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
    border-radius: 12px;
    border-right: 5px solid #10b981;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.08);
    transition: all 0.3s ease;
}

.book-content h3.section-title:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.12);
}

.book-content h3.section-title i {
    color: #10b981;
    font-size: 1.3rem;
}

/* العناوين الفرعية الصغيرة */
.book-content h4.subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f59e0b;
    margin: 2rem 0 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.04) 100%);
    border-radius: 10px;
    border-right: 4px solid #f59e0b;
    position: relative;
    padding-right: 2.5rem;
    transition: all 0.3s ease;
}

.book-content h4.subsection-title::before {
    content: '▸';
    position: absolute;
    right: 1rem;
    color: #f59e0b;
    font-size: 1.2rem;
}

.book-content h4.subsection-title:hover {
    transform: translateX(-3px);
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.1);
}

/* الفقرات */
.book-content p {
    font-size: 1.15rem;
    line-height: 2;
    color: #374151;
    margin: 1.5rem 0;
    text-align: justify;
    font-family: 'Cairo', sans-serif;
}

/* الفقرات بعد العناوين مباشرة */
.book-content h2 + p,
.book-content h3 + p,
.book-content h4 + p {
    margin-top: 1.25rem;
}

/* تباعد محسن للعناصر */
.book-content > *:first-child {
    margin-top: 0;
}

/* ============================================
   📝 LISTS - القوائم المنسقة
   ============================================ */

.book-content ul,
.book-content ol {
    margin: 1.5rem 0;
    padding-right: 2rem;
    line-height: 2;
}

.book-content li {
    font-size: 1.1rem;
    color: #374151;
    margin: 0.75rem 0;
    font-family: 'Cairo', sans-serif;
}

.book-content ul li::marker {
    color: #8b5cf6;
    font-size: 1.2rem;
}

.book-content ol li::marker {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
}

/* قوائم مرقمة خاصة */
.numbered-list {
    counter-reset: custom-counter;
    list-style: none;
    padding-right: 0;
}

.numbered-list li {
    counter-increment: custom-counter;
    position: relative;
    padding-right: 3rem;
    margin: 1rem 0;
}

.numbered-list li::before {
    content: counter(custom-counter);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* قوائم الفوائد */
.benefits-list {
    list-style: none;
    padding-right: 0;
}

.benefits-list li {
    position: relative;
    padding-right: 2.5rem;
    margin: 1rem 0;
}

.benefits-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* ============================================
   ⚠️ WARNING BOX - صندوق التحذير
   ============================================ */
.warning-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.04) 100%);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-right: 6px solid var(--color-red);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.warning-box::before {
    content: '⚠️';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 1.5rem;
    background: white;
    padding: 0.3rem 0.6rem;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.2);
}

.warning-box p {
    color: #991b1b;
    font-weight: 600;
}

/* ============================================
   💡 BENEFIT BOX - صندوق الفائدة
   ============================================ */
.benefit-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-right: 6px solid var(--color-blue);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.benefit-box::before {
    content: '💡';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 1.5rem;
    background: white;
    padding: 0.3rem 0.6rem;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
}

.benefit-box p {
    color: #1e40af;
}

/* ============================================
   📊 COMPARISON TABLE - جدول المقارنة
   ============================================ */
.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.comparison-column {
    padding: 1.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.comparison-column.disease {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 2px solid rgba(239, 68, 68, 0.2);
}

.comparison-column.cure {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
}

.comparison-column h4 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.2rem;
    margin: 0 0 1rem;
    text-align: center;
}

.comparison-column.disease h4 {
    color: var(--color-red);
}

.comparison-column.cure h4 {
    color: var(--color-green);
}

/* ============================================
   🔄 FLOW CHART - خريطة التدفق
   ============================================ */
.flow-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.flow-step {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-purple);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--color-purple);
}

/* ============================================
   ❤️ HEART STATUS ICONS
   ============================================ */
.heart-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.heart-status.healthy::before {
    content: '💚';
}

.heart-status.sick::before {
    content: '💔';
}

.heart-status.healing::before {
    content: '💛';
}

/* ============================================
   🌙 DARK MODE SUPPORT
   ============================================ */
/* الوضع الليلي اليدوي فقط */
body.dark-mode .gem-callout {
    background: rgba(30, 30, 30, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark mode media query removed */

/* ============================================
   📱 RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {

    .quran-mihrab,
    .hadith-shrine,
    .gem-callout {
        padding: 1.5rem;
    }

    .quran-mihrab p,
    .gem-callout p {
        font-size: 1.2rem;
    }

    .comparison-table {
        grid-template-columns: 1fr;
    }

    .flow-chart {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }
}

/* ============================================
   🗺️ PROGRESS SIDEBAR - المسار المعرفي
   ============================================ */
.content-with-sidebar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    position: relative;
}

/* ============================================
   📖 BOOK CONTENT - المحتوى الرئيسي
   (Restored original typography from styles.css)
   ============================================ */
.book-content {
    font-size: 1.25rem;
    line-height: 1.9;
    color: #3d2f1f;
}

.book-content p {
    margin-bottom: 1.75rem;
    text-align: justify;
}

.book-content h2 {
    font-size: 2.25rem;
    margin: 0 0 2rem;
    color: #3d2f1f;
    font-weight: 800;
    border-bottom: 4px solid #b08d55;
    padding-bottom: 0.75rem;
    display: inline-block;
    scroll-margin-top: 100px;
}

.book-content h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: #5e482d;
    font-weight: 700;
}

/* TOC Container in book content */
.toc-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(140, 107, 61, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 15px 35px rgba(140, 107, 61, 0.08);
}

.toc-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #3d2f1f;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(140, 107, 61, 0.15);
}

.toc-container .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.toc-container .toc-item {
    margin: 0;
    padding: 0;
}

.toc-container .toc-item a {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #5e482d;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    border-radius: 8px;
    transition: all 0.3s;
}

.toc-container .toc-item a:hover {
    background: rgba(140, 107, 61, 0.08);
    color: #b08d55;
}

/* Navigation buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(140, 107, 61, 0.15);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(140, 107, 61, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: #5e482d;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-nav:hover {
    background: #b08d55;
    color: white;
    border-color: #b08d55;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #5e482d 0%, #8c6b3d 50%, #b08d55 100%);
    padding: 2.5rem 0;
    color: white;
    position: relative;
}

.page-header .page-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.page-header .page-breadcrumb {
    font-size: 0.95rem;
    opacity: 0.9;
}

.page-header .page-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.page-header .page-breadcrumb a:hover {
    color: white;
}

.progress-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.progress-map {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.progress-map-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-map-title::before {
    content: '🗺️';
}

.progress-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.progress-item:hover {
    background: rgba(139, 92, 246, 0.05);
}

.progress-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(236, 72, 153, 0.08));
    border-right: 3px solid #8b5cf6;
}

.progress-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    background: #d1d5db;
    transition: all 0.3s ease;
}

.progress-item.active .progress-icon,
.progress-item.completed .progress-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.progress-text {
    flex: 1;
}

.progress-text h4 {
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.25rem;
}

.progress-item.active .progress-text h4 {
    color: #7c3aed;
}

.progress-text p {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

/* Mobile: Show sidebar at bottom */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .progress-sidebar {
        position: static;
        order: -1;
        margin-bottom: 2rem;
    }

    .progress-map {
        max-height: none;
    }
}

/* ============================================
   🌙 DARK MODE TOGGLE BUTTON
   ============================================ */
.dark-mode-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f8f4ef 0%, #fff 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(140, 107, 61, 0.1);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(139, 92, 246, 0.3);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-toggle .toggle-icon {
    position: absolute;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode-toggle .toggle-icon.sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.dark-mode-toggle .toggle-icon.moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.dark-mode-toggle.active .toggle-icon.sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.dark-mode-toggle.active .toggle-icon.moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.dark-mode-toggle.active {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d3d 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(212, 175, 55, 0.2);
}

/* ============================================
   🔗 SHARE & COPY BUTTONS
   ============================================ */
/* ============================================
   🔗 SHARE & COPY BUTTONS - أزرار المشاركة
   (محسنة للموبايل والتداخل)
   ============================================ */
.share-buttons {
    position: absolute;
    top: -20px;
    /* تحريك للأعلى قليلاً */
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    /* مخفية مبدئياً على الديسكتوب */
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    background: white;
    padding: 0.4rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gem-callout:hover .share-buttons,
.quran-mihrab:hover .share-buttons,
.hadith-shrine:hover .share-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* على الشاشات الصغيرة، تظهر دائماً */
@media (max-width: 768px) {
    .share-buttons {
        opacity: 1;
        transform: translateY(0);
        top: -18px;
        /* موضع ثابت ومناسب */
        left: 20px;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    /* زيادة المسافة الداخلية للنصوص في الموبايل لمنع التداخل مع الأزرار */
    .quran-mihrab,
    .hadith-shrine {
        padding-top: 3.5rem;
    }
}

.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn:active {
    transform: scale(0.95);
}

.share-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* ============================================
   🌙 DARK MODE STYLES - الوضع الليلي
   ============================================ */
body.dark-mode {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    color: #e4e4e7;
}

body.dark-mode .page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.dark-mode .book-content {
    color: #d4d4d8;
}

body.dark-mode .book-content h2 {
    color: #d4af37;
    border-bottom-color: rgba(212, 175, 55, 0.4);
}

body.dark-mode .book-content h3 {
    color: #f4d03f;
}

/* Dark Mode for Boxes (Moved here) */
body.dark-mode .gem-callout,
body.dark-mode .quran-mihrab,
body.dark-mode .hadith-shrine {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

body.dark-mode .quran-mihrab p {
    color: #6ee7b7;
}

body.dark-mode .hadith-shrine p {
    color: #fcd34d;
}

body.dark-mode .share-buttons {
    background: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .share-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

body.dark-mode .share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .quran-mihrab::before,
body.dark-mode .hadith-shrine::before,
body.dark-mode .gem-callout::before {
    background: #2d2d2d;
    color: #e4e4e7;
    box-shadow: none;
}

body.dark-mode .book-content p {
    color: #a1a1aa;
}

/* Dark Mode - Callouts */
body.dark-mode .gem-callout {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .gem-callout p {
    color: #c4b5fd;
}

body.dark-mode .quran-mihrab {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .quran-mihrab p {
    color: #6ee7b7;
}

body.dark-mode .hadith-shrine {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .hadith-shrine p {
    color: #fcd34d;
}

body.dark-mode .poetry-stage {
    background: linear-gradient(135deg, rgba(140, 107, 61, 0.1) 0%, rgba(176, 141, 85, 0.05) 100%);
    border-right-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .poetry-stage::before {
    background: #1a1a2e;
}

body.dark-mode .poetry-verse {
    color: #d4af37;
}

/* Dark Mode - TOC & Navigation */
body.dark-mode .toc-container {
    background: rgba(30, 30, 46, 0.9);
    border-color: rgba(139, 92, 246, 0.2);
}

body.dark-mode .toc-title {
    color: #d4af37;
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .toc-item a {
    color: #a1a1aa;
}

body.dark-mode .toc-item a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #c4b5fd;
}

body.dark-mode .btn-nav {
    background: rgba(30, 30, 46, 0.9);
    border-color: rgba(139, 92, 246, 0.2);
    color: #a1a1aa;
}

body.dark-mode .btn-nav:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
}

/* Dark Mode - Sidebar */
body.dark-mode .progress-map {
    background: rgba(30, 30, 46, 0.95);
    border-color: rgba(139, 92, 246, 0.15);
}

body.dark-mode .progress-map-title {
    color: #d4af37;
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .progress-item:hover {
    background: rgba(139, 92, 246, 0.08);
}

body.dark-mode .progress-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
}

body.dark-mode .progress-text h4 {
    color: #d4d4d8;
}

body.dark-mode .progress-item.active .progress-text h4 {
    color: #c4b5fd;
}

body.dark-mode .progress-text p {
    color: #71717a;
}

body.dark-mode .progress-icon {
    background: #3f3f46;
}

/* Dark Mode - Share Buttons */
body.dark-mode .share-btn {
    background: rgba(30, 30, 46, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .share-btn:hover {
    background: rgba(50, 50, 66, 1);
}

/* Dark Mode - Comparison & Flow */
body.dark-mode .comparison-column.disease {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%);
}

body.dark-mode .comparison-column.cure {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
}

body.dark-mode .flow-step {
    background: rgba(30, 30, 46, 0.9);
    border-color: rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
}

/* Dark Mode - Warning & Benefit */
body.dark-mode .warning-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
}

body.dark-mode .warning-box::before {
    background: #1a1a2e;
}

body.dark-mode .warning-box p {
    color: #fca5a5;
}

body.dark-mode .benefit-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
}

body.dark-mode .benefit-box::before {
    background: #1a1a2e;
}

body.dark-mode .benefit-box p {
    color: #93c5fd;
}

/* ============================================
   📱 MOBILE ADJUSTMENTS FOR NEW FEATURES
   ============================================ */
@media (max-width: 768px) {
    .dark-mode-toggle {
        bottom: 1rem;
        left: 1rem;
        width: 48px;
        height: 48px;
    }

    .dark-mode-toggle .toggle-icon {
        font-size: 1.25rem;
    }

    .share-buttons {
        opacity: 1;
        transform: translateY(0);
    }

    .share-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* ============================================
   ✨ VISUAL ENHANCEMENT STYLES - تحسينات بصرية
   ============================================ */

/* Intro Section */
.intro-section {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 12px;
    border-left: 5px solid var(--color-purple);
}

.intro-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-top: 3px solid var(--color-purple);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Concept Comparison */
.concept-comparison {
    margin: 35px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%);
    border-radius: 12px;
}

.concept-comparison h3 {
    color: var(--color-purple);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.comparison-table-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    animation: slideIn 0.6s ease-out;
}

.compare-item {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.compare-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.compare-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.compare-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.compare-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.compare-arrow {
    font-size: 1.5rem;
    color: var(--color-purple);
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

/* Metaphor Section */
.metaphor-section {
    margin: 35px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-radius: 12px;
}

.metaphor-section h3 {
    color: var(--color-amber);
    margin-bottom: 25px;
    font-size: 1.3rem;
    text-align: center;
}

.three-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.column-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-top: 4px solid var(--color-green);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.column-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-green) 0%, var(--color-blue) 50%, var(--color-purple) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.column-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.column-card:hover::before {
    opacity: 1;
}

.column-card h4 {
    margin: 10px 0;
    font-size: 1.1rem;
}

.column-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* تحسين التباين في البطاقات الملونة */
.column-card[style*="background: linear-gradient"],
.column-card[style*="background: rgba"] {
    color: inherit;
}

.column-card[style*="background: linear-gradient"] h4,
.column-card[style*="background: linear-gradient"] p,
.column-card[style*="background: linear-gradient"] strong,
.column-card[style*="background: linear-gradient"] li {
    color: inherit !important;
}

/* البطاقات الحمراء */
.column-card[style*="#ef4444"],
.column-card[style*="#dc2626"] {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: white !important;
}

.column-card[style*="#ef4444"] h4,
.column-card[style*="#ef4444"] p,
.column-card[style*="#ef4444"] strong,
.column-card[style*="#ef4444"] li,
.column-card[style*="#dc2626"] h4,
.column-card[style*="#dc2626"] p,
.column-card[style*="#dc2626"] strong,
.column-card[style*="#dc2626"] li {
    color: white !important;
}

/* البطاقات الخضراء */
.column-card[style*="#10b981"],
.column-card[style*="#059669"] {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: white !important;
}

.column-card[style*="#10b981"] h4,
.column-card[style*="#10b981"] p,
.column-card[style*="#10b981"] strong,
.column-card[style*="#10b981"] li,
.column-card[style*="#059669"] h4,
.column-card[style*="#059669"] p,
.column-card[style*="#059669"] strong,
.column-card[style*="#059669"] li {
    color: white !important;
}

/* البطاقات البنفسجية */
.column-card[style*="#8b5cf6"],
.column-card[style*="#7c3aed"] {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    color: white !important;
}

.column-card[style*="#8b5cf6"] h4,
.column-card[style*="#8b5cf6"] p,
.column-card[style*="#8b5cf6"] strong,
.column-card[style*="#8b5cf6"] li,
.column-card[style*="#7c3aed"] h4,
.column-card[style*="#7c3aed"] p,
.column-card[style*="#7c3aed"] strong,
.column-card[style*="#7c3aed"] li {
    color: white !important;
}

/* البطاقات الزرقاء */
.column-card[style*="#3b82f6"],
.column-card[style*="#1d4ed8"] {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    color: white !important;
}

.column-card[style*="#3b82f6"] h4,
.column-card[style*="#3b82f6"] p,
.column-card[style*="#3b82f6"] strong,
.column-card[style*="#3b82f6"] li,
.column-card[style*="#1d4ed8"] h4,
.column-card[style*="#1d4ed8"] p,
.column-card[style*="#1d4ed8"] strong,
.column-card[style*="#1d4ed8"] li {
    color: white !important;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* تحسين التباين في comparison-item */
.comparison-item.good,
.comparison-item.bad {
    color: white !important;
}

.comparison-item.good h4,
.comparison-item.good p,
.comparison-item.good ul,
.comparison-item.good li,
.comparison-item.good strong,
.comparison-item.bad h4,
.comparison-item.bad p,
.comparison-item.bad ul,
.comparison-item.bad li,
.comparison-item.bad strong {
    color: white !important;
}

.comparison-item .comparison-header h4 {
    color: white !important;
}

/* تحسين highlight-box داخل البطاقات الملونة */
[style*="background: linear-gradient"] .highlight-box {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-right-color: white !important;
}

[style*="background: linear-gradient"] .highlight-box p,
[style*="background: linear-gradient"] .highlight-box strong,
[style*="background: linear-gradient"] .highlight-box li {
    color: white !important;
}

/* تحسين gem-callout الملون */
.gem-callout[style*="color: white"] h3,
.gem-callout[style*="color: white"] h4,
.gem-callout[style*="color: white"] p,
.gem-callout[style*="color: white"] strong,
.gem-callout[style*="color: white"] li,
.gem-callout[style*="color: white"] ol {
    color: white !important;
}

/* تحسين logic-flow الملون */
.logic-flow .flow-step[style*="background: linear-gradient"] p,
.logic-flow .flow-step[style*="background: linear-gradient"] strong,
.logic-flow .flow-step[style*="background: linear-gradient"] ul,
.logic-flow .flow-step[style*="background: linear-gradient"] li {
    color: white !important;
}

/* تحسين card-icon داخل البطاقات الملونة */
.column-card[style*="background: linear-gradient"] .card-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* تحسين النص داخل card-detail */
.column-card[style*="background: linear-gradient"] .card-detail,
.column-card[style*="background: linear-gradient"] .card-detail p,
.column-card[style*="background: linear-gradient"] .card-detail strong,
.column-card[style*="background: linear-gradient"] .card-detail li,
.column-card[style*="background: linear-gradient"] .card-detail ol {
    color: white !important;
}

.column-card[style*="background: linear-gradient"] .wisdom-note {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* قاعدة عامة شاملة: أي عنصر له خلفية داكنة يكون نصه أبيض */
[style*="background: linear-gradient(135deg, #ef4444"],
[style*="background: linear-gradient(135deg, #dc2626"],
[style*="background: linear-gradient(135deg, #10b981"],
[style*="background: linear-gradient(135deg, #059669"],
[style*="background: linear-gradient(135deg, #8b5cf6"],
[style*="background: linear-gradient(135deg, #7c3aed"],
[style*="background: linear-gradient(135deg, #3b82f6"],
[style*="background: linear-gradient(135deg, #1d4ed8"],
[style*="background: linear-gradient(135deg, #f59e0b"],
[style*="background: linear-gradient(135deg, #d97706"],
[style*="background: linear-gradient(135deg, #667eea"],
[style*="background: linear-gradient(135deg, #764ba2"] {
    color: white !important;
}

[style*="background: linear-gradient(135deg, #ef4444"] *,
[style*="background: linear-gradient(135deg, #dc2626"] *,
[style*="background: linear-gradient(135deg, #10b981"] *,
[style*="background: linear-gradient(135deg, #059669"] *,
[style*="background: linear-gradient(135deg, #8b5cf6"] *,
[style*="background: linear-gradient(135deg, #7c3aed"] *,
[style*="background: linear-gradient(135deg, #3b82f6"] *,
[style*="background: linear-gradient(135deg, #1d4ed8"] *,
[style*="background: linear-gradient(135deg, #f59e0b"] *,
[style*="background: linear-gradient(135deg, #d97706"] *,
[style*="background: linear-gradient(135deg, #667eea"] *,
[style*="background: linear-gradient(135deg, #764ba2"] * {
    color: white !important;
}

/* استثناء للعناصر التي يجب أن تبقى بلون مختلف */
[style*="background: linear-gradient"] .gem-icon,
[style*="background: linear-gradient"] .quran-icon,
[style*="background: linear-gradient"] .card-icon i {
    color: inherit !important;
}

/* ============================================
   🧩 BENEFITS VISUAL SECTION - فوائد (37–45)
   ============================================ */

.benefits-section {
    margin: 35px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.benefits-section h2 {
    margin: 0 0 10px;
    color: var(--color-green-dark);
    font-size: 1.35rem;
}

.benefits-lead {
    margin: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.benefits-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.benefit-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--color-green);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}


.benefit-details {
    display: block;
}

.benefit-details > summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 18px;
}

.benefit-details > summary::-webkit-details-marker {
    display: none;
}

.benefit-summary {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.benefit-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-green) 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    flex: 0 0 auto;
}

.benefit-summary-text {
    flex: 1;
    min-width: 0;
}

.benefit-summary-text h3 {
    margin: 0 0 8px;
    font-size: 1.12rem;
    color: var(--text-primary);
}

.benefit-excerpt {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.95rem;
}

.benefit-hint {
    display: inline-block;
    margin-top: 10px;
    font-weight: 800;
    color: var(--color-purple-dark);
    font-size: 0.9rem;
}

.benefit-body {
    padding: 0 18px 18px;
}

.benefit-body p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.9;
}

.benefit-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--color-purple-dark);
    text-decoration: none;
    font-weight: 700;
}

.benefit-link:hover {
    text-decoration: underline;
}

.mini-compare {
    margin-top: 14px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.12);
    border-radius: 10px;
}

.mini-compare-title {
    font-weight: 800;
    color: var(--color-purple-dark);
    margin-bottom: 10px;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    overflow: hidden;
    border-radius: 10px;
}

.mini-table th,
.mini-table td {
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: top;
}

.mini-table th {
    background: rgba(16, 185, 129, 0.10);
    color: var(--text-primary);
    font-weight: 800;
}

.mini-table td {
    background: white;
    color: var(--text-secondary);
}

.logic-flow {
    margin-top: 12px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.flow-node {
    background: white;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 800;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.flow-arrow {
    font-size: 1.2rem;
    color: var(--color-amber-dark);
}

.source-text {
    margin-top: 25px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(245, 158, 11, 0.04);
    overflow: hidden;
}

.source-text > summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 900;
    color: var(--text-primary);
    list-style: none;
}

.source-text > summary::-webkit-details-marker {
    display: none;
}

.source-text[open] > summary {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .benefits-section {
    border-color: rgba(255, 255, 255, 0.10);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(139, 92, 246, 0.10) 100%);
}

body.dark-mode .benefit-card {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: none;
    border-top-color: rgba(16, 185, 129, 0.75);
}

body.dark-mode .benefit-summary-text h3 {
    color: #e4e4e7;
}

body.dark-mode .benefit-excerpt {
    color: #d4d4d8;
}

body.dark-mode .benefit-hint {
    color: #c4b5fd;
}

body.dark-mode .benefit-body p {
    color: #d4d4d8;
}

body.dark-mode .mini-compare {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .mini-table th {
    background: rgba(16, 185, 129, 0.14);
    color: #e4e4e7;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .mini-table td {
    background: rgba(20, 20, 20, 0.75);
    color: #d4d4d8;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .logic-flow {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .flow-node {
    background: rgba(20, 20, 20, 0.75);
    color: #e4e4e7;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

body.dark-mode .source-text {
    background: rgba(30, 30, 30, 0.60);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .source-text > summary {
    color: #e4e4e7;
    border-bottom-color: rgba(255, 255, 255, 0.12);
}