/* study-quiz.css -- Multiple choice, fill-in-blanks, written test, quiz feedback */


        /* Multiple Choice 2x2 */
        .mc-question {
            font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; line-height: 1.5;
            margin-bottom: 28px; text-align: left; padding: 0 0 16px;
            background: none; border: none; border-radius: 0;
            box-shadow: none; color: var(--study-text);
        }
        .mc-question-label {
            font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
            color: var(--study-text-tertiary); margin-bottom: 8px; display: block;
        }
        .mc-grid { display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin: 0 auto; width: 100%; }
        .mc-option {
            padding: 18px 20px; background: var(--study-bg-secondary); border: 2px solid var(--study-border);
            border-radius: 14px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 16px;
            font-size: 15px; font-weight: 600; color: var(--study-text); font-family: inherit; text-align: left;
            position: relative;
        }
        .mc-option:hover:not(.answered) { border-color: var(--study-accent); background: color-mix(in srgb, var(--study-accent) 5%, transparent); }
        .mc-option:active:not(.answered) { transform: scale(0.99); }
        .mc-option .opt-text { flex: 1; }
        .mc-option .opt-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--study-border); flex-shrink: 0; transition: all 0.2s; }
        .mc-option:hover:not(.answered) .opt-radio { border-color: var(--study-accent); }
        .mc-option.correct .opt-radio { border-color: var(--study-green); background: var(--study-green); box-shadow: inset 0 0 0 3px #fff; }
        .mc-option.wrong .opt-radio { border-color: var(--study-red); background: var(--study-red); box-shadow: inset 0 0 0 3px #fff; }
        .mc-option .opt-num {
            width: 32px; height: 32px; border-radius: 50%;
            background: var(--study-bg-tertiary); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
            font-weight: 800; font-size: 13px;
        }
        .mc-option.correct { border-color: var(--study-green); background: color-mix(in srgb, var(--study-green) 8%, transparent); }
        .mc-option.correct .opt-num { background: var(--study-green); color: #fff; }
        .mc-option.wrong { border-color: var(--study-red); background: color-mix(in srgb, var(--study-red) 6%, transparent); }
        .mc-option.wrong .opt-num { background: var(--study-red); color: #fff; }
        .mc-option.answered { pointer-events: none; }

        /* Fill-in-Blanks */
        .fib-container { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0; max-width: 720px; margin: 0 auto; width: 100%; }
        .fib-content-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; }
        .fib-sentence { font-size: clamp(24px, 3vw, 30px); font-weight: 700; line-height: 1.8; text-align: left; margin-bottom: 32px; padding: 0 0 16px; background: none; border: none; border-radius: 0; box-shadow: none; color: var(--study-text); }
        .fib-blank { display: inline-block; border-bottom: 3px solid var(--study-accent); min-width: 120px; padding: 2px 4px; }
        .fib-input-row { display: flex; gap: 12px; width: 100%; max-width: 620px; margin-bottom: 16px; }
        .fib-input { flex: 1; padding: 18px 24px; background: var(--study-bg-secondary); border: 2px solid var(--study-border); border-radius: 14px; color: var(--study-text); font-size: 18px; font-family: inherit; outline: none; text-align: center; box-shadow: 3px 3px 0 rgba(0,0,0,0.08); transition: all 0.15s; }
        .fib-input:focus { border-color: var(--study-accent); box-shadow: 3px 3px 0 var(--study-accent-dim, rgba(232,133,58,0.15)); }
        .fib-check {
            padding: 12px 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--study-accent) 92%, #fff), var(--study-accent), color-mix(in srgb, var(--study-accent) 88%, #000)); color: #fff;
            border: none; border-radius: 12px;
            font-weight: 800; cursor: pointer; font-size: 14px; font-family: inherit;
            box-shadow: 3px 3px 0 rgba(0,0,0,0.15); transition: all 0.15s;
            text-transform: uppercase; letter-spacing: 0.03em;
        }
        .fib-check:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0,0,0,0.2); }
        .fib-check:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.1); }
        .fib-hint { color: var(--study-accent); font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
        .fib-hint i { width: 16px; height: 16px; }
        .fib-feedback { font-size: 16px; margin-bottom: 16px; font-weight: 600; }
        .fib-feedback.correct { color: var(--study-green); }
        .fib-feedback.wrong { color: var(--study-red); }
        .fib-next-state { animation: pulseNext 0.3s ease; }
        @keyframes pulseNext { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

        /* Written Test */
        .wt-delete-btn { background: none; border: none; color: var(--study-text-tertiary); cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.15s; }
        .wt-delete-btn:hover { color: var(--study-red, #ef4444); background: rgba(239,68,68,0.1); }
        .wt-container { flex: 1; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; width: 100%; padding: 8px 0; }
        .wt-content-area { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; width: 100%; }
        .wt-question { font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; line-height: 1.5; margin-bottom: 28px; padding: 0 0 16px; background: none; border: none; border-radius: 0; box-shadow: none; color: var(--study-text); }
        .wt-textarea { width: 100%; min-height: 220px; max-height: 400px; padding: 18px 20px; background: var(--study-bg-secondary); border: 2px solid var(--study-border); border-radius: 14px; color: var(--study-text); font-family: inherit; font-size: 16px; resize: vertical; outline: none; margin-bottom: 16px; box-shadow: 3px 3px 0 rgba(0,0,0,0.08); transition: all 0.15s; }
        .wt-textarea:focus { border-color: var(--study-accent); box-shadow: 3px 3px 0 var(--study-accent-dim, rgba(232,133,58,0.15)); }
        .wt-submit {
            padding: 12px 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--study-accent) 92%, #fff), var(--study-accent), color-mix(in srgb, var(--study-accent) 88%, #000)); color: #fff;
            border: none; border-radius: 12px;
            font-weight: 800; font-size: 14px; cursor: pointer; align-self: flex-end;
            box-shadow: 3px 3px 0 rgba(0,0,0,0.15); transition: all 0.15s; font-family: inherit;
            text-transform: uppercase; letter-spacing: 0.03em;
        }
        .wt-submit:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0,0,0,0.2); }
        .wt-submit:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.1); }
        .wt-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 rgba(0,0,0,0.08); }
        .wt-feedback { margin-top: 16px; padding: 18px 20px; border-radius: 14px; border: 1.5px solid var(--study-border); border-left: 5px solid var(--study-accent); background: var(--study-bg-secondary); box-shadow: 3px 3px 0 var(--study-accent-dim, rgba(0,0,0,0.2)); animation: learnSlideIn 0.3s ease; }
        .wt-grade-badge { display: inline-block; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; border: 1.5px solid currentColor; }
        .wt-grade-correct { background: rgba(34,197,94,0.15); color: var(--study-green); }
        .wt-grade-partial { background: var(--study-accent-dim); color: var(--study-accent); }
        .wt-grade-incorrect { background: rgba(239,68,68,0.15); color: var(--study-red); }
        .wt-feedback-text { font-size: 14px; color: var(--study-text-secondary); line-height: 1.6; }


/* --- Test Settings Modal --- */
        /* Test Settings Modal */
        .test-settings-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; animation: fadeIn .15s ease; }
        .test-settings-modal { width: min(440px, 92vw); background: var(--study-bg-secondary); border: 1px solid var(--study-border); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.4); animation: slideUp .2s ease; }
        @keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
        .test-settings-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--study-border); }
        .test-settings-header h3 { font-size: 16px; font-weight: 700; color: var(--study-text); margin: 0; }
        .test-settings-close { background: none; border: none; color: var(--study-text-tertiary); cursor: pointer; padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
        .test-settings-close:hover { color: var(--study-text); background: var(--study-bg-tertiary); }
        .test-settings-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
        .test-settings-group { display: flex; flex-direction: column; gap: 8px; }
        .test-settings-label { font-size: 13px; font-weight: 600; color: var(--study-text); }
        .test-settings-options { display: flex; gap: 6px; flex-wrap: wrap; }
        .ts-opt { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--study-border); background: transparent; color: var(--study-text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
        .ts-opt:hover { color: var(--study-text); background: var(--study-bg-tertiary); }
        .ts-opt.active { background: var(--study-accent-dim); color: var(--study-accent); border-color: var(--study-accent); }
        .test-settings-textarea { width: 100%; min-height: 60px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--study-border); background: var(--study-bg); color: var(--study-text); font-size: 13px; font-family: inherit; resize: vertical; outline: none; line-height: 1.5; }
        .test-settings-textarea:focus { border-color: var(--study-accent); }
        .test-settings-textarea::placeholder { color: var(--study-text-tertiary); }
        .test-settings-input { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--study-border); background: var(--study-bg); color: var(--study-text); font-size: 13px; font-family: inherit; outline: none; }
        .test-settings-input:focus { border-color: var(--study-accent); }
        .test-settings-input::placeholder { color: var(--study-text-tertiary); }
        .test-settings-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--study-border); }
        .test-settings-cancel { padding: 8px 18px; border-radius: 8px; border: 1px solid var(--study-border); background: transparent; color: var(--study-text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
        .test-settings-cancel:hover { color: var(--study-text); background: var(--study-bg-tertiary); }
        .test-settings-generate { padding: 10px 20px; border-radius: 12px; border: 2px solid #111827; background: color-mix(in srgb, var(--accent-amber) 76%, #cb8c52); color: #111827; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 6px; transition: all .15s; box-shadow: 3px 3px 0 rgba(17,24,39,.24); }
        .test-settings-generate:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(17,24,39,.28); }
        .test-settings-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Quiz topic filter --- */
        /* ===== QUIZ TOPIC FILTER ===== */
        .qs-topic-filter{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
        .qs-topic-chip{padding:4px 12px;border-radius:20px;border:1px solid var(--study-border);background:var(--study-card);color:var(--study-text-muted);font-size:.72rem;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s}
        .qs-topic-chip.active{border-color:var(--study-accent);color:var(--study-accent);background:color-mix(in srgb,var(--study-accent) 12%,transparent)}
        .qs-topic-badge{display:inline-block;padding:2px 10px;border-radius:20px;background:color-mix(in srgb,var(--study-accent) 12%,transparent);color:var(--study-accent);font-size:.7rem;font-weight:700;margin-bottom:10px}


