/* 
    Premium MCQ Quiz Styles 
    Multi-Quiz with Glassmorphism & Vibrant Design
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --primary-color: var(--mcq-primary, #0f766e);
    --primary-rgb: var(--mcq-primary-rgb, 15, 118, 110);
    --primary-hover: var(--primary-color);
    --accent-color: #f97316;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --text-color: #111827;
    --bg-glass: rgba(255, 255, 255, 0.98);
    --border-glass: rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON
   ═══════════════════════════════════════════════════════════════ */

.mcq-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 62px;
    height: 62px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    z-index: 999999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mcq-fab:hover {
    transform: scale(1.12) rotate(15deg);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.55);
}

.mcq-fab-icon {
    color: white;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    position: relative;
    z-index: 1;
}

.mcq-fab-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 14px;
    height: 14px;
    background-color: var(--error-color, #ef4444);
    border-radius: 50%;
    border: 2.5px solid var(--primary-color);
    z-index: 2;
    animation: mcq-pulse-badge 2s infinite;
}

@keyframes mcq-pulse-badge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.mcq-bell-anim {
    display: inline-block;
    transform-origin: top center;
    animation: mcq-ring 3s infinite cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes mcq-ring {
    0% {
        transform: rotate(0);
    }

    5% {
        transform: rotate(15deg);
    }

    10% {
        transform: rotate(-15deg);
    }

    15% {
        transform: rotate(12deg);
    }

    20% {
        transform: rotate(-12deg);
    }

    25% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.mcq-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mcq-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL CONTENT
   ═══════════════════════════════════════════════════════════════ */

.mcq-modal-content {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 28px;
    padding: 40px;
    width: 92%;
    max-width: 620px;
    position: relative;
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: mcq-modal-enter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes mcq-modal-enter {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mcq-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcq-modal-close:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   QUIZ HEADER & PROGRESS
   ═══════════════════════════════════════════════════════════════ */

.mcq-quiz-header {
    margin-top: 15px;
}

.mcq-quiz-header h2,
.mcq-quiz-header #mcq-quiz-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.mcq-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mcq-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 18px 0;
    overflow: hidden;
}

.mcq-progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   TIMER
   ═══════════════════════════════════════════════════════════════ */

.mcq-timer {
    background: #f1f5f9;
    color: #6366f1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 2.5px solid #e2e8f0;
    transition: all 0.3s;
}

.mcq-timer.low-time {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
    animation: mcq-pulse 1s infinite;
}

@keyframes mcq-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   QUESTION & OPTIONS
   ═══════════════════════════════════════════════════════════════ */

.mcq-question-text {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 24px;
}

.mcq-options-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mcq-option {
    padding: 16px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 15px;
    font-weight: 500;
}

.mcq-option:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: #f5f3ff;
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.mcq-option.correct {
    border-color: var(--success-color);
    background: #f0fdf4;
    color: #166534;
}

.mcq-option.wrong {
    border-color: var(--error-color);
    background: #fef2f2;
    color: #991b1b;
}

.mcq-option.disabled {
    cursor: default;
    pointer-events: none;
    /* Prevent changing the answer after selection */
}

/* ═══════════════════════════════════════════════════════════════
   FEEDBACK & RESULTS
   ═══════════════════════════════════════════════════════════════ */

.mcq-feedback-box {
    margin-top: 28px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(99, 102, 241, 0.08);
    animation: fadeIn 0.3s ease;
}

.mcq-feedback-text {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.mcq-explanation {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 18px;
}

.mcq-btn {
    padding: 13px 26px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.mcq-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mcq-results-box {
    text-align: center;
    padding: 20px 0;
}

.mcq-results-box h3 {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 800;
}

.mcq-score-emoji {
    display: block;
    font-size: 3rem;
    margin-bottom: 12px;
}

.mcq-score-text {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: #475569;
}

.mcq-score-text strong {
    color: var(--primary-color);
}

.mcq-score-percent {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.mcq-score-feedback-message {
    display: block;
    margin: 0 auto;
    max-width: 520px;
    font-weight: 800;
    font-size: 0.98rem;
    color: #374151;
}

/* ═══════════════════════════════════════════════════════════════
   REGISTRATION SCREEN
   ═══════════════════════════════════════════════════════════════ */

.mcq-registration-box {
    animation: fadeIn 0.4s ease;
    padding: 10px 0;
}

.mcq-registration-box h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-color);
}

.mcq-registration-subtitle {
    color: #64748b;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.mcq-registration-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mcq-form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mcq-form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.mcq-form-group input {
    padding: 12px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #f8fafc;
}

.mcq-form-group input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.mcq-btn-full {
    width: 100%;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   SELECTION SCREEN
   ═══════════════════════════════════════════════════════════════ */

.mcq-selection-box, .mcq-registration-box {
    margin-top: 10px;
}

.mcq-selection-box {
    animation: fadeIn 0.4s ease;
}

.mcq-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.mcq-selection-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-color);
}



.mcq-final-score-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.mcq-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.mcq-btn-outline {
    background: white;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.mcq-btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.mcq-quiz-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar */
.mcq-quiz-list::-webkit-scrollbar {
    width: 6px;
}

.mcq-quiz-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.mcq-quiz-list::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 3px;
}

.mcq-quiz-item {
    background: white;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1.5px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mcq-quiz-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
}

.mcq-quiz-info h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
}

.mcq-quiz-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mcq-quiz-date {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.mcq-quiz-subject-badge {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcq-quiz-qcount {
    background: rgba(var(--primary-rgb), 0.08);
    padding: 8px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.mcq-no-quizzes {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 1rem;
}

/* Refreshed frontend theme */
.mcq-fab {
    background: var(--primary-color);
    box-shadow: 0 18px 38px rgba(var(--primary-rgb), 0.34);
}

.mcq-fab:hover {
    box-shadow: 0 22px 44px rgba(15, 118, 110, 0.42);
}

.mcq-modal-overlay {
    background: rgba(15, 23, 42, 0.62);
}

.mcq-modal-content {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
    border-radius: 32px;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.mcq-quiz-header h2,
.mcq-quiz-header #mcq-quiz-title,
.mcq-results-title {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.mcq-progress-bar {
    height: 10px;
    background: rgba(15, 23, 42, 0.08);
}

.mcq-progress-fill {
    background: var(--primary-color);
}

.mcq-timer {
    background: white;
    color: var(--primary-color);
    border-color: rgba(var(--primary-rgb), 0.18);
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.12);
}

.mcq-question-text {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: 1.32rem;
    line-height: 1.45;
}

.mcq-option {
    border-radius: 18px;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    background: white;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    font-family: 'Manrope', sans-serif;
}

.mcq-option:hover:not(.disabled) {
    border-color: rgba(var(--primary-rgb), 0.5);
    background: rgba(var(--primary-rgb), 0.04);
    transform: translateX(8px);
    box-shadow: 0 16px 28px rgba(var(--primary-rgb), 0.12);
}

.mcq-option.correct {
    background: #f0fdf4;
}

.mcq-option.wrong {
    background: #fef2f2;
}

.mcq-quiz-item {
    border-radius: 22px;
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    background: white;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.mcq-quiz-item:hover {
    border-color: rgba(var(--primary-rgb), 0.42);
    box-shadow: 0 18px 36px rgba(var(--primary-rgb), 0.12);
}

.mcq-quiz-subject-badge {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.16);
}

.mcq-quiz-qcount {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
}

.mcq-quiz-header-meta {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 10px 0 14px 0;
}

.mcq-quiz-meta-pill {
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    padding: 7px 12px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 13px;
    color: #4b5563;
}