.nx_quiz_container {
    --nx_quiz_surface_color: #fff;
    --nx_quiz_text_color: #20242c;
    --nx_quiz_border_color: #d9dee7;
    --nx_quiz_border_radius: 18px;
    color: var(--nx_quiz_text_color);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    margin: 2rem auto;
    max-width: 920px;
}

.nx_quiz_container .nx_quiz_question {
    background: var(--nx_quiz_surface_color);
    border: 1px solid var(--nx_quiz_border_color);
    border-radius: var(--nx_quiz_border_radius);
    box-shadow: 0 14px 40px rgba(23, 31, 48, .09);
    color: var(--nx_quiz_text_color);
    margin: 0 0 1.25rem;
    padding: clamp(1rem, 3vw, 1.75rem);
}

.nx_quiz_container .nx_quiz_question_title {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    letter-spacing: -.02em;
    line-height: 1.3;
    margin: 0 0 .75rem;
}

.nx_quiz_container .nx_quiz_question_content {
    margin: 0 0 1rem;
}

.nx_quiz_container .nx_quiz_question_content img,
.nx_quiz_container .nx_quiz_question_answer_image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.nx_quiz_container .nx_quiz_question_answer_image {
    margin-bottom: .65rem;
}

.nx_quiz_container .nx_quiz_question_answer_image img {
    max-height: 320px;
    margin: 0 auto;
    border-radius: calc(var(--nx_quiz_border_radius) * .4);
    object-fit: contain;
}

.nx_quiz_container .nx_quiz_question_answer {
    border-radius: calc(var(--nx_quiz_border_radius) * .65);
    margin: .55rem 0;
    position: relative;
}

.nx_quiz_container .nx_quiz_question_answers label {
 /*   background: color-mix(in srgb, var(--nx_quiz_surface_color) 92%, var(--nx_quiz_text_color)); */
    border: 1px solid var(--nx_quiz_border_color);
    border-radius: inherit;
    color: var(--nx_quiz_text_color);
    display: block !important;
    font-size: .95rem;
    line-height: 1.45;
    margin: 0;
    padding: .85rem 1rem .85rem 2.8rem;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    width: 100%;
}

.nx_quiz_container .nx_quiz_question_answer label::before {
    border: 2px solid var(--nx_quiz_border_color);
    border-radius: 50%;
    content: "";
    height: 1rem;
    left: 1rem;
    position: absolute;
    top: 1.05rem;
    width: 1rem;
}

.nx_quiz_container .nx_quiz_question_answer:hover label {
    border-color: var(--nx_quiz_button_color);
    transform: translateY(-1px);
}

.nx_quiz_container .nx_quiz_question_answer input:focus-visible + label {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--nx_quiz_button_color) 28%, transparent);
    outline: 2px solid transparent;
}

.nx_quiz_container .nx_quiz_question_answer input:checked + label {
    background: var(--nx_quiz_hover_color);
    border-color: var(--nx_quiz_button_color);
    color: var(--nx_quiz_hover_text_color);
    font-weight: 700;
}

.nx_quiz_container .nx_quiz_question_answer input:checked + label::before {
    background: var(--nx_quiz_button_color);
    border: 4px solid var(--nx_quiz_surface_color);
    box-shadow: 0 0 0 2px var(--nx_quiz_button_color);
}

.nx_quiz_container .nx_quiz_question_answer.is-correct label {
    border: 3px solid var(--nx_quiz_correct_color) !important;
}

.nx_quiz_container .nx_quiz_question_answer.is-wrong label {
    border: 3px solid var(--nx_quiz_wrong_color) !important;
}

.nx_quiz_container .nx_quiz_question_answer.is-checking {
    opacity: .55;
}

.nx_quiz_container .nx_quiz_submit {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: center;
    padding: .5rem 0 1rem;
}

.nx_quiz_container .qbtn {
    border: 0;
    border-radius: var(--nx_quiz_border_radius);
    box-shadow: none;
    margin: 0;
    min-height: 48px;
    padding: .8rem 1.25rem;
    text-shadow: none;
}

.nx_quiz_container .nx_quiz_submit_button {
    background: var(--nx_quiz_submit_button_color);
    color: var(--nx_quiz_submit_button_text_color);
}

.nx_quiz_container .nx_quiz_show_correct {
    background: var(--nx_quiz_button_color);
    color: var(--nx_quiz_button_text_color);
}

.nx_quiz_container .nx_quiz_reset {
    background: var(--nx_quiz_button_reset);
    color: var(--nx_quiz_button_text_reset);
}

.nx_quiz_container .qbtn:focus-visible,
.start_time_limited_quiz:focus-visible {
    outline: 3px solid var(--nx_quiz_button_color);
    outline-offset: 3px;
}

.nx_quiz_container .nx_quiz_results_content {
    border-radius: var(--nx_quiz_border_radius);
    font-size: 1.05rem;
    margin-top: 1rem;
    padding: 1rem;
}

.nx_quiz_container .nx_quiz_results_content:not(:empty) {
    background: color-mix(in srgb, var(--nx_quiz_surface_color) 88%, var(--nx_quiz_button_color));
    border: 1px solid var(--nx_quiz_border_color);
}

.nx_quiz_container .is-busy {
    opacity: .55;
    pointer-events: none;
}

/* 1. Classic — balanced cards */
.nx-quiz-theme-classic {
    --nx_quiz_button_color: #2463eb;
    --nx_quiz_submit_button_color: #f97316;
    --nx_quiz_hover_color: #eaf0ff;
    --nx_quiz_hover_text_color: #173b86;
}

/* 2. Minimal — quiet, precise */
.nx-quiz-theme-minimal {
    --nx_quiz_button_color: #111827;
    --nx_quiz_submit_button_color: #111827;
    --nx_quiz_hover_color: #f3f4f6;
    --nx_quiz_hover_text_color: #111827;
    --nx_quiz_border_radius: 4px;
    font-family: Georgia, "Times New Roman", serif;
}
.nx-quiz-theme-minimal .nx_quiz_question {
    border-width: 0 0 1px;
    box-shadow: none;
    padding-inline: 0;
}

/* 3. Bold — high-energy offset blocks */
.nx-quiz-theme-bold {
    --nx_quiz_button_color: #111;
    --nx_quiz_submit_button_color: #ff3d00;
    --nx_quiz_hover_color: #ffe500;
    --nx_quiz_hover_text_color: #111;
    --nx_quiz_border_color: #111;
    --nx_quiz_border_radius: 10px;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}
.nx-quiz-theme-bold .nx_quiz_question {
    border: 3px solid #111;
    box-shadow: 8px 8px 0 #111;
}
.nx-quiz-theme-bold .nx_quiz_question_content,
.nx-quiz-theme-bold .nx_quiz_question_answers {
    font-family: "Trebuchet MS", sans-serif;
}

/* 4. Soft — calm, rounded learning */
.nx-quiz-theme-soft {
    --nx_quiz_button_color: #8b5e83;
    --nx_quiz_submit_button_color: #397367;
    --nx_quiz_hover_color: #f2e9f0;
    --nx_quiz_hover_text_color: #563951;
    --nx_quiz_border_color: #e8dce5;
    --nx_quiz_border_radius: 28px;
    font-family: ui-rounded, "Trebuchet MS", sans-serif;
}
.nx-quiz-theme-soft .nx_quiz_question {
    background: linear-gradient(145deg, var(--nx_quiz_surface_color), #fbf6fa);
    box-shadow: 0 18px 45px rgba(92, 62, 86, .1);
}

/* 5. Editorial — magazine-like hierarchy */
.nx-quiz-theme-editorial {
    --nx_quiz_button_color: #8a2d20;
    --nx_quiz_submit_button_color: #8a2d20;
    --nx_quiz_hover_color: #f3eadb;
    --nx_quiz_hover_text_color: #40140e;
    --nx_quiz_border_color: #c8bba5;
    --nx_quiz_border_radius: 0px;
    font-family: Georgia, "Times New Roman", serif;
}
.nx-quiz-theme-editorial .nx_quiz_question {
    border-width: 0 0 0 6px;
    box-shadow: none;
}
.nx-quiz-theme-editorial .nx_quiz_question_title {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
}

/* 6. Midnight — focused dark mode */
.nx-quiz-theme-midnight {
    --nx_quiz_surface_color: #111827;
    --nx_quiz_text_color: #f8fafc;
    --nx_quiz_border_color: #334155;
    --nx_quiz_button_color: #22d3ee;
    --nx_quiz_submit_button_color: #f59e0b;
    --nx_quiz_button_text_color: #082f49;
    --nx_quiz_submit_button_text_color: #211500;
    --nx_quiz_hover_color: #164e63;
    --nx_quiz_hover_text_color: #ecfeff;
    --nx_quiz_border_radius: 16px;
}
.nx-quiz-theme-midnight .nx_quiz_question {
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.nx_quiz_timer {
    position: fixed;
    z-index: 99999;
    top: 18px;
    right: 18px;
    display: block;
    margin: 0;
    pointer-events: none;
}
.admin-bar .nx_quiz_timer {
    top: 50px;
}
.countdown-widget {
    display: inline-flex;
    align-items: center;
    background: #111827;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(17, 24, 39, .28);
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: .03em;
    padding: .65rem 1rem;
}

@media (max-width: 600px) {
    .nx_quiz_timer { top: 12px; right: 12px; }
    .admin-bar .nx_quiz_timer { top: 58px; }
    .nx_quiz_container .nx_quiz_question {
        padding: 1rem;
    }
    .nx_quiz_container .nx_quiz_submit {
        align-items: stretch;
        flex-direction: column;
    }
    .nx_quiz_container .qbtn {
        width: 100%;
    }
}
