705 lines
15 KiB
CSS
705 lines
15 KiB
CSS
:root {
|
|
/* Shell colors — neutral light defaults (auth, class picker) */
|
|
--theme-bg: #f0f2f5;
|
|
--theme-bg-mid: #ffffff;
|
|
--theme-bg-light: #e0e4ea;
|
|
--theme-bg-hover: #d0d5de;
|
|
--theme-text: #2c3e50;
|
|
--theme-muted: #8892a4;
|
|
--theme-muted-light: #a8b2c0;
|
|
--theme-accent: #4a90d9;
|
|
--theme-accent-hover: #3a7bc8;
|
|
|
|
/* Content area / lesson-level theming */
|
|
--theme-content-bg: #e8ecf0;
|
|
--theme-card-bg: #ffffff;
|
|
--theme-card-radius: 4px;
|
|
--theme-card-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
|
|
--theme-font: 'Arial', sans-serif;
|
|
--theme-ui-radius: 0px;
|
|
--theme-text-transform: uppercase;
|
|
--theme-letter-spacing: 1px;
|
|
--theme-h1-letter-spacing: 2px;
|
|
--theme-sidebar-item-margin: 0;
|
|
--theme-sidebar-active-bg: var(--theme-bg);
|
|
--theme-sidebar-active-border: 4px solid var(--theme-accent);
|
|
--theme-sidebar-active-color: var(--theme-text);
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--theme-font);
|
|
background: var(--theme-bg-mid);
|
|
min-height: 100vh;
|
|
padding: 0;
|
|
margin: 0;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
.app-wrapper {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
gap: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 280px;
|
|
background: var(--theme-bg-light);
|
|
border-right: 3px solid var(--theme-bg);
|
|
padding: 0;
|
|
position: sticky;
|
|
top: 0;
|
|
height: 100vh;
|
|
overflow-y: auto;
|
|
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.sidebar-header {
|
|
background: var(--theme-bg);
|
|
padding: 20px;
|
|
border-bottom: 2px solid rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.sidebar-header h2 {
|
|
color: var(--theme-text);
|
|
font-size: 1.2em;
|
|
font-weight: bold;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
}
|
|
|
|
.sidebar-item {
|
|
padding: 15px 20px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
border-bottom: 1px solid var(--theme-bg-mid);
|
|
background: var(--theme-bg-light);
|
|
color: var(--theme-text);
|
|
margin: var(--theme-sidebar-item-margin);
|
|
border-radius: var(--theme-ui-radius);
|
|
}
|
|
|
|
.sidebar-item:hover {
|
|
background: var(--theme-bg-hover);
|
|
}
|
|
|
|
.sidebar-item.active {
|
|
background: var(--theme-sidebar-active-bg);
|
|
border-left: var(--theme-sidebar-active-border);
|
|
color: var(--theme-sidebar-active-color);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.sidebar-item.completed {
|
|
background: #1e3a2e;
|
|
border-left: 4px solid #27ae60;
|
|
}
|
|
|
|
.sidebar-item.completed:hover {
|
|
background: #2a4a3a;
|
|
}
|
|
|
|
.sidebar-item.completed.active {
|
|
background: var(--theme-sidebar-active-bg);
|
|
border-left: 4px solid #27ae60;
|
|
}
|
|
|
|
.sidebar-item-title {
|
|
font-size: 0.95em;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.reset-button {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
background: none;
|
|
border: 1px solid #7f3030;
|
|
color: #c0392b;
|
|
font-size: 0.8em;
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s, color 0.2s;
|
|
display: block;
|
|
}
|
|
|
|
.reset-button:hover {
|
|
background: #7f3030;
|
|
color: #fff;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
background: #ecf0f1;
|
|
}
|
|
|
|
.container {
|
|
max-width: 100%;
|
|
background: var(--theme-content-bg);
|
|
padding: 0;
|
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
|
min-height: 100vh;
|
|
}
|
|
|
|
header {
|
|
background: var(--theme-bg);
|
|
padding: 25px 40px;
|
|
border-bottom: 4px solid var(--theme-accent);
|
|
color: var(--theme-text);
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.8em;
|
|
color: var(--theme-text);
|
|
margin: 0;
|
|
font-weight: bold;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-h1-letter-spacing);
|
|
}
|
|
|
|
.points-display {
|
|
background: var(--theme-bg-mid);
|
|
padding: 15px 25px;
|
|
border: 2px solid var(--theme-accent);
|
|
border-radius: var(--theme-ui-radius);
|
|
text-align: center;
|
|
}
|
|
|
|
.points-label {
|
|
font-size: 0.85em;
|
|
color: var(--theme-muted-light);
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.points-value {
|
|
font-size: 2em;
|
|
font-weight: bold;
|
|
color: var(--theme-accent);
|
|
}
|
|
|
|
.progress-section {
|
|
background: var(--theme-bg-light);
|
|
padding: 20px 40px;
|
|
border-bottom: 2px solid var(--theme-bg-mid);
|
|
}
|
|
|
|
.progress-content {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.progress-label {
|
|
font-size: 0.9em;
|
|
color: var(--theme-text);
|
|
margin-bottom: 10px;
|
|
font-weight: bold;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
}
|
|
|
|
.progress-bar-container {
|
|
width: 100%;
|
|
height: 25px;
|
|
background: var(--theme-bg-mid);
|
|
border: 1px solid var(--theme-bg);
|
|
border-radius: var(--theme-ui-radius);
|
|
overflow: hidden;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 100%;
|
|
background: var(--theme-accent);
|
|
width: 0%;
|
|
transition: width 0.5s ease;
|
|
}
|
|
|
|
.progress-text {
|
|
font-size: 0.9em;
|
|
color: var(--theme-muted-light);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.task-section {
|
|
padding: 30px 40px;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.chapter-description {
|
|
background: rgba(0, 0, 0, 0.04);
|
|
padding: 20px 25px;
|
|
margin-bottom: 30px;
|
|
font-size: 1em;
|
|
line-height: 1.7;
|
|
color: #2c3e50;
|
|
border-left: 4px solid var(--theme-accent);
|
|
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
|
border-right: 1px solid rgba(0, 0, 0, 0.08);
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.task-container {
|
|
display: grid;
|
|
gap: 25px;
|
|
}
|
|
|
|
.task-card {
|
|
background: var(--theme-card-bg);
|
|
padding: 30px;
|
|
border: 2px solid rgba(0, 0, 0, 0.08);
|
|
border-left: 4px solid var(--theme-accent);
|
|
border-radius: var(--theme-card-radius);
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
position: relative;
|
|
box-shadow: var(--theme-card-shadow);
|
|
}
|
|
|
|
.task-card:hover {
|
|
border-color: var(--theme-accent);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.task-card.confetti-animation {
|
|
animation: confettiFadeOut 1.5s ease forwards;
|
|
}
|
|
|
|
@keyframes confettiFadeOut {
|
|
0% { opacity: 1; }
|
|
100% { opacity: 0; transform: translateY(-20px); }
|
|
}
|
|
|
|
.confetti {
|
|
position: absolute;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: var(--theme-accent);
|
|
animation: confettiFall linear forwards;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
|
|
@keyframes confettiFall {
|
|
0% {
|
|
transform: translateY(0) translateX(0) rotate(0deg);
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: translateY(400px) translateX(calc(var(--random-x, 0) * 100px)) rotate(720deg);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.task-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
padding-bottom: 15px;
|
|
border-bottom: 2px solid #e0e0e0;
|
|
}
|
|
|
|
.task-title {
|
|
font-size: 1.1em;
|
|
font-weight: bold;
|
|
color: #1a252f;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
}
|
|
|
|
.task-points {
|
|
background: var(--theme-bg-light);
|
|
color: var(--theme-text);
|
|
padding: 6px 15px;
|
|
border-radius: var(--theme-ui-radius);
|
|
font-weight: bold;
|
|
font-size: 0.9em;
|
|
border: 1px solid var(--theme-bg-mid);
|
|
}
|
|
|
|
.task-question {
|
|
font-size: 1.15em;
|
|
margin: 25px 0;
|
|
color: #2c3e50;
|
|
line-height: 1.7;
|
|
white-space: pre-line;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.task-input-group {
|
|
display: flex;
|
|
gap: 15px;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
margin: 25px 0 15px 0;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #e0e0e0;
|
|
}
|
|
|
|
.task-input {
|
|
font-size: 1.2em;
|
|
padding: 12px 18px;
|
|
border: 2px solid #bdc3c7;
|
|
border-radius: var(--theme-ui-radius);
|
|
width: 150px;
|
|
text-align: center;
|
|
font-family: inherit;
|
|
font-weight: bold;
|
|
background: #ffffff;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
.task-input:focus {
|
|
outline: none;
|
|
border-color: var(--theme-accent);
|
|
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
|
|
}
|
|
|
|
.task-button {
|
|
background: var(--theme-accent);
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 30px;
|
|
font-size: 1em;
|
|
border-radius: var(--theme-ui-radius);
|
|
cursor: pointer;
|
|
font-family: inherit;
|
|
font-weight: bold;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.task-button:hover {
|
|
background: var(--theme-accent-hover);
|
|
}
|
|
|
|
.task-button:active {
|
|
background: #21618c;
|
|
}
|
|
|
|
.task-button:disabled {
|
|
background: #95a5a6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.task-status {
|
|
margin-top: 15px;
|
|
font-size: 1em;
|
|
font-weight: bold;
|
|
min-height: 25px;
|
|
}
|
|
|
|
.task-status.success { color: #27ae60; }
|
|
.task-status.error { color: #e74c3c; }
|
|
.task-status.completed { color: #f39c12; }
|
|
|
|
.message {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
padding: 15px 25px;
|
|
border-radius: 2px;
|
|
font-weight: bold;
|
|
font-size: 1em;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
transform: translateX(400px);
|
|
transition: transform 0.3s ease;
|
|
z-index: 1000;
|
|
border: 2px solid;
|
|
}
|
|
|
|
.message.show { transform: translateX(0); }
|
|
|
|
.message.success {
|
|
background: #27ae60;
|
|
color: white;
|
|
border-color: #229954;
|
|
}
|
|
|
|
.message.error {
|
|
background: #e74c3c;
|
|
color: white;
|
|
border-color: #c0392b;
|
|
}
|
|
|
|
/* ─── Auth overlay ─────────────────────────────────────────────────────────── */
|
|
|
|
.auth-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--theme-bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9999;
|
|
}
|
|
|
|
.auth-card {
|
|
background: var(--theme-bg-mid);
|
|
border: 1px solid var(--theme-bg-light);
|
|
border-radius: var(--theme-ui-radius);
|
|
padding: 32px;
|
|
width: 100%;
|
|
max-width: 360px;
|
|
}
|
|
|
|
.auth-title {
|
|
color: var(--theme-text);
|
|
font-size: 1.4em;
|
|
font-weight: bold;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.auth-tabs {
|
|
display: flex;
|
|
margin-bottom: 20px;
|
|
border-bottom: 1px solid var(--theme-bg-light);
|
|
}
|
|
|
|
.auth-tab {
|
|
background: none;
|
|
border: none;
|
|
color: var(--theme-muted);
|
|
padding: 8px 16px;
|
|
font-size: 0.9em;
|
|
cursor: pointer;
|
|
border-bottom: 2px solid transparent;
|
|
margin-bottom: -1px;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.auth-tab.active {
|
|
color: var(--theme-text);
|
|
border-bottom-color: var(--theme-accent);
|
|
}
|
|
|
|
.auth-input {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
margin-bottom: 10px;
|
|
background: var(--theme-bg);
|
|
border: 1px solid var(--theme-bg-light);
|
|
border-radius: var(--theme-ui-radius);
|
|
color: var(--theme-text);
|
|
font-size: 0.95em;
|
|
transition: border-color 0.2s;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.auth-input:focus {
|
|
outline: none;
|
|
border-color: var(--theme-accent);
|
|
}
|
|
|
|
.auth-input::placeholder {
|
|
color: var(--theme-muted);
|
|
}
|
|
|
|
.auth-error {
|
|
font-size: 0.85em;
|
|
color: #e74c3c;
|
|
margin-bottom: 10px;
|
|
min-height: 18px;
|
|
}
|
|
|
|
.auth-button {
|
|
width: 100%;
|
|
padding: 11px;
|
|
background: var(--theme-accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--theme-ui-radius);
|
|
font-size: 0.95em;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.auth-button:hover {
|
|
background: var(--theme-accent-hover);
|
|
}
|
|
|
|
/* ─── Class picker & completion ──────────────────────────────────────────────── */
|
|
|
|
.class-picker-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--theme-bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9998;
|
|
padding: 20px;
|
|
}
|
|
|
|
.class-picker-card {
|
|
background: var(--theme-bg-mid);
|
|
border: 1px solid var(--theme-bg-light);
|
|
border-radius: var(--theme-ui-radius);
|
|
padding: 40px;
|
|
width: 100%;
|
|
max-width: 560px;
|
|
}
|
|
|
|
.class-picker-title {
|
|
color: var(--theme-text);
|
|
font-size: 1.4em;
|
|
font-weight: bold;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.class-picker-subtitle {
|
|
color: var(--theme-muted);
|
|
font-size: 0.9em;
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.class-list {
|
|
display: grid;
|
|
gap: 12px;
|
|
}
|
|
|
|
.class-card {
|
|
background: var(--theme-bg);
|
|
border: 2px solid var(--card-accent, var(--theme-accent));
|
|
border-radius: var(--theme-ui-radius);
|
|
padding: 20px 24px;
|
|
cursor: pointer;
|
|
transition: opacity 0.15s, transform 0.15s;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.class-card:hover {
|
|
opacity: 0.85;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.class-card-icon {
|
|
font-size: 2.2em;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.class-card-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.class-card-name {
|
|
color: var(--theme-text);
|
|
font-size: 1.1em;
|
|
font-weight: bold;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.class-card-desc {
|
|
color: var(--theme-muted);
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.completion-icon {
|
|
font-size: 3em;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/* ─── User display in header ─────────────────────────────────────────────── */
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.user-display {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 6px;
|
|
}
|
|
|
|
.user-name {
|
|
color: var(--theme-muted-light);
|
|
font-size: 0.85em;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
}
|
|
|
|
.user-buttons {
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
|
|
.logout-button {
|
|
background: none;
|
|
border: 1px solid var(--theme-bg-light);
|
|
color: var(--theme-muted);
|
|
padding: 5px 12px;
|
|
font-size: 0.8em;
|
|
font-family: inherit;
|
|
text-transform: var(--theme-text-transform);
|
|
letter-spacing: var(--theme-letter-spacing);
|
|
cursor: pointer;
|
|
transition: border-color 0.2s, color 0.2s;
|
|
}
|
|
|
|
.logout-button:hover {
|
|
border-color: #e74c3c;
|
|
color: #e74c3c;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.app-wrapper {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 100%;
|
|
position: relative;
|
|
height: auto;
|
|
max-height: 300px;
|
|
border-right: none;
|
|
border-bottom: 3px solid var(--theme-bg);
|
|
}
|
|
|
|
.sidebar-item {
|
|
border-bottom: 1px solid var(--theme-bg-mid);
|
|
}
|
|
|
|
.header-content {
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.container { padding: 0; }
|
|
header { padding: 20px; }
|
|
h1 { font-size: 1.4em; }
|
|
.points-value { font-size: 1.5em; }
|
|
.task-section { padding: 20px; }
|
|
.task-input-group { flex-direction: column; align-items: stretch; }
|
|
.task-input { width: 100%; }
|
|
.task-button { width: 100%; }
|
|
.sidebar-item { padding: 12px 15px; }
|
|
.sidebar-item-title { font-size: 0.9em; }
|
|
.class-picker-card { padding: 24px; }
|
|
}
|