html {
    scroll-behavior: smooth;
}

/* Zentrale Styles für Login-Seite */
body {
  font-family: system-ui, sans-serif;
  background: #f0f7ff;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Weißer Kasten um das Formular */
.login-container {
  width: 100%;
  max-width: 400px;
  background: #fff; /* weiß */
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 5px 20px rgba(0,148,255,0.2);
  border: 1px solid #e6e6e6;
  text-align: center;
  box-sizing: border-box;
}

/* Überschrift */
h1 {
  text-align: center;
  color: #003366;
  font-size: 28px;
  margin-bottom: 30px;
}

/* Labels */
label {
  font-size: 14px;
  color: #003366;
}

/* Inputs */
input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-top: 5px;
  box-sizing: border-box;
}

/* Button */
button {
  background: #0094FF;
  color: #fff;
  padding: 12px 0;
  border-radius: 10px;
  font-weight: bold;
  font-size: 16px;
  margin-top: 10px;
  cursor: pointer;
  width: 100%;
  transition: 0.2s;
}

button:hover {
  background: #007acc;
}

/* Links */
.register, .back {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: #003366;
}

.register a, .back a {
  color: #0094FF;
  text-decoration: none;
}

.register a:hover, .back a:hover {
  text-decoration: underline;
}

/* Fehlermeldungen */
.error {
  color: red;
  font-size: 14px;
  text-align: center;
  margin-top: 5px;
  word-wrap: break-word; /* verhindert dass Container breiter wird */
}

/* Passwort vergessen Link */
.forgot {
  text-align: right;
  margin-top: 8px;
  margin-bottom: 8px;
}

.forgot a {
  font-size: 14px;
  color: #0094FF;
  text-decoration: none;
}

.forgot a:hover {
  text-decoration: underline;
}

/* --- RESPONSIVE --- */
@media (max-width: 420px) {
  .login-container {
    padding: 30px 20px;
  }

  h1 {
    font-size: 22px;
  }

  input, button {
    font-size: 14px;
    padding: 10px;
  }
}

/* Stellt sicher, dass nur Inputs den Cursor zeigen */
body, h1, h2, h3, h4, p, span, div {
  caret-color: transparent; /* verhindert blinkenden Cursor */
}

input, textarea {
  caret-color: auto; /* normale Inputs/Textareas haben blinkenden Cursor */
}

/* ==========================================================
   RESPONSIVE-ERWEITERUNG (NEU) — Nur unterhalb, Desktop bleibt unverändert
   Vorgaben:
   - Keine Änderungen am bestehenden CSS oben
   - Nur bestehende Klassen/Elemente verwenden
   - Kein JS / keine externen Libraries / kein Inline-CSS
========================================================== */

/* ----------------------------------------------------------
   MOBILE (NEU) — max-width: 480px
   Ziel: Fullwidth, Touch-Abstände, lesbar, kein horizontales Scrollen (ab 320px)
---------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    /* verhindert "gequetscht" am Rand + reduziert Scroll-Risiko */
    padding: 16px;
    /* bessere Usability mit Tastatur auf Mobile */
    align-items: flex-start;
    justify-content: flex-start;
  }

  .login-container {
    max-width: 100%;
    width: 100%;
    padding: 24px 18px;
  }

  h1 {
    font-size: 22px;
    margin-bottom: 22px;
  }

  label {
    font-size: 14px;
  }

  input {
    font-size: 16px; /* iOS: verhindert oft Auto-Zoom bei Fokus */
    padding: 12px;
    margin-top: 6px;
    border-radius: 10px;
  }

  button {
    font-size: 16px;
    padding: 14px 0; /* größere Touch-Fläche */
    border-radius: 12px;
    margin-top: 12px;
  }

  .forgot {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .forgot a,
  .register,
  .back,
  .error {
    font-size: 14px;
  }
}

/* ----------------------------------------------------------
   MOBILE (NEU) — max-width: 767px
   Ziel: Fullwidth, angenehme Abstände, kein horizontales Scrollen
---------------------------------------------------------- */
@media (max-width: 767px) {
  body {
    padding: 18px;
  }

  .login-container {
    max-width: 100%;
    width: 100%;
    padding: 30px 22px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  input {
    padding: 12px;
  }

  button {
    padding: 14px 0;
  }

  .register, .back {
    margin-top: 16px;
  }
}

/* ----------------------------------------------------------
   TABLET (NEU) — max-width: 1024px
   Ziel: Tablet wirkt nicht "gezoomt", moderate Anpassungen ohne Desktop-Änderung
---------------------------------------------------------- */
@media (max-width: 1024px) {
  .login-container {
    max-width: 440px; /* leicht großzügiger auf Tablet */
    padding: 36px;
  }

  h1 {
    font-size: 26px;
    margin-bottom: 26px;
  }

  input {
    padding: 11px;
  }

  button {
    padding: 13px 0;
  }
}
