
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

nav {
   background-color: #333333;
    padding: 10px 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.ticker-container {
    flex: 1;
    margin-left: 30px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}


.ticker {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    animation: tickerCycle var(--speed, 70s) linear infinite;
    color: #9ea09b;
    font-size: 14px;
    font-weight: 600;
}

h1 {
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}



.top-bar {
    display: flex;
    justify-content: center;  /* zentriert */
    align-items: center;       /* vertikal sauber */
    padding: 10px 15px;         /* Abstand oben/unten und seitlich */
    margin-bottom: 8px;
}

.logo {
    height: 30px;   /* <-- HIER Größe einstellen */
    width: auto;
    display: block;
}

.logo-text {
    font-style: italic;
    color: #666;
    font-size: 14px;
    margin-right: 10px;   /* Abstand zum Logo */
    align-self: center;   /* vertikal mittig */
}


body {
    margin: 0px;
    padding: 5px;
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f0f0f0;
}

.message-box {
    border: 3px solid #af4c4f; /* grüner Rahmen */
    padding: 20px;
    margin: 20px auto;
    width: 50%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1 {
    color: black;
    padding: 0px 10px;  /* Abstand oben/unten und seitlich */
}

.chart-box {
    width: 100%;
    min-height: 320px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.chart-title {
    display: flex;
    justify-content: space-between; /* links / rechts */
    align-items: center;
    gap: 10px; 
}

.effizienz-auszug {
    width: 70%;              /* gleiche Breite wie chart-box */
    margin: 20px auto 0 auto; /* unter Diagramm zentriert */
    text-align: center;       
    color: #333;
}

#effizienz-table {
    margin: 0 auto;
    display: table;
}

.status-block {
    font-size: 16px;     /* kleiner als h1 */
    color: #555;
    font-weight: normal; /* h1-Fettschrift entfernen */
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
}

.gesamtstatus_ampellogik {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;   /* ← SEHR wichtig */
}

.green {
    background-color: #28a745;
}

.yellow {
    background-color: #ffc107;
}

.red {
    background-color: #dc3545;
}


@keyframes tickerMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}


@keyframes tickerCycle {
    from {
        transform: translateX(100vw);
    }

    to {
        transform: translateX(-100%);
    }
}


@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;        /* 1 Spalte auf kleinen Bildschirmen */
    }
}