/* Quiz Teaser Button */
.quiz-teaser-btn {
    background: linear-gradient(135deg, var(--bpc-primary) 0%, var(--bpc-primary-strong) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 40px auto;
}

.quiz-teaser-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.4);
}

/* Modal Overlay */
.quiz-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    /* Dark slate overlay */
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quiz-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.quiz-modal {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

/* Modal Header */
.quiz-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F8FAFC;
    border-radius: 16px 16px 0 0;
}

.quiz-title {
    font-size: 18px;
    font-weight: 800;
    color: #1E293B;
    margin: 0;
}

.quiz-progress {
    font-size: 14px;
    color: #64748B;
    font-weight: 600;
}

.quiz-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #94A3B8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.quiz-close-btn:hover {
    color: var(--bpc-primary);
}

/* Quiz Content */
.quiz-content {
    padding: 24px;
    flex-grow: 1;
}

/* Question */
.quiz-question-text {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 15px;
    color: #334155;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
}

.quiz-option:hover:not(.disabled) {
    border-color: var(--bpc-primary);
    background: #FEF2F2;
}

.quiz-option.disabled {
    cursor: default;
    opacity: 0.7;
}

/* States */
.quiz-option.correct {
    border-color: #10B981;
    background: #ECFDF5;
    color: #065F46;
    font-weight: 600;
}

.quiz-option.wrong {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #991B1B;
}

.quiz-option.correct::after {
    content: "✅";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.quiz-option.wrong::after {
    content: "❌";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Rationale Feedback */
.quiz-rationale {
    margin-top: 24px;
    padding: 16px;
    background: #FEF2F2;
    border-left: 4px solid var(--bpc-primary);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #991B1B;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.quiz-next-btn {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    background: linear-gradient(135deg, var(--bpc-primary) 0%, var(--bpc-primary-strong) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
    animation: fadeIn 0.5s ease;
}

.quiz-next-btn:hover {
    opacity: 0.9;
}

/* Result Screen */
.quiz-result {
    text-align: center;
    padding: 32px 0;
}

.quiz-result-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.quiz-score-display {
    font-size: 32px;
    font-weight: 800;
    color: #1E293B;
    margin-bottom: 8px;
}

.quiz-result-message {
    font-size: 16px;
    color: #64748B;
    max-width: 400px;
    margin: 0 auto 32px auto;
    line-height: 1.6;
}

.quiz-cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--bpc-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
    transition: transform 0.2s;
    border: none;
    cursor: pointer;
}

.quiz-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .quiz-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .quiz-options {
        gap: 10px;
    }
}