/* =====================================================
   quiz.css — Quiz Page Styles
   ===================================================== */
body {
    font-family: 'Droid Serif',  sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ── Reset ─────────────────────────────────────────── */
.quiz-wrap * { box-sizing: border-box;
    font-family: 'Droid Serif',  sans-serif;
 }
/* .quiz-wrap { font-family: 'Georgia', serif; } */

/* ── Hero ──────────────────────────────────────────── */
.quiz-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
    
}

.quiz-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center bottom;
    
}

.quiz-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 50%, transparent 30%, rgba(6,28,42,0.6) 100%);
}

/* ── Quiz landing card ─────────────────────────────── */
.quiz-card {
    position: relative;
    z-index: 2;
    background: linear-gradient(175deg,  #003b7a 40%, #2f865b  100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 24px 52px;
    max-width: 680px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}

/* ── Quiz landing card — dark navy-to-teal (matches reference) ─── */


.quiz-card__eyebrow {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #a7f3d0;
    margin-bottom: 14px;
    /* font-family: 'Arial', sans-serif; */
    font-weight: 600;
}

.quiz-card__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    /* font-family: Georgia, serif; */
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.quiz-card__subtitle {
    font-size: 1rem;
    color: #bae6fd;
    font-weight: 400;
    margin-bottom: 28px;
    font-style: italic;
    /* font-family: Georgia, serif; */
}

.quiz-card__desc {
    background: rgba(219, 234, 254, 0.12);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    font-size: 0.94rem;
    color: rgba(255,255,255,0.88);
    line-height: 1.75;
    /* font-family: 'Arial', sans-serif; */
    font-weight: 300;
    text-align: left;
}

/* ── Buttons ───────────────────────────────────────── */
.quiz-btn-group {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 30px;
}

.btn-quiz {
    padding: 13px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* font-family: 'Arial', sans-serif; */
}

.btn-quiz:hover { transform: translateY(-2px); }
.btn-quiz:active { transform: translateY(0); }

.btn-icon { font-size: 1rem; }

.btn-quiz--outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: #ffffff;
}
.btn-quiz--outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: #ffffff;
}

.btn-quiz--green {
    background: linear-gradient(135deg, #2d8a3e 0%, #25ab35 50%, #1db954 100%);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(37,171,53,0.4);
}
.btn-quiz--green:hover {
    background: linear-gradient(135deg, #38a84e 0%, #2dc440 100%);
    box-shadow: 0 8px 24px rgba(37,171,53,0.55);
}

.btn-submit {
    padding: 16px 48px;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(37,171,53,0.45);
}




/* =======================new hero======================================= */

/* ── Hero ──────────────────────────────────────────── */
.quiz-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
}

.quiz-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center;
    filter: brightness(1.05) saturate(1.1);
}

.quiz-hero-overlay {
    position: absolute;
    inset: 0;
    /* Softened overlay so the illustration shows through more clearly */
    background: radial-gradient(ellipse at 55% 45%, rgba(15, 45, 74, 0.12) 0%, rgba(6, 28, 42, 0.38) 100%);
}



.quiz-card__eyebrow {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7dd3fc;
    margin-bottom: 14px;
    /* font-family: 'Arial', sans-serif; */
    font-weight: 600;
}

.quiz-card__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    /* font-family: Georgia, serif; */
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.quiz-card__subtitle {
    font-size: 1rem;
    color: #94d5e8;        /* cool light blue to match navy-teal palette */
    font-weight: 400;
    margin-bottom: 28px;
    font-style: italic;
    font-family: Georgia, serif;
}

.quiz-card__desc {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.75;
    /* font-family: 'Arial', sans-serif; */
    font-weight: 300;
    text-align: left;
}

/* ── Buttons (outline style inherits white — no change needed) ─── */
.btn-quiz--outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
}
.btn-quiz--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Green CTA stays the same — already correct in your existing CSS */

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
    .quiz-card          { padding: 28px 22px; }
    .quiz-card__title   { font-size: 2rem; }
    .quiz-btn-group     { flex-direction: column; }
    .btn-quiz           { width: 100%; justify-content: center; }
    .quiz-card__desc    { font-size: 0.88rem; }
}


/* ====================================================== */
/* ── Quiz body ─────────────────────────────────────── */
.quiz-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ── Progress bar ──────────────────────────────────── */
.quiz-progress-bar {
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    margin: 36px 0 8px;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #25ab35, #10b981);
    border-radius: 99px;
    transition: width 0.4s ease;
}
.quiz-progress-label {
    font-size: 0.82rem;
    color: #94a3b8;
    text-align: right;
    margin-bottom: 28px;
    /* font-family: 'Arial', sans-serif; */
}

/* ── Quiz page ─────────────────────────────────────── */
#quizPage { display: none; padding-top: 10px; }
#quizPage.active { display: block; }

/* ── Difficulty badges ─────────────────────────────── */
.difficulty-section { margin-bottom: 12px; }

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 20px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.82rem;
    margin: 32px 0 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* font-family: 'Arial', sans-serif; */
}

.warm-up      { background: #dcfce7; color: #166534; border: 1.5px solid #bbf7d0; }
.mid-game     { background: #fef9c3; color: #854d0e; border: 1.5px solid #fde68a; }
.deep-dive    { background: #dbeafe; color: #1e40af; border: 1.5px solid #bfdbfe; }
.loop-de-loop { background: #fae8ff; color: #7e22ce; border: 1.5px solid #e9d5ff; }

/* ── Question card ─────────────────────────────────── */
.question-container {
    background: #ffffff;
    padding: 30px 32px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1.5px solid #e8eef5;
    border-left: 5px solid #3b82f6;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
.question-container:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); }

.question-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.question-number {
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    /* font-family: 'Arial', sans-serif; */
}

.question-text {
    font-size: 1.1rem;
    color: #1e293b;
    line-height: 1.7;
    margin-bottom: 22px;
    /* font-family: Georgia, serif; */
    font-weight: 400;
}

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

.option {
    padding: 14px 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #334155;
    /* font-family: 'Arial', sans-serif; */
    position: relative;
    user-select: none;
}

.option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    transform: translateX(4px);
}

.option.selected {
    border-color: #3b82f6;
    background: #dbeafe;
    color: #1e3a8a;
}

.option.correct {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #14532d;
    animation: correctPulse 0.4s ease;
}

.option.incorrect {
    border-color: #ef4444;
    background: #fff1f2;
    color: #7f1d1d;
    animation: shakeLine 0.4s ease;
}

@keyframes correctPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@keyframes shakeLine {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

.option-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #475569;
    transition: all 0.2s;
    /* font-family: 'Arial', sans-serif; */
}

.option.selected  .option-letter { background: #3b82f6; color: #fff; }
.option.correct   .option-letter { background: #22c55e; color: #fff; }
.option.incorrect .option-letter { background: #ef4444; color: #fff; }

.option-text { flex: 1; line-height: 1.5; }

.option-check {
    font-size: 1.1rem;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.2s;
    font-weight: 700;
}
.option.correct .option-check { opacity: 1; }
.option.incorrect .option-check { content: '✗'; opacity: 1; color: #ef4444; }
.option.incorrect .option-check::before { content: '✗'; }
.option.incorrect .option-check { font-size: 0; }
.option.incorrect .option-check::before { font-size: 1.1rem; }

/* ── Feedback box ──────────────────────────────────── */
.feedback-box {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    display: none;
    font-size: 0.9rem;
    line-height: 1.65;
    /* font-family: 'Arial', sans-serif; */
    animation: fadeSlideIn 0.35s ease;
}
.feedback-box.show     { display: block; }
.feedback-box.correct  {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #14532d;
}
.feedback-box.incorrect {
    background: #fff1f2;
    border-left: 4px solid #ef4444;
    color: #7f1d1d;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Nav buttons ───────────────────────────────────── */
.nav-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 44px;
    padding-bottom: 20px;
}

#quizRevealNote {
    margin: 0;
    text-align: center;
    max-width: 560px;
}

/* ── No questions fallback ─────────────────────────── */
.no-questions {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    /* font-family: 'Arial', sans-serif; */
    font-size: 1rem;
}

/* ── Results page ──────────────────────────────────── */
#resultsPage {
    display: none;
    padding: 60px 20px;
    text-align: center;
}
#resultsPage.active { display: block; animation: fadeSlideIn 0.5s ease; }

.results-inner { max-width: 460px; margin: 0 auto; }

.results-emoji {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.results-title {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 36px;
    /* font-family: Georgia, serif; */
}

/* Score ring */
.score-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
}

.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring__bg   { fill: none; stroke: #e2e8f0; stroke-width: 8; }
.score-ring__fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.score-number {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    /* font-family: Georgia, serif; */
}
.score-label {
    font-size: 0.9rem;
    color: #64748b;
    /* font-family: 'Arial', sans-serif; */
    margin-top: 4px;
}

.results-message {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 36px;
    line-height: 1.7;
    /* font-family: Georgia, serif; */
}

/* ── Modal ─────────────────────────────────────────── */
#masterModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 20, 36, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
#masterModal.active { display: flex; }

.modal-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 44px 40px 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    text-align: center;
}

@keyframes modalIn {
    from { transform: translateY(-40px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: #f1f5f9;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #94a3b8;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    /* font-family: 'Arial', sans-serif; */
}
.modal-close:hover { background: #e2e8f0; color: #1e293b; transform: rotate(90deg); }

.master-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: #fff;
    box-shadow: 0 6px 24px rgba(118, 75, 162, 0.35);
}
.master-avatar img { width: 100%; height: 100%; object-fit: cover; }

.master-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    margin-bottom: 10px;
    /* font-family: 'Arial', sans-serif; */
}

.master-name {
    font-size: 1.55rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 18px;
    /* font-family: Georgia, serif; */
}

.master-bio {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 0.94rem;
    /* font-family: 'Arial', sans-serif; */
    text-align: left;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 640px) {
    .quiz-card            { padding: 28px 22px; }
    .quiz-card__title     { font-size: 2rem; }
    .quiz-btn-group       { flex-direction: column; }
    .btn-quiz             { width: 100%; justify-content: center; }
    .question-container   { padding: 22px 18px; }
    .question-text        { font-size: 1rem; }
    .modal-box            { padding: 36px 22px 30px; }
    .quiz-card__desc      { font-size: 0.88rem; }
}