.quiz-results {
    margin-top: 20px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quiz-results .question a.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    margin-top: 10px;
}

.quiz-results .question a.button:hover {
    background-color: #005177;
}

.question {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: box-shadow 0.3s ease;
}

.question:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.question h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #333;
}

.question p {
    margin: 5px 0;
    line-height: 1.6;
    color: #555;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.button {
    display: inline-block;
    padding: 10px 15px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.button:hover {
    background: #005177;
}

.quiz-results-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.quiz-results-popup {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    box-sizing: border-box;
    direction: rtl;
}


.quiz-results-popup::-webkit-scrollbar {
    width: 8px;
}

.quiz-results-popup::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.quiz-results-popup::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.quiz-results-popup h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.quiz-results-popup .question {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.quiz-results-popup .question h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2em;
}

.quiz-results-popup .question p {
    margin: 5px 0;
    line-height: 1.6;
    color: #333;
}

.quiz-results-popup .question p strong {
    color: #2980b9;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-popup:hover {
    background: #d32f2f;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .quiz-results-popup {
        width: 95%;
        margin: 0 auto;
        padding: 15px;
    }

    .quiz-results-popup h2 {
        font-size: 1.3em;
    }

    .quiz-results-popup .question h3 {
        font-size: 1.1em;
    }
    .quiz-results {
        padding: 15px;
    }

    .question {
        padding: 10px;
    }

    .question h3 {
        font-size: 1.1em;
    }

    .button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .close-popup {
        width: 25px;
        height: 25px;
        top: 5px;
        right: 5px;
    }
}