body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(to right, #FFC0CB, white 50%, #FFC0cb),
                linear-gradient(to bottom, #FFC0cb, white 50%, #FFC0cb);
    background-blend-mode: multiply;
}

.container {
    display: flex; /* Flexbox aktivieren */
    flex-direction: column; /* Elemente in einer Spalte anordnen */
    background: #ffeef1;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1200px;
    height: 600px;

    background-color: #ffffff8f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden; /* Verhindert, dass Inhalte außerhalb des Containers sichtbar sind */
    overflow-x: hidden;
    margin: 40px;
    box-sizing: border-box;
}

  #quizHeading {
    text-align: center;
    padding: 20px;
    padding-top: 5px;
    font-size: 36px;
    font-weight: bold;
  }

#quiz {
    flex-grow: 1; /* Ermöglicht dem Quiz-Bereich, den verfügbaren Platz einzunehmen */
    overflow-y: auto; /* Ermöglicht Scrollen innerhalb des Quiz-Bereichs */
    overflow-x: hidden;
    box-sizing: border-box;
}

h2, h3 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 30px;
}

.question {
    margin-bottom: 20px;
}

.options {
    display: flex;
    flex-direction: column;
}

.options button {
    padding: 22px 15px;
    margin-bottom: 10px;
    border: none;
    background: #FFC0cb;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-align: left;
    font-size: 18px;
    background-color: #FFC0cb;
}

.options button:hover {
    background: #BFEFFF;

}

.options button.selected {
    background-color: #4CAF50; /* Grüne Hintergrundfarbe für ausgewählte Optionen */
    color: white;
}

.options select,
.options textarea,
.options input[type="number"],
.options input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 18px;
}

.options textarea {
    resize: none;
    height: 100px; /* Reduzierte Höhe für bessere Benutzererfahrung */
    border: 1px solid #ccc;
}

.options input[type="number"],
.options input[type="text"] {
    /* Zusätzliche Styles für die Eingabefelder */
    -moz-appearance: textfield;
}

.options input[type="number"]::-webkit-outer-spin-button,
.options input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-input input[type="text"] {
    padding: 8px;
    font-size: 16px;
}

.error-message {
    color: red;
    margin-top: 5px;
    font-size: 14px;
    display: none;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: auto; /* Drückt die Navigation nach unten */
}

button.nav-btn {
    padding: 17px 35px;
    border: none;
    background: #FFC0cb;
    color: #FFF;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 18px;
}

button.nav-btn:disabled {
    background: #B0B0B0;
    cursor: not-allowed;
    padding: 17px 35px;
}

button.nav-btn:hover:not(:disabled) {
    background: #FFC0cb;
}

.summary {
    line-height: 1.6;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.confirm-btn {
    padding: 10px 15px;
    border: none;
    background: #FFC0cb;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-top: 20px;
}

.confirm-btn:hover {
    background: #138496;
}

@media screen and (max-width: 756px) {
  .container {
      display: flex; /* Flexbox aktivieren */
      flex-direction: column; /* Elemente in einer Spalte anordnen */
      background: #ffeef1;
      padding: 20px 30px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      width: 100%;
      max-width: 1200px;
      height: 600px;

      background-color: #ffffff8f;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      border-radius: 10px;
      overflow: hidden; /* Verhindert, dass Inhalte außerhalb des Containers sichtbar sind */
      margin: 40px;
  }
}

/* --- Zusätzliche CSS für grüne Haken und Animation --- */

.summary p {
    position: relative;
    padding-right: 50px; /* Platz für den Edit-Button und das Checkmark */
    opacity: 0;
    transform: translateX(20px); /* Bewegung von rechts */
    animation: fadeInSlide 0.5s forwards;
}

.summary p:nth-child(1) {
    animation-delay: 0.3s;
}

.summary p:nth-child(2) {
    animation-delay: 0.6s;
}

.summary p:nth-child(3) {
    animation-delay: 0.9s;
}

/* Füge weitere nth-child(n) bei Bedarf hinzu */

@keyframes fadeInSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.summary p::after {
    content: '✓';
    position: absolute;
    right: 30px; /* Angepasst, um Platz für den Edit-Button zu schaffen */
    top: 50%;
    transform: translateY(-50%) scale(0);
    color: green;
    font-size: 20px;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.summary p.show-check::after {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    animation: popIn 0.3s forwards;
}

@keyframes popIn {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    60% {
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

@media screen and (max-width: 760px) {
  .summary p::after {
      right: 30px;
  }
}

/* --- Styles für den Edit-Button --- */
.edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    font-size: 16px;
    margin-left: 10px;
}

.edit-btn:hover {
    color: #0056b3;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 0); }
    25% { transform: translate(-1px, 0); }
    50% { transform: translate(1px, 0); }
    75% { transform: translate(-1px, 0); }
    100% { transform: translate(0, 0); }
}

/* --- Zusätzliche CSS für die Inline-Bearbeitung --- */
.inline-edit-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 16px;
}

.save-btn, .cancel-btn {
    padding: 8px 12px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.save-btn {
    background-color: #28a745;
    color: #fff;
}

.cancel-btn {
    background-color: #dc3545;
    color: #fff;
}

.edit-container {
    display: flex;
    flex-direction: column;
}
