diff --git a/classes/grundrechenarten.json b/classes/grundrechenarten.json index 0e7609c..3439d7d 100644 --- a/classes/grundrechenarten.json +++ b/classes/grundrechenarten.json @@ -3,29 +3,12 @@ "name": "Einhorn-Mathe", "icon": "πŸ¦„", "description": "Magische Mathematik mit EinhΓΆrnern und RegenbΓΆgen", - "theme": { - "--theme-bg": "#2d1b69", - "--theme-bg-mid": "#4a1a8a", - "--theme-bg-light": "#6b35b5", - "--theme-bg-hover": "#7d42cc", - "--theme-text": "#fce4ff", - "--theme-muted": "#c4a0dc", - "--theme-muted-light": "#dfc4f0", - "--theme-accent": "#ff69b4", - "--theme-accent-hover": "#e91e8c", - "--theme-content-bg": "#fef0ff", - "--theme-card-bg": "#fce8ff", - "--theme-card-radius": "16px", - "--theme-ui-radius": "12px", - "--theme-card-shadow": "0 6px 24px rgba(255,105,180,0.18)", - "--theme-font": "'Trebuchet MS', sans-serif", - "--theme-text-transform": "none", - "--theme-letter-spacing": "0px", - "--theme-h1-letter-spacing": "0px", - "--theme-sidebar-item-margin": "3px 8px", - "--theme-sidebar-active-bg": "#ff69b4", - "--theme-sidebar-active-border": "none", - "--theme-sidebar-active-color": "#ffffff" + "theme": "unicorn", + "colors": { + "bg": "#3d2280", + "accent": "#ff69b4", + "text": "#fce4ff", + "muted": "#c4a0dc" }, "lessons": ["adding"] } diff --git a/classes/kriminalfΓ€lle.json b/classes/kriminalfΓ€lle.json index 9cca990..4c3eaa8 100644 --- a/classes/kriminalfΓ€lle.json +++ b/classes/kriminalfΓ€lle.json @@ -3,29 +3,12 @@ "name": "KriminalfΓ€lle", "icon": "πŸ”", "description": "LΓΆse echte KriminalfΓ€lle aus Deutschland mit Mathematik", - "theme": { - "--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", - "--theme-content-bg": "#f4f1ec", - "--theme-card-bg": "#ffffff", - "--theme-card-radius": "0px", - "--theme-ui-radius": "0px", - "--theme-card-shadow": "0 1px 3px rgba(0,0,0,0.12)", - "--theme-font": "Georgia, 'Times New Roman', serif", - "--theme-text-transform": "uppercase", - "--theme-letter-spacing": "1px", - "--theme-h1-letter-spacing": "2px", - "--theme-sidebar-item-margin": "0", - "--theme-sidebar-active-bg": "#1a252f", - "--theme-sidebar-active-border": "4px solid #3498db", - "--theme-sidebar-active-color": "#ecf0f1" + "theme": "noir", + "colors": { + "bg": "#21262d", + "accent": "#4393e4", + "text": "#e6edf3", + "muted": "#848d97" }, "lessons": ["steglitz", "bode-museum", "dresden-gruenes-gewoelbe"] } diff --git a/classes/stricken.json b/classes/stricken.json new file mode 100644 index 0000000..238ea9c --- /dev/null +++ b/classes/stricken.json @@ -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"] +} diff --git a/lessons/stricken.json b/lessons/stricken.json new file mode 100644 index 0000000..b2f799e --- /dev/null +++ b/lessons/stricken.json @@ -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" + } + ] +} diff --git a/public/app.js b/public/app.js index 765ec34..c1b9c7c 100644 --- a/public/app.js +++ b/public/app.js @@ -77,11 +77,15 @@ async function apiFetch(url, options = {}) { // ─── Theme ─────────────────────────────────────────────────────────────────── -function applyTheme(theme) { - const root = document.documentElement; - Object.entries(theme).forEach(([prop, value]) => { - root.style.setProperty(prop, value); - }); +function applyTheme(themeName) { + let link = document.getElementById('class-theme'); + if (!link) { + link = document.createElement('link'); + link.id = 'class-theme'; + link.rel = 'stylesheet'; + document.head.appendChild(link); + } + link.href = `/themes/${encodeURIComponent(themeName)}.css`; } @@ -109,7 +113,7 @@ function showScreen(screen) { async function showClassPicker() { showScreen('class-picker'); const listEl = document.getElementById('classList'); - listEl.innerHTML = '

Laden...

'; + listEl.innerHTML = '

Laden...

'; const res = await apiFetch('/api/classes'); if (!res) return; @@ -118,24 +122,21 @@ async function showClassPicker() { listEl.innerHTML = ''; if (classes.length === 0) { - listEl.innerHTML = '

Keine Klassen verfΓΌgbar.

'; + listEl.innerHTML = '

Keine Klassen verfΓΌgbar.

'; return; } classes.forEach(cls => { const card = document.createElement('div'); card.className = 'class-card'; - const bg = cls.theme['--theme-bg-mid'] || ''; - const border = cls.theme['--theme-accent'] || ''; - const text = cls.theme['--theme-text'] || ''; - const muted = cls.theme['--theme-muted'] || ''; - if (bg) card.style.background = bg; - if (border) card.style.borderColor = border; + const c = cls.colors || {}; + if (c.bg) card.style.background = c.bg; + if (c.accent) card.style.borderColor = c.accent; card.innerHTML = `
${cls.icon || 'πŸ“š'}
-
${cls.name}
-
${cls.description || ''}
+
${cls.name}
+
${cls.description || ''}
`; card.onclick = () => selectClass(cls.id); diff --git a/public/style.css b/public/style.css index 11268f2..e367975 100644 --- a/public/style.css +++ b/public/style.css @@ -1,704 +1,94 @@ -: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; +/* Layout skeleton only. All visual styling β†’ public/themes/.css */ - /* 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); -} +*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} +body { font-family: inherit; min-height: 100vh; } -body { - font-family: var(--theme-font); - background: var(--theme-bg-mid); - min-height: 100vh; - padding: 0; - margin: 0; - color: #1a1a1a; -} +/* ─── App shell ──────────────────────────────────────────────────────────── */ +.app-wrapper { display: flex; min-height: 100vh; } +.main-content { flex: 1; min-width: 0; } +.container { max-width: 100%; min-height: 100vh; } -.app-wrapper { - display: flex; - min-height: 100vh; - gap: 0; - padding: 0; -} +/* ─── Sidebar ────────────────────────────────────────────────────────────── */ +.sidebar { width: 280px; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; } +.sidebar-item { cursor: pointer; } -.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); -} +/* ─── Header ─────────────────────────────────────────────────────────────── */ +.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; } +.header-right { display: flex; align-items: center; gap: 20px; } +.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 { - background: var(--theme-bg); - padding: 20px; - border-bottom: 2px solid rgba(0, 0, 0, 0.3); -} +/* ─── Progress ───────────────────────────────────────────────────────────── */ +.progress-content { max-width: 1200px; margin: 0 auto; } +.progress-bar-container { width: 100%; overflow: hidden; } +.progress-bar { height: 100%; width: 0%; transition: width 0.5s ease; } -.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); -} +/* ─── Tasks ──────────────────────────────────────────────────────────────── */ +.task-section { max-width: 1200px; margin: 0 auto; } +.task-container { display: grid; } +.task-card { position: relative; overflow: hidden; } +.task-header { display: flex; justify-content: space-between; align-items: center; } +.task-input-group { display: flex; align-items: center; } +.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 { - 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); -} +/* ─── Confetti (JS-driven) ───────────────────────────────────────────────── */ +.task-card.confetti-animation { animation: taskFadeOut 1.5s ease forwards; } -.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); } +@keyframes taskFadeOut { + 0% { opacity: 1; transform: scale(1); } + 100% { opacity: 0; transform: scale(0.96) translateY(-10px); } } .confetti { position: absolute; - width: 8px; - height: 8px; - background: var(--theme-accent); - animation: confettiFall linear forwards; - z-index: 1000; pointer-events: none; + z-index: 1000; + animation: confettiFall linear forwards; } @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; - } + 0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; } + 100% { transform: translateY(380px) 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; -} +/* ─── Toast (JS-driven) ──────────────────────────────────────────────────── */ +.message { position: fixed; top: 20px; right: 20px; z-index: 9000; transform: translateX(440px); transition: transform 0.3s ease; } +.message.show { transform: translateX(0); } -.task-title { - font-size: 1.1em; - font-weight: bold; - color: #1a252f; - text-transform: var(--theme-text-transform); - letter-spacing: var(--theme-letter-spacing); -} +/* ─── Overlays ───────────────────────────────────────────────────────────── */ +.auth-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9999; } +.class-picker-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9998; padding: 20px; } -.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); -} +/* ─── Auth form ──────────────────────────────────────────────────────────── */ +.auth-card { width: 100%; max-width: 360px; } +.auth-tabs { display: flex; } +.auth-tab { background: none; border: none; cursor: pointer; font-family: inherit; } +.auth-input { display: block; width: 100%; font-family: inherit; } +.auth-error { min-height: 1.2em; } +.auth-button { width: 100%; border: none; cursor: pointer; font-family: inherit; } +.reset-button { width: 100%; display: block; cursor: pointer; font-family: inherit; } -.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; -} +/* ─── Class picker ───────────────────────────────────────────────────────── */ +.class-picker-card { width: 100%; max-width: 560px; } +.class-list { display: grid; } +.class-card { display: flex; align-items: center; cursor: pointer; } +.class-card-icon { flex-shrink: 0; } +.class-card-info { flex: 1; } +/* ─── Responsive ─────────────────────────────────────────────────────────── */ @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; - } + .app-wrapper { flex-direction: column; } + .sidebar { width: 100%; position: relative; height: auto; max-height: 280px; } + .header-content { flex-direction: column; 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; } + .task-input-group { flex-direction: column; align-items: stretch; } + .task-input { width: 100%; } + .task-button { width: 100%; } } diff --git a/public/themes/noir.css b/public/themes/noir.css new file mode 100644 index 0000000..aefb19b --- /dev/null +++ b/public/themes/noir.css @@ -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; } diff --git a/public/themes/unicorn.css b/public/themes/unicorn.css new file mode 100644 index 0000000..7f4dfc7 --- /dev/null +++ b/public/themes/unicorn.css @@ -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); } +}