feat(cefr): CEFR level testing and automated gap ingestion engine (Task 15)

This commit is contained in:
2026-10-06 15:24:33 +03:00
parent 1c3f03a64c
commit 3fae321322
11 changed files with 2926 additions and 10 deletions
+504
View File
@@ -4215,3 +4215,507 @@ body {
background: #0c0c0c;
border-color: #222;
}
/* ==========================================================================
VIEW 4: CEFR Level Testing & Automated Gap Ingestion Styles (Task 15)
========================================================================== */
.cefr-view {
max-width: 960px;
margin: 0 auto;
padding: 24px 16px 80px 16px;
width: 100%;
}
.cefr-header {
margin-bottom: 28px;
}
.cefr-title-wrap h2 {
font-size: 26px;
font-weight: 700;
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 10px;
}
.cefr-title-wrap .subtitle {
font-size: 15px;
color: var(--text-muted);
line-height: 1.5;
}
/* Level Selection Grid */
.cefr-levels-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
}
.cefr-level-card {
background-color: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 24px;
display: flex;
flex-direction: column;
gap: 18px;
box-shadow: var(--shadow-sm);
transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.cefr-level-card:hover {
border-color: var(--primary);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.level-card-header {
display: flex;
align-items: center;
gap: 14px;
}
.level-pill {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px 14px;
border-radius: 9999px;
font-weight: 800;
font-size: 15px;
letter-spacing: 0.5px;
}
.level-badge-a1 {
background: rgba(16, 185, 129, 0.15);
color: #10b981;
border: 1px solid rgba(16, 185, 129, 0.35);
}
.level-badge-a2 {
background: rgba(56, 189, 248, 0.15);
color: #38bdf8;
border: 1px solid rgba(56, 189, 248, 0.35);
}
.level-badge-b1 {
background: rgba(129, 140, 248, 0.15);
color: #818cf8;
border: 1px solid rgba(129, 140, 248, 0.35);
}
.level-badge-b2 {
background: rgba(245, 158, 11, 0.15);
color: #fbbf24;
border: 1px solid rgba(245, 158, 11, 0.35);
}
.level-header-text {
flex: 1;
}
.level-title {
font-size: 17px;
font-weight: 600;
margin: 0 0 2px 0;
}
.level-meta-sub {
font-size: 13px;
color: var(--text-muted);
}
/* Progress bar inside card */
.level-card-progress {
display: flex;
flex-direction: column;
gap: 6px;
}
.progress-bar-wrap {
height: 8px;
background-color: var(--bg-hover);
border-radius: 9999px;
overflow: hidden;
}
.progress-bar-fill {
height: 100%;
border-radius: 9999px;
transition: width 0.4s ease;
}
.progress-bar-fill.level-badge-a1 { background-color: #10b981; }
.progress-bar-fill.level-badge-a2 { background-color: #38bdf8; }
.progress-bar-fill.level-badge-b1 { background-color: #818cf8; }
.progress-bar-fill.level-badge-b2 { background-color: #f59e0b; }
.progress-labels-row {
display: flex;
justify-content: space-between;
font-size: 12px;
color: var(--text-muted);
}
.progress-labels-row .pct-text {
font-weight: 600;
color: var(--text-main);
}
/* Mini metrics */
.level-card-metrics {
display: flex;
justify-content: space-between;
background-color: var(--bg-hover);
border-radius: var(--radius-md);
padding: 10px 12px;
}
.mini-metric {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
}
.mini-metric .m-val {
font-size: 14px;
font-weight: 700;
}
.mini-metric .m-lbl {
font-size: 11px;
color: var(--text-muted);
}
.level-card-actions {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: auto;
}
/* Quiz Topbar */
.cefr-quiz-topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 24px;
padding: 12px 18px;
background-color: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
}
.cefr-quiz-topbar-left {
display: flex;
align-items: center;
gap: 12px;
}
.cefr-quiz-topbar-center {
display: flex;
align-items: center;
gap: 14px;
flex: 1;
max-width: 380px;
}
/* Cloze Card */
.cefr-quiz-card-wrapper {
display: flex;
flex-direction: column;
gap: 20px;
}
.cefr-cloze-card {
background-color: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 32px 28px;
box-shadow: var(--shadow-md);
display: flex;
flex-direction: column;
gap: 20px;
animation: fadeIn 0.25s ease-out;
}
.cefr-cloze-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.cefr-mode-tag {
font-size: 13px;
font-weight: 600;
color: var(--primary);
background: rgba(56, 189, 248, 0.1);
padding: 4px 10px;
border-radius: var(--radius-sm);
}
/* Sentence & Blank */
.cefr-sentence-wrap {
padding: 18px 0;
}
.cefr-sentence-text {
font-size: 22px;
font-weight: 500;
line-height: 1.6;
color: var(--text-main);
margin: 0;
}
.cefr-blank {
display: inline-block;
min-width: 90px;
text-align: center;
background: rgba(56, 189, 248, 0.12);
border-bottom: 2px dashed var(--primary);
padding: 2px 12px;
border-radius: 4px;
font-weight: 700;
color: var(--primary);
transition: all 0.25s ease;
}
.cefr-blank.blank-correct {
background: rgba(16, 185, 129, 0.2);
border-bottom: 2px solid #10b981;
color: #10b981;
}
.cefr-blank.blank-wrong-revealed {
background: rgba(239, 68, 68, 0.2);
border-bottom: 2px solid #ef4444;
color: #f87171;
}
/* Clue Box */
.cefr-clue-box {
display: flex;
align-items: center;
gap: 8px;
background-color: var(--bg-hover);
padding: 10px 14px;
border-radius: var(--radius-md);
font-size: 14px;
color: var(--text-muted);
}
.cefr-clue-box .clue-term {
color: var(--text-main);
font-size: 15px;
}
/* Options Grid: 2x2 */
.cefr-options-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin-top: 6px;
}
.cefr-opt-btn {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
background-color: var(--bg-surface);
border: 1.5px solid var(--border-color);
border-radius: var(--radius-md);
padding: 16px 20px;
min-height: 56px;
color: var(--text-main);
font-size: 17px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
outline: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.cefr-opt-btn:hover:not(:disabled) {
border-color: var(--primary);
background-color: var(--bg-hover);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}
.cefr-opt-btn:active:not(:disabled) {
transform: scale(0.98);
}
.cefr-opt-btn .opt-num {
font-size: 13px;
color: var(--text-muted);
font-weight: 500;
}
.cefr-opt-btn .opt-text {
flex: 1;
text-align: left;
}
/* Option States */
.cefr-opt-btn.opt-correct {
background-color: #10b981 !important;
border-color: #10b981 !important;
color: #fff !important;
box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}
.cefr-opt-btn.opt-correct .opt-num {
color: rgba(255, 255, 255, 0.8) !important;
}
.cefr-opt-btn.opt-wrong {
background-color: #ef4444 !important;
border-color: #ef4444 !important;
color: #fff !important;
box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}
.cefr-opt-btn.opt-wrong .opt-num {
color: rgba(255, 255, 255, 0.8) !important;
}
.cefr-opt-btn.opt-correct-revealed {
border-color: #10b981 !important;
background-color: rgba(16, 185, 129, 0.15) !important;
color: #10b981 !important;
animation: pulseBorder 1.5s infinite ease-in-out;
}
@keyframes pulseBorder {
0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
/* Feedback Box */
.cefr-feedback-box {
border-radius: var(--radius-md);
padding: 18px 20px;
display: flex;
flex-direction: column;
gap: 8px;
animation: fadeIn 0.25s ease-out;
}
.cefr-feedback-box.feedback-correct {
background: rgba(16, 185, 129, 0.12);
border: 1px solid rgba(16, 185, 129, 0.35);
}
.cefr-feedback-box.feedback-wrong {
background: rgba(239, 68, 68, 0.12);
border: 1px solid rgba(239, 68, 68, 0.35);
}
.cefr-feedback-box .fb-title {
font-size: 16px;
font-weight: 700;
}
.cefr-feedback-box.feedback-correct .fb-title {
color: #10b981;
}
.cefr-feedback-box.feedback-wrong .fb-title {
color: #ef4444;
}
.cefr-feedback-box .fb-meta {
display: flex;
align-items: center;
gap: 10px;
font-size: 15px;
}
.cefr-feedback-box .fb-explanation {
margin: 4px 0 0 0;
font-size: 14px;
line-height: 1.5;
color: var(--text-main);
}
/* Gap Ingestion Badge inside mistake feedback */
.cefr-gap-ingested-badge {
display: flex;
align-items: center;
gap: 10px;
background: rgba(239, 68, 68, 0.15);
border: 1px solid rgba(239, 68, 68, 0.3);
border-radius: var(--radius-md);
padding: 10px 14px;
margin-top: 6px;
font-size: 13px;
line-height: 1.4;
color: var(--text-main);
}
.cefr-gap-ingested-badge .badge-icon {
font-size: 18px;
}
/* Next Button Bar */
.cefr-next-bar {
margin-top: 10px;
animation: fadeIn 0.2s ease-out;
}
/* Summary Screen */
.cefr-summary-container {
max-width: 680px;
margin: 40px auto;
}
.cefr-summary-card {
background-color: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 44px 32px;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 24px;
box-shadow: var(--shadow-lg);
animation: fadeIn 0.3s ease-out;
}
.cefr-loading-spinner {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
padding: 48px;
color: var(--text-muted);
}
/* Mobile Responsive */
@media (max-width: 640px) {
.cefr-sentence-text {
font-size: 18px;
}
.cefr-options-grid {
grid-template-columns: 1fr;
}
.cefr-opt-btn {
min-height: 52px;
padding: 14px 16px;
}
.cefr-cloze-card {
padding: 20px 16px;
}
}