/* ... (vorherige Stile beibehalten) ... */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.back-button {
    position: absolute; top: 30px; left: 30px;
    background-color: #6c757d; color: white;
    padding: 8px 15px; border-radius: 6px; text-decoration: none;
}

container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px; /* Erhöht von 550px auf 800px für lange Passwörter */
    text-align: center;
    position: relative;
}

h1 { color: #0056b3; }

.result-container { display: flex; gap: 10px; margin-bottom: 20px; }

#passwordDisplay {
    flex-grow: 1; padding: 12px; font-family: monospace; font-size: 1.1rem;
    border: 2px solid #e0e0e0; border-radius: 8px; background: #f9f9f9;
}

.action-btn { padding: 12px 20px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; }
.primary { background: #28a745; color: white; width: 100%; }
.secondary { background: #007bff; color: white; }

.settings-grid { text-align: left; margin-bottom: 20px; background: #f8f9fa; padding: 15px; border-radius: 8px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px;}

.strength-meter { margin: 15px 0; font-weight: bold; }

/* NEUE STILE FÜR DIE HISTORIE */
/* ... (Bestehendes CSS lassen und diesen Teil bei .history-section anpassen) ... */

.history-section {
    margin: 20px 0 30px 0;
    padding: 15px;
    background-color: #fcfcfc;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    text-align: left;
}

.history-section h3 {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#historyList {
    list-style: none;
    padding: 0;
}

.history-item {
    display: flex;
    justify-content: space-between; /* Passwort links, Aktionen rechts */
    align-items: center;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    gap: 15px;
}

.history-copy-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
}

.history-copy-btn:hover {
    background: #495057;
}

/* Sorgt dafür, dass das Passwort bei sehr kleinen Screens nicht das Layout sprengt */
.history-password {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    word-break: break-all; 
    flex-grow: 1;
}

/* Container für Badge + Button (bleiben immer nebeneinander) */
.history-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Verhindert, dass die Buttons schrumpfen */
}

/* ... (vorherige Stile beibehalten) ... */

.latest-badge {
    background-color: #28a745;
    color: white;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
    white-space: nowrap; /* Kein Zeilenumbruch im Badge */
}

/* Optionale Hervorhebung des ersten Elements */
.history-item.latest {
    border-left: 4px solid #28a745;
    background-color: #f0fff4; /* Ganz leichtes Grün im Hintergrund */
}

/* ... (Bisherige Stile übernehmen und diese ergänzen/anpassen) ... */

.tool-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
}

.checker-box {
    background-color: #f1f7fd;
    padding: 20px;
    border-radius: 10px;
    border: 1px dashed #007bff;
}

#manualInput {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Stärkebalken */
.strength-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Status-Farben */
.weak { background-color: #dc3545; width: 25%; }
.medium { background-color: #fd7e14; width: 50%; }
.good { background-color: #ffc107; width: 75%; }
.strong { background-color: #28a745; width: 100%; }

/* ... Rest wie gehabt ... */

@media (max-width: 600px) { .back-button { position: static; display: block; margin-bottom: 20px; } }