/* style.css */

/* Grundlegendes Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: linear-gradient(120deg, #f0f0f0, #d9e4ff);
    color: #333;
    padding: 20px;
}

/* Zentrierung: horizontale und vertikale Mitte */
.center-wrapper {
    display: flex;
    flex-direction: column;        
    justify-content: center;       
    align-items: center;           
    height: 100vh;                 
    text-align: center;            
    margin-bottom: 300px;
}

/* Übergeordneter Container, der alles zentriert */
.login-wrapper {
    display: flex;
    flex-direction: column; 
    align-items: center;   /* Vertikale Zentrierung */
    justify-content: center; /* Horizontale Zentrierung */
    height: 100vh;
    background: linear-gradient(120deg, #f0f0f0, #d9e4ff);
}

/* Stil für das NeoHub-Titel */
.title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5em; /* Vergrößert die Schriftgröße */
    text-decoration: underline; /* Unterstreicht den Text */
    font-weight: bold; /* Optional: Macht den Text fett */
    color: #333; /* Optional: Farbe des Textes */
/*    margin-bottom: 20px; /* Optional: Abstand unter dem Titel */
}

/* Stil f  r das NeoHub-Titel */
.sectitle {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em; /* Vergr   ^=ert die Schriftgr   ^=e */
    color: #333; /* Optional: Farbe des Textes */
    width: 70%;
}

/* Login Container */
.login-container {
    display: flex;
    flex-direction: column;      /* Elemente untereinander anordnen */
    justify-content: center;     /* Vertikale Zentrierung */
    align-items: center;         /* Horizontale Zentrierung */
    max-width: auto;
    margin: 50px auto;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-container h1 {
    margin-bottom: 20px;
}

/* Popup-Hintergrund (über den gesamten Bildschirm) */
.modal {
  display: none; /* Unsichtbar, bis per JS auf 'block' gesetzt */
  position: fixed;
  z-index: 999; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; 
  background-color: rgba(0,0,0,0.5); /* halbtransparentes Schwarz */
}

/* Innerer Bereich des Modals */
.modal-content {
  background-color: #fff;
  margin: 15% auto; /* von oben 10%, horizontal zentriert */
  padding: 20px;
  border: 1px solid #888;
  width: auto; 
  max-width: 90%;           /* begrenzt die Breite auf 80% des Viewports */
  max-height: 80vh;         /* max. 80% der Bildschirmhöhe */
  border-radius: 8px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  overflow-y: auto;         /* bei zu viel Inhalt -> Scrollbar */
}

/* Schließen-Knopf (X) rechts oben */
.modal-content .close {
  color: #888;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 10px;
  cursor: pointer;
}
.modal-content .close:hover {
  color: #000;
}

/* Konsolenausgabe in <pre> */
#modal-output {
  background: #f0f0f0;
  padding: 10px;
  margin-top: 10px;
  max-height: 300px;
  font-size: 1rem;
  white-space: pre-wrap;       /* Zeilen automatisch umbrechen */
  word-wrap: break-word;       /* Langes Wort wird gebrochen */
  max-width: 100%;            /* Damit es nicht aus dem Modal ragt */
  overflow-y: auto;
}

/* Buttons im "2025-Stil" */
.btn-2025 {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
  /*  padding: 15px 25px;*/
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    display: inline-block;
    white-space: nowrap;
    min-width: calc(100px + 30px);
    width: 100%;
    margin-bottom: 15px;
}

.btn-2025:hover {
    background: #0056b3;
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.4);
    transform: translateY(-3px);
}

/* Buttons im "2025-Stil" */
.btn-2024 {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #ff9800;
    color: #fff;
    border: none;
    padding: 15px 20px;
  /*  padding: 15px 25px;*/
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    z-index: 9999;
}

.btn-2024:hover {
    background: #e68900;
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.4);
    transform: translateY(-3px);
}

.login-btn {
    display: block;         /* Block-Element, damit margin: auto funktioniert */
    margin: 0 auto;         /* Horizontales Zentrieren */
    background: #007bff;
    color: #fff;
    border: none;
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
    min-width: calc(100px + 30px);
    width: auto;
}

.login-btn:hover {
    background: #0056b3;
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.4);
    transform: translateY(-3px);
}
.logout-btn {
  position: fixed;
  bottom: 20px; /* Abstand vom unteren Bildschirmrand */
  right: 20px;  /* Abstand vom rechten Bildschirmrand */
  
  display: inline-block;
  background-color: #e74c3c; /* Rot, z. B. wie in vielen UIs */
  color: #fff;
  padding: 15px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); /* Leichter Schatten */
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 9999; /* Damit der Button über anderen Elementen liegt */
}

/* Hover-Effekt */
.logout-btn:hover {
  background-color: #c0392b; /* Dunkleres Rot */
  transform: translateY(-3px); /* Leichtes "Anheben" */
}

/* Input-Felder */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

label {
    font-weight: bold;
}

/* Error */
.error {
    color: red;
    margin-bottom: 10px;
}

.status-button {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;

    width: 200px;
    height: 40px;
    font-size: 18px;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 999; /* bleibt über anderen Inhalten */
}

.status-button:hover {
/*    transform:  translateX(-50%) translateY(-3px); /* bleibt mittig, aber leicht angehoben */
    box-shadow: 0 8px 20px rgba(100, 100, 100, 0.3); /* weicher grauer Schatten */
}

.status-online {
    background-color: #4CAF50; /* grün */
    box-shadow: 0 0 10px #4CAF50;
}

.status-offline {
    background-color: #F44336; /* rot */
    box-shadow: 0 0 10px #F44336;
}

.status-updating {
    background-color: #777; /* Grau */
    box-shadow: 0 0 10px #999;
}

#nas-info-box {
    padding: 10px 15px;
    text-align: center;
    background-color: #f0f0f0;
    font-weight: bold;
    max-width: 100%;
    margin: 0 auto 20px auto;
    border-left: 5px solid #007bff; /* Standard blau */
    border-radius: 50px;
}

/* Online: blauer Rand */
#nas-info-box.online {
    border-left: 5px solid #007bff;
}

/* Offline: roter Rand */
#nas-info-box.offline {
    border-left: 5px solid #dc3545;
}

/* Responsives Layout */
@media (max-width: 768px) {
    .login-container {
        margin: 20px;
        padding: 20px;
    }

    .button-wrapper {
        display: flex;
        justify-content: center;
        width: 100%; /* optional, falls nötig */
    }

    .status-button {
        position: static !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;

        width: 120px;
        height: 35px;
        font-size: 12px;
    }
    .title {
        position: relative;  /* Normaler Flow statt absoluter Positionierung */
        top: 0;
        left: auto;
        transform: none;
        /* Damit die Überschrift nicht zu dicht am oberen Rand klebt */
        margin: 20px auto 20px auto; /* Oben und unten je 20px */
        text-align: center;
    }
    .sectitle {
        position: relative;  /* Normaler Flow statt absoluter Positionierung */
        top: 0;
        left: auto;
        transform: none;
        /* Damit die Überschrift nicht zu dicht am oberen Rand klebt */
        margin: 20px auto 20px auto; /* Oben und unten je 20px */
        text-align: center;
        width: 100%;
    }
}
