/* ---------------------------
   Quiz Layout
---------------------------- */

.quiz-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 16px;
    text-align: center;
}

.quiz-progress {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.quiz-container {
    max-width: 720px;
    margin: 50px auto;
    padding: 30px 26px;
    text-align: center;
}

.quiz-container h2 {
    margin-bottom: 10px;
}

.quiz-container p {
    margin-left: auto;
    margin-right: auto;
}

.quiz-container .contact-btn {
    margin-top: 16px;
}

/* ---------------------------
   Question
---------------------------- */

.quiz-question {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 30px;
}

/* ---------------------------
   Answers Grid
---------------------------- */

.quiz-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .quiz-answers {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------
   Answer Buttons
---------------------------- */

.answer {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.15s ease;
}

.answer:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.answer:active {
    transform: translateY(0);
}

.answer.locked {
    pointer-events: none;
    cursor: default;
}

/* ---------------------------
   Correct / Wrong States
---------------------------- */

.answer.correct {
    background: #d6f5e6;
    border-color: #2ecc71;
}

.answer.wrong {
    background: #fde2e2;
    border-color: #e74c3c;
}

/* ---------------------------
   WWTBAM-style Flash
---------------------------- */

@keyframes correctFlash {
    0%   { background: #fff; }
    20%  { background: #d6f5e6; }
    40%  { background: #fff; }
    60%  { background: #d6f5e6; }
    80%  { background: #fff; }
    100% { background: #d6f5e6; }
}

.answer.flash-correct {
    animation: correctFlash 1.2s ease-in-out;
    border-color: #2ecc71;
}

/* ---------------------------
   Explanation Panel
---------------------------- */

.quiz-explanation {
    display: none;
    margin: 24px auto 10px;
    padding: 16px 18px;
    background: #f7f4f2;
    border-radius: 8px;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ---------------------------
   Next Button
---------------------------- */

.quiz-next {
    display: none;
    margin-top: 22px;
}

/* ---------------------------
   Review Mode Support
---------------------------- */

.resources-admin-note .quiz-explanation {
    display: block;
    margin-top: 12px;
}
