body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    text-align: center;
    font-size: 2em;
    background-color: #333;
    color: #f4f4f4;
    padding: 1em;
    border-bottom: 2px solid #666;
}

.display-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; /* Gleichmäßiger Abstand zwischen den Bereichen */
    align-items: center;
    gap: 1em;
    padding: 1em;
}

.area {
    flex: 1;
    border: 1px solid #333;
    padding: 1em;
    background-color: white;
    min-height: 150px;
    flex-basis: 15%; /* Dies stellt sicher, dass es 5 Bereiche pro Zeile gibt */
}

.full-width {
    flex-basis: 100%;
    text-align: center;
}

h2 {
    border-bottom: 1px solid #666;
    padding-bottom: 0.5em;
    text-align: center;
}

.seven-segment-display {
    font-family: 'Seven Segment', Arial, sans-serif;
    font-size: 3em;
    text-align: center;
    margin-top: 1em;
}

.number {
    vertical-align: top;
}

.debug-area {
    margin: 0 1em 1em;
    padding: 1em;
    border: 2px solid #333;
    background: #fff;
}

.status-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1em;
}

.status-badge {
    display: inline-block;
    padding: 0.55em 0.85em;
    border: 2px solid #333;
    font-weight: bold;
    letter-spacing: 0.04em;
}

.status-ok {
    background: #dff4df;
}

.status-error {
    background: #ffd8d8;
}

.debug-reason {
    text-align: center;
    font-size: 1.1em;
}

.debug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75em;
}

.debug-grid div {
    border: 1px solid #999;
    padding: 0.75em;
    display: flex;
    flex-direction: column;
    gap: 0.35em;
}

.debug-grid span {
    color: #666;
}

.alarm-message {
    border: 2px solid #9a2424;
    background: #fff0f0;
    padding: 0.75em;
    text-align: center;
}

footer {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    padding: 1em;
}

@media (max-width: 760px) {
    .area {
        flex-basis: 40%;
    }

    .seven-segment-display {
        font-size: 2.2em;
    }
}
