/* === Grundlayout === */
body {
  font-family: "Segoe UI", sans-serif;
  background: #f6f6f6;
  color: #222;
  text-align: center;
  margin: 0;
  padding: 0;
  transition: background 0.5s, color 0.5s;
}

.dark-mode {
  background: #1c1c1c;
  color: #e0e0e0;
}

/* === Logo === */
.logo {
  width: 120px;
  margin-top: 30px;
  transition: transform 0.3s ease;
}
.logo:hover {
  transform: scale(1.05);
}

/* === Animation Box === */
#animatedBox {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

#animatedInstruction {
  display: inline-block;
  font-size: 1.2rem;
  letter-spacing: 1.5px;
  white-space: nowrap;
  overflow: hidden;
}

#dot {
  width: 8px;
  height: 8px;
  background: #b80000;
  border-radius: 50%;
  position: relative;
  top: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* === Formular & Buttons === */
input, button {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  margin: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  transition: all 0.3s;
}

input:focus {
  border-color: #b80000;
}

button {
  background: #b80000;
  color: white;
  border: none;
  cursor: pointer;
}

button:disabled {
  background: #999;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background: #d41a1a;
}

.secure {
  letter-spacing: 3px;
}

/* === Fehlermeldung === */
#errorMessage {
  display: none;
  color: #ff4444;
  margin-top: 10px;
  font-weight: bold;
}

/* === Trennlinien & Texte === */
hr {
  width: 70%;
  margin: 30px auto;
  border: 0;
  border-top: 1px solid #ccc;
}

h2, h3 {
  margin-top: 30px;
}

fieldset {
  max-width: 450px;
  margin: 10px auto;
  border: 1px solid #aaa;
  background: rgba(255, 255, 255, 0.1);
}

/* === Dark Mode Felder === */
.dark-mode fieldset {
  border-color: #555;
  background: rgba(255, 255, 255, 0.05);
}

/* === Footer Texte === */
h4, h6 {
  margin: 5px;
  color: #777;
}

/* ===========================================================
   📱 RESPONSIVE LAYOUTS
   =========================================================== */

/* === Tablet (Galaxy Tab A etc.) === */
@media (max-width: 1000px) {
  .logo {
    width: 100px;
    margin-top: 25px;
  }

  #animatedInstruction {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  input, button {
    width: 80%;
    font-size: 0.95rem;
  }

  fieldset {
    width: 85%;
  }
}

/* === Smartphone (Portrait) === */
@media (max-width: 600px) {
  body {
    font-size: 0.95rem;
    padding: 0 5vw;
  }

  .logo {
    width: 90px;
    margin-top: 20px;
  }

  #animatedBox {
    margin-top: 25px;
  }

  #animatedInstruction {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  #dot {
    width: 6px;
    height: 6px;
  }

  input, button {
    width: 95%;
    font-size: 0.9rem;
    padding: 8px;
  }

  h2 {
    font-size: 1.1rem;
    margin: 20px 0;
  }

  h3 {
    font-size: 1rem;
  }

  fieldset {
    width: 95%;
  }

  hr {
    width: 90%;
  }
}

/* === Extra kleine Geräte (unter 400px, z. B. alte Smartphones) === */
@media (max-width: 400px) {
  #animatedInstruction {
    font-size: 0.85rem;
  }

  input, button {
    font-size: 0.85rem;
  }

  .logo {
    width: 80px;
  }

  fieldset {
    width: 100%;
  }
}
/* === Zurück-Button === */
.back-btn {
  background: #666;
  color: #fff;
  border: none;
  padding: 10px 15px;
  margin-top: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.back-btn:hover {
  background: #555;
}

.dark-mode .back-btn {
  background: #444;
  color: #e0e0e0;
}

.dark-mode .back-btn:hover {
  background: #333;
}
#codeInputWrapper {
  position: relative;
  width: 80%;
  max-width: 400px;
  margin: 0 auto; /* zentriert den Container */
}

#suggestionList {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%; /* volle Breite des Containers */
  display: none;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: absolute;
  top: 100%; /* direkt unter Input */
  left: 0;
  z-index: 100;
}
#suggestionList li {
  padding: 10px;
  cursor: pointer;
  text-align: left;
}
#suggestionList li:hover {
  background-color: #B80000;
  color: white;
}