/* =========================================
   MCQ / QUIZ PAGE STYLES
   ========================================= */

.mcq-container {
    padding-bottom: 4rem;
}

.mcq-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
}

.question-anchor {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9em;
    margin-right: 10px;
    opacity: 0.6;
    font-weight: 400;
}
.question-anchor:hover {
    opacity: 1;
    color: var(--primary);
}

.mcq-card {
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease;
    scroll-margin-top: 120px; /* Adjust this value to match your Navbar height + some breathing room */
}
.mcq-card:hover {
    box-shadow: var(--shadow);
}

.mcq-options-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mcq-option {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-body);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
    position: relative;
    user-select: none; 
}

.mcq-option:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

/* --- INTERACTIVE STATES --- */

/* 1. Selected (Blue) */
.mcq-option.selected {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 1px var(--primary) inset;
}

/* Locked Mode */
.mcq-options-list.checked-mode .mcq-option {
    cursor: default;
    pointer-events: none;
}

/* 2. Validation Colors (Overrides Selected) */
.mcq-option.correct {
    background-color: rgba(34, 197, 94, 0.15) !important;
    border-color: #22c55e !important;
    color: #15803d;
    box-shadow: none !important;
}
.mcq-option.correct::after {
    content: "✅";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.mcq-option.incorrect {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #b91c1c;
    box-shadow: none !important;
}
.mcq-option.incorrect::after {
    content: "❌";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Missed (Was correct, but not selected) */
.mcq-option.missed {
    border: 1px dashed #22c55e !important;
    background-color: rgba(34, 197, 94, 0.05) !important;
    color: #15803d;
}
.mcq-option.missed::after {
    content: "⚠️ Missed";
    font-size: 0.8em;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.option-label {
    font-weight: bold;
    color: var(--text-muted);
    margin-right: 12px;
    min-width: 20px;
}

.answer-reveal-btn {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    min-width: 130px;
}
.answer-reveal-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.answer-box {
    display: none;
    margin-top: 1.5rem;
    background: var(--ad-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent-red); 
    animation: slideDown 0.3s ease-out;
}

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

.correct-text {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05rem;
}

.explanation-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
}

/* Navigation Buttons */
.quiz-nav {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.btn-next-set {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    border-radius: 2rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}
.btn-next-set:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.active-set {
    color: var(--primary) !important;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    padding-left: 8px !important;
    margin-left: -8px;
}

.q-type-badge {
    font-size: 0.75rem;
    background-color: var(--bg-read-only, #e2e8f0);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}