Add B1 Meister: OeSD B1 exam trainer (German-Arabic)

Next.js app with Hoeren, Lesen, Schreiben, Sprechen, Grammatik and Wortschatz sections, flashcards with spaced repetition, speaking chat, XP/streaks/badges, daily reminders (PWA) and Docker Compose setup for Coolify.
This commit is contained in:
X4Lo committed 2026-11-05 19:11:46 +00:00
commit 1f1d28a34d
42 files changed
+8879

No files matched your search

+880
View File
@@ -0,0 +1,880 @@
:root {
--bg: #fff8f0;
--bg2: #ffffff;
--card: #ffffff;
--text: #1f2a44;
--muted: #6b7280;
--line: #f0e4d7;
--red: #e63946;
--red-soft: #ffe3e5;
--yellow: #ffb703;
--yellow-soft: #fff3cd;
--green: #2a9d8f;
--green-soft: #d8f3ee;
--blue: #3a86ff;
--blue-soft: #e0ecff;
--purple: #8338ec;
--purple-soft: #efe4ff;
--orange: #fb8500;
--orange-soft: #ffe8d1;
--shadow: 0 6px 20px rgba(31, 42, 68, 0.08);
--shadow-pop: 0 4px 0 rgba(31, 42, 68, 0.15);
--radius: 20px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #121826;
--bg2: #182033;
--card: #1c2539;
--text: #f1f3f8;
--muted: #9aa3b5;
--line: #2a3550;
--red-soft: #3a1f27;
--yellow-soft: #3a3220;
--green-soft: #173533;
--blue-soft: #1b2a47;
--purple-soft: #2a1f45;
--orange-soft: #3a2a1b;
--shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
--shadow-pop: 0 4px 0 rgba(0, 0, 0, 0.4);
}
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--text);
font-family: var(--font-latin), system-ui, sans-serif;
-webkit-tap-highlight-color: transparent;
}
body {
min-height: 100dvh;
overflow-x: hidden;
}
a {
color: inherit;
text-decoration: none;
}
button {
font-family: inherit;
font-size: inherit;
color: inherit;
}
textarea,
input,
select {
font-family: inherit;
font-size: 16px;
color: var(--text);
background: var(--bg2);
border: 2px solid var(--line);
border-radius: 14px;
padding: 12px 14px;
width: 100%;
outline: none;
}
textarea:focus,
input:focus,
select:focus {
border-color: var(--blue);
}
.ar {
font-family: var(--font-arabic), "Segoe UI", Tahoma, sans-serif;
direction: rtl;
unicode-bidi: isolate;
line-height: 1.8;
}
.hide-ar .ar.optional {
display: none;
}
/* ---------- Layout ---------- */
.shell {
max-width: 820px;
margin: 0 auto;
padding: 0 16px 110px;
}
.topbar {
position: sticky;
top: 0;
z-index: 20;
background: color-mix(in srgb, var(--bg) 88%, transparent);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--line);
}
.topbar-inner {
max-width: 820px;
margin: 0 auto;
padding: 10px 16px;
display: flex;
align-items: center;
gap: 10px;
}
.brand {
display: flex;
align-items: center;
gap: 8px;
font-weight: 900;
font-size: 18px;
margin-right: auto;
}
.brand img {
width: 30px;
height: 30px;
}
.chip {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 6px 11px;
border-radius: 999px;
font-weight: 800;
font-size: 14px;
background: var(--card);
border: 2px solid var(--line);
white-space: nowrap;
}
.chip.fire {
color: var(--orange);
}
.chip.xp {
color: var(--purple);
}
.bottomnav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 30;
background: var(--card);
border-top: 1px solid var(--line);
padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav-inner {
max-width: 820px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(7, 1fr);
}
.navlink {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 8px 2px 9px;
font-size: 11px;
font-weight: 700;
color: var(--muted);
border-top: 3px solid transparent;
}
.navlink .ico {
font-size: 21px;
line-height: 1;
}
.navlink.active {
color: var(--red);
border-top-color: var(--red);
}
/* ---------- Bausteine ---------- */
h1 {
font-size: 28px;
margin: 22px 0 4px;
font-weight: 900;
letter-spacing: -0.5px;
}
h2 {
font-size: 20px;
margin: 26px 0 10px;
font-weight: 900;
}
h3 {
margin: 0 0 6px;
font-size: 17px;
font-weight: 800;
}
.sub {
color: var(--muted);
margin: 0 0 14px;
}
.card {
background: var(--card);
border: 2px solid var(--line);
border-radius: var(--radius);
padding: 18px;
box-shadow: var(--shadow);
}
.card + .card {
margin-top: 12px;
}
.grid {
display: grid;
gap: 12px;
}
.grid-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 560px) {
.grid-3 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.tile {
display: block;
border-radius: var(--radius);
padding: 16px;
border: 2px solid var(--line);
background: var(--card);
box-shadow: var(--shadow-pop);
transition: transform 0.12s ease, box-shadow 0.12s ease;
cursor: pointer;
text-align: left;
width: 100%;
}
.tile:hover {
transform: translateY(-2px);
}
.tile:active {
transform: translateY(2px);
box-shadow: none;
}
.tile .emoji {
font-size: 30px;
}
.tile .t {
font-weight: 900;
font-size: 17px;
margin-top: 6px;
}
.tile .s {
color: var(--muted);
font-size: 13px;
margin-top: 2px;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
border: none;
border-radius: 16px;
padding: 13px 20px;
font-weight: 900;
font-size: 16px;
cursor: pointer;
background: var(--red);
color: #fff;
box-shadow: 0 4px 0 #b02a35;
transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.2s;
user-select: none;
}
.btn:active {
transform: translateY(3px);
box-shadow: 0 1px 0 #b02a35;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn.secondary {
background: var(--card);
color: var(--text);
border: 2px solid var(--line);
box-shadow: 0 4px 0 var(--line);
}
.btn.green {
background: var(--green);
box-shadow: 0 4px 0 #1f7469;
}
.btn.blue {
background: var(--blue);
box-shadow: 0 4px 0 #2763c4;
}
.btn.purple {
background: var(--purple);
box-shadow: 0 4px 0 #5f22b3;
}
.btn.small {
padding: 8px 13px;
font-size: 14px;
border-radius: 12px;
}
.btn.block {
width: 100%;
}
.row {
display: flex;
gap: 10px;
align-items: center;
flex-wrap: wrap;
}
.spacer {
flex: 1;
}
.muted {
color: var(--muted);
}
.small {
font-size: 13px;
}
.pill {
display: inline-block;
padding: 3px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 800;
background: var(--blue-soft);
color: var(--blue);
}
.pill.green {
background: var(--green-soft);
color: var(--green);
}
.pill.red {
background: var(--red-soft);
color: var(--red);
}
.pill.yellow {
background: var(--yellow-soft);
color: #b07d00;
}
.pill.purple {
background: var(--purple-soft);
color: var(--purple);
}
.bar {
height: 12px;
border-radius: 999px;
background: var(--line);
overflow: hidden;
}
.bar > div {
height: 100%;
border-radius: 999px;
background: linear-gradient(90deg, var(--yellow), var(--orange));
transition: width 0.5s ease;
}
.bar.green > div {
background: linear-gradient(90deg, #52c7b8, var(--green));
}
.tabs {
display: flex;
gap: 8px;
overflow-x: auto;
padding: 2px 0 8px;
scrollbar-width: none;
}
.tabs button {
flex: 0 0 auto;
border: 2px solid var(--line);
background: var(--card);
border-radius: 999px;
padding: 8px 14px;
font-weight: 800;
cursor: pointer;
}
.tabs button.active {
background: var(--text);
color: var(--bg);
border-color: var(--text);
}
/* ---------- Quiz ---------- */
.option {
display: flex;
width: 100%;
text-align: left;
gap: 10px;
align-items: center;
padding: 13px 15px;
border-radius: 14px;
border: 2px solid var(--line);
background: var(--bg2);
cursor: pointer;
font-weight: 700;
margin-top: 8px;
transition: transform 0.08s ease;
}
.option:hover:not(:disabled) {
border-color: var(--blue);
}
.option:active:not(:disabled) {
transform: scale(0.98);
}
.option .key {
flex: 0 0 28px;
height: 28px;
border-radius: 9px;
display: grid;
place-items: center;
background: var(--line);
font-size: 13px;
font-weight: 900;
}
.option.correct {
border-color: var(--green);
background: var(--green-soft);
}
.option.selected {
border-color: var(--blue);
background: var(--blue-soft);
}
.option.wrong {
border-color: var(--red);
background: var(--red-soft);
animation: shake 0.35s;
}
.option:disabled {
cursor: default;
}
@keyframes shake {
0%,
100% {
transform: translateX(0);
}
25% {
transform: translateX(-6px);
}
75% {
transform: translateX(6px);
}
}
.feedback {
margin-top: 10px;
padding: 10px 12px;
border-radius: 12px;
font-weight: 700;
font-size: 14px;
}
.feedback.ok {
background: var(--green-soft);
color: var(--green);
}
.feedback.no {
background: var(--red-soft);
color: var(--red);
}
.reading {
white-space: pre-wrap;
line-height: 1.75;
font-size: 16.5px;
}
.word-chip {
border: 2px solid var(--line);
background: var(--bg2);
border-radius: 12px;
padding: 8px 12px;
font-weight: 800;
cursor: pointer;
box-shadow: 0 3px 0 var(--line);
}
.word-chip:active {
transform: translateY(2px);
box-shadow: none;
}
.drop-zone {
min-height: 56px;
border: 2px dashed var(--line);
border-radius: 14px;
padding: 8px;
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
/* ---------- Karteikarten ---------- */
.flip {
perspective: 1200px;
cursor: pointer;
user-select: none;
}
.flip-inner {
position: relative;
min-height: 280px;
transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
transform-style: preserve-3d;
}
.flip.flipped .flip-inner {
transform: rotateY(180deg);
}
.face {
position: absolute;
inset: 0;
backface-visibility: hidden;
border-radius: 26px;
padding: 24px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
border: 2px solid var(--line);
box-shadow: var(--shadow);
}
.face.front {
background: linear-gradient(135deg, var(--card), var(--blue-soft));
}
.face.back {
transform: rotateY(180deg);
background: linear-gradient(135deg, var(--card), var(--yellow-soft));
}
.art-der {
color: #3a86ff;
}
.art-die {
color: #e63946;
}
.art-das {
color: #2a9d8f;
}
/* ---------- Chat ---------- */
.chat {
display: flex;
flex-direction: column;
gap: 10px;
}
.bubble {
max-width: 86%;
padding: 12px 14px;
border-radius: 18px;
line-height: 1.5;
animation: pop 0.25s ease;
}
.bubble.bot {
align-self: flex-start;
background: var(--card);
border: 2px solid var(--line);
border-bottom-left-radius: 6px;
}
.bubble.me {
align-self: flex-end;
background: var(--blue);
color: #fff;
border-bottom-right-radius: 6px;
}
.bubble.tip {
align-self: stretch;
max-width: 100%;
background: var(--yellow-soft);
border: 2px dashed var(--yellow);
font-size: 14px;
}
@keyframes pop {
from {
transform: scale(0.92);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
.typing span {
display: inline-block;
width: 7px;
height: 7px;
margin: 0 2px;
border-radius: 50%;
background: var(--muted);
animation: blink 1.2s infinite;
}
.typing span:nth-child(2) {
animation-delay: 0.2s;
}
.typing span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes blink {
0%,
80%,
100% {
opacity: 0.25;
}
40% {
opacity: 1;
}
}
.composer {
position: sticky;
bottom: 74px;
background: var(--bg);
padding: 10px 0;
}
.mic {
width: 54px;
height: 54px;
border-radius: 50%;
border: none;
font-size: 22px;
cursor: pointer;
background: var(--red);
color: #fff;
box-shadow: 0 4px 0 #b02a35;
flex: 0 0 auto;
}
.mic.on {
animation: pulse 1.2s infinite;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.6);
}
100% {
box-shadow: 0 0 0 18px rgba(230, 57, 70, 0);
}
}
/* ---------- Toasts & Konfetti ---------- */
.toasts {
position: fixed;
top: 64px;
left: 50%;
transform: translateX(-50%);
z-index: 60;
display: flex;
flex-direction: column;
gap: 8px;
align-items: center;
pointer-events: none;
width: min(92vw, 420px);
}
.toast {
background: var(--text);
color: var(--bg);
padding: 10px 16px;
border-radius: 14px;
font-weight: 800;
box-shadow: var(--shadow);
animation: toastIn 0.3s ease, toastOut 0.3s ease 2.4s forwards;
text-align: center;
}
@keyframes toastIn {
from {
transform: translateY(-12px) scale(0.95);
opacity: 0;
}
}
@keyframes toastOut {
to {
transform: translateY(-12px);
opacity: 0;
}
}
.confetti {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 70;
overflow: hidden;
}
.confetti i {
position: absolute;
top: -20px;
width: 10px;
height: 14px;
border-radius: 2px;
animation: fall linear forwards;
}
@keyframes fall {
to {
transform: translateY(110vh) rotate(720deg);
}
}
.ring {
--p: 0;
width: 92px;
height: 92px;
border-radius: 50%;
background: conic-gradient(var(--orange) calc(var(--p) * 1%), var(--line) 0);
display: grid;
place-items: center;
flex: 0 0 auto;
}
.ring > div {
width: 72px;
height: 72px;
border-radius: 50%;
background: var(--card);
display: grid;
place-items: center;
font-weight: 900;
font-size: 18px;
text-align: center;
line-height: 1.1;
}
.hero {
border-radius: 26px;
padding: 20px;
color: #fff;
background: linear-gradient(135deg, #e63946 0%, #fb8500 100%);
box-shadow: var(--shadow);
position: relative;
overflow: hidden;
}
.hero::after {
content: "";
position: absolute;
right: -40px;
top: -40px;
width: 160px;
height: 160px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.12);
}
.kbd-hint {
font-size: 12px;
color: var(--muted);
}
.fade-in {
animation: pop 0.3s ease;
}
.week {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 6px;
text-align: center;
font-size: 12px;
font-weight: 800;
}
.week .d {
aspect-ratio: 1;
border-radius: 12px;
display: grid;
place-items: center;
background: var(--line);
font-size: 16px;
}
.week .d.on {
background: var(--orange-soft);
border: 2px solid var(--orange);
}
details summary {
cursor: pointer;
font-weight: 800;
}
.slide {
border-left: 5px solid var(--purple);
padding: 10px 14px;
background: var(--purple-soft);
border-radius: 12px;
margin-top: 8px;
}
.timer {
font-variant-numeric: tabular-nums;
font-weight: 900;
}