/* ═══════════════════════════════════════════════════════════
   Career Quiz — Premium Styles
   ═══════════════════════════════════════════════════════════ */

.quiz-wrapper {
    max-width: 680px;
    margin: 0 auto;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-screen {
    width: 100%;
    animation: quizFadeIn 0.5s ease;
}

@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Intro Screen ────────────────────────────────────────── */
.quiz-intro {
    text-align: center;
}

.quiz-intro-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    animation: quizBounce 2s ease-in-out infinite;
}

@keyframes quizBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.quiz-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.quiz-subtitle {
    color: var(--color-text-secondary, #9ca3af);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 36px;
    color: var(--color-text-muted, #6b7280);
    font-size: 0.9rem;
}

.quiz-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-start-btn {
    padding: 16px 48px;
    font-size: 1.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-start-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5);
}

/* ─── Progress ────────────────────────────────────────────── */
.quiz-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.quiz-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.quiz-progress-text {
    font-size: 0.85rem;
    color: var(--color-text-muted, #6b7280);
    font-weight: 500;
    white-space: nowrap;
}

/* ─── Question ────────────────────────────────────────────── */
.quiz-question {
    animation: quizSlideIn 0.4s ease;
}

@keyframes quizSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.quiz-q-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary, #f3f4f6);
    margin-bottom: 28px;
    line-height: 1.4;
}

/* ─── Answers ─────────────────────────────────────────────── */
.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-answer {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: var(--color-text-secondary, #d1d5db);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.quiz-answer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.25s;
}

.quiz-answer:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.quiz-answer:hover::before {
    opacity: 1;
}

.quiz-answer.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.quiz-answer.selected .quiz-answer-letter {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-color: transparent;
}

.quiz-answer-letter {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text-muted, #6b7280);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    transition: all 0.25s;
    position: relative;
    z-index: 1;
}

.quiz-answer-text {
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

/* ─── Navigation ──────────────────────────────────────────── */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    gap: 16px;
}

.quiz-nav-btn {
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 600;
}

.quiz-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Results Screen ──────────────────────────────────────── */
.quiz-results {
    text-align: center;
}

.quiz-result-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    animation: quizResultPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes quizResultPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.quiz-result-heading {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 12px;
}

.quiz-result-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.quiz-result-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-secondary, #9ca3af);
    max-width: 560px;
    margin: 0 auto 36px;
}

.quiz-result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.quiz-result-actions .btn {
    padding: 14px 36px;
    border-radius: 999px;
    font-size: 1rem;
}

/* ─── Matched Professions Grid ────────────────────────────── */
.quiz-prof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.quiz-prof-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 24px;
    text-align: left;
    transition: all 0.3s ease;
    animation: quizFadeIn 0.5s ease;
    position: relative;
}

.quiz-prof-card.quiz-prof-primary {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.04);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.06);
}

.quiz-prof-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.quiz-prof-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.quiz-prof-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary, #f3f4f6);
    margin-bottom: 8px;
}

.quiz-prof-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 12px;
}

.quiz-prof-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #9ca3af);
}

.quiz-prof-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Profession Favorite Button ──────────────────────────── */
.quiz-prof-fav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 18px;
    width: 100%;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary, #9ca3af);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-prof-fav-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.quiz-prof-fav-btn.is-fav {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.quiz-prof-fav-btn.is-fav:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.quiz-prof-fav-btn.login-hint {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.quiz-prof-fav-btn.fav-pop {
    animation: quizFavPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes quizFavPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ─── Hero Quiz Link (on index.php) ───────────────────────── */
.hero-quiz-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
    /* Start invisible, fade in after 1.2s delay (after all other hero elements) */
    opacity: 0;
    transform: translateY(20px);
    animation: quizLinkEntrance 0.8s ease-out 1.2s forwards, quizLinkPulse 3s ease-in-out 2s infinite;
}

.hero-quiz-link:hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

@keyframes quizLinkEntrance {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes quizLinkPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.08); }
}

/* ─── Mobile ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .quiz-main-title,
    .quiz-result-title {
        font-size: 1.8rem;
    }

    .quiz-meta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .quiz-q-title {
        font-size: 1.2rem;
    }

    .quiz-answer {
        padding: 14px 18px;
        font-size: 0.9rem;
    }

    .quiz-answer-letter {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .quiz-result-desc {
        font-size: 1rem;
    }

    .quiz-result-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-quiz-link {
        font-size: 0.85rem;
        padding: 10px 20px;
    }
}
