/* ========================================= */
/* DARK MODE SUPPORT FOR QUIZ                */
/* ========================================= */

/* Note: Assuming your site uses body.dark-mode or [data-theme="dark"] class for dark mode */
body.dark-mode .ah-quiz-container,
[data-theme="dark"] .ah-quiz-container {
    background: #1e1e2d;
    border: 1px solid #333;
    color: #e4e6eb;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
body.dark-mode .ah-header { border-bottom-color: #333; }
body.dark-mode .ah-header h2 { color: #60a5fa; }
body.dark-mode .ah-header p { color: #a1a1aa; }
body.dark-mode .ah-filter-box { background: #2a2a3c; }
body.dark-mode .ah-filter-box h3 { color: #e4e6eb !important; }
body.dark-mode .ah-filter-select { background: #1e1e2d; color: #e4e6eb; border-color: #444; }
body.dark-mode .ah-stats { background: #2a2a3c; color: #e4e6eb; border-left-color: #3b82f6; }
body.dark-mode .ah-question { color: #f8fafc; }

body.dark-mode .ah-option { background: #2a2a3c; border-color: #444; color: #e4e6eb; }
body.dark-mode .ah-option b { color: #60a5fa !important; }
body.dark-mode .ah-option:hover:not(.ah-disabled) { border-color: #3b82f6; background: #32324a; }
body.dark-mode .ah-option.ah-correct { background: #064e3b; border-color: #059669; color: #34d399; }
body.dark-mode .ah-option.ah-wrong { background: #7f1d1d; border-color: #dc2626; color: #f87171; }

body.dark-mode .ah-explanation { background: #064e3b; color: #a7f3d0; border-left-color: #10b981; }
body.dark-mode .ah-explanation strong { color: #34d399 !important; }

body.dark-mode .ah-nav-grid-title { color: #94a3b8; border-top-color: #333; }
body.dark-mode .ah-nav-btn { background: #2a2a3c; border-color: #444; color: #e4e6eb; }
body.dark-mode .ah-nav-btn:hover { background: #334155; }
body.dark-mode .ah-nav-btn.ah-active { background: #1e3a8a; border-color: #3b82f6; color: #60a5fa; }
body.dark-mode .ah-nav-btn.ah-ans-correct { background: #059669; border-color: #047857; color: white; }
body.dark-mode .ah-nav-btn.ah-ans-wrong { background: #dc2626; border-color: #b91c1c; color: white; }

body.dark-mode .ah-result-circle { background: #1e293b; color: #60a5fa; border-color: #3b82f6; }
body.dark-mode .ah-result-section h2 { color: #fbbf24 !important; }
body.dark-mode .ah-result-section p { color: #cbd5e1 !important; }





/* Ancient History Quiz CSS */
.ah-quiz-container { font-family: 'Poppins', sans-serif; max-width: 850px; margin: 0 auto; background: #ffffff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); padding: 2rem; color: #0f172a; border: 1px solid #e2e8f0; }
.ah-header { text-align: center; margin-bottom: 2rem; border-bottom: 2px dashed #e2e8f0; padding-bottom: 1rem; }
.ah-header h2 { color: #1e40af; font-size: 2rem; margin-bottom: 5px; font-weight: bold; }
.ah-header p { color: #64748b; font-size: 1rem; margin: 0; }
.ah-filter-box { background: #f1f5f9; padding: 2rem; border-radius: 12px; text-align: center; margin-bottom: 2rem; }
.ah-filter-select { padding: 12px; width: 100%; max-width: 350px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 1rem; margin-bottom: 20px; outline: none; background: #fff; }
.ah-btn { background: #1e40af; color: white; border: none; padding: 12px 25px; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: 0.3s; font-weight: 600; display: inline-block; }
.ah-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.ah-stats { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 15px; background: #e0f2fe; padding: 12px 15px; border-radius: 8px; border-left: 4px solid #1e40af; }
.ah-tag { background: #dbeafe; color: #0369a1; padding: 4px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 600; margin-right: 6px; display: inline-block; margin-bottom: 6px; border: 1px solid #bae6fd; }
.ah-question { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; line-height: 1.5; color: #0f172a; }
.ah-option { padding: 14px 18px; border: 2px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; cursor: pointer; display: flex; justify-content: space-between; font-weight: 500; align-items: center; transition: 0.2s; background: #fff; }
.ah-option:hover:not(.ah-disabled) { border-color: #3b82f6; background: #f0f9ff; }
.ah-option.ah-correct { background: #d1fae5; border-color: #059669; color: #065f46; font-weight: bold; }
.ah-option.ah-wrong { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.ah-disabled { pointer-events: none; opacity: 0.9; }
.ah-explanation { display: none; margin-top: 20px; padding: 15px; background: #f0fdf4; border-left: 5px solid #059669; color: #166534; font-size: 1rem; border-radius: 0 8px 8px 0; }
.ah-nav-grid-title { margin-top: 30px; font-size: 1rem; font-weight: 600; color: #475569; border-top: 2px dashed #e2e8f0; padding-top: 20px; text-align: center; }
.ah-nav-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 15px; }
.ah-nav-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #cbd5e1; background: #ffffff; font-weight: 600; color: #334155; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; padding: 0; }
.ah-nav-btn:hover { background: #e2e8f0; }
.ah-nav-btn.ah-active { border: 2px solid #1e40af; transform: scale(1.1); background: #e0f2fe; color: #1e40af; }
.ah-nav-btn.ah-ans-correct { background: #10b981; color: white; border-color: #059669; }
.ah-nav-btn.ah-ans-wrong { background: #ef4444; color: white; border-color: #dc2626; }
.ah-result-circle { width: 140px; height: 140px; border-radius: 50%; border: 8px solid #3b82f6; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: bold; color: #1e40af; margin: 0 auto 20px; background: #e0f2fe; }
.ah-flex-btn-group { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
@media (max-width: 600px) { .ah-quiz-container { padding: 15px; } .ah-btn { width: 100%; text-align: center; } .ah-stats { flex-direction: column; text-align: center; gap: 8px; } }
