body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.container {
    background: #ffffff;
    width: 100%;
    max-width: 1000px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* Zur&uuml;ck Button Design */
.back-button {
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-button:hover { color: #0056b3; }

h1 { color: #1c1e21; font-size: 28px; margin-bottom: 30px; display: flex; align-items: center; gap: 12px; }
h1 i { color: #007bff; }

.input-group { margin-bottom: 25px; }
label { display: block; margin-bottom: 8px; font-weight: 600; color: #4b4f56; font-size: 14px; }

textarea, input[type="text"] {
    width: 100%; padding: 12px; border: 1px solid #dddfe2; border-radius: 6px;
    font-size: 15px; box-sizing: border-box;
}

textarea { font-family: 'Courier New', monospace; }

.settings { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 25px; align-items: start; }

.button-row { display: flex; gap: 10px; margin-bottom: 20px; }

button {
    padding: 12px 24px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;
    font-size: 15px; transition: all 0.2s;
}

#convertBtn { background: #007bff; color: white; flex: 2; }
#convertBtn:hover { background: #0056b3; }

.download-btn { background: #28a745; color: white; flex: 1; }
.download-btn:hover { background: #218838; }

button.secondary { background: #6c757d; color: white; margin-top: 15px; width: 100%; }

.output-wrapper {
    display: flex; background: #1e1e1e; border-radius: 6px; height: 400px; overflow: hidden;
}

.line-numbers {
    width: 40px; background: #252526; color: #858585; padding: 12px 5px;
    text-align: right; font-family: monospace; font-size: 13px; line-height: 1.5;
}

#composeOutput {
    flex: 1; background: transparent; color: #d4d4d4; border: none; padding: 12px;
    font-family: monospace; font-size: 13px; line-height: 1.5; resize: none; outline: none;
}

/* Validation Msg Colors */
#validation-msg { padding: 15px; border-radius: 6px; margin-bottom: 20px; display: none; font-weight: 500; }
.valid { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.invalid { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
/* --- MODAL SCHL&Uuml;SSEL-FIX --- */

/* 1. Die Haupt-Klasse f&uuml;r das Modal */
.modal {
    /* WICHTIG: Versteckt das Modal standardm&auml;&szlig;ig beim Laden der Seite */
    display: none; 

    /* Volle H&ouml;he und Breite f&uuml;r den verdunkelten Hintergrund */
    position: fixed;
    z-index: 1000; /* Stellt sicher, dass es IMMER ganz oben liegt */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    
    /* Verdunkelter Hintergrundeffekt */
    background-color: rgba(0, 0, 0, 0.6); 
    
    /* Erm&ouml;glicht das Scrollen des Modal-Inhalts, falls er zu lang ist */
    overflow-y: auto; 
    
    /* Sanfter &Uuml;bergang beim Einblenden */
    transition: all 0.2s ease;
}

/* 2. Der eigentliche Inhalts-Kasten im Modal */
.modal-content {
    background-color: #fff;
    margin: 10% auto; /* Positioniert das Modal weiter oben im Sichtfeld */
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px; /* Begrenzt die Breite auf Desktops */
    position: relative; /* WICHTIG f&uuml;r die Positionierung des Schlie&szlig;en-Buttons */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Eleganter Schatten */
}

/* 3. Der Schlie&szlig;en-Button (das kleine X) */
.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.1s;
}

.close-modal:hover {
    color: #000; /* Wird dunkler beim Dr&uuml;berfahren */
}

/* 4. Eine Utility-Klasse, um das Modal per JavaScript zu zeigen */
.modal.show {
    display: block !important;
}