/*
 * Retro‑Konsolenstil
 * Dieses Stylesheet setzt die Farben, Schriftarten und Positionierung so,
 * dass die Anwendung wie eine klassische Shell oder ein DOS‑Fenster aus den
 * 1990er Jahren aussieht. Die Eingabezeile befindet sich stets am unteren
 * Rand, darüber werden die bisherigen Konsolenausgaben angezeigt. Der
 * blinkende Cursor wird separat animiert, während die eigentliche Eingabe
 * über ein verstecktes Eingabefeld erfolgt.
 */

/* Grundlayout */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    line-height: 1.4;
    overflow: hidden;
}

/* Wrapper umfasst die gesamte Konsole */
#wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Bereich für die bisherigen Konsolenausgaben */
#console {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px; /* Platz für die Eingabezeile */
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: #000;
}

/* Einzelne Einträge der Konsole */
.console-entry {
    margin: 0;
    white-space: pre-wrap;
    color: #00ff00;
    animation: appear 0.3s ease-out;
}

/* Erscheinungsanimation für neue Zeilen */
@keyframes appear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Eingabezeile am unteren Rand */
#currentLine {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background-color: #000;
    color: #00ff00;
    border-top: 1px solid #00ff00;
}

/* Prompt (Benutzername) */
#prompt {
    color: #00ff00;
    margin-right: 4px;
}

/* Sichtbarer Text der Benutzereingabe */
#typedText {
    color: #00ff00;
    white-space: pre;
    min-height: 1em;
}

/* Blinker für den Cursor */
#cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    margin-left: 2px;
    background-color: #00ff00;
    animation: blink 1s step-start infinite;
}

/* Blinkanimation für den Cursor */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Verstecktes Eingabefeld zum Erfassen der Tastatureingaben */
#userInput {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
    border: none;
    background: none;
    color: #00ff00;
    caret-color: #00ff00;
    outline: none;
}

/* Responsive Anpassungen für kleinere Bildschirme */
@media (max-width: 600px) {
    html, body {
        font-size: 14px;
    }
    #currentLine {
        height: 35px;
        padding: 8px;
    }
    #cursor {
        width: 6px;
    }
}