.nd-quiz-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(19, 56, 43, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nd-quiz-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.nd-quiz-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding: 20px;
}
.nd-quiz-modal-close {
    position: absolute;
    top: 5px;
    right: 35px;
    background: #fff;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--color-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.nd-quiz-modal-content .quiz-wrapper {
    margin: 0 auto;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .nd-quiz-modal-overlay {
        align-items: flex-end;
    }
    .nd-quiz-modal-content {
        padding: 0;
        max-width: 100%;
    }
    .nd-quiz-modal-content .quiz-wrapper {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        border: none;
    }
    .nd-quiz-modal-close {
        top: -50px;
        right: 15px;
    }
}
