@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.mcq-quiz {
    background: linear-gradient(135deg, #f5f7fa, #e0e7ff);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
}

.mcq-quiz-title {
    font-size: 40px; /* Typical size for h3 */
    font-weight: 600; /* Slightly bold, like h3 */
    text-align: center; /* Center the title */
    margin: 0 0 20px 0; /* Spacing below title */
    color: #333; /* Consistent text color */
}



.mcq-question {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mcq-question:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.mcq-question label {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #f7fafc;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.mcq-question label:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.mcq-question input[type="radio"] {
    margin-right: 10px;
    accent-color: #4c51bf;
}

.mcq-question label[style*="background-color: #d4edda"] {
    background: #c6f6d5 !important;
    border-left: 4px solid #48bb78;
    animation: fadeIn 0.5s ease;
}

.mcq-question label[style*="background-color: #f8d7da"] {
    background: #fed7d7 !important;
    border-left: 4px solid #f56565;
    animation: fadeIn 0.5s ease;
}

.mcq-explanation {
    background: #d4ffff !important;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #4c51bf;
    font-size: 2rem;
    color: #0c12c0;
}


.mcq-quiz-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}


.correct-answer {
    background-color: #c6f6d5 !important;  /* light green */
    border-left: 4px solid #48bb78 !important; /* green border */
    animation: fadeIn 0.5s ease;
}

.incorrect-answer {
    background-color: #fed7d7 !important; /* light red */
    border-left: 4px solid #f56565 !important; /* red border */
    animation: fadeIn 0.5s ease;
}

.mcq-options label {
    display: flex;
    align-items: center;
}

.mcq-options input[type="checkbox"],
.mcq-options input[type="radio"] {
    margin-right: 8px;
}

/* UPDATED TOP RESULT */
#mcq-top-result {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: #2aaae6;
    align-items: center;         /* center horizontally */
    justify-content: center;     /* center vertically */
    gap: 10px;
    text-align: center;
    padding: 15px;
    animation: slideIn 0.5s ease;
}

#mcq-top-result h3 {
    margin: 0;
    display: inline;
    margin-right: 10px;
    color: white;
    background: linear-gradient(90deg, #4c51bf, #6b46c1);
    font-size: 3rem;
}

#mcq-top-result button {
    background: linear-gradient(90deg, #ec35d0, #c40dce);
    border: none;
    color: white;
    padding: 8px 15px;
    font-size: 3rem; /* fixed space issue */
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#mcq-top-result button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* NEW TOP BAR */
#mcq-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

/* NEW QUESTION NAV */
#mcq-question-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    flex: 1;
}

/* UPDATED TIMER */
#mcq-timer {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: red !important;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    transition: none !important;
    animation: none !important;
}

.mcq-timer-text {
    text-align: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.mcq-timer-label {
    font-size: 2.5rem;
    font-weight: 600;
    margin-top: 5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: none !important;
    animation: none !important;
    display: none !important;
}

#mcq-top-menu {
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    align-items: center;
}

.blue-link {
    color: #4c51bf;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.blue-link:hover {
    color: #6b46c1;
    text-decoration: underline;
}

#mcq-start-screen {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

#mcq-start-screen button {
    background: linear-gradient(90deg, #f08d36, #ff8e53);
    border: none;
    color: white;
    padding: 12px 30px;
    font-size: 2rem;
    font-weight: 600;
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#mcq-start-screen button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.mcq-quiz button {
    background: linear-gradient(90deg, rgb(238, 115, 7), rgb(228, 96, 14));
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 2.5rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    margin: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mcq-quiz button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 1);
}

.mcq-quiz button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mcq-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.mcq-nav-btn.active {
    background-color: #0c189b !important;
    border: 2px solid #0c189b !important;
    color: #fff !important;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.6);
}

.mcq-nav-btn:disabled {
    background: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}



.mcq-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Default: assume option is short → 2 columns */
.mcq-options .option {
    flex: 1 1 calc(50% - 15px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: all .2s ease;
    display: flex;
    align-items: center;
}

/* LONG OPTIONS → full width (1 column) */
.mcq-options .option.long-option {
    flex: 1 1 100%;
}





.mcq-options label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-size: 16px;
    cursor: pointer;
    word-wrap: break-word;
    word-break: break-word;
    width: auto; /* remove width: 100% */
}



#mcq-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

#mcq-nav-buttons button {
    flex: 1 1 100px;
    min-width: 100px;
    max-width: 100%;
    font-size: 1.2rem;
    padding: 10px 20px;
}



#mcq-result, #mcq-top-result {
    align-items: center;         /* center horizontally */
    justify-content: center;     /* center vertically */
    gap: 10px;
    text-align: center;
    padding: 15px;
    animation: slideIn 0.5s ease;
}

#mcq-result h3 {
    color: hsl(223, 89%, 29%);
    font-weight: 400;
    font-size: 3.0rem;
}

#mcq-result button {
    background: linear-gradient(90deg, #c0f050, #43e715) !important;
    border: none;
    color: white;
    padding: 8px 15px;
    font-size: 3rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#mcq-result button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 600px) {
    .mcq-quiz {
        padding: 20px;
    }

    #mcq-top-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mcq-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .mcq-quiz button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    #mcq-start-screen {
        padding: 30px;
    }

    #mcq-timer {
        width: 50px;
        height: 50px;
        padding: 4px;
    }

    .mcq-timer-text {
        font-size: 1.5rem;
    }
    
    .mcq-quiz-container {
        padding: 10px;
    }

    #mcq-result h3,
    #mcq-top-result h3 {
        white-space: nowrap;
        font-size: 2.5rem !important;
    }


    #mcq-nav-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    #mcq-nav-buttons button {
        width: 100% !important;
        font-size: 1rem;
        padding: 12px 0;
        margin: 0;
    }

    .mcq-options.grid-2x2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .mcq-options {
        flex-direction: row; /* horizontal layout on tablets/desktops */
        gap: 15px;
    }

    .mcq-options label {
        flex: 1 1 calc(50% - 15px); /* 2 columns layout */
    }
    
   
