
/* MBTI QUIZ PAGE */

.hidden {
    display: none !important;
}

.back-link {
    color: var(--muted);
    font-size: 13px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--purple-light);
}

.quiz-page {
    min-height: calc(100vh - 76px);
    padding: 70px 6%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background:
        radial-gradient(
            ellipse at 50% 10%,
            rgba(125, 74, 205, 0.16),
            transparent 55%
        ),
        var(--bg);
}

.quiz-intro,
.quiz-container,
.result-container {
    width: 100%;
    max-width: 760px;
}

.quiz-intro {
    text-align: center;
    padding: 65px 35px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(23, 19, 33, 0.85);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.2);
}

.quiz-intro h1 {
    font-size: clamp(32px, 6vw, 52px);
    line-height: 1.2;
    margin: 24px 0;
    letter-spacing: -2px;
}

.quiz-intro h1 span {
    color: var(--purple);
}

.quiz-intro > p {
    max-width: 540px;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 14px;
}

.quiz-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.quiz-info span {
    padding: 8px 13px;
    background: rgba(167, 123, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--purple-light);
    font-size: 11px;
}

/* QUESTION PROGRESS */

.quiz-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 12px;
}

#progressPercent {
    color: var(--purple-light);
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--surface-light);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 35px;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #8252d4, #c5a8ff);
    border-radius: inherit;
    transition: width 0.4s ease;
}

/* QUESTION CARD */

.question-card {
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
    animation: questionAppear 0.35s ease;
}

@keyframes questionAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card h2 {
    font-size: clamp(21px, 4vw, 30px);
    line-height: 1.45;
    margin: 18px 0 30px;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.answer-option {
    width: 100%;
    padding: 20px;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
    transition: 0.25s;
}

.answer-option:hover {
    border-color: rgba(167, 123, 255, 0.7);
    background: rgba(167, 123, 255, 0.1);
}

.answer-option.selected {
    border-color: var(--purple);
    background: rgba(167, 123, 255, 0.16);
    box-shadow: 0 0 20px rgba(167, 123, 255, 0.08);
}

.next-button {
    width: 100%;
    margin-top: 28px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.next-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* RESULT */

.result-container {
    padding: 45px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    animation: questionAppear 0.4s ease;
}

.result-container h1 {
    margin-top: 20px;
    font-size: clamp(48px, 10vw, 76px);
    color: var(--purple);
    letter-spacing: 3px;
}

.result-container h2 {
    margin: 5px 0 18px;
    font-size: 25px;
}

.result-container > p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.result-scale {
    margin-bottom: 22px;
}

.result-scale p {
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
}

.result-bar {
    width: 100%;
    height: 8px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-light);
}

.result-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8252d4, #c5a8ff);
    border-radius: inherit;
}

#restartQuiz {
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* MOBILE */

@media (max-width: 650px) {
    .quiz-page {
        padding: 40px 5%;
    }

    .quiz-intro {
        padding: 45px 22px;
    }

    .quiz-intro h1 {
        letter-spacing: -1px;
    }

    .quiz-info {
        gap: 8px;
    }

    .quiz-info span {
        font-size: 10px;
    }

    .question-card {
        padding: 25px 20px;
    }

    .question-card h2 {
        font-size: 22px;
    }

    .answer-option {
        padding: 17px;
        font-size: 13px;
    }

    .result-container {
        padding: 28px 22px;
    }

    .result-container h2 {
        font-size: 21px;
    }
}

#nextQuestion,
#restartQuiz,
#startQuiz {
    background: linear-gradient(135deg, #a77bff, #8052d6);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

#nextQuestion:hover,
#restartQuiz:hover,
#startQuiz:hover {
    background: linear-gradient(135deg, #b995ff, #9468ed);
    transform: translateY(-2px);
}

#nextQuestion:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.result-details h3 {
    color: #a77bff;
    margin-top: 28px;
    margin-bottom: 10px;
}
.result-section h3 {
    color: #a77bff !important;
    font-size: 19px;
    margin-bottom: 12px;
}
.result-scale {
    margin-top: 25px;
}

.result-scale h3 {
    color: #a77bff;
    font-size: 17px;
    margin-bottom: 10px;
}

.result-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #c9b8e8;
}

.result-bar {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 20px;
    background: #211a30;
}

.result-bar-first {
    height: 100%;
    background: #8052d6;
    transition: width 0.5s ease;
}

.result-bar-second {
    height: 100%;
    background: #c3a5ff;
    transition: width 0.5s ease;
}
