/* Globale Einstellungen und Darkmode Basis */
:root {
    --color-bg-primary: #121212; /* Dunkler Hintergrund */
    --color-bg-secondary: #1e1e1e; /* Leicht hellerer Container-Hintergrund */
    --color-text-primary: #f0f0f0; /* Heller Text */
    --color-accent: #9146FF; /* Twitch Lila */
    --color-accent-hover: #b992ff;
    --color-error: #ff4d4f;
    --color-success: #52c41a;
    --font-family: 'Arial', sans-serif;
    --border-radius: 8px;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-family);
    /* WICHTIGE KORREKTUR: display:flex, justify-content, align-items wurden entfernt! */
    margin: 0; 
}

h1, h2 {
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-hover);
}

/* Container für den Inhalt (unterhalb der Nav-Bar) */
.container {
    max-width: 1600px; /* Erhöht die maximale Breite für mehr Platz */
    width: 95%;
    margin: 25px auto; /* Etwas mehr Abstand oben und unten */
    padding: 40px; /* Erhöht den Innenabstand für weniger "Gequetschtheit" */
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* --- Menü-Layout (Horizontal) --- */
.main-menu {
    width: 100%;
    background-color: #0d0d0d; 
    /* Padding auf den NAV-Container sorgt für Abstand zum Fensterrand */
    padding: 10px 20px; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    position: sticky; 
    top: 0;
    z-index: 1000;
}

.main-menu ul {
    list-style: none;
    display: flex; /* Sorgt für die horizontale Anordnung */
    gap: 30px; /* Abstand zwischen den Links */
    align-items: center;
    
    /* Padding/Margin auf 0, um Konflikte zu vermeiden und den Container-Padding zu nutzen */
    padding: 0; 
    margin: 0 auto; /* Zentriert die Liste im Navigationsbalken */
    max-width: 1400px; /* Begrenzt die Listenbreite */
}

.main-menu a {
    color: white; 
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 600; /* Kräftigere Schriftart */
}

.main-menu a:hover {
    background-color: #2a2a2a;
}

/* Positioniert den Logout-Link ganz nach rechts */
.main-menu ul .logout {
    margin-left: auto; /* Schiebt das Logout-Element ganz nach rechts */
}


/* --- Styling für die Benutzerverwaltungstabelle (admin/users.php) --- */

.user-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    color: #f0f0f0; 
}

.user-table th, .user-table td { 
    border: 1px solid #444; 
    padding: 10px; 
    text-align: left; 
    background-color: #1e1e1e; 
}

.user-table th { 
    background-color: #333; 
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Abwechselnde Zeilen für bessere Trennung */
.user-table tr:nth-child(even) td { 
    background-color: #252525;
}

/* Hervorhebung der Zeile des aktuell eingeloggten Admins ("Sie") */
/* WICHTIG: Die :contains()-Funktion ist kein Standard-CSS, funktioniert aber oft in Chrome/Firefox */
.user-table tr:has(td:first-child:contains("Sie")) td {
    background-color: #303010 !important; 
    border-left: 5px solid gold; 
}

/* Hervorhebung für gebannte Benutzer */
.user-table tr:has(input[name="is_banned"]:checked) td {
    color: #ff8888; 
    background-color: #401a1a !important; 
}

/* Hover-Effekt für alle Zeilen */
.user-table tr:hover td {
    background-color: #3a3a3a !important;
}

/* Button Styling (Speichern) */
.user-table button[type="submit"] {
    background-color: #007bff; 
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.user-table button[type="submit"]:hover {
    background-color: #0056b3;
}