/* Allgemeine Stile */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Mindesthöhe auf die volle Bildschirmhöhe setzen */
    background-color: #121212;
    color: #fff;
    margin: 0;
    font-size: 20px; /* Standard-Schriftgröße */
    font-family: Arial, sans-serif;
}

/* Header-Stile */
header {
    display: flex;
    flex-direction: column; /* Anordnung der Elemente in einer Spalte */
    justify-content: center; /* Zentriere die Elemente horizontal */
    align-items: center; /* Zentriere die Elemente vertikal */
    height: 120px; /* Erhöhe die Höhe des Headers */
    background-color: #1f1f1f;
    color: #fff;
    position: relative;
}

/* Logo-Stile */
#logo-container {
    position: absolute; /* Positioniere das Logo absolut */
    left: 20px; /* Abstand vom linken Rand */
    top: 50%; /* Positionierung vertikal in der Mitte */
    transform: translateY(-50%); /* Korrektur für die vertikale Position */
}

#logo {
    max-height: 80px;
}

/* Navigationsmenü-Stile */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    display: inline; /* Links inline darstellen */
    margin-right: 20px; /* Abstand zwischen den Links */
}

nav ul li:last-child {
    margin-right: 0; /* Kein Abstand für das letzte Element */
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

/* Aktive Links im Navigationsmenü */
#startseite-link.active,
#dashboard-link.active {
    color: #1e90ff; /* Aktive Links-Farbe */
    font-weight: bold; /* Fettschrift für aktive Links */
}

/* Haupttitel-Stile */
h1 {
    margin: 10px 0; /* Oberer und unterer Abstand für h1-Titel */
}

/* Hauptcontainer-Stile */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Vertikal zentrieren */
    background-color: #121212;
    padding: 20px;
}

/* Formular-Stile */
#input-container {
    text-align: center;
    margin-top: 30px; /* Oberer Abstand */
    margin-bottom: 20px; /* Unterer Abstand */
}

#code-input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2f2f2f;
    color: #fff;
    width: 100%;
    max-width: 250px;
    margin-bottom: 10px; /* Abstand zum nächsten Element */
}

#button-container {
    display: flex;
    justify-content: space-between; /* Abstand zwischen den Buttons */
    gap: 10px; /* Optional: Abstand zwischen den Buttons */
    width: 100%;
    max-width: 250px; /* Gleiche Breite wie das Eingabefeld */
    margin: 10px auto; /* Zentriert den Button-Container */
}

#submit-button, #cancel-button {
    flex: 1; /* Teilt die Breite zwischen den beiden Buttons auf */
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Popup-Stile */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup {
    background-color: #2F2F2F;
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: 80%;
    height: 60%;
    overflow: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto; /* Platzierung am unteren Rand */
    margin-bottom: 20px; /* Adjusted */
}

.popup-actions select,
.popup-actions button {
    padding: 10px 15px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 0;
    width: 80%;
    max-width: 300px;
}

.popup-actions button {
    margin-bottom: 0; /* Adjusted */
}

.popup-content {
    color: #fff;
    display: flex;
    flex-wrap: wrap; /* Kästen umbrechen, wenn sie nicht in eine Reihe passen */
    margin-bottom: 0; /* Adjusted */
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 10px;
}

.info-container {
    flex: 0 1 calc(33.33% - 20px);
    background-color: #404040;
    color: white;
    padding: 10px;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.smaller {
    flex-basis: calc(50% - 20px);
}

/* Anpassungen für mobile Geräte */
@media screen and (max-width: 768px) {
    .info-container {
        flex-basis: calc(100% - 20px);
    }
}

/* Schließen-Button-Stile */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    color: #fff;
}

.close:hover {
    color: #ffd700;
}

/* Info-Box-Stile */
.info-box {
    background-color: #404040;
    color: #fff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

/* Popup-Element-Stile */
.popup-item {
    margin-bottom: 10px;
    color: white;
}

/* Titel und Wert-Stile für Popup */
.info-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.info-value {
    background-color: #404040;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
}

/* Button-Container-Stile */
#button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

/* OK-Button-Stile */
#ok-button {
    padding: 12px 18px;
    font-size: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 20px 20px 10px;
}

#ok-button:hover {
    background-color: #2F2F2F;
}

/* Dropdown-Stile */
#counter-increase {
    padding: 12px 18px;
    font-size: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2F2F2F;
    color: #fff;
    width: 100px;
    margin: 0 20px 10px;
}

/* Tabelle-Stile */
table {
    width: 90%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 15px;
    border: 2px solid #28013f;
    overflow: hidden;
    table-layout: fixed;
    margin: 20px auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
    border-right: 1px solid #333;
}

th {
    background-color: #1f1f1f;
    color: #fff;
    text-transform: uppercase;
    border: none;
}

th:first-child {
    border-top-left-radius: 15px;
}

th:last-child {
    border-top-right-radius: 15px;
}

tr:hover {
    background-color: #333;
}

.highlight {
    background-color: #ffd700;
}

/* Footer-Stile */
footer {
    background-color: #1f1f1f;
    color: #fff;
    padding: 15px 0;
    text-align: center;
    margin-top: auto;
    width: 100%;
}

/* Dashboard */
/* Gemeinsame Stildefinitionen für das Dashboard */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
}

/* Responsives Styling für die Tabellenspalten */
@media screen and (max-width: 600px) {
    th, td {
        font-size: 12px;
    }
}

@media screen and (min-width: 601px) and (max-width: 900px) {
    th, td {
        font-size: 14px;
    }
}

@media screen and (min-width: 901px) {
    th, td {
        font-size: 16px;
    }
}

canvas {
    max-width: 300px;
    margin: 20px auto;
    display: block;
}