/* --- 1. Grund-Setup & Farbvariablen --- */
:root {
    --color-background: #10131B;
    --color-surface: #1B202D;
    --color-border: #31384E;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #A0A9C0;
    --color-accent: #3772FF;
    --color-accent-gradient: linear-gradient(90deg, #3772FF, #9747FF);
    --color-success: #37FF8B;
    --color-danger: #FF375F;
    --color-warning: #FF8A37;
    --font-family: 'Poppins', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.console-output {
    background-color: #1a1a1a;
    color: #f1f1f1;
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}
.console-command { color: #87cefa; }
.console-response { color: #ffffff; }
.console-error { color: #ff6b6b; }
.console-info { color: #90ee90; }
#console-command-form { display: flex; margin-top: 10px; }
#console-command-input { flex-grow: 1; }

.server-item.inactive {
    opacity: 0.6;
    background-color: #f0f0f0;
}

.form-hint {
    font-size: 0.8em;
    color: #9e9e9e;
    margin-top: -8px;
    margin-bottom: 10px;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

/* --- 2. Haupt-Layout & Container --- */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
}

h1, h2, h3 {
    color: var(--color-text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

h1 {
    font-size: 2em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 15px;
}

h2 {
    font-size: 1.5em;
    margin-top: 30px;
}

/* --- 3. Karten-Styling (für Server-Items & Control-Groups) --- */
.server-list, .user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.control-group, .server-item, .form-container {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.2s ease-in-out;
}

.form-container {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto 20px;
}

#login-form h1,p{
    text-align: left;
}

#login-form p{
    padding-top: 2%;
}

.login-form{
    justify-content: center;
}

.server-item {
    background-color: #2c2c3e; /* Ein etwas helleres Dunkelblau/Violett */
    border-radius: 12px;
    overflow: hidden; /* Stellt sicher, dass das Bild die abgerundeten Ecken beibehält */
    display: flex;
    flex-direction: column; /* Richtet die Elemente (Bild, Inhalt, Aktionen) vertikal aus */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}

.server-item:hover {
    transform: translateY(-5px);
}

/* Das Bild oben auf der Karte */
.server-card-image {
    width: 100%;
    height: 140px; /* Eine feste Höhe für ein gutes Seitenverhältnis */
    object-fit: cover; /* Schneidet das Bild passend zu, anstatt es zu verzerren */
}

/* Der Inhaltsbereich (Name, Spiel, Status) */
.server-card-content {
    padding: 15px;
    flex-grow: 1; /* WICHTIG: Dieser Bereich wächst, um den Platz auszufüllen */
}

.server-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #fff;
}

.server-card-content p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #ccc;
}

.server-card-actions button {
    flex-grow: 1;
}

.dashboard-header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-header img {
    height: 250px;
    width: auto;
}

#logout-btn {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.8em;
    background-color: var(--color-border);
    color: var(--color-text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
}

#logout-btn:hover {
    background-color: #404861;
    color: var(--color-text-primary);
}

.server-card-address {
    margin-top: 10px;
    font-size: 0.9em;
    color: #a0a0b0;
}

.creation-wizard {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    overflow: hidden; /* Für sanfte Übergänge */
}

.wizard-progress {
    width: 100%;
    background-color: var(--color-border);
    border-radius: 4px;
    height: 8px;
    margin-bottom: 25px;
}

.wizard-progress-bar {
    width: 33.3%; /* Startet bei Schritt 1 von 3 */
    height: 100%;
    background: var(--color-accent-gradient);
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.wizard-step.active {
    display: block;
}

.wizard-step label, .wizard-step p {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.1em;
    color: var(--color-text-secondary);
}

.wizard-nav button {
    width: auto;
    flex-grow: 1;
}
/* Spezifischer Button für "Zurück" */
.wizard-nav .btn-back {
    background-color: var(--color-border);
    color: var(--color-text-secondary);
}
.wizard-nav .btn-back:hover {
     background-color: #404861;
}

.game-image-preview {
    min-height: 150px; /* Platzhalter, bevor ein Bild geladen wird */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    background-color: var(--color-background);
    border-radius: 8px;
}

.game-image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

/* 1. Definiert das Layout und versteckt die Leiste standardmäßig */
.wizard-nav-final {
    display: none; /* WICHTIG: Macht die Buttons standardmäßig unsichtbar */
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

/* 2. Macht die Leiste NUR sichtbar, wenn Schritt 3 aktiv ist */
.wizard-step[data-step="3"].active + .wizard-nav-final {
    display: flex;
}

/* 3. Legt die einheitliche Breite für die Buttons in der Leiste fest */
.wizard-nav-final .btn-back,
.wizard-nav-final #final-step-buttons {
    width: 450px;
    max-width: 100%;
}


.game-panel-image {
    flex-basis: 200px; /* Feste Breite für die Bild-Spalte */
    flex-shrink: 0;
}

.game-panel-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.game-panel-details {
    flex-grow: 1; /* Text-Spalte füllt den Rest des Platzes */
    display: flex;
    flex-direction: column;
}

.game-panel-details h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
    color: var(--color-text-primary);
}

.game-panel-details p {
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

#game-selection-panel {
    display: flex; /* Aktiviert das zweispaltige Layout */
    gap: 25px; /* Abstand zwischen Bild und Text */
    background-color: var(--color-background); /* Etwas dunkler als die Wizard-Box */
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in-out; /* Schöne Einblend-Animation */
}

.game-panel-image {
    flex-basis: 200px; /* Feste Breite für die Bild-Spalte */
    flex-shrink: 0;
}

.game-panel-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.admin-grid-layout {
    display: grid;
    /* Zwei Spalten: Formular 60%, Liste 40% */
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Zwei gleich breite Spalten innerhalb des Formulars */
    gap: 20px;
}

.grid-full-width {
    grid-column: 1 / -1; /* Element erstreckt sich über die volle Breite des Grids */
}

.config-header {
    margin-top: 20px;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.form-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.form-buttons button {
    flex-grow: 1; /* Beide Buttons teilen sich den Platz */
}

/* Kleinere Buttons für Vorlagen, damit sie in eine Zeile passen */
#insert-plugin-template-btn, 
#insert-mod-template-btn, 
#insert-backup-template-btn {
    padding: 4px 8px;
    font-size: 0.75em;
    margin-left: 5px;
    vertical-align: middle;
}

/* Macht das Layout auf kleineren Bildschirmen einspaltig */
@media (max-width: 992px) {
    .admin-grid-layout {
        grid-template-columns: 1fr; /* Alles untereinander */
    }
}

@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr; /* Formularfelder auch untereinander */
    }
}

.variant-selection {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.variant-option {
    margin-bottom: 10px;
}
.variant-option input[type="radio"] {
    display: none; /* Versteckt den Standard-Radio-Button */
}
.variant-option label {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.variant-option input[type="radio"]:checked + label {
    border-color: var(--color-accent);
    background-color: rgba(55, 114, 255, 0.1);
}
.variant-name { font-weight: 600; }
.variant-price { color: var(--color-success); }

.config-fieldset {
    border: 1px solid #4a4a5a; /* Ändert den Rahmen zu einem dunklen Grau */
    border-radius: 8px;       /* Macht die Ecken rund */
    padding: 1.5em;           /* Fügt Innenabstand hinzu */
    margin-bottom: 1.5em;     /* Fügt Abstand nach unten hinzu */
}

.config-fieldset legend {
    font-size: 1em;          /* Passt die Schriftgröße des Titels an */
    font-weight: bold;       /* Macht den Titel fett */
    padding: 0 0.5em;        /* Fügt seitlichen Abstand zum Titel hinzu */
    color: #e0e0e0;          /* Hellt die Schriftfarbe etwas auf */
}

.game-panel-details {
    flex-grow: 1; /* Text-Spalte füllt den Rest des Platzes */
    display: flex;
    flex-direction: column;
}

.game-panel-details h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
    color: var(--color-text-primary);
}

.game-panel-details p {
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.details-btn {
    width: fit-content; /* Button ist nur so breit wie sein Inhalt */
    padding: 6px 12px;
    background-color: var(--color-border);
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.details-btn:hover {
    background-color: #404861;
}

/* Angepasstes Styling für die Beschreibungs-Box */
.long-description-box {
    background-color: rgba(0, 0, 0, 0.2); /* Dunkler, transparenter Hintergrund */
    border: none; /* Kein Rand mehr nötig */
    border-left: 3px solid var(--color-accent); /* Akzent-Linie links */
    padding: 15px;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--color-text-secondary);
}


#paypal-button-container {
    width: 100%;
}

.hidden {
    display: none;
}

.start-creation-container {
    text-align: center;
    margin-bottom: 40px;
}

#show-wizard-btn {
    width: auto; /* Überschreibt die 100% Breite von .btn-primary */
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 700;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Der Aktionsbereich (Buttons) am unteren Rand */
.server-card-actions {
    padding: 0 15px 15px 15px;
    display: flex;
    flex-wrap: wrap; /* Buttons umbrechen, falls nicht genug Platz ist */
    gap: 10px;
}

.server-info {
    flex: 1;
}

.server-info strong {
    font-size: 1.2em;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.server-info .status {
    font-size: 0.9em;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 15px;
}

.server-info span {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.9em;
    margin-top: 5px;
}

.server-info code {
    background-color: var(--color-background);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.server-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* --- 4. Buttons --- */
button {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    white-space: nowrap;
}

button.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Primärer Button */
.btn-start-new, .btn-start, .btn-primary {
    background: var(--color-accent-gradient);
    color: white;
    width: 100%;
}

.server-actions .btn-start {
    width: auto;
    flex: 1;
    min-width: 0;
    background: var(--color-accent);
}

.btn-start-new:hover, .btn-start:hover, .btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 15px rgba(55, 114, 255, 0.5);
}

/* Sekundäre Buttons */
.btn-stop, .btn-delete, .btn-edit, #clear-form-btn, #logout-btn {
    background-color: var(--color-border);
    color: var(--color-text-secondary);
}

.server-actions .btn-edit,
.server-actions .btn-stop,
.server-actions .btn-delete {
    flex: 1;
    min-width: 0;
}

.btn-stop:hover, .btn-delete:hover, .btn-edit:hover, #clear-form-btn:hover, #logout-btn:hover {
    background-color: #404861;
    color: var(--color-text-primary);
}

/* Edit Button */
.btn-edit {
    background-color: #2d3752;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-edit:hover {
    background-color: var(--color-accent);
    color: white;
}

/* Stop Button */
.btn-stop {
    background-color: #38242c;
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.btn-stop:hover {
    background-color: var(--color-warning);
    color: white;
}

/* Delete Button */
.btn-delete {
    background-color: #38242c;
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
}

.btn-delete:hover {
    background-color: var(--color-danger);
    color: white;
}

/* --- 5. Formulare --- */
.input-row {
    margin-bottom: 20px;
}

.input-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

input[type="text"], 
input[type="password"], 
input[type="number"],
input[type="file"],
select, 
textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="number"]:focus,
select:focus, 
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(55, 114, 255, 0.3);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23A0A9C0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 100px;
}

/* --- 6. Modal --- */
.modal-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: 1000;
    padding: 20px;
}

.modal {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    padding: 25px;
    border-radius: 8px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
}

.modal h2 {
    margin-top: 0;
}

.modal hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 15px 0;
}

.modal #mod-upload-form {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.modal #mod-upload-form input[type="file"] {
    flex: 1;
    min-width: 200px;
}

.modal #mod-upload-form button {
    flex-shrink: 0;
}

.modal #close-modal-btn {
    margin-top: 15px;
    background-color: #6c757d;
    width: 100%;
}

#mod-list-container ul {
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

#mod-list-container li {
    background-color: var(--color-background);
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#mod-list-container li span {
    flex: 1;
    min-width: 150px;
    word-break: break-all;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8em;
    flex-shrink: 0;
}
/* --- Styles für Tabs --- */
.tab-container {
    display: flex;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1em;
    font-weight: 500;
    color: #ccc;
    border-bottom: 3px solid transparent;
}
.tab-btn.active {
    color: white;
    border-bottom: 3px solid #007bff;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

.log-container {
    background-color: #1a1a1a; /* Dunkler Hintergrund für besseren Kontrast */
    border: 1px solid #444;
    border-radius: 5px;
    max-height: 60vh; /* Maximale Höhe, z.B. 60% der Bildschirmhöhe */
    overflow-y: auto; /* Scrollbalken hinzufügen, wenn der Inhalt zu lang ist */
    padding: 10px;
}

.log-container pre {
    margin: 0;
    white-space: pre-wrap; /* Zeilen umbrechen, wenn sie zu lang sind */
    word-wrap: break-word; /* Lange Wörter umbrechen */
    font-family: monospace; /* Schriftart für Code */
    font-size: 0.9em;
}

.server-item {
    display: flex;       /* Ermöglicht die Anordnung von Bild und Text nebeneinander */
    align-items: center; /* Zentriert die Inhalte vertikal */
    gap: 15px;           /* Fügt einen Abstand zwischen Bild und Text hinzu */
}

.server-image, .server-image-placeholder {
    flex-shrink: 0;      /* Verhindert, dass das Bild schrumpft */
    width: 120px;        /* Feste Breite für das Bild */
    height: 80px;        /* Feste Höhe */
}

.server-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Stellt sicher, dass das Bild den Container ausfüllt, ohne sich zu verzerren */
    border-radius: 8px;
}

.server-details {
    flex-grow: 1;        /* Sorgt dafür, dass der Textbereich den restlichen Platz einnimmt */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#server-list {
  display: grid;
  /* Erstellt so viele Spalten wie möglich mit einer Mindestbreite von 280px */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Optional: Stellt sicher, dass die Buttons untereinander stehen, wenn der Platz knapp wird */
@media (max-width: 600px) {
    .server-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
/* --- Styles für Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 15px;
    border-radius: 5px;
    color: white;
    font-size: 1em;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(-20px);
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast-success { background-color: #28a745; }
.toast-error { background-color: #dc3545; }

/* --- 7. Responsive Design --- */

/* Tablets (bis 768px) */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 15px;
        margin: 10px auto;
    }

    h1 {
        font-size: 1.6em;
        padding-bottom: 12px;
    }

    h2 {
        font-size: 1.3em;
        margin-top: 25px;
    }

    .server-list, .user-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .control-group, .server-item, .form-container {
        padding: 20px;
    }

    .server-actions {
        flex-direction: column;
    }

    .server-actions button {
        width: 100%;
    }

    .modal {
        padding: 20px;
    }
}

/* Smartphones (bis 480px) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 10px;
        margin: 5px auto;
    }

    h1 {
        font-size: 1.4em;
        padding-bottom: 10px;
    }

    h2 {
        font-size: 1.2em;
        margin-top: 20px;
    }

    .control-group, .server-item, .form-container {
        padding: 15px;
    }

    .server-info strong {
        font-size: 1.1em;
    }

    button {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    input[type="text"], 
    input[type="password"], 
    input[type="number"],
    select, 
    textarea {
        padding: 10px;
        font-size: 0.95rem;
    }

    .modal {
        padding: 15px;
        max-width: 100%;
        margin: 10px;
    }

    .modal #mod-upload-form {
        flex-direction: column;
    }

    .modal #mod-upload-form input[type="file"],
    .modal #mod-upload-form button {
        width: 100%;
    }

    #mod-list-container li {
        flex-direction: column;
        align-items: flex-start;
    }

    #mod-list-container li span {
        width: 100%;
    }

    .btn-small {
        width: 100%;
    }
}

/* Sehr kleine Smartphones (bis 360px) */
@media (max-width: 360px) {
    body {
        padding: 8px;
    }

    h1 {
        font-size: 1.3em;
    }

    h2 {
        font-size: 1.1em;
    }

    .server-info strong {
        font-size: 1em;
    }

    button {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* Landscape-Modus für kleine Geräte */
@media (max-height: 500px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
    }

    #mod-list-container ul {
        max-height: 150px;
    }
}

/* --- 8. Accessibility & Touch-Optimierung --- */
@media (hover: none) and (pointer: coarse) {
    /* Touch-optimierte Buttons */
    button {
        min-height: 44px;
        padding: 12px 20px;
    }

    .btn-small {
        min-height: 36px;
    }

    /* Größere Touch-Targets */
    input[type="text"], 
    input[type="password"], 
    input[type="number"],
    select {
        min-height: 44px;
    }
}

/* --- 9. Print-Styles --- */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .server-item, .control-group {
        border: 1px solid #000;
        break-inside: avoid;
    }

    button {
        display: none;
    }

    .modal-overlay {
        display: none;
    }
}

