@media (max-width: 520px) {
    .quizContainer {
        width: 100%!important;
    }

    .questionContainer .textContainer p {
        margin-top: .35em!important;
        margin-bottom: .35em!important;
    }

    .answersContainer .answerButton {
        margin: .5em 0 .5em 0!important;
    }

    .answerButton p {
        margin: .45em 0 .45em 0!important;
    }

    .questionContainer .textContainer {
        font-size: 1.08rem!important;
        margin: 0!important;
        text-align: center!important;
    }

    .questionContainer {
        flex-direction: column!important;
    }

    .answersContainer {
        grid-template-columns: repeat(1, 1fr) !important;
        grid-row-gap: 10px!important;
        grid-column-gap: 10px!important;
        margin-top: 0px!important;
    }

    .answersContainer .answerButton {
        margin: 0!important;
    }

    .quizShareButtons {
        gap: 8px;
    }

    .quizShareIconBtn {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .quizShareIconBtn img {
        width: 21px;
        height: 21px;
    }

    .quizResultMoreBtnWrapper {
        margin-top: 16px;
    }

    .quizResultMoreBtn {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px;
        border-radius: 13px;
    }
}

.quizContentWrapper {
    max-width: 800px;
    margin: auto;
    padding: 22px 0 0 0;
    border-top: 1px solid rgba(95, 127, 114, 0.22);
}

.quizContainer {
    position: relative;
    max-width: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #2f3a35;
}

.gameElementWrapper {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gameElementWrapper h3 {
    margin: 24px auto;
    color: #2f3a35;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.gameElementWrapper .shareBlockItemsContainer {
    justify-content: center;
}

.quizContainer .quizImageContainer {
    position: relative;
    max-width: 350px;
    margin: auto;
    text-align: right;
}

.quizContainer .questionContainer .questionDevider {
    margin: 0 auto 0 auto;
    border-bottom: 1px solid rgba(95, 127, 114, 0.18);
}

.questionContainer {
    display: flex;
    flex-direction: column;
}

.resultWrapper {
    flex-direction: column!important;
}

.quizContainer .quizImageContainer img {
    position: relative;
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(95, 127, 114, 0.14);
    box-shadow: 0 14px 34px rgba(47, 58, 53, 0.10);
}

.quizContainer .quizImageContainer figcaption {
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: #8f978e;
}

.questionContainer .textContainer {
    text-align: center;
    font-size: 1.3rem;
    color: #2f3a35;
}

.textContainer .resultText {
    text-align: left;
}

.questionContainer .textContainer p {
    margin: 24px 0;
}

.quizContainer .answersContainer {
    display: grid;
    grid-column-gap: 16px;
    grid-row-gap: 16px;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 24px;
}

.quizProgressContainer {
    display: flex;
    justify-content: center;
    padding: 24px 0;
    font-size: 17px;
    font-style: italic;
    color: #6f766f;
}

.answerButton {
    border: 1px solid rgba(95, 127, 114, 0.20);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform .16s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease, opacity .22s ease;
    max-width: 600px;
    user-select: none;

    padding: 14px 16px;
    background: #ffffff;
    color: #2f3a35;
    font-weight: 700;
    font-size: 1.04rem;
    line-height: 1.3;
    box-shadow: 0 8px 22px rgba(47, 58, 53, 0.06);
}

.answerButton p {
    margin: .5em 0 .5em 0;
}

.answerButton:hover {
    transform: translateY(-1px);
    background-color: #fbfaf6;
    border-color: rgba(95, 127, 114, 0.38);
    box-shadow: 0 12px 28px rgba(47, 58, 53, 0.10);
}

.answerButton.unavailable {
    cursor: default;
    opacity: 0.58;
    transform: none;
    background: #edf0ea;
    color: #7d857d;
    box-shadow: none;
}

.answerButton.answerSelected {
    background: rgba(95, 127, 114, 0.12);
    border-color: rgba(95, 127, 114, 0.58);
    color: #2f3a35;
    box-shadow: 0 10px 26px rgba(95, 127, 114, 0.16);
}

.answerButton.correctAnswer {
    background: rgba(83, 139, 103, 0.14);
    border-color: rgba(83, 139, 103, 0.62);
    color: #234234;
    box-shadow: 0 10px 26px rgba(83, 139, 103, 0.14);
}

.answerButton.wrongAnswer {
    background: rgba(170, 82, 82, 0.12);
    border-color: rgba(170, 82, 82, 0.58);
    color: #5c2b2b;
    box-shadow: 0 10px 26px rgba(170, 82, 82, 0.12);
}

.quizContainer .gameButtonsContainer {
    display: flex;
}

.gameButtonsContainer .gameButton {
    margin: 0 .5em 0 .5em;
    border: 1px solid rgba(95, 127, 114, 0.22);
    border-radius: 14px;
    text-align: center;
    flex: 1;
    background: #ffffff;
    color: #2f3a35;
    box-shadow: 0 8px 20px rgba(47, 58, 53, 0.06);
    transition: transform .16s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.gameButton p {
    margin: .5em 0 .5em 0;
}

.gameButton.checkBtn {
    color: #48695f;
    font-size: 1.5rem;
    font-weight: 800;
}

.gameButton.arrowBtn {
    font-size: 1.5rem;
    cursor: pointer;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.gameButton.arrowBtn:hover,
.gameButton.nextBtn:hover {
    transform: translateY(-1px);
    background: rgba(95, 127, 114, 0.10);
    border-color: rgba(95, 127, 114, 0.38);
}

.gameButton.unavailable {
    background: #edf0ea;
    color: #9aa199;
    box-shadow: none;
}

.quizContainer .resultsContainer {
    margin-top: 1rem;
    text-align: center;
}

.resultsContainer .resultHeadline {
    margin-top: 1em;
    font-size: 1.3rem!important;
    font-weight: 800;
    color: #2f3a35;
}

.resultsContainer .resultScore {
    font-style: italic;
    color: #6f766f;
}

.resultsContainer .sharesButtons {
    display: flex;
    margin-bottom: 1em;
}

.sharesButtons .icon-vk,.icon-ok {
    scale: 2.5;
}

.sharesButtons .icon-ok {
    color: #6f766f;
}

.sharesButtons .icon-vk {
    color: #48695f;
}

.startBtn {
    border: 1px solid rgba(95, 127, 114, 0.36);
    padding: 13px 26px;
    border-radius: 16px;
    background: linear-gradient(135deg, #5f7f72 0%, #48695f 100%);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .22s ease, filter .22s ease;
    color: #ffffff;
    font-size: 30px;
    font-weight: 850;
    margin: auto;
    box-shadow: 0 14px 34px rgba(72, 105, 95, 0.22);
}

.startBtn:hover {
    transform: translateY(-1px);
    filter: saturate(1.03) brightness(0.98);
    box-shadow: 0 18px 40px rgba(72, 105, 95, 0.28);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(251, 250, 246, 0.86);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 7px solid rgba(95, 127, 114, 0.18);
    border-top: 7px solid #5f7f72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Quiz: show/hide blocks --- */
.quizGameField.is-visible { display: block !important; }
.resultsContainer.is-visible { display: block !important; }

/* --- Next/Finish button: под текст, а не стрелку --- */
.gameButton.nextBtn {
    font-size: 1.2rem;
    cursor: pointer;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    user-select: none;
    font-weight: 800;
}

/* disabled состояние уже есть через .unavailable, но добавим запрет кликов */
.gameButton.unavailable {
    pointer-events: none;
}

/* --- Lock answers after выбор --- */
.quizContainer.isLocked .answerButton {
    pointer-events: none;
}

/* --- Fade animation for question switch --- */
.quizFadeOut {
    opacity: 0;
    transition: opacity .25s ease;
}
.quizFadeIn {
    opacity: 1;
    transition: opacity .25s ease;
}

/* --- Similar quizzes container --- */
.similarQuizzesContainer {
    margin-top: 24px;
    text-align: left;
}


/* =========================
   QUIZ GAME FIELD (IMPROVED)
   add to end of styles_udt.css
   ========================= */

/* контейнер игры */
#quizGameField {
    margin: 0 auto;
    margin-top: 1.5em;
    max-width: 760px;

    background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
    border: 1px solid rgba(95, 127, 114, 0.18);
    border-radius: 22px;

    padding: 24px 20px;
    box-shadow: 0 18px 46px rgba(47, 58, 53, 0.10);
    backdrop-filter: none;
    color: #2f3a35;
    box-sizing: border-box;
}

/* прогресс сверху */
#quizProgress {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 13px;
    border-radius: 999px;

    background-color: rgba(95, 127, 114, 0.10);
    border: 1px solid rgba(95, 127, 114, 0.22);

    color: #48695f;
    font-weight: 800;
    letter-spacing: 0.2px;

    margin: 0 auto 14px auto;
}

/* центрируем прогресс если он один */
#quizProgressHolder {
    display: flex;
    justify-content: center;
}

/* текст вопроса */
#questionText {
    margin: 0;
    margin-top: 8px;
    margin-bottom: 20px;

    text-align: center;
    color: #2f3a35;

    font-size: 1.35rem;
    font-weight: 820;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

/* контейнер вариантов */
#answersCont {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    margin-top: 8px;
    margin-bottom: 18px;
}

/* на узких экранах — в столбик */
@media (max-width: 560px) {
    #quizGameField {
        padding: 18px 14px;
        border-radius: 18px;
    }

    #answersCont {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #questionText {
        font-size: 1.18rem;
    }
}

/* кнопка-ответ */
.answerButton {
    user-select: none;
    cursor: pointer;

    padding: 14px 14px;
    border-radius: 16px;

    background-color: #ffffff;
    border: 1px solid rgba(95, 127, 114, 0.20);

    color: #2f3a35;
    font-weight: 760;
    font-size: 1.05rem;
    line-height: 1.28;

    transition: transform .15s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}

/* hover (только если не disabled) */
.answerButton:hover {
    transform: translateY(-1px);
    background-color: #fbfaf6;
    border-color: rgba(95, 127, 114, 0.38);
}

/* выбранный (PERSONALITY и до подсветки TRIVIA) */
.answerButton.answerSelected {
    background-color: rgba(95, 127, 114, 0.12);
    border-color: rgba(95, 127, 114, 0.58);
    box-shadow: 0 9px 22px rgba(95, 127, 114, 0.15);
}

/* недоступные после выбора */
.answerButton.unavailable {
    cursor: default;
    opacity: 0.58;
    transform: none;
}

/* TRIVIA: правильный/неправильный */
.answerButton.correctAnswer {
    background-color: rgba(83, 139, 103, 0.14);
    border-color: rgba(83, 139, 103, 0.62);
    color: #234234;
    box-shadow: 0 9px 22px rgba(83, 139, 103, 0.14);
}

.answerButton.wrongAnswer {
    background-color: rgba(170, 82, 82, 0.12);
    border-color: rgba(170, 82, 82, 0.58);
    color: #5c2b2b;
    box-shadow: 0 9px 22px rgba(170, 82, 82, 0.12);
}

/* кнопка Next/Finish */
#nextQuestion {
    width: 100%;
    border: 1px solid rgba(72, 105, 95, 0.28);
    cursor: pointer;

    padding: 14px 16px;
    border-radius: 16px;

    background: linear-gradient(135deg, #5f7f72 0%, #48695f 100%);

    color: #ffffff;
    font-weight: 850;
    font-size: 1.08rem;

    box-shadow: 0 12px 28px rgba(72, 105, 95, 0.20);
    transition: transform .16s ease, box-shadow .25s ease, filter .25s ease, opacity .25s ease;
}

/* hover */
#nextQuestion:hover {
    transform: translateY(-1px);
    filter: saturate(1.03) brightness(0.98);
    box-shadow: 0 16px 34px rgba(72, 105, 95, 0.25);
}

/* disabled (у тебя это класс unavailable) */
#nextQuestion.unavailable {
    cursor: default;
    opacity: 0.55;
    background: #edf0ea;
    border-color: rgba(95, 127, 114, 0.18);
    color: #8f978e;
    box-shadow: none;
    transform: none;
}

/* более мягкая анимация смены вопроса (если используешь quizFadeIn/quizFadeOut) */
.quizFadeOut {
    opacity: 0.0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
}

.quizFadeIn {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease;
}


/* RESULT CARD (AJAX) */

.quizResultCard {
    max-width: 760px;
    margin: 0 auto;
    margin-top: 0;

    background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
    border: 1px solid rgba(95, 127, 114, 0.18);
    border-radius: 22px;

    padding: 20px 20px 18px 20px;
    box-shadow: 0 18px 46px rgba(47, 58, 53, 0.10);
    backdrop-filter: none;
    box-sizing: border-box;
}

.quizResultCardImageWrap {
    aspect-ratio: 16/9;
    width: 100%;
    margin-bottom: 16px;
}

.quizResultCardImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    border: 1px solid rgba(95, 127, 114, 0.14);
    box-shadow: 0 12px 30px rgba(47, 58, 53, 0.08);
}

.quizResultCardTitle {
    margin: 0 0 10px 0;
    color: #2f3a35;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.quizResultCardText {
    color: #46514b;
    font-size: 1.08rem;
    line-height: 1.65;
}

.quizResultCardMeta {
    margin-top: 12px;
    color: #6f766f;
    font-weight: 800;
}

.quizResultCardMetaValue {
    color: #2f3a35;
}

.quizShareBlock {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(95, 127, 114, 0.16);
}

.quizShareTitle {
    font-weight: 850;
    color: #2f3a35;
    margin-bottom: 10px;
}

.quizShareButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.quizShareBtn {
    text-decoration: none;
    cursor: pointer;

    color: #48695f;
    background-color: rgba(95, 127, 114, 0.08);
    border: 1px solid rgba(95, 127, 114, 0.20);

    padding: 10px 12px;
    border-radius: 13px;
    font-weight: 820;

    transition: transform .16s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.quizShareBtn:hover {
    transform: translateY(-1px);
    background-color: rgba(95, 127, 114, 0.14);
    border-color: rgba(95, 127, 114, 0.34);
    color: #2f3a35;
}


/* Image loading state (перекрываем существующий .loading-overlay, чтобы по умолчанию был скрыт) */
#imgContainer .loading-overlay {
    display: none;
}

/* Когда идёт загрузка новой картинки */
#imgContainer.is-loading .loading-overlay {
    display: flex;
}

/* Чтобы не показывать старую картинку под спиннером */
#imgContainer.is-loading img {
    visibility: hidden;
}

.quizShareBtnCopy {
    padding: 10px 14px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quizShareIconBtn {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    flex: 0 0 48px;
}

.quizShareIconBtn img {
    width: 22px;
    height: 22px;
    display: block;
}


/* Google Preferred Sources CTA */

.quizGoogleSourceBox {
    margin-top: 14px;
    padding: 15px 15px 16px 15px;

    background-color: rgba(95, 127, 114, 0.08);
    border: 1px solid rgba(95, 127, 114, 0.20);
    border-radius: 16px;

    text-align: left;

    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

.quizGoogleSourceTitle {
    color: #2f3a35;
    font-weight: 850;
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 6px;
    text-align: center;
    letter-spacing: -0.02em;
}

.quizGoogleSourceText {
    color: #5f6961;
    font-size: .98rem;
    line-height: 1.5;
    margin: 0 0 12px 0;
    text-align: center;
}

.quizGoogleSourceBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 15px;

    border-radius: 13px;
    border: 1px solid rgba(72, 105, 95, 0.30);
    background: linear-gradient(135deg, #5f7f72 0%, #48695f 100%);

    color: #ffffff;
    text-decoration: none;
    font-weight: 850;

    box-shadow: 0 10px 24px rgba(72, 105, 95, 0.18);
    transition: transform .16s ease, box-shadow .25s ease, filter .25s ease;
}

.quizGoogleSourceBtn:hover {
    transform: translateY(-1px);
    filter: saturate(1.03) brightness(0.98);
    box-shadow: 0 14px 30px rgba(72, 105, 95, 0.23);
    color: #ffffff;
}


/* QUIZ RESULT MORE BUTTON */

.quizResultMoreBtnWrapper {
    display: flex;
    justify-content: center;
    margin: 18px 0 0 0;
}

.quizResultMoreBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 180px;
    padding: 11px 18px;
    border-radius: 15px;

    background: rgba(95, 127, 114, 0.10);
    border: 1px solid rgba(95, 127, 114, 0.28);

    color: #48695f;
    text-decoration: none;

    font-size: 1rem;
    font-weight: 850;
    line-height: 1.15;

    cursor: pointer;
    transition: transform .16s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.quizResultMoreBtn::after {
    content: "↓";
    margin-left: 8px;
    font-size: 1rem;
    line-height: 1;
    transform: translateY(-1px);
}

.quizResultMoreBtn:hover {
    transform: translateY(-1px);
    background: rgba(95, 127, 114, 0.16);
    border-color: rgba(95, 127, 114, 0.42);

    color: #2f3a35;
    text-decoration: none;
}

.quizResultMoreBtn:focus-visible {
    outline: 2px solid rgba(95, 127, 114, 0.60);
    outline-offset: 3px;
}
/* END QUIZ RESULT MORE BUTTON */
