/* Grund-Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* DER BUTTON - Fixiert oben links am Bildschirmrand */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #6c757d !important; /* Grau-Blau */
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    z-index: 99999; /* Maximaler Vordergrund */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-button:hover {
    background-color: #495057 !important;
    text-decoration: none;
}

/* Die weiße Card */
.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 850px;
    text-align: center;
    margin: 60px auto; /* Platz für den fixierten Button lassen */
}

h1 { color: #0056b3; margin-top: 0; font-size: 2rem; }
p { color: #666; margin-bottom: 30px; }

/* Sektionen */
.tool-section {
    text-align: left;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.input-box { background-color: #f8f9fa; border: 1px solid #e0e0e0; }
.output-box { background-color: #f1f7fd; border: 1px dashed #007bff; }

label { display: block; font-weight: bold; margin-bottom: 8px; color: #444; }

textarea, input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    box-sizing: border-box;
}

textarea { height: 100px; resize: vertical; }
#composeOutput { height: 250px; background-color: #fff; }

/* Buttons */
.action-btn {
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.primary { background-color: #28a745; color: white; width: 100%; font-size: 1.1rem; }
.primary:hover { background-color: #218838; }

.secondary { background-color: #007bff; color: white; padding: 8px 16px; }
.secondary:hover { background-color: #0056b3; }

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Mobile */
@media (max-width: 768px) {
    .back-button { position: absolute; top: 15px; left: 15px; }
    .container { margin-top: 80px; padding: 20px; }
}