/* MCQ Pro — Frontend Styles v2 */
:root {
    --mcqp-primary: #4F46E5;
    --mcqp-accent:  #10B981;
    --mcqp-gold:    #F59E0B;
    --mcqp-danger:  #EF4444;
    --mcqp-dark:    #1E1B4B;
    --mcqp-gray:    #6B7280;
    --mcqp-light:   #F9FAFB;
    --mcqp-border:  #E5E7EB;
    --mcqp-radius:  12px;
    --mcqp-shadow:  0 4px 20px rgba(0,0,0,.08);
}

/* ── Top Bar ──────────────────────────────────────────────── */
#mcqp-top-bar {
    position: sticky; top: 0; z-index: 9999;
    background: var(--mcqp-primary);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.mcqp-top-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 20px; height: 56px;
}
.mcqp-logo { font-weight: 700; font-size: 18px; }
.mcqp-top-nav { display: flex; align-items: center; gap: 10px; }
.mcqp-nav-link {
    display: flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,.9);
    text-decoration: none; font-size: 14px;
}
.mcqp-nav-link:hover { color: #fff; }
.mcqp-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,.25); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
body { padding-top: 0 !important; }

/* ── Buttons ──────────────────────────────────────────────── */
.mcqp-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 8px;
    border: none; cursor: pointer;
    font-size: 14px; font-weight: 600;
    transition: all .2s; text-decoration: none;
    font-family: inherit;
}
.mcqp-btn-primary  { background: var(--mcqp-primary); color: #fff; }
.mcqp-btn-primary:hover  { background: #3730A3; transform: translateY(-1px); }
.mcqp-btn-ghost    { background: rgba(255,255,255,.15); color: #fff; }
.mcqp-btn-ghost:hover    { background: rgba(255,255,255,.25); }
.mcqp-btn-outline  { background: transparent; border: 1.5px solid var(--mcqp-primary); color: var(--mcqp-primary); }
.mcqp-btn-gold     { background: var(--mcqp-gold); color: #fff; }
.mcqp-btn-gold:hover { background: #D97706; }
.mcqp-btn-sm { padding: 6px 14px; font-size: 13px; }
.mcqp-btn-full { width: 100%; justify-content: center; }

/* ── Modal ────────────────────────────────────────────────── */
.mcqp-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    animation: mcqp-fade-in .2s;
}
@keyframes mcqp-fade-in { from {opacity:0} to {opacity:1} }
.mcqp-modal {
    background: #fff; border-radius: var(--mcqp-radius);
    padding: 32px; width: 100%; max-width: 420px;
    position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: mcqp-slide-up .3s;
}
@keyframes mcqp-slide-up { from {transform:translateY(20px);opacity:0} to {transform:none;opacity:1} }
.mcqp-modal h2 { margin: 0 0 20px; font-size: 22px; color: var(--mcqp-dark); }
.mcqp-modal-close {
    position: absolute; top: 16px; left: 16px;
    background: none; border: none; cursor: pointer;
    font-size: 20px; color: var(--mcqp-gray); line-height: 1;
}
.mcqp-modal-close:hover { color: var(--mcqp-danger); }

/* ── Form Fields ──────────────────────────────────────────── */
.mcqp-field { margin-bottom: 16px; }
.mcqp-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.mcqp-input {
    width: 100%; box-sizing: border-box;
    padding: 10px 14px; border: 1.5px solid var(--mcqp-border);
    border-radius: 8px; font-size: 14px;
    transition: border-color .2s;
    font-family: inherit; direction: rtl;
}
.mcqp-input:focus { outline: none; border-color: var(--mcqp-primary); }
.mcqp-input-group { position: relative; }
.mcqp-input-group .mcqp-input { padding-left: 40px; }
.mcqp-toggle-pass {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 16px;
}
.mcqp-switch-tab { text-align: center; font-size: 13px; color: var(--mcqp-gray); margin-top: 16px; }
.mcqp-switch-tab a { color: var(--mcqp-primary); font-weight: 600; }
.mcqp-msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.mcqp-msg.error   { background: #FEF2F2; color: #B91C1C; }
.mcqp-msg.success { background: #ECFDF5; color: #065F46; }

/* ── Browser ──────────────────────────────────────────────── */
.mcqp-browser { max-width: 800px; margin: 30px auto; padding: 0 16px; direction: rtl; }

.mcqp-section-item { margin-bottom: 6px; }

.mcqp-section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-radius: 10px; cursor: pointer;
    transition: all .2s; border: 1.5px solid var(--mcqp-border);
    background: #fff;
}
.mcqp-section-header:hover { border-color: var(--mcqp-primary); box-shadow: var(--mcqp-shadow); }

.mcqp-type-main .mcqp-section-header { background: var(--mcqp-dark); color: #fff; border-color: var(--mcqp-dark); }
.mcqp-type-sub  .mcqp-section-header { background: #EEF2FF; border-color: #A5B4FC; }
.mcqp-type-topic .mcqp-section-header { background: #F0FDF4; border-color: #86EFAC; padding-right: 32px; }
.mcqp-type-level .mcqp-section-header { background: #fff; padding-right: 48px; cursor: default; }
.mcqp-locked .mcqp-section-header { opacity: .7; }

.mcqp-section-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.mcqp-chevron { font-size: 18px; transition: transform .2s; display: inline-block; min-width: 16px; }
.mcqp-section-item.open > .mcqp-section-header .mcqp-chevron { transform: rotate(90deg); }
.mcqp-section-icon  { font-size: 20px; }
.mcqp-section-name  { font-weight: 600; font-size: 15px; }

.mcqp-premium-tag {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
}
.mcqp-q-badge {
    background: var(--mcqp-light); border: 1px solid var(--mcqp-border);
    padding: 2px 8px; border-radius: 10px; font-size: 11px; color: var(--mcqp-gray);
}

.mcqp-section-children { margin-right: 20px; margin-top: 6px; }

/* ── Quiz Player ──────────────────────────────────────────── */
.mcqp-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.7);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.mcqp-player {
    background: #fff; border-radius: 16px;
    width: 100%; max-width: 680px; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3);
    display: flex; flex-direction: column;
}

.mcqp-player-header {
    display: flex; align-items: center; padding: 20px 24px;
    border-bottom: 1px solid var(--mcqp-border);
    position: sticky; top: 0; background: #fff; z-index: 2;
}
.mcqp-player-title { font-weight: 700; font-size: 17px; flex: 1; }
.mcqp-player-timer {
    display: flex; align-items: center; gap: 6px;
    background: var(--mcqp-danger); color: #fff;
    padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 15px;
    margin-left: 12px;
}
.mcqp-player-timer.warning { animation: mcqp-pulse .8s infinite; }
@keyframes mcqp-pulse { 0%,100% {opacity:1} 50% {opacity:.5} }
.mcqp-player-close {
    background: none; border: none; cursor: pointer;
    font-size: 22px; color: var(--mcqp-gray); padding: 4px;
}
.mcqp-player-close:hover { color: var(--mcqp-danger); }

.mcqp-player-progress {
    padding: 12px 24px;
    display: flex; align-items: center; gap: 12px;
}
.mcqp-progress-bar {
    flex: 1; height: 8px; background: var(--mcqp-light);
    border-radius: 4px; overflow: hidden;
}
.mcqp-progress-fill {
    height: 100%; background: var(--mcqp-primary);
    border-radius: 4px; transition: width .4s ease;
}
#player-progress-text { font-size: 13px; color: var(--mcqp-gray); white-space: nowrap; }

.mcqp-player-loading {
    padding: 60px; text-align: center; color: var(--mcqp-gray);
}
.mcqp-spinner {
    width: 40px; height: 40px; border: 4px solid var(--mcqp-border);
    border-top-color: var(--mcqp-primary); border-radius: 50%;
    animation: mcqp-spin 1s linear infinite; margin: 0 auto 16px;
}
@keyframes mcqp-spin { to { transform: rotate(360deg); } }

/* ── Question inside player ───────────────────────────────── */
#player-question { padding: 20px 24px; }
.mcqp-question-num { font-size: 12px; color: var(--mcqp-gray); margin-bottom: 8px; }
.mcqp-question-text {
    font-size: 18px; font-weight: 600; line-height: 1.6;
    margin-bottom: 20px; color: var(--mcqp-dark);
}
.mcqp-options { display: flex; flex-direction: column; gap: 10px; }
.mcqp-option {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; border: 2px solid var(--mcqp-border);
    border-radius: 10px; cursor: pointer; transition: all .2s;
    font-size: 15px;
}
.mcqp-option:hover   { border-color: var(--mcqp-primary); background: #EEF2FF; }
.mcqp-option.selected { border-color: var(--mcqp-primary); background: var(--mcqp-primary); color: #fff; }
.mcqp-option.correct  { border-color: var(--mcqp-accent); background: #ECFDF5; }
.mcqp-option.wrong    { border-color: var(--mcqp-danger); background: #FEF2F2; }
.mcqp-option-key {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid currentColor; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.mcqp-player-nav {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 24px; border-top: 1px solid var(--mcqp-border);
    justify-content: space-between;
}
.mcqp-dots { display: flex; gap: 5px; flex: 1; justify-content: center; flex-wrap: wrap; }
.mcqp-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--mcqp-border); cursor: pointer; transition: background .2s;
}
.mcqp-dot.answered  { background: var(--mcqp-primary); }
.mcqp-dot.current   { background: var(--mcqp-accent); transform: scale(1.3); }

/* ── Result ───────────────────────────────────────────────── */
.mcqp-result { padding: 40px 24px; text-align: center; }
.mcqp-result-circle {
    width: 120px; height: 120px; border-radius: 50%;
    background: conic-gradient(var(--mcqp-primary) var(--pct,0%), var(--mcqp-border) 0%);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}
.mcqp-result-circle::before {
    content: ''; position: absolute; inset: 10px;
    background: #fff; border-radius: 50%;
}
#result-score { position: relative; z-index: 1; font-size: 24px; font-weight: 800; }
.mcqp-result h2 { font-size: 24px; margin-bottom: 8px; }
.mcqp-result-answers { text-align: right; margin: 20px 0; }
.mcqp-answer-item {
    display: flex; gap: 10px; padding: 10px;
    border-radius: 8px; margin-bottom: 8px; font-size: 14px;
}
.mcqp-answer-item.correct { background: #ECFDF5; }
.mcqp-answer-item.wrong   { background: #FEF2F2; }
.mcqp-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ── Profile ──────────────────────────────────────────────── */
.mcqp-profile { max-width: 800px; margin: 30px auto; padding: 0 16px; direction: rtl; }
.mcqp-profile-header {
    display: flex; align-items: center; gap: 20px;
    background: linear-gradient(135deg, var(--mcqp-primary), #7C3AED);
    border-radius: 16px; padding: 24px; color: #fff; margin-bottom: 20px;
}
.mcqp-profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,.25); font-size: 28px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.mcqp-profile-info h2 { margin: 0 0 4px; }
.mcqp-profile-info p  { margin: 0; opacity: .85; font-size: 14px; }

.mcqp-profile-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; margin-bottom: 20px;
}
.mcqp-pstat {
    background: #fff; border: 1.5px solid var(--mcqp-border);
    border-radius: 12px; padding: 16px 12px; text-align: center;
}
.mcqp-pstat-num { display: block; font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.mcqp-pstat span:last-child { font-size: 12px; color: var(--mcqp-gray); }
.mcqp-text-green { color: var(--mcqp-accent); }
.mcqp-text-blue  { color: var(--mcqp-primary); }
.mcqp-text-gold  { color: var(--mcqp-gold); }

.mcqp-card { background: #fff; border: 1.5px solid var(--mcqp-border); border-radius: 12px; padding: 20px; }
.mcqp-card-title { font-size: 15px; font-weight: 700; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--mcqp-border); }

.mcqp-table-wrap { overflow-x: auto; }
.mcqp-history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mcqp-history-table th, .mcqp-history-table td {
    padding: 10px 12px; border-bottom: 1px solid var(--mcqp-border); text-align: right;
}
.mcqp-history-table th { font-weight: 600; background: var(--mcqp-light); }
.mcqp-mini-bar { height: 4px; background: var(--mcqp-border); border-radius: 2px; margin-bottom: 3px; }
.mcqp-mini-fill { height: 100%; border-radius: 2px; }
.mcqp-mini-fill.pass { background: var(--mcqp-accent); }
.mcqp-mini-fill.fail { background: var(--mcqp-danger); }
.mcqp-pass { color: var(--mcqp-accent); font-weight: 600; }
.mcqp-fail { color: var(--mcqp-danger); font-weight: 600; }

.mcqp-unlocks-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.mcqp-unlock-card {
    display: flex; align-items: center; gap: 8px;
    background: var(--mcqp-light); border: 1px solid var(--mcqp-border);
    border-radius: 10px; padding: 10px 16px; font-size: 14px;
}

.mcqp-empty { color: var(--mcqp-gray); padding: 30px; text-align: center; }
.mcqp-alert { background: #FEF3C7; color: #92400E; padding: 16px; border-radius: 10px; }

@media (max-width: 600px) {
    .mcqp-profile-stats { grid-template-columns: 1fr 1fr; }
    .mcqp-player { border-radius: 0; max-height: 100vh; }
    .mcqp-question-text { font-size: 16px; }
}

/* ── Question image in player ── */
.mcqp-q-img { margin: 12px 0; text-align: center; }
.mcqp-q-img img { max-width: 100%; max-height: 300px; border-radius: 10px; object-fit: contain; box-shadow: 0 2px 12px rgba(0,0,0,.1); }

/* ── Section images in browser ── */
.mcqp-section-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }

/* ── KaTeX in player ── */
.mcqp-question-text .katex-display { margin: 10px 0; overflow-x: auto; }
.mcqp-option-text .katex { font-size: 1em; }
.katex-preview .katex-display { margin: 6px 0; }

/* v3.1.2: allow starting quizzes from any section that directly contains questions */
.mcqp-section-header.mcqp-click-start{cursor:pointer}
.mcqp-section-header.mcqp-click-start:hover{background:rgba(79,70,229,.06)}
.mcqp-play-chevron{font-size:12px;color:var(--mcqp-primary,#4F46E5)}
.mcqp-q-empty{background:#F3F4F6!important;color:#9CA3AF!important}

/* Sub-subcategory / level selector */
.mcqp-levels-panel {
    margin: -4px 18px 12px 18px;
    padding: 12px;
    border: 1px dashed rgba(79,70,229,.28);
    border-radius: 14px;
    background: rgba(79,70,229,.035);
}
.mcqp-levels-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    color: #374151;
}
.mcqp-level-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mcqp-level-count {
    font-size: 12px;
    opacity: .75;
}
.mcqp-section-item.levels-open > .mcqp-section-header .mcqp-level-chevron {
    transform: rotate(180deg);
}
.mcqp-has-level-panel {
    cursor: pointer;
}

/* v3.3.0: fix nested section colors. Older descendant selectors made child titles inherit white text. */
.mcqp-section-item.mcqp-type-main > .mcqp-section-header {
    background: linear-gradient(135deg, #312E81, #4338CA);
    border-color: #312E81;
    color: #fff;
}
.mcqp-section-item.mcqp-type-main > .mcqp-section-header .mcqp-section-name,
.mcqp-section-item.mcqp-type-main > .mcqp-section-header .mcqp-section-icon,
.mcqp-section-item.mcqp-type-main > .mcqp-section-header .mcqp-chevron {
    color: #fff;
}
.mcqp-section-item.mcqp-type-main > .mcqp-section-header .mcqp-q-badge {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.32);
    color: #fff;
}
.mcqp-section-item.mcqp-type-sub > .mcqp-section-header {
    background: #F5F7FF;
    border-color: #C7D2FE;
    color: #111827;
}
.mcqp-section-item.mcqp-type-topic > .mcqp-section-header {
    background: #F0FDF4;
    border-color: #86EFAC;
    color: #111827;
    padding-right: 32px;
}
.mcqp-section-item.mcqp-type-sub > .mcqp-section-header .mcqp-section-name,
.mcqp-section-item.mcqp-type-sub > .mcqp-section-header .mcqp-section-icon,
.mcqp-section-item.mcqp-type-sub > .mcqp-section-header .mcqp-chevron,
.mcqp-section-item.mcqp-type-topic > .mcqp-section-header .mcqp-section-name,
.mcqp-section-item.mcqp-type-topic > .mcqp-section-header .mcqp-section-icon,
.mcqp-section-item.mcqp-type-topic > .mcqp-section-header .mcqp-chevron {
    color: #111827;
}
.mcqp-section-item.mcqp-type-sub > .mcqp-section-header .mcqp-q-badge,
.mcqp-section-item.mcqp-type-topic > .mcqp-section-header .mcqp-q-badge {
    background: #fff;
    color: #374151;
    border-color: #D1D5DB;
}
.mcqp-section-header .mcqp-btn-outline {
    background: #fff;
}


/* v3.4.0: question count modal, profile editor, avatar */
.mcqp-count-box { max-width: 460px; }
.mcqp-count-hint { color: var(--mcqp-gray); margin-top: -8px; }
.mcqp-count-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mcqp-count-options .mcqp-btn { justify-content: center; }
.mcqp-profile-avatar img, .mcqp-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mcqp-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.mcqp-profile-card .mcqp-btn { margin-top: 4px; }
.mcqp-muted { color: var(--mcqp-gray); font-size: 13px; margin: 0 0 12px; }
.mcqp-type-sub > .mcqp-section-header .mcqp-btn-primary,
.mcqp-type-topic > .mcqp-section-header .mcqp-btn-primary { color:#fff; }
.mcqp-option-text { flex:1; }
@media (max-width: 700px) { .mcqp-profile-grid, .mcqp-count-options { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════
   DAILY TRIVIA / TIME ATTACK (v3.5)
══════════════════════════════════════════════════════════ */
.mcqp-trivia-wrap{max-width:1100px;margin:24px auto;padding:0 16px;font-family:inherit}
.mcqp-trivia-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
    background:linear-gradient(135deg,var(--mcqp-primary),#6D28D9);color:#fff;border-radius:16px;padding:20px 24px;margin-bottom:20px;box-shadow:var(--mcqp-shadow)}
.mcqp-trivia-head-main h1{margin:0;font-size:24px;color:#fff}
.mcqp-trivia-date{opacity:.85;font-size:14px;margin-top:2px}
.mcqp-trivia-head-side{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.mcqp-trivia-streak{background:rgba(255,255,255,.15);border-radius:12px;padding:8px 14px;display:flex;align-items:center;gap:6px}
.mcqp-streak-num{font-size:20px;font-weight:800}.mcqp-streak-label{font-size:11px;opacity:.85}
.mcqp-trivia-countdown{background:rgba(0,0,0,.18);border-radius:12px;padding:8px 14px;text-align:center}
.mcqp-cd-label{display:block;font-size:11px;opacity:.85}
.mcqp-cd-clock{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:1px}

.mcqp-trivia-grid{display:grid;grid-template-columns:1fr 340px;gap:20px;align-items:start}
.mcqp-trivia-card{box-shadow:var(--mcqp-shadow)}
.mcqp-trivia-side .mcqp-trivia-card{position:sticky;top:72px}

/* Intro */
.mcqp-trivia-intro-body{text-align:center}
.mcqp-trivia-intro-body h2{margin:4px 0 16px;font-size:20px;color:var(--mcqp-dark)}
.mcqp-trivia-facts{display:flex;justify-content:center;gap:14px;margin-bottom:18px}
.mcqp-trivia-fact{background:var(--mcqp-light);border:1.5px solid var(--mcqp-border);border-radius:12px;padding:12px 18px;min-width:84px}
.mcqp-fact-num{display:block;font-size:26px;font-weight:800;color:var(--mcqp-primary)}
.mcqp-fact-label{font-size:12px;color:var(--mcqp-gray)}
.mcqp-trivia-rules{background:#FFF7ED;border:1px solid #FED7AA;color:#9A3412;border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:16px}
.mcqp-btn-lg{padding:14px 22px;font-size:16px}.mcqp-btn-full{width:100%;justify-content:center}
.mcqp-trivia-login-note{margin-top:12px;font-size:13px;color:var(--mcqp-gray)}
.mcqp-trivia-empty,.mcqp-trivia-done{text-align:center;padding:24px 10px}
.mcqp-trivia-empty-icon,.mcqp-trivia-done-icon{font-size:48px;margin-bottom:8px}
.mcqp-trivia-empty h2,.mcqp-trivia-done h2{margin:6px 0;color:var(--mcqp-dark)}
.mcqp-trivia-comeback{color:var(--mcqp-gray);font-size:13px}

/* Play */
.mcqp-trivia-play-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.mcqp-trivia-progress{font-size:13px;color:var(--mcqp-gray);font-weight:600}
.mcqp-trivia-timer{display:flex;align-items:center;gap:4px;background:var(--mcqp-light);border:1.5px solid var(--mcqp-border);border-radius:999px;padding:6px 14px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--mcqp-dark)}
.mcqp-trivia-timer.warning{background:#FEF2F2;border-color:#FCA5A5;color:#B91C1C;animation:mcqpPulse 1s infinite}
.mcqp-timer-unit{font-size:11px;font-weight:600;opacity:.7}
@keyframes mcqpPulse{50%{opacity:.55}}
.mcqp-trivia-bar{height:6px;background:var(--mcqp-border);border-radius:3px;overflow:hidden;margin-bottom:16px}
.mcqp-trivia-bar-fill{height:100%;background:var(--mcqp-primary);border-radius:3px;transition:width .3s;width:0}
.mcqp-trivia-question{font-size:18px;font-weight:700;color:var(--mcqp-dark);line-height:1.7;margin-bottom:16px}
.mcqp-trivia-qimg{display:block;max-width:100%;border-radius:10px;margin-top:12px}
.mcqp-trivia-options{display:flex;flex-direction:column;gap:10px;margin-bottom:18px}
.mcqp-trivia-opt{display:flex;align-items:center;gap:12px;text-align:right;background:#fff;border:2px solid var(--mcqp-border);border-radius:12px;padding:12px 14px;cursor:pointer;font-size:15px;font-family:inherit;transition:all .15s;width:100%}
.mcqp-trivia-opt:hover{border-color:var(--mcqp-primary);background:#EEF2FF}
.mcqp-trivia-opt.selected{border-color:var(--mcqp-primary);background:var(--mcqp-primary);color:#fff}
.mcqp-trivia-opt-key{width:30px;height:30px;flex-shrink:0;border-radius:50%;background:var(--mcqp-light);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;color:var(--mcqp-dark)}
.mcqp-trivia-opt.selected .mcqp-trivia-opt-key{background:rgba(255,255,255,.25);color:#fff}
.mcqp-trivia-opt-text{flex:1}
.mcqp-trivia-nav{display:flex;gap:10px;justify-content:space-between}
.mcqp-trivia-nav .mcqp-btn{flex:1;justify-content:center}

/* Result */
.mcqp-trivia-result-top{display:flex;align-items:center;justify-content:space-around;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.mcqp-result-rank,.mcqp-result-time{text-align:center}
.mcqp-result-rank-label,.mcqp-result-time-label{display:block;font-size:12px;color:var(--mcqp-gray)}
.mcqp-result-rank-num{font-size:30px;font-weight:800;color:var(--mcqp-gold)}
.mcqp-result-time-num{font-size:20px;font-weight:800;color:var(--mcqp-dark)}
.mcqp-result-score-circle{width:120px;height:120px;border-radius:50%;background:conic-gradient(var(--mcqp-accent) 0%,#E5E7EB 0);display:flex;align-items:center;justify-content:center}
.mcqp-result-score-circle span{width:92px;height:92px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;color:var(--mcqp-dark)}
.mcqp-result-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}
.mcqp-rmeta{background:var(--mcqp-light);border-radius:10px;padding:10px;text-align:center}
.mcqp-rmeta span{display:block;font-size:11px;color:var(--mcqp-gray);margin-bottom:3px}
.mcqp-rmeta strong{font-size:15px;color:var(--mcqp-dark)}
.mcqp-trivia-actions{display:flex;gap:10px}.mcqp-trivia-actions .mcqp-btn{flex:1;justify-content:center}
.mcqp-trivia-review{margin-top:16px;display:flex;flex-direction:column;gap:10px}
.mcqp-trivia-rev-item{border:1.5px solid var(--mcqp-border);border-radius:10px;padding:12px;border-right-width:4px}
.mcqp-trivia-rev-item.correct{border-right-color:var(--mcqp-accent)}
.mcqp-trivia-rev-item.wrong{border-right-color:var(--mcqp-danger)}
.mcqp-rev-head{font-weight:700;color:var(--mcqp-dark);margin-bottom:6px}
.mcqp-rev-body{font-size:13px;color:#374151}
.mcqp-rev-exp{margin-top:6px;background:#F8F9FA;border-radius:8px;padding:8px 10px;font-size:13px;color:#4B5563}

/* Leaderboard */
.mcqp-trivia-lb-head{display:flex;align-items:center;justify-content:space-between}
.mcqp-lb-refresh{background:none;border:none;cursor:pointer;font-size:16px;line-height:1;padding:4px;border-radius:6px}
.mcqp-lb-refresh:hover{background:var(--mcqp-light)}
.mcqp-trivia-lb-sub{font-size:12px;color:var(--mcqp-gray);margin:2px 0 12px}
.mcqp-trivia-lb{display:flex;flex-direction:column;gap:6px;max-height:520px;overflow-y:auto}
.mcqp-trivia-lb-empty{text-align:center;color:var(--mcqp-gray);padding:24px 8px;font-size:14px}
.mcqp-lb-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:var(--mcqp-light);font-size:13px}
.mcqp-lb-row.is-me{background:#EEF2FF;border:1.5px solid var(--mcqp-primary)}
.mcqp-lb-rank{width:26px;text-align:center;font-weight:800;color:var(--mcqp-gray);flex-shrink:0}
.mcqp-lb-rank.rank-1,.mcqp-lb-rank.rank-2,.mcqp-lb-rank.rank-3{font-size:16px}
.mcqp-lb-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;flex-shrink:0}
.mcqp-lb-name{flex:1;font-weight:600;color:var(--mcqp-dark);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mcqp-lb-score{font-weight:800;color:var(--mcqp-primary)}
.mcqp-lb-time{color:var(--mcqp-gray);font-variant-numeric:tabular-nums;min-width:42px;text-align:left}
.mcqp-nav-trivia{font-weight:700}

@media(max-width:860px){
    .mcqp-trivia-grid{grid-template-columns:1fr}
    .mcqp-trivia-side .mcqp-trivia-card{position:static}
    .mcqp-result-meta{grid-template-columns:repeat(2,1fr)}
}

/* ── Profile v2: account/progress sections ───────────────── */
.mcqp-profile-v2{max-width:1100px}
.mcqp-profile-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}
.mcqp-profile-tab{border:1.5px solid var(--mcqp-border);background:#fff;color:var(--mcqp-dark);border-radius:999px;padding:10px 16px;cursor:pointer;font-weight:700;transition:.2s}
.mcqp-profile-tab.active,.mcqp-profile-tab:hover{background:var(--mcqp-primary);border-color:var(--mcqp-primary);color:#fff}
.mcqp-profile-section{display:none}.mcqp-profile-section.active{display:block}
.mcqp-level-progress-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:22px}
.mcqp-level-card{text-align:center;overflow:hidden;position:relative}.mcqp-level-card-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:14px}.mcqp-level-card-head h3{margin:0;font-size:16px}.mcqp-level-card-head span{font-size:12px;color:var(--mcqp-gray);background:var(--mcqp-light);border-radius:999px;padding:4px 8px}.mcqp-donut{--p:0;width:118px;height:118px;margin:0 auto 14px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:conic-gradient(var(--mcqp-primary) calc(var(--p)*1%), #E5E7EB 0);position:relative}.mcqp-donut:before{content:"";position:absolute;inset:11px;background:#fff;border-radius:50%}.mcqp-donut span{position:relative;z-index:1;font-size:22px;font-weight:900;color:var(--mcqp-dark)}.mcqp-level-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mcqp-level-metrics div{background:var(--mcqp-light);border-radius:10px;padding:9px 6px}.mcqp-level-metrics strong{display:block;font-size:15px}.mcqp-level-metrics span{font-size:11px;color:var(--mcqp-gray)}
.mcqp-progress-accordion{display:flex;flex-direction:column;gap:10px}.mcqp-progress-acc{border:1.5px solid var(--mcqp-border);border-radius:12px;background:#fff;overflow:hidden}.mcqp-progress-acc summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;cursor:pointer;background:#fff}.mcqp-progress-acc summary::-webkit-details-marker{display:none}.mcqp-progress-acc summary:after{content:"⌄";font-weight:900;color:var(--mcqp-gray);transition:.2s}.mcqp-progress-acc[open]>summary:after{transform:rotate(180deg)}.mcqp-acc-title{display:flex;align-items:center;gap:8px;font-weight:800;color:var(--mcqp-dark)}.mcqp-acc-icon{font-size:18px}.mcqp-acc-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.mcqp-acc-badges span{font-size:12px;background:var(--mcqp-light);border-radius:999px;padding:4px 8px;color:#374151}.mcqp-acc-body{padding:0 16px 16px}.mcqp-acc-bars{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mcqp-bar-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--mcqp-gray);margin-bottom:5px}.mcqp-wide-bar{height:9px;background:#E5E7EB;border-radius:999px;overflow:hidden}.mcqp-wide-bar span{display:block;height:100%;background:var(--mcqp-primary);border-radius:inherit}.mcqp-wide-bar.accuracy span{background:var(--mcqp-accent)}.mcqp-acc-mini{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.mcqp-acc-mini span{font-size:12px;background:#F8FAFC;border:1px solid #E5E7EB;border-radius:8px;padding:6px 8px}.mcqp-acc-children{margin-top:12px;display:flex;flex-direction:column;gap:8px}.mcqp-progress-acc.depth-1{margin-right:10px}.mcqp-progress-acc.depth-2{margin-right:20px}
.mcqp-option.correct{color:#065F46;border-color:#10B981;background:#D1FAE5}.mcqp-option.wrong{color:#991B1B;border-color:#FCA5A5;background:#FEE2E2}.mcqp-live-explanation{border:1.5px solid #DBEAFE;background:#F8FBFF;border-radius:12px;padding:14px 16px;margin-top:12px}.mcqp-live-explanation .mcqp-explanation-title{font-weight:800;margin-bottom:6px;color:var(--mcqp-dark)}
.mcqp-trivia-lb-tabs{display:flex;gap:8px;margin:10px 0}.mcqp-lb-tab{flex:1;border:1.5px solid var(--mcqp-border);background:#fff;border-radius:999px;padding:8px 10px;font-weight:800;cursor:pointer;color:var(--mcqp-dark)}.mcqp-lb-tab.active{background:var(--mcqp-primary);border-color:var(--mcqp-primary);color:#fff}
@media(max-width:700px){.mcqp-acc-bars{grid-template-columns:1fr}.mcqp-progress-acc summary{align-items:flex-start;flex-direction:column}.mcqp-acc-badges{justify-content:flex-start}.mcqp-profile-tabs{display:grid;grid-template-columns:1fr 1fr}.mcqp-profile-tab{border-radius:12px}}

/* v3.5.5: expand explanation from inside the correct option */
.mcqp-option.expanded{align-items:flex-start}
.mcqp-option-explanation{width:100%;margin-top:10px;margin-right:46px;border:1.5px solid #BFDBFE;background:#F8FBFF;border-radius:12px;padding:12px 14px;color:#1F2937;box-shadow:0 10px 25px rgba(59,130,246,.08);animation:mcqpExplainOpen .18s ease-out}
.mcqp-option-explanation .mcqp-explanation-title{font-weight:900;margin-bottom:6px;color:#111827}
.mcqp-option-explanation .mcqp-explanation-text{line-height:1.7;font-size:14px}
@keyframes mcqpExplainOpen{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.mcqp-option-explanation{margin-right:0}}

/* v3.5.6 — instant local result + background save status */
.mcqp-sync-status{display:inline-flex;align-items:center;justify-content:center;margin:8px auto 12px;padding:8px 12px;border-radius:999px;font-size:13px;font-weight:700}
.mcqp-sync-status.saving{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.mcqp-sync-status.success{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}
.mcqp-sync-status.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}

/* v3.5.7 — focused drill-down category browsing */
.mcqp-browser-nav{align-items:center;gap:10px;margin:0 0 14px;padding:10px 12px;border:1.5px solid #E5E7EB;border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.05)}
.mcqp-browser-back{padding:8px 12px!important;border-radius:999px!important;white-space:nowrap}
.mcqp-browser-path{font-size:13px;font-weight:800;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mcqp-section-item.mcqp-drill-current > .mcqp-section-header{box-shadow:0 12px 30px rgba(79,70,229,.14)}

/* v3.5.7 — cleaner expanded explanation inside correct option */
.mcqp-option.expanded{align-items:center}
.mcqp-option-explanation{flex-basis:100%;width:auto;margin:6px 0 0!important;border:1px solid #D7E3FF;background:linear-gradient(180deg,#FFFFFF,#F8FBFF);border-radius:10px;padding:10px 12px;color:#1F2937;box-shadow:0 8px 18px rgba(37,99,235,.07);animation:mcqpExplainOpen .16s ease-out}
.mcqp-option-explanation .mcqp-explanation-head{display:flex;align-items:center;gap:8px;margin-bottom:6px;color:#0F172A;font-size:13px}
.mcqp-option-explanation .mcqp-explanation-icon{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#EFF6FF;border:1px solid #BFDBFE;font-size:13px;flex:0 0 24px}
.mcqp-option-explanation .mcqp-explanation-text{line-height:1.75;font-size:14px;color:#334155;margin:0}

/* v3.5.7 — count modal opens instantly to avoid flicker */
#mcqp-count-modal{align-items:center;justify-content:center}

/* v3.5.8 — explanation only, compact spacing inside the correct option */
.mcqp-option.expanded{align-items:center;flex-wrap:wrap}
.mcqp-option-explanation{box-sizing:border-box;flex:0 0 100%;width:100%!important;margin:8px 0 0!important;border:1px solid #C7D2FE;background:#F8FAFF;border-radius:12px;padding:10px 12px;color:#1E293B;box-shadow:0 8px 18px rgba(79,70,229,.07);animation:mcqpExplainOpen .14s ease-out}
.mcqp-option-explanation .mcqp-explanation-head,.mcqp-option-explanation .mcqp-explanation-icon{display:none!important}
.mcqp-option-explanation .mcqp-explanation-text{line-height:1.75;font-size:14px;color:#1E293B;margin:0;padding:0}
.mcqp-option.correct .mcqp-option-explanation{border-color:#A7F3D0;background:#F0FDF4;box-shadow:0 8px 18px rgba(16,185,129,.08)}

/* v3.5.8 — profile last performance fallback bars */
.mcqp-profile-chart-fallback{display:none;margin-top:12px;gap:8px;flex-direction:column}
.mcqp-profile-chart-row{display:grid;grid-template-columns:minmax(90px,1fr) 4fr 46px;gap:10px;align-items:center;font-size:12px;color:#475569}
.mcqp-profile-chart-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.mcqp-profile-chart-track{height:10px;border-radius:999px;background:#E5E7EB;overflow:hidden}
.mcqp-profile-chart-fill{display:block;height:100%;border-radius:inherit;background:var(--mcqp-primary)}
.mcqp-profile-chart-fill.pass{background:var(--mcqp-accent)}
.mcqp-profile-chart-fill.fail{background:var(--mcqp-danger)}
.mcqp-profile-chart-score{font-weight:900;text-align:left;color:#0F172A;font-variant-numeric:tabular-nums}

/* v3.5.9 — fixed profile last-performance chart height */
.mcqp-progress-chart-wrap{position:relative;height:230px;max-height:230px;width:100%;overflow:hidden}
.mcqp-progress-chart-wrap canvas{display:block!important;width:100%!important;height:230px!important;max-height:230px!important}

/* Most Frequently Missed Questions */
.mcqp-missed{max-width:1180px;margin:30px auto;padding:0 16px;color:#111827}
.mcqp-missed-hero{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:stretch;background:linear-gradient(135deg,#eef2ff,#ecfdf5);border:1px solid #e5e7eb;border-radius:24px;padding:24px;box-shadow:0 12px 36px rgba(15,23,42,.08)}
.mcqp-eyebrow{display:inline-flex;padding:5px 10px;border-radius:999px;background:#fff;color:#4f46e5;font-weight:800;font-size:12px;margin-bottom:8px}
.mcqp-missed-hero h1{margin:0 0 8px;font-size:30px;line-height:1.25}
.mcqp-missed-hero p{margin:0;color:#4b5563;line-height:1.8;max-width:760px}
.mcqp-missed-hero-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:10px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.mcqp-missed-hero-card strong{font-size:18px}.mcqp-missed-hero-card span{color:#6b7280;line-height:1.6}
.mcqp-missed-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:18px 0;flex-wrap:wrap}
.mcqp-missed-tabs{display:flex;gap:8px;background:#f3f4f6;padding:6px;border-radius:999px}
.mcqp-missed-tab{border:0;background:transparent;border-radius:999px;padding:9px 16px;font-weight:800;cursor:pointer;color:#4b5563}
.mcqp-missed-tab.active{background:#fff;color:#4f46e5;box-shadow:0 4px 12px rgba(15,23,42,.08)}
.mcqp-missed-filters{display:flex;gap:8px;flex-wrap:wrap}.mcqp-missed-filters select{border:1px solid #d1d5db;border-radius:12px;padding:9px 12px;background:#fff;min-width:130px}
.mcqp-missed-list{display:grid;gap:14px}.mcqp-missed-card{display:grid;grid-template-columns:50px minmax(0,1fr) 240px;gap:14px;background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:16px;box-shadow:0 8px 26px rgba(15,23,42,.06)}
.mcqp-missed-rank{width:42px;height:42px;border-radius:14px;background:#eef2ff;color:#4f46e5;display:grid;place-items:center;font-weight:900}.mcqp-missed-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:#6b7280;font-size:13px;margin-bottom:8px}.mcqp-missed-badge{background:#fef3c7;color:#92400e;border-radius:999px;padding:4px 9px;font-weight:900}.mcqp-missed-main h3{font-size:18px;margin:0 0 12px;line-height:1.65}.mcqp-missed-options{display:grid;gap:7px}.mcqp-missed-opt{display:grid;grid-template-columns:34px minmax(0,1fr) 110px 44px;gap:8px;align-items:center;background:#f9fafb;border:1px solid #eef2f7;border-radius:12px;padding:8px}.mcqp-missed-opt-key{width:28px;height:28px;border-radius:9px;background:#fff;border:1px solid #e5e7eb;display:grid;place-items:center;font-weight:900}.mcqp-missed-opt-text{overflow:hidden;text-overflow:ellipsis}.mcqp-missed-opt-bar{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden}.mcqp-missed-opt-bar i{display:block;height:100%;background:#f59e0b;border-radius:999px}.mcqp-missed-opt-pct{font-weight:900;color:#374151}.mcqp-missed-opt.no-dist{grid-template-columns:34px minmax(0,1fr)}.mcqp-missed-stats{display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;border-right:1px dashed #e5e7eb;padding-right:14px}.mcqp-missed-ring{--p:0;width:112px;height:112px;border-radius:50%;background:conic-gradient(#ef4444 calc(var(--p)*1%),#e5e7eb 0);display:grid;place-items:center;position:relative}.mcqp-missed-ring:after{content:"";position:absolute;inset:11px;background:#fff;border-radius:50%}.mcqp-missed-ring strong,.mcqp-missed-ring span{position:relative;z-index:1}.mcqp-missed-ring strong{font-size:24px}.mcqp-missed-ring span{font-size:12px;color:#6b7280;margin-top:30px;position:absolute}.mcqp-missed-stat-grid{display:grid;gap:6px;width:100%;font-size:13px;color:#4b5563}.mcqp-missed-stat-grid span{background:#f9fafb;border-radius:10px;padding:7px 9px}.mcqp-skeleton-card{height:150px;border-radius:20px;background:linear-gradient(90deg,#f3f4f6,#fff,#f3f4f6);background-size:200% 100%;animation:mcqpSk 1.2s infinite}.mcqp-empty-state{background:#fff;border:1px dashed #d1d5db;border-radius:18px;padding:26px;text-align:center;color:#6b7280}@keyframes mcqpSk{to{background-position:-200% 0}}
@media(max-width:850px){.mcqp-missed-hero{grid-template-columns:1fr}.mcqp-missed-card{grid-template-columns:1fr}.mcqp-missed-rank{width:auto}.mcqp-missed-stats{border-right:0;border-top:1px dashed #e5e7eb;padding:12px 0 0}.mcqp-missed-opt{grid-template-columns:30px 1fr 70px 38px}.mcqp-missed-opt.no-dist{grid-template-columns:30px 1fr}}

/* Most missed hierarchical filters */
.mcqp-missed-section-picker{display:flex;gap:8px;flex-wrap:wrap}.mcqp-missed-section-picker select{min-width:150px}
@media(max-width:700px){.mcqp-missed-section-picker{width:100%}.mcqp-missed-section-picker select,.mcqp-missed-filters select{width:100%;min-width:0}}


/* v3.5.15 — dynamic browser refresh protection against desktop/mobile page-cache variants */
#mcqp-browser-dynamic-root.mcqp-browser-refreshing{position:relative}
#mcqp-browser-dynamic-root.mcqp-browser-refreshing:before{content:"تحديث الأقسام...";display:block;margin:0 auto 10px;max-width:800px;padding:8px 12px;border:1px solid #DBEAFE;border-radius:12px;background:#EFF6FF;color:#1D4ED8;font-size:13px;font-weight:800;text-align:center;direction:rtl}

/* Memory Anchor / Leitner Review */
.mcqp-nav-review{background:linear-gradient(135deg,#eef2ff,#ecfeff)}
.mcqp-review{max-width:1180px;margin:34px auto;padding:0 16px;color:#0f172a}
.mcqp-review-hero{display:flex;justify-content:space-between;gap:22px;align-items:center;background:linear-gradient(135deg,#eef2ff,#ecfeff);border:1px solid #dbeafe;border-radius:26px;padding:28px;box-shadow:0 18px 48px rgba(15,23,42,.08)}
.mcqp-review-hero h1{margin:6px 0 10px;font-size:34px;line-height:1.2}
.mcqp-review-hero p{margin:0;color:#475569;font-size:15px;max-width:720px;line-height:1.9}
.mcqp-review-hero-card{min-width:260px;background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:10px;box-shadow:0 12px 32px rgba(15,23,42,.08)}
.mcqp-review-hero-card strong{font-size:18px}.mcqp-review-hero-card span{color:#64748b;font-size:14px}
.mcqp-review-filters{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0;justify-content:flex-start}
.mcqp-review-filters select{min-width:150px;border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;background:#fff;color:#0f172a}
.mcqp-review-boxes{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:16px}
.mcqp-review-box{border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:16px;text-align:right;cursor:pointer;box-shadow:0 8px 22px rgba(15,23,42,.06);transition:.18s transform,.18s border-color}
.mcqp-review-box:hover,.mcqp-review-box.active{transform:translateY(-2px);border-color:#6366f1}.mcqp-review-box-num{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:12px;background:#eef2ff;color:#4f46e5;font-weight:800;margin-left:8px}.mcqp-review-box strong{display:block;margin:8px 0 4px}.mcqp-review-box small{display:block;color:#64748b;line-height:1.7;min-height:48px}.mcqp-review-box em{display:block;margin-top:8px;font-style:normal;color:#334155;font-size:13px}.mcqp-review-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.mcqp-review-stats>div{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px;text-align:center}.mcqp-review-stats strong{display:block;font-size:28px;color:#4f46e5}.mcqp-review-stats span{color:#64748b;font-size:13px}.mcqp-review-list{display:grid;gap:12px}.mcqp-review-preview-card{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:16px;box-shadow:0 10px 26px rgba(15,23,42,.05)}.mcqp-review-preview-box{width:84px;min-width:84px;text-align:center;background:#f8fafc;border-radius:14px;padding:10px;font-weight:800;color:#4f46e5}.mcqp-review-preview-main h3{font-size:18px;margin:8px 0;line-height:1.7}.mcqp-review-preview-main small{color:#64748b}.mcqp-review-player{width:min(760px,94vw);max-height:92vh;overflow:auto;background:#fff;border-radius:24px;padding:18px;box-shadow:0 24px 70px rgba(15,23,42,.22)}.mcqp-review-card-wrap{perspective:1200px;margin:18px 0}.mcqp-review-flashcard{position:relative;min-height:360px;transform-style:preserve-3d;transition:transform .5s;cursor:pointer}.mcqp-review-flashcard.flipped{transform:rotateY(180deg)}.mcqp-review-card-face{position:absolute;inset:0;backface-visibility:hidden;border:1px solid #e2e8f0;border-radius:22px;padding:24px;background:linear-gradient(135deg,#fff,#f8fafc);box-shadow:0 12px 34px rgba(15,23,42,.08);overflow:auto}.mcqp-review-front h2{font-size:24px;line-height:1.9;margin:14px 0}.mcqp-review-front p{color:#64748b}.mcqp-review-back{transform:rotateY(180deg)}.mcqp-review-answer-title{font-size:20px;font-weight:800;color:#16a34a;margin-bottom:14px}.mcqp-review-card-options{display:grid;gap:8px;margin-bottom:14px}.mcqp-review-card-options>div{display:flex;gap:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px}.mcqp-review-card-options b{display:inline-grid;place-items:center;min-width:32px;height:32px;border-radius:10px;background:#eef2ff;color:#4f46e5}.mcqp-review-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.mcqp-review-bookmark-btn{display:inline-flex;margin-top:12px;border:1px solid #c7d2fe;background:#eef2ff;color:#4338ca;border-radius:999px;padding:8px 12px;font-weight:700;cursor:pointer}.mcqp-review-bookmark-btn:disabled{opacity:.75;cursor:default}.mcqp-review-bookmark-box .mcqp-review-box-num{background:#fef3c7;color:#92400e}
@media(max-width:800px){.mcqp-review-hero{flex-direction:column;align-items:stretch}.mcqp-review-boxes{grid-template-columns:1fr}.mcqp-review-stats{grid-template-columns:1fr}.mcqp-review-preview-card{align-items:flex-start}.mcqp-review-flashcard{min-height:430px}}

/* v3.5.23 — Memory Anchor multi-level filter chips */
.mcqp-review-level-filter{display:flex;align-items:center;gap:7px;flex-wrap:wrap;background:#fff;border:1px solid #cbd5e1;border-radius:14px;padding:7px 10px;min-height:42px}
.mcqp-review-level-filter .mcqp-filter-label{font-weight:800;color:#475569;font-size:13px;margin-left:2px}
.mcqp-review-level-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:999px;padding:6px 9px;cursor:pointer;font-size:13px;font-weight:800;color:#334155}
.mcqp-review-level-chip input{accent-color:var(--mcqp-primary,#4f46e5)}
.mcqp-review-level-chip:has(input:checked){background:#eef2ff;border-color:#c7d2fe;color:#4338ca}
@media(max-width:700px){.mcqp-review-level-filter{width:100%}.mcqp-review-level-chip{flex:1 1 auto;justify-content:center}}


/* Student-facing custom section headings */
.mcqp-browser-hero{background:linear-gradient(135deg,rgba(79,70,229,.08),rgba(16,185,129,.08));border:1px solid rgba(79,70,229,.12);border-radius:20px;padding:20px 24px;margin:0 0 18px;box-shadow:0 10px 30px rgba(15,23,42,.05)}
.mcqp-browser-hero h1{margin:0 0 6px;font-size:26px;line-height:1.4;color:#111827}
.mcqp-browser-hero p,.mcqp-trivia-description{margin:0;color:#64748b;line-height:1.8;font-size:15px}
.mcqp-trivia-description{margin-top:4px}

.mcqp-missed-hero-card .mcqp-mini-label{font-size:12px;font-weight:700;color:#374151;margin-top:2px}
.mcqp-challenge-limit{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:10px 12px;background:#fff;color:#111827}

/* Section Challenge / Time Attack */
.mcqp-section-challenge{max-width:1180px;margin:28px auto;padding:0 16px;direction:rtl}
.mcqp-challenge-hero{margin-bottom:18px}
.mcqp-challenge-setup{margin-bottom:18px}
.mcqp-challenge-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:14px;align-items:end}
.mcqp-challenge-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
#mcqp-challenge-play .mcqp-trivia-progress{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin:10px 0 18px}
#mcqp-ch-bar-fill{height:100%;width:0;background:var(--mcqp-primary,#4F46E5);transition:width .2s ease}
#mcqp-ch-timer{min-width:58px;text-align:center;font-weight:800;background:#eef2ff;border-radius:999px;padding:6px 10px;color:#3730a3}
#mcqp-ch-timer.warning{background:#fee2e2;color:#b91c1c}
#mcqp-challenge-result{background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:20px;box-shadow:0 12px 35px rgba(15,23,42,.08);margin-bottom:18px}
.mcqp-result-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin:14px 0}
.mcqp-result-box{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:14px;text-align:center}
.mcqp-result-box span{display:block;color:#64748b;font-size:13px;margin-bottom:6px}
.mcqp-result-box strong{font-size:24px;color:#111827}
.mcqp-challenge-bottom{display:grid;grid-template-columns:1.3fr .9fr;gap:18px;margin-top:18px}
.mcqp-ch-my-scores{display:flex;flex-direction:column;gap:10px}
.mcqp-ch-score-row{border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#fff;display:grid;gap:5px}
.mcqp-ch-score-row strong{color:#111827}
.mcqp-ch-score-row span{color:#2563eb;font-weight:700}
.mcqp-ch-score-row small{color:#64748b}
.mcqp-ch-lb-tab{border:0;background:#eef2ff;color:#3730a3;border-radius:999px;padding:8px 13px;cursor:pointer;font-weight:700}
.mcqp-ch-lb-tab.active{background:var(--mcqp-primary,#4F46E5);color:#fff}
@media (max-width: 900px){.mcqp-challenge-grid{grid-template-columns:1fr 1fr}.mcqp-challenge-bottom{grid-template-columns:1fr}.mcqp-result-grid{grid-template-columns:1fr 1fr}}
@media (max-width: 560px){.mcqp-challenge-grid,.mcqp-result-grid{grid-template-columns:1fr}}

/* v3.5.44 — Modern student web home UI */
.mcqp-student-home{max-width:1180px;margin:28px auto;padding:0 16px;color:#0f172a;box-sizing:border-box}.mcqp-student-home *{box-sizing:border-box}.mcqp-student-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:18px;align-items:stretch;padding:24px;border:1px solid rgba(148,163,184,.22);border-radius:28px;background:radial-gradient(circle at 10% 20%,rgba(79,70,229,.16),transparent 32%),linear-gradient(135deg,#ffffff,#f8fafc);box-shadow:0 22px 55px rgba(15,23,42,.09)}.mcqp-student-hero h1{margin:10px 0 8px;font-size:clamp(26px,4vw,44px);line-height:1.25;color:#111827}.mcqp-student-hero p{margin:0;max-width:720px;color:#64748b;font-size:15px;line-height:1.9}.mcqp-student-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.mcqp-student-status-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:190px;border-radius:24px;background:rgba(255,255,255,.78);border:1px solid rgba(226,232,240,.9);box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}.mcqp-student-avatar{width:74px;height:74px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:#eef2ff;font-size:34px;overflow:hidden}.mcqp-student-avatar img{width:100%;height:100%;object-fit:cover}.mcqp-student-plan{display:inline-flex;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:900;border:1px solid #e2e8f0;background:#f8fafc;color:#475569}.mcqp-student-plan.premium{background:#fff7ed;border-color:#fed7aa;color:#c2410c}.mcqp-student-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.mcqp-student-kpis>div{padding:15px 16px;border-radius:18px;background:#fff;border:1px solid #eef2f7;box-shadow:0 10px 28px rgba(15,23,42,.055)}.mcqp-student-kpis span{display:block;color:#64748b;font-size:12px;font-weight:800}.mcqp-student-kpis strong{display:block;color:#111827;font-size:26px;line-height:1.2;margin-top:4px}.mcqp-student-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.mcqp-student-card{position:relative;overflow:hidden;display:flex;flex-direction:column;min-height:190px;text-decoration:none!important;color:#111827!important;background:#fff;border:1px solid #e8eef7;border-radius:26px;padding:20px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.mcqp-has-shadows .mcqp-student-card{box-shadow:0 16px 38px rgba(15,23,42,.08)}.mcqp-no-shadows .mcqp-student-card{box-shadow:none}.mcqp-student-card:before{content:"";position:absolute;inset:auto -25% -42% auto;width:160px;height:160px;border-radius:999px;background:rgba(79,70,229,.09);pointer-events:none}.mcqp-student-card:hover{transform:translateY(-4px);border-color:#c7d2fe;box-shadow:0 22px 50px rgba(15,23,42,.12)}.mcqp-student-card-icon{width:54px;height:54px;border-radius:18px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eef2ff,#e0e7ff);font-size:30px;margin-bottom:16px}.mcqp-student-card-title{font-size:19px;font-weight:1000;line-height:1.35;margin-bottom:8px;color:#0f172a}.mcqp-student-card-desc{font-size:13px;line-height:1.8;color:#64748b;padding-inline-end:8px}.mcqp-student-card-badge{position:absolute;top:14px;left:14px;z-index:1;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;color:#475569;font-size:11px;font-weight:900;padding:5px 9px}.mcqp-student-card-arrow{margin-top:auto;align-self:flex-start;font-weight:1000;color:#4f46e5}.mcqp-style-rounded .mcqp-student-card,.mcqp-style-rounded .mcqp-student-hero{border-radius:34px}.mcqp-style-compact .mcqp-student-card{min-height:150px;border-radius:18px;padding:16px}.mcqp-style-compact .mcqp-student-card-icon{width:46px;height:46px;border-radius:14px;font-size:25px;margin-bottom:12px}.mcqp-card-subjects .mcqp-student-card-icon{background:linear-gradient(135deg,#dcfce7,#bbf7d0)}.mcqp-card-challenges .mcqp-student-card-icon{background:linear-gradient(135deg,#fef3c7,#fed7aa)}.mcqp-card-missed .mcqp-student-card-icon{background:linear-gradient(135deg,#fee2e2,#fecaca)}.mcqp-card-review .mcqp-student-card-icon{background:linear-gradient(135deg,#e0f2fe,#bae6fd)}.mcqp-card-activity .mcqp-student-card-icon{background:linear-gradient(135deg,#ede9fe,#ddd6fe)}.mcqp-card-profile .mcqp-student-card-icon{background:linear-gradient(135deg,#f1f5f9,#e2e8f0)}
.mcqp-challenge-hub-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:16px 0}.mcqp-challenge-hub-card{display:flex;flex-direction:column;gap:8px;min-height:145px;text-decoration:none!important;color:#0f172a!important;background:#fff;border:1px solid #e8eef7;border-radius:22px;padding:17px;box-shadow:0 13px 34px rgba(15,23,42,.07);position:relative;overflow:hidden}.mcqp-challenge-hub-card:before{content:"";position:absolute;inset:auto -30px -45px auto;width:130px;height:130px;border-radius:999px;background:rgba(79,70,229,.08)}.mcqp-challenge-hub-card.active{border-color:#c7d2fe;background:linear-gradient(135deg,#fff,#f8fafc)}.mcqp-challenge-hub-icon{width:48px;height:48px;border-radius:17px;background:#eef2ff;display:flex;align-items:center;justify-content:center;font-size:28px}.mcqp-challenge-hub-card.daily .mcqp-challenge-hub-icon{background:#fff7ed}.mcqp-challenge-hub-card.section .mcqp-challenge-hub-icon{background:#ecfeff}.mcqp-challenge-hub-card.overall .mcqp-challenge-hub-icon{background:#fef3c7}.mcqp-challenge-hub-card strong{font-size:17px;font-weight:1000}.mcqp-challenge-hub-card small{color:#64748b;line-height:1.7}.mcqp-challenge-hub-card em{font-style:normal;font-size:12px;font-weight:900;color:#4f46e5;margin-top:auto}
@media(max-width:820px){.mcqp-student-hero{grid-template-columns:1fr;padding:20px;border-radius:22px}.mcqp-student-status-card{min-height:auto;padding:16px;align-items:flex-start}.mcqp-student-kpis{grid-template-columns:repeat(2,1fr)}.mcqp-challenge-hub-grid{grid-template-columns:1fr}.mcqp-student-card-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.mcqp-student-home{margin:18px auto;padding:0 12px}.mcqp-student-card-grid{grid-template-columns:1fr}.mcqp-student-kpis{grid-template-columns:1fr 1fr;gap:9px}.mcqp-student-kpis>div{padding:12px}.mcqp-student-kpis strong{font-size:22px}.mcqp-student-card{min-height:160px;border-radius:22px}.mcqp-student-actions .mcqp-btn{width:100%;justify-content:center}}

/* Modern student home logout/account actions */
.mcqp-btn-danger{background:#fee2e2!important;color:#991b1b!important;border:1px solid #fecaca!important;box-shadow:0 10px 24px rgba(239,68,68,.10)}
.mcqp-btn-danger:hover{background:#fecaca!important;color:#7f1d1d!important;transform:translateY(-1px)}
.mcqp-student-actions .mcqp-logout-btn{cursor:pointer}
@media(max-width:560px){.mcqp-student-actions{width:100%}.mcqp-student-actions .mcqp-btn,.mcqp-student-actions a.mcqp-btn{width:100%;justify-content:center;text-align:center}}
