@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600;700;800;900&family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --test-primary: #101d4a;
    --test-primary-dark: #071230;
    --test-yellow: #ffd200;
    --test-white: #ffffff;
    --test-bg: #f6f8fc;
    --test-text: #101d4a;
    --test-muted: #66738c;
    --test-border: rgba(16, 29, 74, 0.11);
    --test-shadow: 0 18px 52px rgba(16, 29, 74, 0.10);
}

.test-page,
.test-page * {
    box-sizing: border-box;
}

.test-page {
    min-height: 100vh;
    padding: 42px 0 110px;
    background:
        radial-gradient(circle at top right, rgba(255, 210, 0, 0.18), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
    color: var(--test-text);
    font-family: "Montserrat", Arial, sans-serif;
}

.test-container {
    width: min(100% - 32px, 980px);
    margin-inline: auto;
}

.test-top {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.test-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--test-primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.test-label::before {
    content: "";
    width: 34px;
    height: 3px;
    border-radius: 999px;
    background: var(--test-yellow);
}

.test-top h1 {
    margin: 0;
    color: var(--test-primary);
    font-family: "Inter", Arial, sans-serif;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.test-back {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--test-primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    transition: 0.22s ease;
}

.test-back:hover {
    transform: translateY(-2px);
    background: var(--test-primary-dark);
}

.test-shell {
    background: var(--test-white);
    border: 1px solid var(--test-border);
    border-radius: 28px;
    box-shadow: var(--test-shadow);
    overflow: hidden;
}

.test-progress-head {
    padding: 24px 26px;
    background: var(--test-primary);
    color: var(--test-white);
}

.test-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.test-progress-row strong {
    font-size: 16px;
    font-weight: 900;
}

.test-progress-row span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 800;
}

.progress-track {
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--test-yellow);
    transition: width 0.25s ease;
}

.question-area {
    padding: 34px 32px 30px;
    scroll-margin-top: 120px;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(16, 29, 74, 0.07);
    color: var(--test-primary);
    font-size: 26px;
    font-weight: 900;
}

.question-type {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 210, 0, 0.22);
    color: var(--test-primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.question-title {
    margin: 0;
    color: var(--test-primary);
    font-family: "Inter", Arial, sans-serif;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.28;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.question-image-wrap {
    margin-top: 24px;
    border-radius: 22px;
    background: #f3f5fa;
    border: 1px solid rgba(16, 29, 74, 0.08);
    overflow: hidden;
    display: none;
}

.question-image-wrap.is-visible {
    display: block;
}

.question-image-wrap img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    display: block;
    padding: 16px;
    background: #ffffff;
}

.answers-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.answer-option {
    position: relative;
    width: 100%;
    border: 1px solid rgba(16, 29, 74, 0.11);
    border-radius: 17px;
    background: #ffffff;
    padding: 17px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.answer-option:hover {
    border-color: rgba(16, 29, 74, 0.24);
    box-shadow: 0 12px 32px rgba(16, 29, 74, 0.08);
}

.answer-option.is-selected {
    border-color: var(--test-primary);
    background: rgba(16, 29, 74, 0.045);
}

.answer-mark {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    border: 2px solid rgba(16, 29, 74, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: -2px;
    transition: 0.22s ease;
}

.answer-option.is-selected .answer-mark {
    border-color: var(--test-yellow);
    background: var(--test-yellow);
}

.answer-option.is-selected .answer-mark::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--test-primary);
}

.answer-text {
    color: var(--test-primary);
    font-size: 16px;
    line-height: 1.55;
    font-weight: 700;
}

.question-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 22px 24px;
    background: #f9fafc;
    border-top: 1px solid rgba(16, 29, 74, 0.08);
}

.question-dot {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid rgba(16, 29, 74, 0.12);
    background: #ffffff;
    color: var(--test-primary);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
}

.question-dot.is-current {
    background: var(--test-primary);
    color: #ffffff;
    border-color: var(--test-primary);
}

.question-dot.is-answered:not(.is-current) {
    background: rgba(255, 210, 0, 0.2);
    border-color: rgba(255, 210, 0, 0.8);
}


.question-dot.is-correct {
    background: #1f9d55;
    border-color: #1f9d55;
    color: #ffffff;
}

.question-dot.is-wrong {
    background: #d64545;
    border-color: #d64545;
    color: #ffffff;
}

.question-dot.is-unanswered {
    background: #d9dde7;
    border-color: #c8ceda;
    color: #101d4a;
}

.answer-option.is-correct-answer {
    border-color: #1f9d55;
    background: rgba(31, 157, 85, 0.10);
}

.answer-option.is-correct-answer .answer-mark {
    border-color: #1f9d55;
    background: #1f9d55;
}

.answer-option.is-correct-answer .answer-mark::after {
    content: "✓";
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.answer-option.is-wrong-answer {
    border-color: #d64545;
    background: rgba(214, 69, 69, 0.10);
}

.answer-option.is-wrong-answer .answer-mark {
    border-color: #d64545;
    background: #d64545;
}

.answer-option.is-wrong-answer .answer-mark::after {
    content: "×";
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.answer-option.is-disabled {
    cursor: default;
}

.answer-option.is-disabled:hover {
    transform: none;
    box-shadow: none;
}

.result-help {
    margin-top: 18px;
    color: var(--test-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.test-navigation {
    padding: 22px 32px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid rgba(16, 29, 74, 0.08);
    background: #ffffff;
}

.test-btn {
    min-height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 900;
    font-family: "Montserrat", Arial, sans-serif;
    cursor: pointer;
    transition: 0.22s ease;
    text-decoration: none;
}

.test-btn.prev {
    background: rgba(16, 29, 74, 0.07);
    color: var(--test-primary);
}

.test-btn.next {
    background: var(--test-primary);
    color: #ffffff;
}

.test-btn.finish {
    background: var(--test-yellow);
    color: var(--test-primary);
}

.test-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.test-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.result-box {
    display: none;
    padding: 42px 32px;
    text-align: center;
}

.result-box.is-visible {
    display: block;
}

.result-badge {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--test-primary);
    color: var(--test-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
}

.result-box h2 {
    margin: 0;
    color: var(--test-primary);
    font-family: "Inter", Arial, sans-serif;
    font-size: 38px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.result-box p {
    margin: 14px auto 0;
    max-width: 520px;
    color: var(--test-muted);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 600;
}

.result-score {
    margin-top: 26px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(255, 210, 0, 0.24);
    color: var(--test-primary);
    font-size: 18px;
    font-weight: 950;
}

.result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.restart-btn {
    background: var(--test-primary);
    color: #ffffff;
}

.back-btn {
    background: rgba(16, 29, 74, 0.07);
    color: var(--test-primary);
}

.empty-test {
    padding: 46px 32px;
    text-align: center;
}

.empty-test h2 {
    margin: 0;
    color: var(--test-primary);
    font-family: "Inter", Arial, sans-serif;
    font-size: 32px;
}

.empty-test p {
    color: var(--test-muted);
    font-weight: 600;
}

@media (max-width: 700px) {
    
    .question-type {
    display: flex;
    align-items: center;
    min-height: 21px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 210, 0, 0.22);
    color: var(--test-primary);
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    justify-self: flex-end;
    margin-top:10px;
    
}

.question-meta {
    
    justify-content: space-between;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(16, 29, 74, 0.07);
    color: var(--test-primary);
    font-size: 18px;
    font-weight: 700;
}
    .test-page {
        padding: 28px 0 92px;
    }

    .test-container {
        width: min(100% - 24px, 980px);
    }

    .test-top {
        display: block;
    }

    .test-back {
        margin-top: 16px;
    }

    .test-shell {
        border-radius: 22px;
    }

    .test-progress-head {
        padding: 22px 20px;
    }

    .test-progress-row {
        display: grid;
        gap: 8px;
    }

    .question-area {
        padding: 28px 20px 24px;
        scroll-margin-top: 96px;
    }

    .question-title {
        font-size: 18px;
        font-weight: 700;
    }

    .question-image-wrap img {
        max-height: 280px;
        padding: 12px;
    }

    .answer-option {
        padding: 15px;
    }

    .answer-text {
        font-size: 15px;
    }

    .test-navigation {
        position: sticky;
        bottom: 0;
        z-index: 20;
        padding: 14px 16px;
        box-shadow: 0 -12px 32px rgba(16, 29, 74, 0.08);
    }

    .test-btn {
        flex: 1;
        min-height: 50px;
        padding: 0 14px;
    }

    .question-dots {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: wrap;
    }

    .question-dot {
        width:6vw;
        height:6vw;
        font-size:9px;
    }

    .result-box h2 {
        font-size: 32px;
    }
}



.result-summary {
    margin: 18px auto 0;
    max-width: 560px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.result-summary span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(16, 29, 74, 0.06);
    color: var(--test-primary);
    font-size: 14px;
    font-weight: 900;
}

.result-summary span strong {
    margin-left: 5px;
    color: var(--test-primary);
}

.review-btn {
    background: var(--test-yellow);
    color: var(--test-primary);
}

.review-btn.light {
    background: rgba(16, 29, 74, 0.07);
    color: var(--test-primary);
}

.review-btn.is-hidden {
    display: none;
}

.test-review-mode {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 210, 0, 0.18);
    color: var(--test-primary);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.45;
    display: none;
}

.test-review-mode.is-visible {
    display: block;
}










/* =========================================================
   REVIEW MODE - FINAL COLORS
========================================================= */

.question-dot.is-correct {
    background: #1f9d55 !important;
    border-color: #1f9d55 !important;
    color: #ffffff !important;
}

.question-dot.is-wrong {
    background: #d64545 !important;
    border-color: #d64545 !important;
    color: #ffffff !important;
}

.question-dot.is-unanswered {
    background: #d9dde7 !important;
    border-color: #c8ceda !important;
    color: #101d4a !important;
}

.question-dot.is-current {
    outline: 3px solid #ffd200;
    outline-offset: 3px;
}

/* Tačan odgovor */
.answer-option.is-correct-answer {
    border-color: #1f9d55 !important;
    background: rgba(31, 157, 85, 0.12) !important;
}

.answer-option.is-correct-answer .answer-mark {
    border-color: #1f9d55 !important;
    background: #1f9d55 !important;
}

.answer-option.is-correct-answer .answer-mark::after {
    content: "✓" !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* Pogrešno odabran odgovor */
.answer-option.is-wrong-answer {
    border-color: #d64545 !important;
    background: rgba(214, 69, 69, 0.12) !important;
}

.answer-option.is-wrong-answer .answer-mark {
    border-color: #d64545 !important;
    background: #d64545 !important;
}

.answer-option.is-wrong-answer .answer-mark::after {
    content: "×" !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* Neutralan odgovor poslije testa */
.answer-option.is-disabled {
    cursor: default !important;
}

.answer-option.is-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Ako je korisnik odabrao tačan odgovor, neka bude zelen, ne žut */
.answer-option.is-selected.is-correct-answer {
    border-color: #1f9d55 !important;
    background: rgba(31, 157, 85, 0.12) !important;
}

/* Ako je korisnik odabrao pogrešan odgovor, neka bude crven */
.answer-option.is-selected.is-wrong-answer {
    border-color: #d64545 !important;
    background: rgba(214, 69, 69, 0.12) !important;
}



.result-message-pass {
    margin-top: 16px;
    color: #0f8f3a;
    font-weight: 700;
}

.result-message-fail {
    margin-top: 16px;
    color: #c62828;
    font-weight: 700;
}