feat(lessons): implement comprehensive lesson configurator, session runner and AI debrief (Beta)

This commit is contained in:
Antigravity committed 2026-10-07 13:03:16 +03:00
1 parent 31e105b2c2
commit 718e9797eb
12 files changed
+4093 -1

No files matched your search

+954
View File
@@ -7229,4 +7229,958 @@ body.drawer-open {
}
}
/* =======================================================================
Comprehensive Lesson Configurator & Session Runner (Beta)
======================================================================= */
.lesson-view, .lesson-runner-view {
padding: 24px 20px;
max-width: 960px;
margin: 0 auto;
width: 100%;
}
.lesson-configurator-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.lesson-header-bar {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
flex-wrap: wrap;
border-bottom: 1px solid var(--border-color);
padding-bottom: 18px;
}
.lesson-title-wrap h2 {
font-size: 24px;
font-weight: 800;
margin: 0 0 6px 0;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.lesson-subtitle {
margin: 0;
font-size: 14px;
}
.badge-beta {
background: linear-gradient(135deg, #8b5cf6, #3b82f6);
color: #fff;
font-size: 11px;
font-weight: 700;
padding: 2px 8px;
border-radius: 999px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-ai {
background: rgba(139, 92, 246, 0.15);
color: #8b5cf6;
border: 1px solid rgba(139, 92, 246, 0.35);
font-size: 12px;
font-weight: 600;
padding: 4px 10px;
border-radius: var(--radius-sm);
}
.lesson-header-actions {
display: flex;
gap: 10px;
align-items: center;
flex-wrap: wrap;
}
.pulse-btn {
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
animation: btnPulse 2s infinite;
}
@keyframes btnPulse {
0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
/* Presets Chips Bar */
.lesson-presets-section {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 16px 20px;
}
.presets-section-title {
font-size: 14px;
font-weight: 700;
margin-bottom: 12px;
color: var(--text-main);
}
.lesson-presets-chips-row {
display: flex;
gap: 10px;
overflow-x: auto;
padding-bottom: 4px;
-webkit-overflow-scrolling: touch;
}
.lesson-preset-chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 9px 16px;
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: 999px;
font-size: 13.5px;
font-weight: 600;
color: var(--text-main);
cursor: pointer;
white-space: nowrap;
transition: all 0.15s ease;
}
.lesson-preset-chip:hover {
border-color: var(--primary);
background: var(--bg-hover);
}
.lesson-preset-chip.active {
background: var(--primary);
color: #fff;
border-color: var(--primary);
}
.preset-del-btn {
margin-left: 6px;
opacity: 0.7;
font-size: 12px;
border-radius: 50%;
padding: 2px 4px;
}
.preset-del-btn:hover {
opacity: 1;
background: rgba(0, 0, 0, 0.2);
}
.preset-description-text {
font-size: 13px;
margin: 8px 0 0 0;
}
/* Blocks List & Cards */
.blocks-section-header {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.blocks-section-header h3 {
margin: 0;
font-size: 18px;
font-weight: 700;
}
.blocks-tip {
font-size: 12.5px;
}
.lesson-steps-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.lesson-step-card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 16px 18px;
transition: all 0.2s ease;
}
.lesson-step-card:hover {
border-color: rgba(59, 130, 246, 0.4);
}
.lesson-step-card.step-disabled {
opacity: 0.55;
background: var(--bg-main);
}
.step-card-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
}
.step-card-title-wrap {
display: flex;
align-items: center;
gap: 10px;
}
.step-num {
width: 26px;
height: 26px;
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 800;
}
.step-icon {
font-size: 18px;
}
.step-title {
font-size: 15px;
}
.step-card-actions {
display: flex;
align-items: center;
gap: 8px;
}
/* Switch Toggle */
.switch-toggle {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
}
.switch-toggle input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: var(--border-color);
transition: .2s;
border-radius: 24px;
}
.toggle-slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
transition: .2s;
border-radius: 50%;
}
input:checked + .toggle-slider {
background-color: var(--success);
}
input:checked + .toggle-slider:before {
transform: translateX(20px);
}
/* Step Card Body & Params */
.step-card-body {
margin-top: 14px;
padding-top: 14px;
border-top: 1px solid var(--border-color);
}
.step-param-row {
display: flex;
gap: 16px;
flex-wrap: wrap;
align-items: flex-end;
}
.param-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.param-group label {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
}
.param-group.flex-2 {
flex: 2;
min-width: 220px;
}
.segmented-control {
display: inline-flex;
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 2px;
gap: 2px;
}
.seg-btn {
border: none;
background: transparent;
padding: 6px 14px;
font-size: 13px;
font-weight: 600;
color: var(--text-muted);
border-radius: 4px;
cursor: pointer;
transition: all 0.15s ease;
}
.seg-btn:hover {
color: var(--text-main);
}
.seg-btn.active {
background: var(--primary);
color: #fff;
}
.ai-debrief-info-box {
display: flex;
align-items: center;
gap: 12px;
background: rgba(139, 92, 246, 0.08);
border: 1px dashed rgba(139, 92, 246, 0.3);
padding: 12px 16px;
border-radius: var(--radius-md);
font-size: 13.5px;
color: var(--text-main);
}
.ai-box-icon {
font-size: 24px;
}
.lesson-bottom-cta {
padding: 10px 0;
}
.btn-xl {
padding: 14px 24px;
font-size: 17px;
font-weight: 800;
border-radius: var(--radius-md);
}
/* =======================================================================
Lesson Session Runner Stage
======================================================================= */
.lesson-runner-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
padding: 14px 0;
border-bottom: 1px solid var(--border-color);
flex-wrap: wrap;
}
.runner-nav-left {
display: flex;
align-items: center;
gap: 14px;
}
.runner-timer-wrap {
font-family: var(--font-mono, monospace);
font-size: 15px;
font-weight: 700;
color: var(--text-main);
background: var(--bg-card);
padding: 4px 10px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-color);
}
.runner-breadcrumbs-row {
display: flex;
align-items: center;
gap: 8px;
overflow-x: auto;
max-width: 550px;
padding: 4px 0;
-webkit-overflow-scrolling: touch;
}
.runner-crumb {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
background: var(--bg-card);
border: 1px solid var(--border-color);
color: var(--text-muted);
white-space: nowrap;
}
.crumb-num {
font-size: 11px;
font-weight: 800;
}
.runner-crumb.step-done {
background: rgba(34, 197, 94, 0.15);
border-color: rgba(34, 197, 94, 0.4);
color: var(--success);
}
.runner-crumb.step-active {
background: var(--primary);
border-color: var(--primary);
color: #fff;
box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}
.crumb-separator {
color: var(--text-dim);
font-size: 11px;
}
.lesson-runner-progress-track {
width: 100%;
height: 4px;
background: var(--bg-hover);
overflow: hidden;
margin-bottom: 24px;
}
.lesson-runner-progress-fill {
height: 100%;
background: linear-gradient(90deg, #3b82f6, #8b5cf6);
transition: width 0.3s ease;
}
.step-card-box {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 28px 24px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
max-width: 760px;
margin: 0 auto;
}
.step-mini-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 18px;
gap: 10px;
flex-wrap: wrap;
}
.step-term-display {
text-align: center;
padding: 20px 0;
}
.display-term {
font-size: 36px;
font-weight: 800;
margin: 0 0 6px 0;
color: var(--text-main);
}
.display-phonetic {
font-size: 18px;
color: var(--text-muted);
}
.step-context-box {
background: var(--bg-main);
border-left: 3px solid var(--primary);
padding: 12px 16px;
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
margin-top: 14px;
}
.translation-reveal-banner {
background: rgba(59, 130, 246, 0.1);
border: 1px solid rgba(59, 130, 246, 0.3);
padding: 14px 18px;
border-radius: var(--radius-md);
text-align: center;
font-size: 20px;
color: var(--text-main);
}
.rating-buttons-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
}
.srs-btn-rating {
display: flex;
flex-direction: column;
align-items: center;
padding: 12px 6px;
gap: 4px;
}
.rating-key {
font-size: 11px;
opacity: 0.7;
}
.rating-label {
font-size: 13px;
font-weight: 700;
}
/* Grammar Questions Stage */
.grammar-question-box {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 20px 18px;
}
.grammar-sentence-prompt {
font-size: 20px;
font-weight: 600;
line-height: 1.5;
margin: 0 0 10px 0;
}
.clue-tag {
font-size: 13px;
color: var(--text-muted);
}
.grammar-options-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.grammar-opt-btn {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 18px;
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
cursor: pointer;
font-size: 15px;
font-weight: 600;
color: var(--text-main);
transition: all 0.15s ease;
text-align: left;
}
.grammar-opt-btn:hover:not(:disabled) {
border-color: var(--primary);
background: var(--bg-hover);
}
.grammar-opt-btn.opt-correct {
background: rgba(34, 197, 94, 0.18) !important;
border-color: var(--success) !important;
color: var(--success) !important;
}
.grammar-opt-btn.opt-wrong {
background: rgba(239, 68, 68, 0.18) !important;
border-color: var(--danger) !important;
color: var(--danger) !important;
}
.opt-key {
width: 22px;
height: 22px;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
}
.feedback-banner {
padding: 16px 18px;
border-radius: var(--radius-md);
}
.feedback-banner.fb-success {
background: rgba(34, 197, 94, 0.12);
border: 1px solid rgba(34, 197, 94, 0.35);
}
.feedback-banner.fb-danger {
background: rgba(239, 68, 68, 0.12);
border: 1px solid rgba(239, 68, 68, 0.35);
}
.fb-title {
font-size: 16px;
font-weight: 700;
margin-bottom: 6px;
}
.fb-text {
font-size: 14px;
line-height: 1.4;
}
/* Audio Player Card */
.audio-player-card {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 20px;
text-align: center;
}
.audio-controls-row {
display: flex;
justify-content: center;
gap: 12px;
align-items: center;
flex-wrap: wrap;
}
.answer-input-group {
display: flex;
gap: 10px;
}
.transcript-box {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 12px 14px;
font-size: 13.5px;
}
/* Reading Article Interactive */
.article-paragraph-card {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 16px 18px;
margin-bottom: 14px;
}
.article-para-en {
font-size: 17px;
line-height: 1.7;
margin: 0 0 10px 0;
}
.clickable-reader-word {
cursor: pointer;
border-radius: 3px;
padding: 1px 2px;
transition: background 0.15s;
}
.clickable-reader-word:hover {
background: rgba(59, 130, 246, 0.25);
color: var(--primary);
}
.article-para-ru {
font-size: 14px;
color: var(--text-muted);
border-top: 1px dashed var(--border-color);
padding-top: 8px;
margin: 8px 0 0 0;
}
.vocab-highlights-bar {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 14px 16px;
}
.highlights-title {
font-size: 13px;
font-weight: 700;
margin-bottom: 8px;
display: block;
}
.highlights-chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.vh-chip {
background: var(--bg-card);
border: 1px solid var(--border-color);
padding: 4px 10px;
border-radius: 999px;
font-size: 12.5px;
}
/* Word Popup in Lesson */
.lesson-popup {
position: fixed;
z-index: 1000;
width: 250px;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 12px 14px;
box-shadow: 0 8px 30px rgba(0,0,0,0.18);
animation: fadeIn 0.15s ease-out;
}
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border-color);
padding-bottom: 6px;
margin-bottom: 6px;
}
.popup-close-btn {
border: none;
background: transparent;
cursor: pointer;
color: var(--text-muted);
}
.popup-trans {
font-size: 14px;
font-weight: 600;
color: var(--text-main);
}
/* Debrief Final Card */
.lesson-debrief-card {
max-width: 800px;
}
.debrief-banner-header {
display: flex;
align-items: center;
gap: 20px;
border-bottom: 1px solid var(--border-color);
padding-bottom: 20px;
flex-wrap: wrap;
}
.grade-badge-wrap {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 90px;
height: 90px;
background: var(--bg-main);
border: 3px solid var(--primary);
border-radius: 50%;
}
.grade-badge {
font-size: 32px;
font-weight: 900;
line-height: 1;
color: var(--primary);
}
.score-pct {
font-size: 13px;
font-weight: 700;
color: var(--text-muted);
}
.debrief-titles {
flex: 1;
}
.debrief-headline {
font-size: 22px;
font-weight: 800;
margin: 0 0 8px 0;
}
.blocks-scores-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 12px;
}
.block-score-item {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 10px 12px;
}
.bs-header {
display: flex;
justify-content: space-between;
font-size: 13px;
font-weight: 600;
margin-bottom: 6px;
}
.bs-bar {
width: 100%;
height: 6px;
background: var(--bg-card);
border-radius: 3px;
overflow: hidden;
}
.bs-bar-fill {
height: 100%;
background: var(--success);
}
.debrief-list, .tomorrow-focus-list {
margin: 8px 0 0 0;
padding-left: 20px;
font-size: 14.5px;
line-height: 1.6;
}
.tomorrow-focus-list {
list-style: none;
padding-left: 0;
}
.tomorrow-focus-list li {
padding: 6px 10px;
background: var(--bg-main);
border-left: 3px solid var(--primary);
margin-bottom: 6px;
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.error-cards-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.error-analysis-item {
display: flex;
align-items: flex-start;
gap: 10px;
background: rgba(234, 179, 8, 0.1);
border: 1px solid rgba(234, 179, 8, 0.3);
border-radius: var(--radius-md);
padding: 12px 14px;
font-size: 14px;
}
.celebrate-badge {
font-size: 48px;
margin-bottom: 12px;
}
.step-completed-box h3 {
font-size: 24px;
font-weight: 800;
margin-bottom: 8px;
}
.score-highlight {
font-size: 16px;
color: var(--text-muted);
}
/* History Modal items */
.lesson-history-list {
display: flex;
flex-direction: column;
gap: 12px;
max-height: 65vh;
overflow-y: auto;
}
.lesson-history-item {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 14px 16px;
}
.lh-header {
display: flex;
justify-content: space-between;
font-size: 15px;
font-weight: 700;
margin-bottom: 6px;
}
.lh-date {
font-size: 12px;
color: var(--text-muted);
font-weight: normal;
}
.lh-stats {
display: flex;
gap: 12px;
align-items: center;
font-size: 13px;
margin-bottom: 6px;
}
.lh-headline {
font-size: 13px;
font-style: italic;
color: var(--text-dim);
}
@media (max-width: 640px) {
.grammar-options-grid {
grid-template-columns: 1fr;
}
.rating-buttons-row {
grid-template-columns: repeat(2, 1fr);
}
.step-card-box {
padding: 18px 14px;
}
.display-term {
font-size: 26px;
}
}