body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: url("3.jpg") no-repeat center center fixed;
    background-size: cover;
    background-color: black;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 300px;
    padding: 30px;
    border-radius: 8px;
    box-sizing: border-box;
}

.login-box h2 {
    color: white;
    margin: 0 0 0px 0;
    text-align: left;
    font-weight: 600;
}

.login-box input {
    padding: 10px;
    border: 1px solid white;
    border-radius: 6px;
    outline: none;
    width: 100%;
    background: transparent;
    color: white;
    box-sizing: border-box; /* ← das löst dein Problem */
}

.login-box input::placeholder {
    color: white;
    opacity: 1; /* für Firefox */
}

.login-box button {
    padding: 10px;
    border: none;
    background-color: #007acc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s ease;
    font-weight: 600;
}

.login-box button:hover {
    background-color: #005a99;
}

.error {
    visibility: hidden; /* ← reserviert Platz, aber ist unsichtbar */
    height: 1.2em;       /* optional: definiert exakte Höhe */
    color: rgb(255, 255, 255);
    margin-top: 10px;
    font-weight: 400;
    text-align: left;
}

.error.visible {
    visibility: visible;
}

/* Basis: Button nicht fett und gleiche Schrift übernehmen */
.login-box button {
  font-weight: 400;                 /* kein Bold */
  font-family: inherit;             /* wie Body */
  text-align: left;                 /* konsistent zu deinen Tiles */
}

/* Kleinere Screens entsperren, kein starres fixed-Background auf Mobile */
@media (max-width: 1200px) {
  body {
    background-attachment: scroll;  /* vermeidet Jank auf iOS/Android */
  }
}

/* Smartphones bis ca. 600px */
@media (max-width: 600px) {
  body {
    height: auto;                   /* nicht zwanghaft Bildschirmhöhe */
    min-height: 100vh;
    padding: 16px;                  /* etwas Innenabstand */
    align-items: stretch;
    justify-content: flex-start;
    background-position: center top;
  }

  .login-container {
    width: 100%;
    align-items: stretch;
    justify-content: center;
  }

  .login-box {
    width: 100%;
    max-width: 420px;               /* angenehm lesbar */
    padding: 18px;
    gap: 12px;
    border-radius: 12px;
    /* optionaler Glas-Look wie im Dashboard */
    background: rgba(204, 133, 133, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 14px rgba(0,0,0,0.28);
  }

  .login-box h2 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    text-align: left;
    font-weight: 600;               /* nur die Überschrift darf kräftiger */
  }

  .login-box input {
    padding: 12px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255,255,255,0.06);
  }

  .login-box input::placeholder {
    opacity: 0.9;
  }

  .login-box button {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.14);   /* dezenter Glas-Knopf */
    border: 1px solid rgba(255,255,255,0.28);
    transition: background 0.2s ease, transform 0.08s ease;
  }

  .login-box button:active {
    transform: scale(0.99);
  }

  .error {
    margin-top: 8px;
    font-size: 0.95rem;
    line-height: 1.2;
  }
}

/* Tablets 601–900px */
@media (min-width: 601px) and (max-width: 900px) {
  .login-box {
    width: 80%;
    max-width: 520px;
    padding: 22px;
    border-radius: 12px;
    background: rgba(204,133,133,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    backdrop-filter: blur(10px);
  }
  .login-box button {
    font-weight: 400;
  }
}

/* Weniger Bewegung auf Wunsch */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
