/* === Grundlayout und Reset === */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(to bottom, #4b006e, #1a001f);
  min-height: 100vh;
  color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === Container für das Quiz/Login-Feld === */
.quiz-box-container {
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 2rem;
  background-color: #f9f9f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  width: 100%;
  color: #1a001f;
}

/* === Überschrift === */
h1 {
  font-size: 2.5rem;
  color: #4b006e;
  margin: 0;
  text-align: center;
}

/* === Label-Stil === */
label {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Passwortfeld mit Auge === */
.password-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding: 0.5rem;
  padding-right: 2.5em; /* Platz für Icon */
  font-size: 1rem;
  border: 2px solid #aaa;
  border-radius: 5px;
  transition: border-color 0.2s ease;
  outline: none;
  text-align: center;
  box-sizing: border-box;
}

.password-wrapper button#togglePassword {
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.password-wrapper svg {
  width: 1.5em;
  height: 1.5em;
  fill: #4b006e;
}

/* === Absende-Button === */
button {
  margin-top: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background-color: #4b006e;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:hover {
  background-color: #37004d;
}

/* === Blinkanimation bei falschem Passwort === */
.blink {
  animation: blinkRed 0.15s ease-in-out 2;
}

@keyframes blinkRed {
  0%, 100% { border: 3px solid red; }
  50%      { border: 4px solid darkred; }
}

/* === Responsive Optimierung für kleinere Bildschirme === */
@media (max-width: 480px) {
  .quiz-box-container {
    padding: 1.5rem;
    width: 90%;
  }

  button,
  .password-wrapper input {
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }
}

/* === Passwortfeld mit Icon rechts === */
.password-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 70%;
}

.password-wrapper input {
  flex: 1;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  border: 2px solid #aaa;
  border-radius: 5px;
  outline: none;
  text-align: center;
  box-sizing: border-box;
}

#togglePassword {
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  margin-left: -0.3rem;
}

/* Dark Mode Icon-Farbe */
@media (prefers-color-scheme: dark) {
  #togglePassword {
    color: #f0f0f0;
  }
}

