Compare commits

..

2 Commits

Author SHA1 Message Date
Lukas Cremer
ec78dfeddd make themes more distict 2026-05-14 00:17:13 +02:00
Lukas Cremer
f4a1b4dca9 make css more generic 2026-05-13 23:30:53 +02:00
10 changed files with 1003 additions and 811 deletions

View File

@@ -1,18 +1,14 @@
{ {
"id": "grundrechenarten", "id": "grundrechenarten",
"name": "Grundrechenarten", "name": "Einhorn-Mathe",
"icon": "", "icon": "🦄",
"description": "Lerne die Grundlagen der Mathematik", "description": "Magische Mathematik mit Einhörnern und Regenbögen",
"theme": { "theme": "unicorn",
"--theme-bg": "#1a2f1a", "colors": {
"--theme-bg-mid": "#2a4a2a", "bg": "#3d2280",
"--theme-bg-light": "#3a6a3a", "accent": "#ff69b4",
"--theme-bg-hover": "#4a7a4a", "text": "#fce4ff",
"--theme-text": "#e8f5e8", "muted": "#c4a0dc"
"--theme-muted": "#7fa87f",
"--theme-muted-light": "#aed4ae",
"--theme-accent": "#4caf50",
"--theme-accent-hover": "#388e3c"
}, },
"lessons": ["adding"] "lessons": ["adding"]
} }

View File

@@ -3,16 +3,12 @@
"name": "Kriminalfälle", "name": "Kriminalfälle",
"icon": "🔍", "icon": "🔍",
"description": "Löse echte Kriminalfälle aus Deutschland mit Mathematik", "description": "Löse echte Kriminalfälle aus Deutschland mit Mathematik",
"theme": { "theme": "noir",
"--theme-bg": "#1a252f", "colors": {
"--theme-bg-mid": "#2c3e50", "bg": "#21262d",
"--theme-bg-light": "#34495e", "accent": "#4393e4",
"--theme-bg-hover": "#3d566e", "text": "#e6edf3",
"--theme-text": "#ecf0f1", "muted": "#848d97"
"--theme-muted": "#7f8c8d",
"--theme-muted-light": "#bdc3c7",
"--theme-accent": "#3498db",
"--theme-accent-hover": "#2980b9"
}, },
"lessons": ["steglitz", "bode-museum", "dresden-gruenes-gewoelbe"] "lessons": ["steglitz", "bode-museum", "dresden-gruenes-gewoelbe"]
} }

14
classes/stricken.json Normal file
View File

@@ -0,0 +1,14 @@
{
"id": "stricken",
"name": "Mathe-Stricken",
"icon": "🧶",
"description": "Rechnen mit Wolle, Maschen und Strickmustern",
"theme": "unicorn",
"colors": {
"bg": "#3d2280",
"accent": "#ff69b4",
"text": "#fce4ff",
"muted": "#c4a0dc"
},
"lessons": ["stricken"]
}

View File

@@ -15,132 +15,6 @@
"answer": 3, "answer": 3,
"points": 10, "points": 10,
"type": "word-problem" "type": "word-problem"
},
{
"id": "adding-3",
"question": "Was ist 2 + 2?",
"answer": 4,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-4",
"question": "Was ist 3 + 2?",
"answer": 5,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-5",
"question": "Was ist 3 + 3?",
"answer": 6,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-6",
"question": "Was ist 4 + 3?",
"answer": 7,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-7",
"question": "Was ist 4 + 4?",
"answer": 8,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-8",
"question": "Was ist 5 + 4?",
"answer": 9,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-9",
"question": "Was ist 5 + 5?",
"answer": 10,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-10",
"question": "Was ist 6 + 4?",
"answer": 10,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-11",
"question": "Was ist 6 + 5?",
"answer": 11,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-12",
"question": "Was ist 6 + 6?",
"answer": 12,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-13",
"question": "Was ist 7 + 5?",
"answer": 12,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-14",
"question": "Was ist 7 + 6?",
"answer": 13,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-15",
"question": "Was ist 7 + 7?",
"answer": 14,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-16",
"question": "Was ist 8 + 6?",
"answer": 14,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-17",
"question": "Was ist 8 + 7?",
"answer": 15,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-18",
"question": "Was ist 9 + 7?",
"answer": 16,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-19",
"question": "Was ist 9 + 8?",
"answer": 17,
"points": 10,
"type": "word-problem"
},
{
"id": "adding-20",
"question": "Was ist 9 + 9?",
"answer": 18,
"points": 10,
"type": "word-problem"
} }
] ]
} }

55
lessons/stricken.json Normal file
View File

@@ -0,0 +1,55 @@
{
"chapter": "🧶 Stricken mit Zahlen",
"description": "Beim Stricken steckt überall Mathematik drin — in den Maschen, der Wolle und den Mustern. Löse die Aufgaben und werde zur Mathe-Strick-Meisterin!",
"tasks": [
{
"id": "stricken-1",
"question": "Lena strickt einen Schal. Eine Reihe hat 24 Maschen.\nSie strickt 6 Reihen. Wie viele Maschen hat sie insgesamt gestrickt?",
"answer": 144,
"points": 10,
"type": "word-problem"
},
{
"id": "stricken-2",
"question": "Ein Knäuel Wolle hat 200 Meter.\nFür eine Mütze braucht Emma 75 Meter.\nWie viele Meter Wolle hat sie nach der Mütze noch übrig?",
"answer": 125,
"points": 10,
"type": "word-problem"
},
{
"id": "stricken-3",
"question": "Mia strickt ein Muster aus 8 rosa und 4 lila Maschen — immer abwechselnd.\nSie strickt das Muster 5 Mal in einer Reihe.\nWie viele Maschen hat die Reihe insgesamt?",
"answer": 60,
"points": 15,
"type": "word-problem"
},
{
"id": "stricken-4",
"question": "Für eine Decke braucht man 12 Knäuel Wolle.\nJedes Knäuel kostet 3 Euro.\nWie viel kostet die Wolle für die ganze Decke?",
"answer": 36,
"points": 10,
"type": "word-problem"
},
{
"id": "stricken-5",
"question": "Sophie strickt jeden Tag 9 Reihen.\nNach wie vielen Tagen hat sie 63 Reihen gestrickt?",
"answer": 7,
"points": 15,
"type": "word-problem"
},
{
"id": "stricken-6",
"question": "Ein Pullover braucht 450 Meter Wolle.\nEin Knäuel hat 150 Meter.\nWie viele Knäuel braucht man für den Pullover?",
"answer": 3,
"points": 10,
"type": "word-problem"
},
{
"id": "stricken-7",
"question": "In einem Strickclub sind 5 Kinder.\nJedes Kind strickt 8 Maschen pro Minute.\nWie viele Maschen stricken sie zusammen in 3 Minuten?",
"answer": 120,
"points": 20,
"type": "word-problem"
}
]
}

View File

@@ -77,13 +77,18 @@ async function apiFetch(url, options = {}) {
// ─── Theme ─────────────────────────────────────────────────────────────────── // ─── Theme ───────────────────────────────────────────────────────────────────
function applyTheme(theme) { function applyTheme(themeName) {
const root = document.documentElement; let link = document.getElementById('class-theme');
Object.entries(theme).forEach(([prop, value]) => { if (!link) {
root.style.setProperty(prop, value); link = document.createElement('link');
}); link.id = 'class-theme';
link.rel = 'stylesheet';
document.head.appendChild(link);
}
link.href = `/themes/${encodeURIComponent(themeName)}.css`;
} }
// ─── Screen management ─────────────────────────────────────────────────────── // ─── Screen management ───────────────────────────────────────────────────────
function showScreen(screen) { function showScreen(screen) {
@@ -108,7 +113,7 @@ function showScreen(screen) {
async function showClassPicker() { async function showClassPicker() {
showScreen('class-picker'); showScreen('class-picker');
const listEl = document.getElementById('classList'); const listEl = document.getElementById('classList');
listEl.innerHTML = '<p style="color: var(--theme-muted)">Laden...</p>'; listEl.innerHTML = '<p style="opacity:0.6">Laden...</p>';
const res = await apiFetch('/api/classes'); const res = await apiFetch('/api/classes');
if (!res) return; if (!res) return;
@@ -117,19 +122,21 @@ async function showClassPicker() {
listEl.innerHTML = ''; listEl.innerHTML = '';
if (classes.length === 0) { if (classes.length === 0) {
listEl.innerHTML = '<p style="color: var(--theme-muted)">Keine Klassen verfügbar.</p>'; listEl.innerHTML = '<p style="opacity:0.6">Keine Klassen verfügbar.</p>';
return; return;
} }
classes.forEach(cls => { classes.forEach(cls => {
const card = document.createElement('div'); const card = document.createElement('div');
card.className = 'class-card'; card.className = 'class-card';
card.style.setProperty('--card-accent', cls.theme['--theme-accent'] || 'var(--theme-accent)'); const c = cls.colors || {};
if (c.bg) card.style.background = c.bg;
if (c.accent) card.style.borderColor = c.accent;
card.innerHTML = ` card.innerHTML = `
<div class="class-card-icon">${cls.icon || '📚'}</div> <div class="class-card-icon">${cls.icon || '📚'}</div>
<div class="class-card-info"> <div class="class-card-info">
<div class="class-card-name">${cls.name}</div> <div class="class-card-name" style="${c.text ? `color:${c.text}` : ''}">${cls.name}</div>
<div class="class-card-desc">${cls.description || ''}</div> <div class="class-card-desc" style="${c.muted ? `color:${c.muted}` : ''}">${cls.description || ''}</div>
</div> </div>
`; `;
card.onclick = () => selectClass(cls.id); card.onclick = () => selectClass(cls.id);

View File

@@ -118,9 +118,10 @@
</div> </div>
<div class="user-display"> <div class="user-display">
<div class="user-name" id="userDisplayName"></div> <div class="user-name" id="userDisplayName"></div>
<button class="logout-button" onclick="logout()"> <div class="user-buttons">
Abmelden <button class="logout-button" onclick="showClassPicker()">Klasse wechseln</button>
</button> <button class="logout-button" onclick="logout()">Abmelden</button>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,677 +1,94 @@
:root { /* Layout skeleton only. All visual styling → public/themes/<classId>.css */
--theme-bg: #1a252f;
--theme-bg-mid: #2c3e50;
--theme-bg-light: #34495e;
--theme-bg-hover: #3d566e;
--theme-text: #ecf0f1;
--theme-muted: #7f8c8d;
--theme-muted-light: #bdc3c7;
--theme-accent: #3498db;
--theme-accent-hover: #2980b9;
}
* { *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
margin: 0;
padding: 0;
box-sizing: border-box;
}
body { body { font-family: inherit; min-height: 100vh; }
font-family: 'Arial', 'Helvetica', sans-serif;
background: var(--theme-bg-mid);
min-height: 100vh;
padding: 0;
margin: 0;
color: #1a1a1a;
}
.app-wrapper { /* ─── App shell ──────────────────────────────────────────────────────────── */
display: flex; .app-wrapper { display: flex; min-height: 100vh; }
min-height: 100vh; .main-content { flex: 1; min-width: 0; }
gap: 0; .container { max-width: 100%; min-height: 100vh; }
padding: 0;
}
.sidebar { /* ─── Sidebar ────────────────────────────────────────────────────────────── */
width: 280px; .sidebar { width: 280px; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
background: var(--theme-bg-light); .sidebar-item { cursor: pointer; }
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 { /* ─── Header ─────────────────────────────────────────────────────────────── */
background: var(--theme-bg); .header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
padding: 20px; .header-right { display: flex; align-items: center; gap: 20px; }
border-bottom: 2px solid rgba(0, 0, 0, 0.3); .user-display { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
} .user-buttons { display: flex; gap: 6px; }
.logout-button { cursor: pointer; font-family: inherit; }
.sidebar-header h2 { /* ─── Progress ───────────────────────────────────────────────────────────── */
color: var(--theme-text); .progress-content { max-width: 1200px; margin: 0 auto; }
font-size: 1.2em; .progress-bar-container { width: 100%; overflow: hidden; }
font-weight: bold; .progress-bar { height: 100%; width: 0%; transition: width 0.5s ease; }
text-transform: uppercase;
letter-spacing: 1px;
}
.sidebar-item { /* ─── Tasks ──────────────────────────────────────────────────────────────── */
padding: 15px 20px; .task-section { max-width: 1200px; margin: 0 auto; }
cursor: pointer; .task-container { display: grid; }
transition: background-color 0.2s; .task-card { position: relative; overflow: hidden; }
border-bottom: 1px solid var(--theme-bg-mid); .task-header { display: flex; justify-content: space-between; align-items: center; }
background: var(--theme-bg-light); .task-input-group { display: flex; align-items: center; }
color: var(--theme-text); .task-input { font-family: inherit; text-align: center; }
} .task-button { border: none; cursor: pointer; font-family: inherit; }
.task-question { white-space: pre-line; }
.task-status { min-height: 1.2em; }
.sidebar-item:hover { /* ─── Confetti (JS-driven) ───────────────────────────────────────────────── */
background: var(--theme-bg-hover); .task-card.confetti-animation { animation: taskFadeOut 1.5s ease forwards; }
}
.sidebar-item.active { @keyframes taskFadeOut {
background: var(--theme-bg); 0% { opacity: 1; transform: scale(1); }
border-left: 4px solid var(--theme-accent); 100% { opacity: 0; transform: scale(0.96) translateY(-10px); }
color: var(--theme-text);
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-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: 'Arial', sans-serif;
text-transform: uppercase;
letter-spacing: 0.5px;
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: #ffffff;
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: uppercase;
letter-spacing: 2px;
}
.points-display {
background: var(--theme-bg-mid);
padding: 15px 25px;
border: 2px solid var(--theme-accent);
border-radius: 4px;
text-align: center;
}
.points-label {
font-size: 0.85em;
color: var(--theme-muted-light);
text-transform: uppercase;
letter-spacing: 1px;
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: uppercase;
letter-spacing: 1px;
}
.progress-bar-container {
width: 100%;
height: 25px;
background: var(--theme-bg-mid);
border: 1px solid var(--theme-bg);
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: #f8f9fa;
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 #e0e0e0;
border-right: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.task-container {
display: grid;
gap: 25px;
}
.task-card {
background: #ffffff;
padding: 30px;
border: 2px solid #e0e0e0;
border-left: 4px solid var(--theme-accent);
transition: border-color 0.2s, box-shadow 0.2s;
position: relative;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.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 { .confetti {
position: absolute; position: absolute;
width: 8px;
height: 8px;
background: var(--theme-accent);
animation: confettiFall linear forwards;
z-index: 1000;
pointer-events: none; pointer-events: none;
z-index: 1000;
animation: confettiFall linear forwards;
} }
@keyframes confettiFall { @keyframes confettiFall {
0% { 0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
transform: translateY(0) translateX(0) rotate(0deg); 100% { transform: translateY(380px) translateX(calc(var(--random-x, 0) * 100px)) rotate(720deg); opacity: 0; }
opacity: 1;
}
100% {
transform: translateY(400px) translateX(calc(var(--random-x, 0) * 100px)) rotate(720deg);
opacity: 0;
}
} }
.task-header { /* ─── Toast (JS-driven) ──────────────────────────────────────────────────── */
display: flex; .message { position: fixed; top: 20px; right: 20px; z-index: 9000; transform: translateX(440px); transition: transform 0.3s ease; }
justify-content: space-between; .message.show { transform: translateX(0); }
align-items: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 2px solid #e0e0e0;
}
.task-title { /* ─── Overlays ───────────────────────────────────────────────────────────── */
font-size: 1.1em; .auth-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9999; }
font-weight: bold; .class-picker-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9998; padding: 20px; }
color: var(--theme-bg);
text-transform: uppercase;
letter-spacing: 1px;
}
.task-points { /* ─── Auth form ──────────────────────────────────────────────────────────── */
background: var(--theme-bg-light); .auth-card { width: 100%; max-width: 360px; }
color: var(--theme-text); .auth-tabs { display: flex; }
padding: 6px 15px; .auth-tab { background: none; border: none; cursor: pointer; font-family: inherit; }
border-radius: 2px; .auth-input { display: block; width: 100%; font-family: inherit; }
font-weight: bold; .auth-error { min-height: 1.2em; }
font-size: 0.9em; .auth-button { width: 100%; border: none; cursor: pointer; font-family: inherit; }
border: 1px solid var(--theme-bg-mid); .reset-button { width: 100%; display: block; cursor: pointer; font-family: inherit; }
}
.task-question { /* ─── Class picker ───────────────────────────────────────────────────────── */
font-size: 1.15em; .class-picker-card { width: 100%; max-width: 560px; }
margin: 25px 0; .class-list { display: grid; }
color: #2c3e50; .class-card { display: flex; align-items: center; cursor: pointer; }
line-height: 1.7; .class-card-icon { flex-shrink: 0; }
white-space: pre-line; .class-card-info { flex: 1; }
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: 2px;
width: 150px;
text-align: center;
font-family: 'Arial', sans-serif;
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: 2px;
cursor: pointer;
font-family: 'Arial', sans-serif;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
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);
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);
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;
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);
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));
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: uppercase;
letter-spacing: 1px;
}
.logout-button {
background: none;
border: 1px solid var(--theme-bg-light);
color: var(--theme-muted);
padding: 5px 12px;
font-size: 0.8em;
font-family: 'Arial', sans-serif;
text-transform: uppercase;
letter-spacing: 1px;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
}
.logout-button:hover {
border-color: #e74c3c;
color: #e74c3c;
}
/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) { @media (max-width: 900px) {
.app-wrapper { .app-wrapper { flex-direction: column; }
flex-direction: column; .sidebar { width: 100%; position: relative; height: auto; max-height: 280px; }
} .header-content { flex-direction: column; align-items: flex-start; }
.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) { @media (max-width: 600px) {
.container { padding: 0; } .task-input-group { flex-direction: column; align-items: stretch; }
header { padding: 20px; } .task-input { width: 100%; }
h1 { font-size: 1.4em; } .task-button { width: 100%; }
.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; }
} }

422
public/themes/noir.css Normal file
View File

@@ -0,0 +1,422 @@
/* ═══════════════════════════════════════════════════════════════════════════
🔍 NOIR THEME — Crime files. Cold coffee. No magic here.
═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Source+Sans+3:wght@400;600;700&display=swap');
:root {
--n-black: #080c10;
--n-dark: #0d1117;
--n-surface: #161b22;
--n-raised: #1c2128;
--n-border: #30363d;
--n-border-dim: #21262d;
--n-text: #cdd9e5;
--n-muted: #768390;
--n-dim: #545d68;
--n-blue: #539bf5;
--n-blue-dark: #2e6cd1;
--n-amber: #c69026;
--n-red: #e5534b;
--n-green: #57ab5a;
--n-paper: #1a1209;
--n-paper-line: rgba(255,255,255,0.04);
--n-ink: #d4c9b0;
--n-ink-dim: #8a7d68;
--theme-accent: #539bf5; /* compat */
}
/* ─── Spacing & typography ───────────────────────────────────────────────── */
body { font-family: 'Source Sans 3', sans-serif; }
h1 { font-size: 1.5em; font-weight: 700; }
header { padding: 20px 36px; }
.sidebar-item { padding: 12px 16px; font-size: 0.88em; line-height: 1.4; }
.points-display { padding: 10px 18px; text-align: center; }
.points-label { font-size: 0.65em; font-weight: 700; margin-bottom: 3px; }
.points-value { font-size: 1.8em; font-weight: 700; }
.user-name { font-size: 0.78em; font-weight: 600; }
.logout-button { font-size: 0.72em; padding: 4px 10px; }
.progress-section { padding: 14px 36px; }
.progress-label { margin-bottom: 6px; font-size: 0.72em; font-weight: 700; }
.progress-bar-container { margin-bottom: 5px; }
.progress-text { font-size: 0.72em; font-weight: 600; }
.task-section { padding: 26px 36px; }
.chapter-description { padding: 16px 20px; margin-bottom: 22px; font-size: 0.96em; line-height: 1.9; }
.task-container { gap: 16px; }
.task-card { padding: 22px 26px; }
.task-header { margin-bottom: 14px; padding-bottom: 12px; }
.task-title { font-size: 0.85em; font-weight: 700; }
.task-points { padding: 3px 10px; font-size: 0.75em; font-weight: 700; }
.task-question { font-size: 1.05em; margin: 16px 0; line-height: 1.85; font-weight: 400; }
.task-input-group { gap: 10px; margin: 16px 0 10px; padding-top: 14px; }
.task-input { font-size: 1.05em; padding: 9px 12px; width: 130px; font-weight: 600; }
.task-button { padding: 9px 24px; font-size: 0.82em; font-weight: 700; }
.task-status { margin-top: 10px; font-size: 0.9em; font-weight: 700; }
.confetti { width: 5px; height: 5px; }
.message { padding: 11px 20px; font-size: 0.92em; font-weight: 700; }
.auth-card { padding: 32px; }
.auth-title { font-size: 1.4em; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; }
.auth-tabs { margin-bottom: 18px; }
.auth-tab { padding: 7px 14px; font-size: 0.75em; font-weight: 700; }
.auth-input { padding: 9px 12px; margin-bottom: 8px; font-size: 0.88em; }
.auth-error { font-size: 0.82em; margin-bottom: 8px; }
.auth-button { padding: 10px; font-size: 0.82em; font-weight: 700; }
.reset-button { padding: 7px 12px; font-size: 0.75em; font-weight: 600; }
.class-picker-card { padding: 32px; }
.class-picker-title { font-size: 1.3em; font-weight: 700; margin-bottom: 6px; }
.class-picker-subtitle { font-size: 0.85em; margin-bottom: 22px; }
.class-list { gap: 8px; }
.class-card { padding: 14px 18px; gap: 14px; }
.class-card-icon { font-size: 1.8em; }
.class-card-name { font-size: 1em; font-weight: 700; margin-bottom: 2px; }
.class-card-desc { font-size: 0.8em; }
.completion-icon { font-size: 2.6em; margin-bottom: 12px; }
/* ─── Full-page background ───────────────────────────────────────────────── */
body { background: var(--n-black); }
/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
background: var(--n-dark);
border-right: 1px solid var(--n-border);
box-shadow: 2px 0 16px rgba(0,0,0,0.8);
}
.sidebar::-webkit-scrollbar { width: 2px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--n-border); }
.sidebar-header {
background: var(--n-surface);
border-bottom: 1px solid var(--n-border);
padding: 20px 18px;
}
.sidebar-header h2 {
font-family: 'Special Elite', monospace;
color: var(--n-muted);
font-size: 0.72em;
font-weight: 400;
letter-spacing: 3px;
text-transform: uppercase;
}
.sidebar-item {
margin: 0;
border-radius: 0;
color: var(--n-muted);
font-weight: 400;
border-bottom: 1px solid var(--n-border-dim);
border-left: 2px solid transparent;
transition: background 0.12s, color 0.12s, border-left-color 0.12s;
}
.sidebar-item:hover {
background: var(--n-surface);
color: var(--n-text);
border-left-color: var(--n-dim);
transform: none;
}
.sidebar-item.active {
background: var(--n-raised);
border-left: 2px solid var(--n-blue);
color: var(--n-text);
font-weight: 700;
box-shadow: inset 3px 0 12px rgba(83,155,245,0.08);
}
.sidebar-item.completed {
border-left: 2px solid var(--n-green);
color: var(--n-green);
background: rgba(87,171,90,0.05);
}
.sidebar-item.completed.active {
background: var(--n-raised);
border-left: 2px solid var(--n-blue);
color: var(--n-text);
}
/* ─── Main content — aged dark paper ────────────────────────────────────── */
.main-content, .container {
background: var(--n-paper);
background-image: repeating-linear-gradient(
transparent, transparent 27px,
var(--n-paper-line) 27px, var(--n-paper-line) 28px
);
}
/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
background: var(--n-dark);
border-bottom: 2px solid var(--n-blue);
}
h1 {
font-family: 'Special Elite', monospace;
font-weight: 400;
color: var(--n-text);
letter-spacing: 3px;
text-transform: uppercase;
background: none;
-webkit-background-clip: unset;
-webkit-text-fill-color: unset;
background-clip: unset;
animation: none;
}
/* ─── Points ─────────────────────────────────────────────────────────────── */
.points-display {
background: var(--n-surface);
border: 1px solid var(--n-border);
border-radius: 0;
box-shadow: none;
}
.points-label { color: var(--n-dim); text-transform: uppercase; letter-spacing: 2.5px; }
.points-value { color: var(--n-blue); font-family: 'Special Elite', monospace; }
/* ─── User area ──────────────────────────────────────────────────────────── */
.user-name { color: var(--n-muted); text-transform: uppercase; letter-spacing: 1px; }
.logout-button {
background: none;
border: 1px solid var(--n-border);
color: var(--n-muted);
border-radius: 0;
text-transform: uppercase;
letter-spacing: 1px;
transition: border-color 0.2s, color 0.2s;
}
.logout-button:hover { border-color: var(--n-red); color: var(--n-red); background: none; }
/* ─── Progress ───────────────────────────────────────────────────────────── */
.progress-section {
background: rgba(0,0,0,0.4);
border-bottom: 1px solid var(--n-border-dim);
}
.progress-label { color: var(--n-dim); text-transform: uppercase; letter-spacing: 2px; }
.progress-bar-container {
height: 6px;
background: rgba(255,255,255,0.06);
border-radius: 0;
border: none;
}
.progress-bar { background: var(--n-blue); border-radius: 0; animation: none; box-shadow: none; }
.progress-text { color: var(--n-dim); }
/* ─── Chapter description ────────────────────────────────────────────────── */
.chapter-description {
background: rgba(0,0,0,0.25);
border: 1px solid var(--n-border-dim);
border-left: 3px solid var(--n-blue);
border-radius: 0;
color: var(--n-ink);
font-family: 'Special Elite', monospace;
}
/* ─── Task cards — case files ────────────────────────────────────────────── */
.task-card {
background: rgba(0,0,0,0.3);
border: 1px solid var(--n-border-dim);
border-top: 2px solid var(--n-border);
border-radius: 0;
box-shadow: 0 2px 12px rgba(0,0,0,0.4);
transition: box-shadow 0.2s, border-top-color 0.2s;
}
.task-card::before { display: none; }
.task-card:hover {
box-shadow: 0 4px 20px rgba(0,0,0,0.5);
border-top-color: var(--n-blue);
transform: none;
}
.task-header { border-bottom: 1px solid var(--n-border-dim); }
.task-title {
font-family: 'Special Elite', monospace;
color: var(--n-text);
font-weight: 400;
text-transform: uppercase;
letter-spacing: 2px;
}
.task-points {
background: var(--n-surface);
color: var(--n-muted);
border: 1px solid var(--n-border);
border-radius: 0;
text-transform: uppercase;
letter-spacing: 1px;
}
.task-question { color: var(--n-ink); }
.task-input-group { border-top: 1px solid var(--n-border-dim); }
.task-input {
background: rgba(0,0,0,0.3);
border: 1px solid var(--n-border);
border-radius: 0;
color: var(--n-text);
font-family: 'Special Elite', monospace;
transition: border-color 0.2s;
}
.task-input:focus {
outline: none;
border-color: var(--n-blue);
box-shadow: 0 0 0 3px rgba(83,155,245,0.1);
}
.task-button {
background: var(--n-blue);
color: #fff;
border-radius: 0;
text-transform: uppercase;
letter-spacing: 2px;
box-shadow: none;
transition: background 0.15s;
}
.task-button:hover { background: var(--n-blue-dark); transform: none; box-shadow: none; opacity: 1; }
.task-button:active { background: #1f4fa5; }
.task-button:disabled { background: var(--n-surface); color: var(--n-dim); }
.task-status.success { color: var(--n-green); }
.task-status.error { color: var(--n-red); }
.task-status.completed { color: var(--n-amber); }
/* ─── Confetti (square, minimal) ─────────────────────────────────────────── */
.confetti { border-radius: 0; background: var(--n-blue); }
/* ─── Toast ──────────────────────────────────────────────────────────────── */
.message {
border-radius: 0;
border: 1px solid;
box-shadow: 0 4px 20px rgba(0,0,0,0.6);
font-family: 'Source Sans 3', sans-serif;
}
.message.success { background: #0d1f12; color: var(--n-green); border-color: var(--n-green); }
.message.error { background: #1f0d0d; color: #f07070; border-color: var(--n-red); }
/* ─── Overlays — CRT scanline texture ───────────────────────────────────── */
.auth-overlay,
.class-picker-overlay {
background:
repeating-linear-gradient(
0deg,
transparent, transparent 2px,
rgba(255,255,255,0.012) 2px, rgba(255,255,255,0.012) 4px
),
var(--n-black);
}
.auth-card,
.class-picker-card {
background: var(--n-dark);
border: 1px solid var(--n-border);
border-radius: 0;
box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 20px 60px rgba(0,0,0,0.8);
backdrop-filter: none;
}
.auth-title {
font-family: 'Special Elite', monospace;
color: var(--n-text);
font-weight: 400;
letter-spacing: 2px;
text-transform: uppercase;
border-bottom: 1px solid var(--n-border);
background: none;
-webkit-background-clip: unset;
-webkit-text-fill-color: unset;
background-clip: unset;
animation: none;
}
.class-picker-title {
font-family: 'Special Elite', monospace;
color: var(--n-text);
font-weight: 400;
letter-spacing: 2px;
text-transform: uppercase;
}
.class-picker-subtitle { color: var(--n-muted); }
.auth-tabs { border-bottom: 1px solid var(--n-border); }
.auth-tab {
color: var(--n-dim);
border-bottom: 2px solid transparent;
margin-bottom: -1px;
text-transform: uppercase;
letter-spacing: 1.5px;
transition: color 0.2s, border-color 0.2s;
}
.auth-tab.active { color: var(--n-text); border-bottom-color: var(--n-blue); }
.auth-input {
background: var(--n-surface);
border: 1px solid var(--n-border);
border-radius: 0;
color: var(--n-text);
transition: border-color 0.2s;
}
.auth-input:focus { outline: none; border-color: var(--n-blue); }
.auth-input::placeholder { color: var(--n-dim); }
.auth-error { color: #f07070; }
.auth-button {
background: var(--n-blue);
color: #fff;
border-radius: 0;
text-transform: uppercase;
letter-spacing: 2px;
transition: background 0.2s;
box-shadow: none;
}
.auth-button:hover { background: var(--n-blue-dark); opacity: 1; transform: none; }
.reset-button {
border: 1px solid rgba(229,83,75,0.35);
color: var(--n-red);
border-radius: 0;
transition: background 0.2s;
}
.reset-button:hover { background: rgba(229,83,75,0.08); }
/* ─── Class cards in picker ──────────────────────────────────────────────── */
.class-card {
background: var(--n-surface);
border: 1px solid var(--n-border);
border-left: 2px solid var(--n-blue);
border-radius: 0;
transition: background 0.15s;
}
.class-card:hover { background: var(--n-raised); transform: none; box-shadow: none; opacity: 1; }
.class-card-name {
font-family: 'Special Elite', monospace;
font-weight: 400;
letter-spacing: 1px;
}
.completion-icon { animation: none; }

410
public/themes/unicorn.css Normal file
View File

@@ -0,0 +1,410 @@
/* ═══════════════════════════════════════════════════════════════════════════
🦄 UNICORN THEME — Maximum magic. No apologies.
═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');
:root {
--u-bg: #1a0840;
--u-sidebar: #120630;
--u-purple: #6d28d9;
--u-pink: #ff69b4;
--u-pink-dark: #db2777;
--u-pink-glow: rgba(255, 105, 180, 0.35);
--u-content: #fdf4ff;
--u-card: #ffffff;
--u-text-dark: #3b0764;
--u-text-mid: #7e22ce;
--u-text-pale: #fce4ff;
--u-muted: #c4a0dc;
--u-green: #34d399;
--u-red: #f87171;
--theme-accent: #ff69b4; /* compat */
--rainbow: linear-gradient(90deg,
#ff6ec7 0%, #c084fc 20%, #60a5fa 40%, #34d399 60%, #fbbf24 80%, #ff6ec7 100%);
}
/* ─── Spacing & typography ───────────────────────────────────────────────── */
body { font-family: 'Nunito', sans-serif; }
h1 { font-size: 2em; font-weight: 900; }
header { padding: 24px 44px; }
.sidebar-item { padding: 12px 16px; font-size: 0.93em; line-height: 1.4; }
.points-display { padding: 14px 26px; text-align: center; }
.points-label { font-size: 0.72em; font-weight: 700; margin-bottom: 4px; }
.points-value { font-size: 2.2em; font-weight: 900; }
.user-name { font-size: 0.85em; font-weight: 600; }
.logout-button { font-size: 0.8em; padding: 5px 14px; }
.progress-section { padding: 20px 44px; }
.progress-label { margin-bottom: 10px; font-size: 0.8em; font-weight: 700; }
.progress-bar-container { margin-bottom: 6px; }
.progress-text { font-size: 0.8em; font-weight: 700; }
.task-section { padding: 36px 44px; }
.chapter-description { padding: 20px 26px; margin-bottom: 32px; font-size: 1.05em; line-height: 1.8; }
.task-container { gap: 28px; }
.task-card { padding: 32px; }
.task-header { margin-bottom: 20px; padding-bottom: 16px; }
.task-title { font-size: 1.05em; font-weight: 800; }
.task-points { padding: 5px 16px; font-size: 0.82em; font-weight: 800; }
.task-question { font-size: 1.15em; margin: 22px 0; line-height: 1.8; font-weight: 600; }
.task-input-group { gap: 14px; margin: 24px 0 14px; padding-top: 20px; }
.task-input { font-size: 1.2em; padding: 12px 18px; width: 160px; font-weight: 700; }
.task-button { padding: 12px 32px; font-size: 1em; font-weight: 800; }
.task-status { margin-top: 16px; font-size: 1em; font-weight: 700; }
.confetti { width: 10px; height: 10px; }
.message { padding: 14px 24px; font-size: 1em; font-weight: 700; }
.auth-card { padding: 40px; }
.auth-title { font-size: 1.7em; font-weight: 900; margin-bottom: 24px; }
.auth-tabs { margin-bottom: 24px; }
.auth-tab { padding: 8px 20px; font-size: 0.9em; font-weight: 700; }
.auth-input { padding: 12px 16px; margin-bottom: 12px; font-size: 1em; }
.auth-error { font-size: 0.85em; margin-bottom: 10px; }
.auth-button { padding: 14px; font-size: 1em; font-weight: 900; }
.reset-button { padding: 10px 12px; font-size: 0.8em; font-weight: 600; }
.class-picker-card { padding: 44px; }
.class-picker-title { font-size: 1.6em; font-weight: 900; margin-bottom: 10px; }
.class-picker-subtitle { font-size: 0.92em; margin-bottom: 32px; }
.class-list { gap: 16px; }
.class-card { padding: 20px 24px; gap: 18px; }
.class-card-icon { font-size: 2.6em; }
.class-card-name { font-size: 1.15em; font-weight: 800; margin-bottom: 5px; }
.class-card-desc { font-size: 0.87em; }
.completion-icon { font-size: 3.6em; margin-bottom: 18px; }
/* ─── Full-page background with stars ───────────────────────────────────── */
body {
background: var(--u-bg);
background-image:
radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.6) 0%, transparent 100%),
radial-gradient(1px 1px at 72% 8%, rgba(255,255,255,0.5) 0%, transparent 100%),
radial-gradient(1px 1px at 44% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
radial-gradient(1px 1px at 88% 45%, rgba(255,255,255,0.6) 0%, transparent 100%),
radial-gradient(1px 1px at 5% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
radial-gradient(2px 2px at 30% 70%, rgba(255,105,180,0.5) 0%, transparent 100%),
radial-gradient(2px 2px at 60% 30%, rgba(192,132,252,0.5) 0%, transparent 100%);
}
/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
background: var(--u-sidebar);
border-right: 1px solid rgba(255, 105, 180, 0.15);
box-shadow: 4px 0 30px rgba(0, 0, 0, 0.6);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--u-pink); border-radius: 99px; }
.sidebar-header {
padding: 28px 20px 22px;
border-bottom: 1px solid rgba(255, 105, 180, 0.15);
background: linear-gradient(180deg, rgba(255,105,180,0.08) 0%, transparent 100%);
}
.sidebar-header h2 {
color: var(--u-muted);
font-size: 0.75em;
font-weight: 800;
letter-spacing: 2px;
text-transform: uppercase;
}
.sidebar-item {
border-radius: 10px;
margin: 3px 10px;
color: var(--u-muted);
font-weight: 600;
transition: background 0.18s, color 0.15s, transform 0.15s;
}
.sidebar-item:hover {
background: rgba(255, 105, 180, 0.12);
color: var(--u-text-pale);
transform: translateX(4px);
}
.sidebar-item.active {
background: linear-gradient(135deg, var(--u-pink), var(--u-purple));
color: #fff;
font-weight: 900;
box-shadow: 0 4px 20px var(--u-pink-glow);
}
.sidebar-item.completed {
background: rgba(52, 211, 153, 0.1);
color: #6ee7b7;
}
.sidebar-item.completed.active {
background: linear-gradient(135deg, var(--u-pink), var(--u-purple));
color: #fff;
}
/* ─── Main content ───────────────────────────────────────────────────────── */
.main-content, .container { background: var(--u-content); }
/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
background: var(--u-bg);
border-bottom: 4px solid transparent;
border-image: var(--rainbow) 1;
}
h1 {
font-weight: 900;
background: var(--rainbow);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
background-size: 300% 100%;
animation: rainbowSlide 5s linear infinite;
}
@keyframes rainbowSlide {
0% { background-position: 0% 50%; }
100% { background-position: 300% 50%; }
}
/* ─── Points ─────────────────────────────────────────────────────────────── */
.points-display {
background: rgba(255, 105, 180, 0.1);
border: 2px solid var(--u-pink);
border-radius: 16px;
box-shadow: 0 0 20px var(--u-pink-glow);
}
.points-label { color: var(--u-muted); text-transform: uppercase; letter-spacing: 1.5px; }
.points-value { color: var(--u-pink); }
/* ─── User area ──────────────────────────────────────────────────────────── */
.user-name { color: var(--u-muted); }
.logout-button {
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.12);
color: var(--u-muted);
border-radius: 8px;
transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.logout-button:hover {
border-color: var(--u-pink);
color: var(--u-pink);
background: rgba(255, 105, 180, 0.1);
}
/* ─── Progress ───────────────────────────────────────────────────────────── */
.progress-section {
background: rgba(109, 40, 217, 0.05);
border-bottom: 1px solid rgba(255, 105, 180, 0.1);
}
.progress-label { color: var(--u-text-mid); letter-spacing: 1px; text-transform: uppercase; }
.progress-bar-container {
height: 18px;
background: rgba(109, 40, 217, 0.12);
border-radius: 99px;
border: 1px solid rgba(109, 40, 217, 0.2);
}
.progress-bar {
background: var(--rainbow);
background-size: 300% 100%;
border-radius: 99px;
animation: rainbowSlide 3s linear infinite;
box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}
.progress-text { color: var(--u-text-mid); }
/* ─── Chapter description ────────────────────────────────────────────────── */
.chapter-description {
background: linear-gradient(135deg, rgba(109,40,217,0.06), rgba(255,105,180,0.06));
border: 1px solid rgba(255, 105, 180, 0.2);
border-left: 5px solid var(--u-pink);
border-radius: 16px;
color: var(--u-text-dark);
}
/* ─── Task cards ─────────────────────────────────────────────────────────── */
.task-card {
background: var(--u-card);
border: 2px solid rgba(192, 132, 252, 0.15);
border-radius: 20px;
box-shadow: 0 8px 32px rgba(255, 105, 180, 0.1);
transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.task-card::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 5px;
background: var(--rainbow);
background-size: 300% 100%;
border-radius: 20px 20px 0 0;
animation: rainbowSlide 5s linear infinite;
}
.task-card:hover {
border-color: rgba(255, 105, 180, 0.5);
box-shadow: 0 12px 40px rgba(255, 105, 180, 0.22);
transform: translateY(-4px);
}
.task-header { border-bottom: 1px solid rgba(192, 132, 252, 0.15); }
.task-title { color: var(--u-text-dark); font-weight: 800; }
.task-question { color: var(--u-text-dark); }
.task-points {
background: rgba(255, 105, 180, 0.1);
color: var(--u-pink-dark);
border: 1px solid rgba(255, 105, 180, 0.25);
border-radius: 99px;
}
.task-input-group { border-top: 1px solid rgba(192, 132, 252, 0.12); }
.task-input {
border: 2px solid rgba(109, 40, 217, 0.2);
border-radius: 12px;
background: #fff;
color: var(--u-text-dark);
transition: border-color 0.2s, box-shadow 0.2s;
}
.task-input:focus {
outline: none;
border-color: var(--u-pink);
box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.15);
}
.task-button {
background: linear-gradient(135deg, var(--u-pink), var(--u-purple));
color: #fff;
border-radius: 12px;
box-shadow: 0 4px 20px var(--u-pink-glow);
transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.task-button:hover {
transform: translateY(-2px);
box-shadow: 0 8px 28px rgba(255, 105, 180, 0.55);
opacity: 0.92;
}
.task-button:active { transform: translateY(0); }
.task-button:disabled { background: #d4bde8; box-shadow: none; opacity: 0.6; }
.task-status.success { color: #15803d; }
.task-status.error { color: #dc2626; }
.task-status.completed { color: var(--u-pink-dark); }
/* ─── Confetti ───────────────────────────────────────────────────────────── */
.confetti { border-radius: 50%; background: var(--u-pink); }
/* ─── Toast ──────────────────────────────────────────────────────────────── */
.message { border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); font-family: 'Nunito', sans-serif; }
.message.success { background: linear-gradient(135deg, #15803d, #166534); color: #fff; }
.message.error { background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; }
/* ─── Overlays ───────────────────────────────────────────────────────────── */
.auth-overlay,
.class-picker-overlay {
background:
radial-gradient(ellipse at 30% 60%, rgba(109,40,217,0.5) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(255,105,180,0.4) 0%, transparent 45%),
radial-gradient(ellipse at 60% 80%, rgba(96,165,250,0.3) 0%, transparent 40%),
#0d0520;
}
.auth-card,
.class-picker-card {
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,105,180,0.3);
border-radius: 28px;
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
box-shadow:
0 30px 80px rgba(0,0,0,0.5),
0 0 0 1px rgba(255,255,255,0.06),
inset 0 1px 0 rgba(255,255,255,0.12);
}
.auth-title {
background: var(--rainbow);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
background-size: 300% 100%;
animation: rainbowSlide 5s linear infinite;
}
.class-picker-title { color: #fff; }
.class-picker-subtitle { color: rgba(255,255,255,0.4); }
.auth-tabs { border-bottom: 1px solid rgba(255,255,255,0.1); }
.auth-tab {
color: rgba(255,255,255,0.35);
border-bottom: 2px solid transparent;
margin-bottom: -1px;
transition: color 0.2s, border-color 0.2s;
}
.auth-tab.active { color: #fff; border-bottom-color: var(--u-pink); }
.auth-input {
background: rgba(255,255,255,0.07);
border: 1px solid rgba(255,255,255,0.14);
border-radius: 12px;
color: #fff;
transition: border-color 0.2s, background 0.2s;
}
.auth-input:focus { outline: none; border-color: var(--u-pink); background: rgba(255,255,255,0.11); }
.auth-input::placeholder { color: rgba(255,255,255,0.28); }
.auth-error { color: var(--u-red); }
.auth-button {
background: linear-gradient(135deg, var(--u-pink), var(--u-purple));
color: #fff;
border-radius: 14px;
box-shadow: 0 6px 24px var(--u-pink-glow);
transition: opacity 0.2s, transform 0.15s;
}
.auth-button:hover { opacity: 0.88; transform: translateY(-1px); }
.reset-button {
border: 1px solid rgba(220,38,38,0.35);
color: #f87171;
border-radius: 10px;
transition: background 0.2s;
}
.reset-button:hover { background: rgba(220,38,38,0.1); }
/* ─── Class cards in picker ──────────────────────────────────────────────── */
.class-card {
border: 2px solid rgba(255,105,180,0.3);
border-radius: 16px;
background: rgba(255,255,255,0.04);
transition: transform 0.18s, box-shadow 0.18s;
}
.class-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,0.35); }
.class-card-name { font-weight: 900; }
/* ─── Completion bounce ──────────────────────────────────────────────────── */
.completion-icon { animation: bounce 1.2s ease infinite; }
@keyframes bounce {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-14px) scale(1.08); }
}