* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e; color: #d4d4d4; line-height: 1.65;
}
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Login */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-box {
    background: #2d2d30; border: 2px solid #007acc; border-radius: 8px;
    padding: 40px; max-width: 400px; width: 100%;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}
.login-box h1 { color: #007acc; text-align: center; margin-bottom: 10px; font-size: 2em; }
.login-box .subtitle { color: #858585; text-align: center; margin-bottom: 30px; }
.login-box input {
    width: 100%; padding: 12px; margin: 10px 0;
    background: #1e1e1e; border: 1px solid #3e3e42; color: #d4d4d4;
    border-radius: 4px; font-size: 14px;
}
.login-box input:focus { outline: none; border-color: #007acc; }
.login-box button {
    width: 100%; padding: 12px; margin-top: 20px;
    background: #007acc; color: #fff; border: none; border-radius: 4px;
    font-size: 16px; cursor: pointer; transition: background 0.3s;
}
.login-box button:hover { background: #005a9e; }
.login-error {
    background: #3a1e1e; border: 1px solid #f44336; color: #ef9a9a;
    padding: 10px; border-radius: 4px; margin-top: 15px; display: none;
}
.main-content { display: none; }

/* Header */
header {
    background: #2d2d30; border: 3px solid #007acc; padding: 30px;
    margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    text-align: center; border-radius: 8px; position: relative;
}
.top-buttons { position: absolute; top: 15px; right: 15px; display: flex; gap: 8px; }
.top-btn {
    background: #3e3e42; color: #d4d4d4; border: none;
    padding: 8px 15px; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.top-btn:hover { background: #007acc; }
h1 { font-size: 2.5em; color: #007acc; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.subtitle { color: #858585; margin-top: 10px; }

/* Kurs-Auswahl */
.course-picker {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin: 30px 0;
}
.course-card {
    background: #252526; border: 2px solid #3e3e42; padding: 25px;
    border-radius: 8px; cursor: pointer; transition: all 0.3s;
}
.course-card:hover { border-color: #007acc; transform: translateY(-3px); }
.course-card h2 { color: #4fc3f7; border: none; padding: 0; margin-bottom: 10px; }
.course-card .badge {
    display: inline-block; background: #007acc; color: #fff;
    padding: 3px 10px; border-radius: 12px; font-size: 0.8em; margin-bottom: 10px;
}
.course-card p { color: #b0b0b0; margin-top: 10px; }
.course-card .meta { color: #858585; font-size: 0.9em; }

/* Navigation */
nav {
    background: #2d2d30; border: 2px solid #3e3e42;
    padding: 15px; margin-bottom: 20px; border-radius: 5px;
}
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
nav a {
    color: #4fc3f7; text-decoration: none; padding: 8px 14px;
    border: 1px solid #3e3e42; display: block; transition: all 0.3s;
    border-radius: 3px; font-size: 0.95em; cursor: pointer;
}
nav a:hover, nav a.active { background: #007acc; color: #fff; border-color: #007acc; }

/* Kapitel */
.chapter {
    background: #252526; border: 2px solid #3e3e42; padding: 25px;
    margin-bottom: 20px; display: none; border-radius: 5px;
}
.chapter.active { display: block; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
h2 { color: #4fc3f7; border-bottom: 2px solid #3e3e42; padding-bottom: 10px; margin-bottom: 20px; }
h3 { color: #569cd6; margin-top: 25px; margin-bottom: 10px; }
h4 { color: #9cdcfe; margin-top: 18px; margin-bottom: 8px; }
p { margin: 10px 0; }
strong { color: #f0f0f0; }
em { color: #d7d7d7; }

/* Boxen */
.info-box {
    background: #1e2a3a; border-left: 4px solid #4fc3f7;
    padding: 12px 15px; margin: 15px 0; border-radius: 3px;
}
.info-box .label { color: #4fc3f7; font-weight: bold; margin-right: 8px; }
.warn-box {
    background: #3a2e1e; border-left: 4px solid #ffb74d;
    padding: 12px 15px; margin: 15px 0; border-radius: 3px;
}
.warn-box .label { color: #ffb74d; font-weight: bold; margin-right: 8px; }
.glossar {
    background: #2d2d30; border: 1px solid #3e3e42;
    padding: 15px; margin: 15px 0; border-radius: 5px;
}
.glossar h4 { margin-top: 0; }
.glossar dt { color: #ce9178; font-family: 'Consolas','Courier New',monospace; font-weight: bold; margin-top: 10px; }
.glossar dd { margin-left: 20px; color: #c8c8c8; margin-top: 4px; }

code {
    background: #1e1e1e; color: #ce9178; padding: 2px 6px;
    border: 1px solid #3e3e42; border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace; font-size: 0.92em;
}
pre {
    background: #1e1e1e; border: 1px solid #3e3e42; padding: 15px;
    overflow-x: auto; margin: 12px 0; border-radius: 5px;
    color: #d4d4d4; font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.92em; line-height: 1.5;
}
pre .comment { color: #6a9955; font-style: italic; }
ul, ol { margin-left: 28px; margin-top: 8px; }
li { margin: 6px 0; }

/* Mini-Übung (Eingabe) */
.mini-exercise {
    background: #1e2a1e; border-left: 4px solid #66bb6a;
    padding: 14px 18px; margin: 20px 0; border-radius: 4px;
}
.mini-exercise .me-title { color: #81c784; font-weight: bold; margin-bottom: 8px; }
.mini-exercise input {
    width: 100%; padding: 10px; margin: 8px 0;
    background: #1e1e1e; border: 1px solid #3e3e42; color: #d4d4d4;
    border-radius: 3px; font-family: 'Consolas','Courier New',monospace; font-size: 14px;
}
.mini-exercise input:focus { outline: none; border-color: #66bb6a; }
.mini-exercise button {
    background: #66bb6a; color: #fff; border: none;
    padding: 8px 16px; border-radius: 3px; cursor: pointer;
    font-size: 14px; transition: background 0.2s;
}
.mini-exercise button:hover { background: #4caf50; }
.mini-exercise button.show-solution {
    background: #3e3e42; margin-left: 8px;
}
.mini-exercise button.show-solution:hover { background: #555; }

/* Quiz */
.interactive-task {
    background: #2d2d30; border: 2px solid #007acc; padding: 20px;
    margin: 25px 0; border-radius: 5px;
}
.task-title { color: #4fc3f7; font-weight: bold; margin-bottom: 10px; font-size: 1.1em; }
.feedback { padding: 10px; margin: 10px 0; border-radius: 3px; display: none; font-size: 0.95em; }
.feedback.correct { background: #1e3a1e; border: 1px solid #4caf50; color: #a5d6a7; display: block; }
.feedback.incorrect { background: #3a1e1e; border: 1px solid #f44336; color: #ef9a9a; display: block; }
.quiz-option {
    background: #2d2d30; border: 1px solid #3e3e42;
    padding: 10px 12px; margin: 5px 0; border-radius: 3px;
    cursor: pointer; transition: all 0.2s;
}
.quiz-option:hover { background: #3e3e42; border-color: #007acc; }
.quiz-option.correct { background: #1e3a1e; border-color: #4caf50; }
.quiz-option.incorrect { background: #3a1e1e; border-color: #f44336; }

/* Weiter-Button */
.chapter-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 30px; padding-top: 20px; border-top: 1px solid #3e3e42;
    gap: 12px; flex-wrap: wrap;
}
.btn-nav {
    background: #007acc; color: #fff; border: none;
    padding: 12px 25px; border-radius: 4px; cursor: pointer;
    font-size: 15px; transition: all 0.2s; font-weight: 500;
}
.btn-nav:hover { background: #005a9e; transform: translateY(-2px); }
.btn-nav:disabled { background: #3e3e42; color: #707070; cursor: not-allowed; transform: none; }
.btn-nav.secondary { background: #3e3e42; }
.btn-nav.secondary:hover { background: #555; }
.chapter-progress { color: #858585; font-size: 0.9em; }

/* Stats */
.progress-bar {
    width: 100%; height: 18px; background: #1e1e1e;
    border-radius: 10px; overflow: hidden; margin: 10px 0;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, #007acc, #4fc3f7); transition: width 0.3s; }
.progress-text { text-align: center; color: #858585; font-size: 0.9em; }
.stats-bar {
    display: flex; justify-content: space-around; gap: 10px;
    background: #2d2d30; padding: 12px; border-radius: 5px;
    border: 1px solid #3e3e42; margin-bottom: 15px;
}
.stat-item { text-align: center; }
.stat-value { font-size: 1.4em; color: #4fc3f7; font-weight: bold; }
.stat-label { font-size: 0.85em; color: #858585; }
