/* ================================
   QUIZ CONTAINER
================================ */
#quiz-section {
  background: var(--gradient-background);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Karte */
.quiz-card {
  width: 340px;
  height: 440px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  position: relative;
  perspective: 1000px;
  color: #111;
}

/* Vorder- & Rückseite */
.quiz-front,
.quiz-back {
  position: absolute;
  inset: 0;
  padding: 2rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  background: #ffffff;
  color: #111;
  transition: transform 0.7s ease;
}

/* Flip */
.quiz-card.flipped .quiz-front {
  transform: rotateY(180deg);
}

.quiz-back {
  transform: rotateY(180deg);
}

.quiz-card.flipped .quiz-back {
  transform: rotateY(0deg);
}

/* Text */
.quiz-front h3,
.quiz-back h3 {
  color: #111;
  margin-bottom: 1rem;
  text-align: center;
}

.quiz-front p,
.quiz-back p {
  color: #333;
  text-align: center;
  line-height: 1.6;
  padding: 15px;
}


/* Antwortbuttons */
.quiz-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.quiz-buttons button {
  margin-top: 1.2rem;
  background: linear-gradient(to right, #4ade80, #22d3ee);
  color: #fff;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-buttons button:hover {
  background: #eaeaea;
  transform: translateY(-2px);
}

/* Weiter Button */
#next-question {
  margin-top: 1.2rem;
  background: linear-gradient(to right, #4ade80, #22d3ee);
  color: #fff;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* ================================
   MOBILE OPTIMIERUNG
================================ */
@media (max-width: 600px) {

  .quiz-card {
    width: 92vw;
    height: auto;
    min-height: 480px;
    padding-bottom: 1rem;
  }

  .quiz-front,
  .quiz-back {
    padding: 1.5rem;
  }

  .quiz-image {
    max-width: 140px;
    margin-bottom: 1rem;
  }

  /* Buttons größer & besser antippbar */
  .quiz-buttons {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .quiz-buttons button {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
    border-radius: 14px;
    padding: 1rem 1.25rem;
  }

  #next-question {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
    border-radius: 14px;
    margin-top: 1.5rem;
  }

  .quiz-front h3,
  .quiz-back h3 {
    font-size: 1.25rem;
  }

  .quiz-front p,
  .quiz-back p {
    font-size: 1rem;
    padding: 3rem;
  }
}

#result-screen {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
}

#result-screen.active {
  display: flex;
}

#result-screen .quiz-card {
  width: 340px;
  min-height: 300px;
  padding: 2rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}


/* Titel */
#result-screen h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #111;
}

/* Score Text */
#final-score {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
  color: #222;
}

/* Restart Button */
#restart {
  background: linear-gradient(to right, #4ade80, #22d3ee);
  color: #fff;
  border: none;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#restart:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}



/* ================================


   MOBILE OPTIMIERUNG


================================ */


@media (max-width: 600px) {





  .quiz-card {


    width: 92vw;


    height: auto;


    min-height: 480px;


    padding-bottom: 1rem;


  }





  .quiz-front,


  .quiz-back {


    padding: 1.5rem;


  }





  .quiz-image {


    max-width: 140px;


    margin-bottom: 1rem;


  }





  /* Buttons größer & besser antippbar */


  .quiz-buttons {


    grid-template-columns: 1fr;


    gap: 1rem;


    margin-top: 1.5rem;


  }





  .quiz-buttons button {


    width: 100%;


    min-height: 56px;


    font-size: 1.05rem;


    border-radius: 14px;


    padding: 1rem 1.25rem;


  }





  #next-question {


    width: 100%;


    min-height: 56px;


    font-size: 1.05rem;


    border-radius: 14px;


    margin-top: 1.5rem;


  }





  .quiz-front h3,


  .quiz-back h3 {


    font-size: 1.25rem;


  }





  .quiz-front p,


  .quiz-back p {


    font-size: 1rem;


    padding: 3rem;


  }


}

.quiz-explanation {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  text-align: center;
  padding: 0 0.5rem;
}
