Files
German-Learning/assets/style.css
2026-06-30 11:47:01 +02:00

263 lines
4.8 KiB
CSS

/* German Learning — Shared Stylesheet */
:root {
--ink: #1a1a1a;
--ink-light: #555;
--ink-faint: #888;
--bg: #fafaf8;
--bg-warm: #f4f1eb;
--accent: #2e5d9e;
--accent-dark: #1d3f6e;
--green: #1e6b3c;
--green-bg: #eaf5ee;
--red: #8b1a1a;
--red-bg: #fdecea;
--yellow-bg: #fdf8e8;
--border: #ddd;
--radius: 6px;
--max-w: 680px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 18px;
line-height: 1.7;
color: var(--ink);
background: var(--bg);
padding: 3rem 1.5rem 6rem;
}
.page {
max-width: var(--max-w);
margin: 0 auto;
}
/* Typography */
h1 {
font-size: 1.9rem;
line-height: 1.25;
margin-bottom: 0.3rem;
color: var(--ink);
}
.subtitle {
font-size: 1rem;
color: var(--ink-light);
margin-bottom: 2.5rem;
font-style: italic;
}
h2 {
font-size: 1.2rem;
font-weight: bold;
margin: 2.5rem 0 0.75rem;
color: var(--ink);
letter-spacing: 0.01em;
}
h3 {
font-size: 1rem;
font-weight: bold;
margin: 1.5rem 0 0.5rem;
color: var(--ink);
}
p { margin-bottom: 1rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
code, .de {
font-family: 'Courier New', monospace;
font-size: 0.92em;
background: var(--bg-warm);
padding: 0.1em 0.35em;
border-radius: 3px;
color: var(--accent-dark);
}
/* Rule box */
.rule-box {
background: var(--yellow-bg);
border-left: 4px solid #c9a800;
padding: 1rem 1.25rem;
margin: 1.5rem 0;
border-radius: 0 var(--radius) var(--radius) 0;
}
.rule-box .formula {
font-family: 'Courier New', monospace;
font-size: 1rem;
color: var(--ink);
margin-top: 0.5rem;
}
/* Example table */
table {
width: 100%;
border-collapse: collapse;
margin: 1.25rem 0;
font-size: 0.95rem;
}
th {
text-align: left;
padding: 0.4rem 0.75rem;
border-bottom: 2px solid var(--border);
color: var(--ink-light);
font-size: 0.85rem;
font-style: normal;
letter-spacing: 0.05em;
}
td {
padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--border);
vertical-align: top;
}
tr:last-child td { border-bottom: none; }
.wrong { color: var(--red); }
.right { color: var(--green); }
/* Quiz */
.quiz-section {
margin: 2rem 0;
}
.question-block {
background: white;
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.25rem 1.5rem;
margin-bottom: 1rem;
transition: border-color 0.2s;
}
.question-block.correct { border-color: #5aab77; background: var(--green-bg); }
.question-block.incorrect { border-color: #c97070; background: var(--red-bg); }
.question-text {
font-size: 1rem;
margin-bottom: 0.9rem;
line-height: 1.5;
}
.blank {
display: inline-block;
min-width: 120px;
border-bottom: 2px solid var(--ink-light);
margin: 0 0.2em;
color: transparent;
font-family: 'Courier New', monospace;
}
.options {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.option-btn {
background: var(--bg-warm);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.55rem 1rem;
text-align: left;
font-family: 'Courier New', monospace;
font-size: 0.95rem;
cursor: pointer;
transition: background 0.15s, border-color 0.15s;
color: var(--ink);
}
.option-btn:hover:not(:disabled) {
background: #e8e4da;
border-color: #bbb;
}
.option-btn.selected-correct {
background: var(--green-bg);
border-color: #5aab77;
color: var(--green);
font-weight: bold;
}
.option-btn.selected-incorrect {
background: var(--red-bg);
border-color: #c97070;
color: var(--red);
text-decoration: line-through;
}
.option-btn.reveal-correct {
background: var(--green-bg);
border-color: #5aab77;
color: var(--green);
}
.option-btn:disabled { cursor: default; }
.feedback {
margin-top: 0.75rem;
font-size: 0.9rem;
line-height: 1.5;
display: none;
}
.feedback.show { display: block; }
.feedback.correct-fb { color: var(--green); }
.feedback.incorrect-fb { color: var(--red); }
/* Score */
.score-bar {
background: white;
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem 1.5rem;
margin-top: 1.5rem;
display: none;
font-size: 1rem;
}
.score-bar.show { display: block; }
.score-number { font-size: 1.5rem; font-weight: bold; color: var(--accent); }
/* Nav footer */
.lesson-nav {
margin-top: 3rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border);
font-size: 0.88rem;
color: var(--ink-faint);
}
.lesson-nav a { color: var(--ink-light); }
.ask-teacher {
background: var(--bg-warm);
border-radius: var(--radius);
padding: 0.75rem 1rem;
margin-top: 2rem;
font-size: 0.92rem;
color: var(--ink-light);
border: 1px solid var(--border);
}
/* Print */
@media print {
body { background: white; padding: 1rem; }
.option-btn { border: 1px solid #aaa; }
.quiz-section { display: none; }
}