/* =========================
   NYX PROFILE QUIZ
   Theme: Premium / Compact / Dark Glass
   ========================= */

#interactive-quiz {
    position: relative;
    padding: clamp(32px, 5vw, 48px) 20px !important;
}

/* Card wrapper — contains the video, scoped to the quiz card only */
.quiz-card-wrapper {
    position: relative;
    overflow: hidden;
    max-width: min(900px, 100%);
    margin: 0 auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 46, 99, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    background: #050508; /* Fallback */
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

/* Beach video — fills the card */
.quiz-bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.5; /* Reduced slightly for better text contrast */
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.quiz-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 5, 12, 0.9) 0%, rgba(5, 5, 12, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

#interactive-quiz .section-title {
    margin-bottom: 8px;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    letter-spacing: 0.2em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    text-align: center;
}

#interactive-quiz .section-subtitle {
    max-width: 600px;
    margin: 0 auto 24px;
    color: rgba(234, 240, 255, 0.6);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    line-height: 1.4;
    text-shadow: 0 1px 8px rgba(0,0,0,0.9);
    text-align: center;
}

/* Internal header wrapper for inside the card */
.quiz-banner-header {
    position: relative;
    z-index: 2;
    padding: 32px 32px 0;
    text-align: center;
}

.quiz-container {
    max-width: 100%;
    margin: 0;
    padding: clamp(20px, 4vw, 32px);
    background: transparent;
    border: none;
    border-radius: 20px;
    text-align: left;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-container::before { display: none; }
.quiz-container::after  { display: none; }

.quiz-header {
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.quiz-header h2 {
    font-family: 'Cinzel', serif;
    color: rgba(249, 251, 255, 0.35);
    font-size: clamp(0.76rem, 1.3vw, 0.98rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}

.quiz-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-step {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(230, 235, 250, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
    background: transparent;
}

.quiz-progress {
    width: 136px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4d86, #ff8aad);
    width: 0%;
    transition: width 0.45s ease;
    box-shadow: 0 0 14px rgba(255, 96, 145, 0.52);
}

.question-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.04rem, 2.2vw, 1.52rem);
    color: rgba(243, 246, 255, 0.92);
    margin-bottom: 18px;
    line-height: 1.52;
    font-weight: 400;
    text-shadow: 0 1px 12px rgba(0,0,0,0.95);
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(214, 221, 238, 0.85);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
    text-align: left;
    font-size: 0.94rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.opt-index {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(235, 241, 255, 0.92);
    background: rgba(255, 255, 255, 0.04);
    flex: 0 0 24px;
}

.opt-text {
    flex: 1;
}

.quiz-option:hover {
    border-color: rgba(255, 126, 166, 0.76);
    color: #ffffff;
    background: rgba(21, 28, 44, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
}

.quiz-option:focus-visible {
    outline: none;
    border-color: rgba(255, 119, 160, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 119, 160, 0.24);
}

.quiz-option.selected-flash {
    background: linear-gradient(135deg, rgba(255, 92, 142, 0.28), rgba(62, 124, 220, 0.2));
    color: #ffffff;
    border-color: rgba(255, 153, 186, 0.8);
    transform: scale(0.997);
}

.quiz-option.selected-flash .opt-index {
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.16);
}

.quiz-option[disabled] {
    cursor: default;
}

/* --- RESULTS SCREEN --- */
.result-screen {
    display: none;
    text-align: left;
    padding: 6px 0 2px;
    animation: fadeIn 0.8s ease-out forwards;
}

.result-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.result-grade {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.82rem, 1.5vw, 1rem);
    color: #ff7aa9;
    letter-spacing: 0.2em;
    margin: 0;
}

.result-score {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: rgba(232, 238, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
}

.result-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.08rem, 2.2vw, 1.48rem);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.35;
}

.result-divider {
    width: 76px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 121, 164, 0.8), rgba(70, 151, 255, 0.12));
    margin: 0 0 18px;
}

.result-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    line-height: 1.68;
    color: rgba(214, 223, 241, 0.9);
    margin-bottom: 24px;
    font-weight: 300;
    max-width: 52ch;
}

.quiz-restart {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(241, 246, 255, 0.92);
    padding: 10px 18px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.24s ease;
    text-transform: uppercase;
}

.quiz-restart:hover {
    border-color: rgba(255, 136, 173, 0.88);
    color: #ffffff;
    background: rgba(255, 106, 154, 0.18);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade {
    animation: fadeIn 0.4s ease-out;
}

@media (max-width: 900px) {
    .quiz-progress {
        width: 116px;
    }
}

@media (max-width: 768px) {
    #interactive-quiz {
        padding: 56px 16px !important;
    }

    .quiz-container {
        margin: 22px auto 0;
        padding: 18px 14px;
        border-radius: 16px;
    }

    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .quiz-meta {
        width: 100%;
        justify-content: space-between;
    }

    .quiz-progress {
        width: min(52vw, 190px);
    }

    .question-text {
        margin-bottom: 14px;
        line-height: 1.46;
    }

    .quiz-option {
        padding: 11px 12px;
        font-size: 0.91rem;
        gap: 10px;
    }

    .opt-index {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
        font-size: 0.64rem;
    }

    .result-title {
        letter-spacing: 0.08em;
        margin-bottom: 14px;
    }

    .result-desc {
        font-size: 0.92rem;
        line-height: 1.58;
    }

    .quiz-restart {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #interactive-quiz .section-title {
        letter-spacing: 0.22em;
    }

    #interactive-quiz .section-subtitle {
        font-size: 0.92rem;
    }

    .quiz-header h2 {
        letter-spacing: 0.18em;
    }

    .quiz-step,
    .result-score {
        font-size: 0.68rem;
    }
}
