/* ===========================================
   🎨 Schnitzeljagd Styles – abgestimmt auf Inspiro Premium Theme
   =========================================== */

/* 💡 Grundlayout */
body,
#quiz-container {
  font-family: "Open Sans", "Helvetica Neue", sans-serif;
  color: #333;
  background-color: #fff;
}

/* 📦 Container */
#quiz-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 🖼️ Quiz-Bild */
.quiz-image {
  margin: 0;
  padding: 0;
  text-align: center;
}
.quiz-image img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

/* 🏆 Punktestand */
.quiz-score {
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  margin: 24px auto 16px;
  color: #333;
}

/* ❓ Rätsel-Frage */
#quiz-container h3 {
  margin-top: 30px;
  font-size: 1.6rem;
  font-weight: normal;
  color: #222;
  text-align: justify;
  line-height: 1.6;
}

/* ✏️ Eingabe */
#answer-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

/* 💬 Feedback */
#feedback {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
  min-height: 1.2em;
  position: relative;
  z-index: 10;
}

/* 🔘 Standard Buttons */
#submit-btn,
#hint-btn,
#restart-btn,
#skip-btn,
.geo-btn,
#start-quiz-btn {
  display: inline-block;
  padding: 12px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background-color: #d6a83b;
  color: #fff;
  cursor: pointer;
  margin: 8px 8px 8px 0;
  transition: background 0.2s;
}
#submit-btn:hover,
#hint-btn:hover,
#restart-btn:hover,
#skip-btn:hover,
.geo-btn:hover,
#start-quiz-btn:hover {
  background-color: #c2942f;
}

/* 💡 Tipp */
#hint-popup {
  display: none;
  background-color: #fff8e1;
  border-left: 4px solid #d6a83b;
  margin: 12px 0;
  padding: 12px;
  border-radius: 6px;
}
#hint-popup.show {
  display: block;
}

/* 📊 Fortschrittsbalken */
.quiz-progress {
  margin: 28px 0 10px;
  font-size: 1.1rem;
  text-align: center;
  color: #555;
}
.quiz-progress > div {
  width: 100%;
  height: 14px;
  border-radius: 8px;
  background: #eee;
  margin-top: 6px;
  overflow: hidden;
}
.quiz-progress > div > div {
  height: 100%;
  background: #d6a83b;
  transition: width 0.8s ease-in-out;
}

/* 🏁 Quiz-Ende */
#quiz-container h2 {
  text-align: center;
  color: #333;
  font-size: 1.8rem;
  margin-top: 40px;
}

/* 📱 Mobile Optimierung */
@media (max-width: 600px) {
  #quiz-container {
    padding: 20px 12px;
  }
  #submit-btn,
  #hint-btn,
  #restart-btn,
  #skip-btn,
  .geo-btn,
  #start-quiz-btn {
    width: 100%;
    margin-bottom: 12px;
  }
  .quiz-score {
    font-size: 1.4rem;
  }
  #quiz-container h3 {
    font-size: 1.4rem;
  }
}

/* ➕ Button-Grid (4 quadratische Buttons) */
.button-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.quiz-button {
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.3s;
}
.quiz-button:hover {
  background: #eaeaea;
}
@media (max-width: 600px) {
  .button-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 🏛️ Popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-box {
  background: #fff;
  padding: 20px;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 15px;
  text-align: center;
}
/* ✅ SCHWIERIGKEITSWAHL – FINAL STYLE angepasst an die Spiel-Buttons */

/* Container */
#quiz-container .difficulty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
}

/* Buttons – jetzt im Stil der Standardbuttons */
#quiz-container .difficulty-container .difficulty-btn {
  display: block;
  width: 90%;
  max-width: 300px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background-color: #d6a83b;   /* gleiche Farbe wie andere Buttons */
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}
#quiz-container .difficulty-container .difficulty-btn:hover {
  background-color: #c2942f;  /* Hover-Farbe wie andere Buttons */
}
/* 🎯 Verbesserte Schwierigkeitsanzeige mit Animation */
/* 🎯 Zierlicher Schwierigkeitsbalken mit Marker nach unten */
/* 🎯 Zierlicher Schwierigkeitsbalken mit Marker direkt unter dem Balken */
/* 🎯 Balken näher an den Button */
#quiz-container .difficulty-meter {
  position: relative;
  width: 90%;
  max-width: 300px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    #7ed957 0%,
    #4caf50 35%,
    #ffb347 65%,
    #ff4b2b 100%
  );
  margin-top: 5px; /* ✅ jetzt dichter unter dem Button */
  margin-bottom: 10px;
  box-shadow: inset 0 0 3px rgba(0,0,0,0.2);
}

/* 🔻 Marker knapp über dem Balken */
#quiz-container .difficulty-marker {
  position: absolute;
  top: 5px; /* leicht über der Skala */
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid #ffd700;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
  z-index: 10;
  transform: translateX(-25px) scale(0.8);
  opacity: 0;
  animation: markerEnter 0.6s ease-out forwards;
}

/* 🎯 Label direkt näher an der Skala */
#quiz-container .difficulty-label {
  position: absolute;
  top: 14px; /* ✅ knapp unter der Skala */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 4px;
  border-radius: 4px;
  box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

  /* Animation */
  transform: translateX(-25px) scale(0.8);
  opacity: 0;
  animation: markerEnter 0.6s ease-out forwards;
}

@keyframes markerEnter {
  0%   { transform: translateX(-25px) scale(0.8); opacity: 0; }
  70%  { transform: translateX(3px) scale(1.05); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

  /* Animation */
  transform: translateX(-25px) scale(0.8);
  opacity: 0;
  animation: markerEnter 0.6s ease-out forwards;
}

@keyframes markerEnter {
  0%   { transform: translateX(-25px) scale(0.8); opacity: 0; }
  70%  { transform: translateX(3px) scale(1.05); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}


  /* Animation */
  transform: translateX(-25px) scale(0.8);
  opacity: 0;
  animation: markerEnter 0.6s ease-out forwards;
}

@keyframes markerEnter {
  0%   { transform: translateX(-25px) scale(0.8); opacity: 0; }
  70%  { transform: translateX(3px) scale(1.05); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

  /* Animiertes Reinschwingen */
  transform: translateX(-25px) scale(0.8);
  opacity: 0;
  animation: markerEnter 0.6s ease-out forwards;
}

/* 🎞️ Keyframes für weiches Einblenden */
@keyframes markerEnter {
  0%   { transform: translateX(-25px) scale(0.8); opacity: 0; }
  70%  { transform: translateX(3px) scale(1.05); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}


@keyframes markerEnter {
  0% { transform: translateX(-30px) scale(0.8); opacity: 0; }
  70% { transform: translateX(5px) scale(1.05); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}



/* Mobile Optimierung */
@media (max-width: 600px) {
  #quiz-container .difficulty-container .difficulty-btn {
    width: 95%;
    font-size: 1.05rem;
    padding: 14px;
  }
}
/* ✅ Fix für die unteren vier Action-Buttons */
.quiz-button.image-button {
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  width: 100%;
  max-width: 140px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  text-transform: uppercase;
}

.quiz-button.image-button:hover {
  background: #eee;
}

.quiz-button.image-button img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 8px;
}

.quiz-button.image-button span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

/* ✅ Grid Layout für die Buttons */
.quiz-button-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .quiz-button-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  #quiz-container .difficulty-label {
    font-size: 0.65rem;       /* kompakter Text */
    top: 18px;                /* nahe an der Skala */
    padding: 3px 5px;
    max-width: none;          /* keine Begrenzung, Text darf breit sein */
    white-space: nowrap;      /* ✅ verhindert Umbruch */
    background: rgba(255,255,255,0.85);
    border-radius: 4px;
  }
}
