body {
    background-color: black;
    color: white;
    margin: 0;           /* besser 0, nicht auto */
    font-family: arial;
    overflow: hidden;    /* kein Scrollen am Body */
    height: 100vh;       /* gesamte Viewport-Höhe */
}

header {
    width: 100%;
    text-align: center;
    padding-top: 2%;
    padding-bottom: 2%;
    /*background-color: rgb(53, 53, 85);*/
    background-color: rgb(53, 53, 85);
    border-bottom: solid rgb(73, 116, 255) 1px;
    font-size: 200%;
    font-weight: bold;
    display: inline-flex;
}

#header-left{
    width:20%;
    margin:auto;
}

#header-center{
    width:60%;
    margin:auto;
}

#header-right{
    width: 20%;
    margin:auto;
}



#header-update{
    border-radius: 100px;
    border: solid white;
}







.container {
    display: flex;
    height: calc(100vh - 64px); /* Header abziehen (ungefähr 64px Höhe) */
}

.sidebar {
    width: 20%;
    background-color: rgb(53, 53, 85);
    overflow-y: auto;  /* nur vertikales Scrollen */
    overflow-x: hidden; /* kein horizontaler Scroll */
    height: auto;
    padding-bottom:7%;
    scrollbar-width: thin;


    a{
        width:100%;
        padding-top:7%;
        padding-bottom:7%;
        background-color:rgb(53, 53, 85);
        display:block;
        font-size: 200%;
        font-weight: bold;
        text-decoration: none;
        color: white;
        padding-left:10%;
    }

    a:hover{
        background-color:rgb(255, 62, 62);
    }
}

.main {
    width: 80%;
    background-color: rgb(202, 202, 202);
    overflow-y: auto;  /* nur vertikales Scrollen */
    overflow-x: hidden; /* kein horizontaler Scroll */
    height: 100%;       /* muss Höhe haben, damit scroll funktioniert */
}



.onlineSymbol{
        width:100%;
        padding-top:7%;
        padding-bottom:7%;
        display:block;
        text-align: center;
        font-size: 200%;
        font-weight: bold;
        text-decoration: none;
        color: white;
}



.online-anzeige{
    margin:auto;
    margin-top:5%;
    width:95%;
    border-radius: 15px;
    overflow: hidden;
    font-size: 200%;
    font-weight: bold;   
}

.ip-adresse{
        width:100%;
        background-color:rgb(53, 53, 85);
        padding-top:5%;
        padding-bottom:5%;
        text-align: center;
    }

    .online{
        width:100%;
        background-color:rgb(0, 181, 0);
        padding-top:2%;
        padding-bottom:2%;
        text-align: center;
    }


.start-stop-button{
    margin:auto;
    margin-top:5%;
    text-align: center;
    padding-left:6%;
    padding-right:6%;
    padding-top:3%;
    padding-bottom:3%;
    width:5%;
    background-color:red;
    border-radius: 20px;
    font-weight: bold;
    font-size: 200%;
}

.start-stop-button:hover{
    cursor: pointer;
    background-color:rgb(255, 82, 82);
}



/*Konsole*/

.console{
    width: 90%;
    margin:auto;
    margin-top:5%;
    background-color:black;
    padding:3%;
    min-height: 60vh;
}

#logBox{
    min-height: 50vh;
    max-height: 50vh;
    overflow-y: scroll;      /* Scrollen aktiv */
    color: rgb(4, 192, 255); /* gleiche Farbe wie Input oder optional andere */
    font-family: monospace;  /* echtes Terminal-Feeling */
    padding: 10px;
    background-color: #000;  /* nochmal sicher schwarz */
    white-space: pre-wrap; /* WICHTIG: Zeilenumbrüche erhalten */
}

#commandInput{
    width:100%;
    background-color:black;
    color: rgb(4, 192, 255);
    margin-top:5%;
    padding-top:1%;
    padding-bottom:1%;
    border:solid rgb(80, 80, 80) 2px;
}


/*---------------------- Container für alle Optionen -----------------------*/
/* Optionen-Wrapper */
.optionwrapper {
    text-align: center;
    margin-top: 3%;
}

/* Jede Option als Kachel */
.option {
    width: 30%;
    margin: 1%;
    display: inline-flex;
    flex-direction: column;
    border: 2px solid black;
    border-radius: 10px;
    font-size: 1.2rem;
    padding: 15px;
    text-align: left;
    background-color: #353f66;
    color: white;
    padding:3%;
}

/* Label oben */
.option label {
    width: 100%;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Inputs & Selects */
.option input[type="text"],
.option input[type="number"],
.option select {
    width: 100%;
    padding: 5px;
    font-size: 1rem;
    border: 1px solid #555;
    background-color: #ffffff;
    color: #000000;
    
}

/* Toggle-Switch Container */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Das unsichtbare Checkbox Input */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Die Slider-Fläche */
.toggle-switch .slider {
    width:60px;
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555; /* Track Farbe */
    transition: .4s;
    border-radius: 34px;
}

/* Der Kreis innen */
.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Checkbox checked -> Track färben */
.toggle-switch input:checked + .slider {
    background-color: #04c0ff;
}

/* Checkbox checked -> Kreis nach rechts verschieben */
.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Speichern-Button */
#saveOptions {
    padding: 12px 20px;
    font-size: 1rem;
    background-color: #21c92c; /* grün */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 1px 1px 6px rgba(169, 164, 164, 0.4);
}

#saveOptions:hover {
    background-color: #218838; /* dunkleres grün beim hover */
}




/*----------------------------------Welten---------------------------------------*/
/* Welten-Kacheln */
.welt-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.welt {
    width: 28%;
    margin: 1%;
    background-color: rgb(53, 53, 85);
    color: white;
    border: 2px solid black;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.welt h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Buttons untereinander in der Kachel */
.welt button {
    display: block;       /* untereinander */
    width: 100%;          /* volle Breite der Kachel */
    margin-top: 8px;      /* Abstand zwischen Buttons */
    padding: 8px 0;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* Farben nach Funktion */
.welt button.download { background-color: #007bff; color: white; }
.welt button.upload { background-color: #fd7e14; color: white; }
.welt button.delete { background-color: #dc3545; color: white; }
.welt button.backup { background-color: #28a745; color: white; }

/* Hover nur aktiv, wenn Button nicht disabled */
.welt button:not(:disabled):hover {
    filter: brightness(1.1); /* leicht aufhellen beim Hover */
}

/* Disabled-Style */
.welt button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/*--------------------Neuinstallieren--------------------*/
/* Reinstall Button */
#reinstallBtn {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    background-color: #ff9800; /* orange */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 5px;
}

#reinstallBtn:hover {
    background-color: #e68900;
}


/*------------------------------Login-----------------------------*/
#login-wrapper{
    height: 100vh;
    background-color:rgb(53, 53, 85);
    padding-top:5%;
}

#login{
    margin:auto;
    background-color:rgb(202, 202, 202);
    border-radius: 10px;
    width:30%;
    font-size: 200%;
    text-align: center;
    color:rgb(61, 61, 61);
    font-weight: bold;
    padding-top:1%;
    padding-bottom:1%;
    box-shadow: 0px 0px 10px black;
}





@media (max-width: 768px) {

    /* Header kleiner, Schrift kleiner */
    header {
        font-size: 150%;
        padding-top: 3%;
        padding-bottom: 3%;
    }

    /* Container flexen in Spalte */
    .container {
        flex-direction: column;
        height: auto; /* Body scroll zulassen */
    }

    /* Sidebar oben, volle Breite */
    .sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar a {
        flex: 1 0 auto;
        font-size: 120%;
        padding: 5% 2%;
        text-align: center;
    }

    /* Main Bereich volle Breite unter Sidebar */
    .main {
        width: 100%;
        height: auto;
        max-height: calc(100vh - 64px);
    }

    /* Start/Stop Button größer für Touch */
    .start-stop-button {
        width: 30%;
        padding: 4% 0;
        font-size: 150%;
        border-radius: 15px;
    }

    /* Option-Kacheln auf volle Breite */
    .optionwrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .option {
        width: 90%;
        margin: 5px 0;
    }

    /* Welten-Kacheln einspaltig */
    .welt-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .welt {
        width: 90%;
        margin: 10px 0;
    }

    /* Login-Box auf fast volle Breite */
    #login {
        width: 90%;
        font-size: 150%;
        padding: 2%;
    }

    /* Console scrollen verbessern */
    .console {
        width: 95%;
        margin-top: 10px;
        padding: 3%;
    }

    #logBox {
        min-height: 40vh;
        max-height: 40vh;
    }

    #saveOptions {
        bottom: 5%;
        left: 5%;
        width: 90%;
        font-size: 1.2rem;
    }
}


/*--------------------------------------------Mods------------------------------------------*/

/* Container für alle Mods */
#modsWrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1%;
}

.mod {
    flex: 1 1 20%; /* Basisbreite 22%, wächst flexibel */
    max-width: 16%;
    background-color: rgb(53, 53, 85);
    padding: 3%;
    border-radius: 30px;
    text-align: center;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin:1%;
}

#modsWrapper .delete{
    width: 60%;
    padding: 1%;
    font-size: 100%;
    background-color:red;
    border-radius: 10px;
    border: solid black;
    margin:auto;
}

#modsWrapper .delete:hover{
    background-color:rgb(254, 66, 66);
    box-shadow: 0px 0px 10px black;
    cursor: pointer;
    margin:auto;
}

#uploadButton {
    font-size: 150%;
    padding: 1%;
    margin: 2% auto 0 auto; /* oben: 2%, horizontal zentriert */
    display: block;
    margin-bottom:5%;
}



/*----------------------------------backups-----------------------------------*/
/* Backup Einträge */
.backup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(53, 53, 85);
    padding: 10px;
    margin: 5px 0;
    border-radius: 15px;
    font-weight: bold;
}

.backup-buttons button {
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.restore {
    background-color: #28a745;
    color: white;
}

.restore:hover {
    background-color: rgb(50, 180, 50);
}

.backup-buttons .delete {
    background-color: red;
    color: white;
}

.backup-buttons .delete:hover {
    background-color: rgb(255, 70, 70);
}


/*--------------------------Server icon---------------------*/


#uploadServerIcon {
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

#uploadServerIcon:hover {
    filter: brightness(1.1);
}


/*------------------------Plugins----------------------------------*/
/* Container für alle Mods */
#pluginsWrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1%;
    margin:5%;
}




.mod button.delete { background-color: #dc3545; color: white; }

.mod button {
    display: block;       /* untereinander */
    width: 100%;          /* volle Breite der Kachel */
    margin-top: 8px;      /* Abstand zwischen Buttons */
    padding: 8px 0;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.mod button:not(:disabled):hover {
    filter: brightness(1.1); /* leicht aufhellen beim Hover */
}


#updateBtn{
    margin:auto;
    padding:2%;
    margin-top:10%;
    font-size: 150%;
    font-weight: bold;
}

@keyframes update {
    0% {box-shadow: 0px 0px 20px orange;}
    50% {box-shadow: none;}
    100% {box-shadow: 0px 0px 20px orange;}
}

#datawrapper{
    margin:auto;
    margin-top:5%;
    width:50%;
    border-radius: 15px;
    overflow: hidden;
}

.ftp-ip-adresse{
    width:100%;
    margin:auto;
    background-color:rgb(53, 53, 85);
    padding:2%;
    border-top: solid rgba(128, 128, 128, 0.211) 1px;
    border-bottom: solid rgba(128, 128, 128, 0.211) 1px;
}

#bedrock-port{
    margin-bottom:5%;
}