body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    height: 38px; /* Feste Höhe für alle Elemente */
    -webkit-appearance: none; /* Entfernt Browser-Styling auf Webkit (Chrome, Safari) */
    -moz-appearance: none;    /* Entfernt Browser-Styling auf Firefox */
    appearance: none;         /* Standard-Eigenschaft */
    background-color: #fff;   /* Stellt sicher, dass der Hintergrund weiß ist */
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

nav {
    background-color: #007bff; /* Hintergrundfarbe des Menüs */
    padding: 10px;
}

nav ul {
    list-style-type: none; /* Keine Aufzählungszeichen */
    margin: 0;
    padding: 0;
    display: flex; /* Flexbox für die Ausrichtung aktivieren */
    align-items: center; /* Vertikale Zentrierung der Menüpunkte */
}

nav ul li {
    margin-right: 15px; /* Abstand zwischen den Einträgen */
}

nav ul li.logout-link {
    margin-left: auto; /* Schiebt diesen Eintrag ganz nach rechts */
    margin-right: 0; /* Entfernt den rechten Abstand für den letzten Eintrag */
}

nav ul li a {
    color: white; /* Textfarbe */
    text-decoration: none; /* Unterstreichung entfernen */
}

nav ul li a:hover {
    text-decoration: underline; /* Unterstreichung beim Hover */
}

hr {
    margin: 20px 0; /* Abstand um die Linie */
    border: 1px solid #ccc; /* Farbe und Stil der Linie */
}

#overlay {
    position: fixed; /* Fixiert das Overlay relativ zum Viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Halbtransparentes Schwarz */
    display: flex; /* Flexbox für zentrierte Ausrichtung */
    justify-content: center; /* Horizontale Zentrierung */
    align-items: center; /* Vertikale Zentrierung */
    z-index: 1000; /* Über anderen Inhalten */
}

#content {
    background-color: white; /* Hintergrundfarbe des Inhalts */
    padding: 20px; /* Innenabstand */
    border-radius: 5px; /* Abgerundete Ecken */
    width: 80%; /* Breite des Inhalts */
    max-width: 800px; /* Maximale Breite */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Schatten für Tiefe */
}

.main-content {
    padding-left: 20px;
    padding-right: 20px;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group input {
    flex-grow: 1;
    margin-right: 10px;
}

.input-group button {
    width: auto; /* Breite an Inhalt anpassen */
    flex-shrink: 0; /* Verhindert, dass der Button schrumpft */
}

#fetch-status {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    display: none; /* Standardmäßig ausgeblendet */
}

#fetch-status.success { background-color: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
#fetch-status.error { background-color: #ffebee; color: #c62828; border-left: 4px solid #f44336; }
#fetch-status.info { background-color: #e3f2fd; color: #1565c0; border-left: 4px solid #2196f3; }

#batch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Über dem normalen Overlay */
}

#batch-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

#batch-log p {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.button-group {
    display: flex; /* Buttons nebeneinander anordnen */
    gap: 10px; /* Abstand zwischen den Buttons */
    flex-wrap: wrap; /* Buttons bei Platzmangel in die nächste Zeile umbrechen */
}

.button-group button {
    width: auto; /* Breite an den Inhalt anpassen */
}

.btn-edit {
    display: inline-block;
    padding: 5px 10px;
    background-color: #28a745; /* Ein freundliches Grün */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    border: none;
    cursor: pointer;
}
.btn-edit:hover { background-color: #218838; }

/* Dashboard Section Styling */
.dashboard-section {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: inline-block; /* Sorgt dafür, dass der Container nur so breit ist wie sein Inhalt */
}

.dashboard-section h2 {
    margin: 0;
    padding: 15px 20px;
    background-color: #f7f7f9;
    border-bottom: 1px solid #ddd;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 1.2em;
}

.dashboard-table-container {
    padding: 20px;
}

.dashboard-table-container table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table-container td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.dashboard-table-container tr:last-child td {
    border-bottom: none;
}

.stat-value {
    text-align: right;
    font-weight: bold;
    font-size: 1.2em;
    color: #007bff;
}

/* Filter Bar für Spiele-Ansicht */
.filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Allgemeine Tabellen-Styles für System- und Spiele-Ansicht */
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-content th,
.main-content td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.main-content th {
    background-color: #f2f2f2; /* Heller Hintergrund für die Überschriften */
    font-weight: bold;
}

.main-content tbody tr:hover {
    background-color: #f9f9f9; /* Leichter Hover-Effekt für die Zeilen */
}

/* Grid-Layout für die Spieldetails im Overlay */
.game-details-grid {
    display: grid;
    grid-template-columns: 180px 1fr; /* Feste Breite für Labels, Rest für Werte */
    gap: 10px 15px; /* Abstand zwischen Zeilen und Spalten */
    max-height: 60vh;
    overflow-y: auto;
    padding-top: 10px;
}

.game-details-grid > div {
    padding: 5px;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word; /* Lange URLs etc. umbrechen */
}

/* Aktionen im Overlay (z.B. "Einlesen"-Button) */
.overlay-actions {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.overlay-actions button {
    width: auto;
}