/* Grundlayout */
html, body {
    height: 100%; /* Nimmt die volle Höhe des Fensters ein */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Vertikale Anordnung */
    box-sizing: border-box;
}

/* Navigation oben */
.top-buttons {
    display: flex;
    justify-content: flex-start; /* Buttons am Anfang */
    gap: 10px;
    background-color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%; /* Volle Breite */
    box-sizing: border-box;
    flex-shrink: 0; /* Höhe bleibt konstant */
    align-items: center;
}

/* Buttons in der Navigation */
.top-buttons a, .top-buttons button {
    width: 150px;
    height: 50px;
    font-size: 16px;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

/* Button-Farben */
.profile-button {
    background-color: #28a745;
    color: white;
}

.profile-button:hover {
    background-color: #218838;
}

.logout-link {
    background-color: #dc3545;
    color: white;
}

.logout-link:hover {
    background-color: #c82333;
}

.admin-button {
    background-color: #ffc107;
    color: black;
}

.admin-button:hover {
    background-color: #e0a800;
}

.NachrichtenL schen-button {
    background-color: black;
    color: white;
    border: none;
}

.NachrichtenL schen-button:hover {
    background-color: #006400;
}

/* Chat-Bereich */
.chat-container {
    flex: 1; /* Nimmt den gesamten verbleibenden Platz ein */
    display: flex;
    flex-direction: column;
    width: 100%; /* Volle Breite */
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

/* Nachrichtenbox */
.chat-box {
    flex: 1; /* Füllt den Platz im Chat-Container aus */
    overflow-y: auto;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px 0;
    padding: 10px;
    box-sizing: border-box;
}

.chat-box p {
    margin: 5px 0;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f4f4f4;
}

textarea {
    width: 100%; /* Nimmt die gesamte Breite ein */
    height: 100px; /* Höhe für mehrere Zeilen */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box; /* Einschließlich Padding und Border */
}

/* Login-Container */
.login-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 400px;
    margin: auto; /* Zentriert den Login-Container */
    text-align: center;
}

/* Login-Überschrift */
.login-container h1 {
    margin-bottom: 20px;
    color: #333;
}

/* Input-Felder */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Buttons */
button {
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* Link für Registrierung */
.register-link {
    display: block;
    margin-top: 15px;
    color: #007BFF;
    text-decoration: none;
    font-size: 14px;
}

.register-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Gast-Container */
.guest-container {
    margin-top: 20px;
}

.guest-container h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Buttons für Gastzugang */
.guest-container button {
    background-color: #28a745;
    margin-top: 10px;
}

.guest-container button:hover {
    background-color: #218838;
}

textarea:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#message-textarea {
    width: 100%;
}

/* Media Queries für kleinere Geräte */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .top-buttons {
        flex-wrap: wrap; /* Umbrechen der Buttons */
        justify-content: center;
    }

    .top-buttons a, .top-buttons button {
        width: 100%; /* Volle Breite */
        margin-bottom: 10px;
    }

    .chat-container {
        width: 100%; /* Nimmt die gesamte Breite ein */
        padding: 15px;
    }

    .chat-box {
        max-height: 400px; /* Begrenzung der Höhe */
    }

    .login-container {
        width: 90%;
        padding: 20px;
    }

    input[type="text"], input[type="password"], button {
        font-size: 14px;
        padding: 8px;
    }
}