@charset "utf-8";
/* CSS Document */

:root {
  --mm-red: #df0000;
  --mm-dark: #111111;
  --mm-grey: #f5f5f5;
  --mm-border: #dddddd;
  --mm-text: #222222;
  --mm-correct: #1a9c4b;
  --mm-wrong: #c92323;
  --mm-radius: 0.5rem;

  /* Badge-Farben (metallischer angehaucht) */
  --badge-platinum: #e5e4e2; /* sehr helles, leicht metallisches Grau */
  --badge-gold: #d4af37;
  --badge-silver: #c0c0c0;
  --badge-bronze: #cd7f32;
}

p#scoreText {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

div#scoreText {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Während des Ladens: nur Loader anzeigen, #page-content verstecken */
html.quiz-loading #page-content {
  display: none;
}

.quiz-loader {
  display: none;
  text-align: center;
  padding: 40px 16px;
}

/* Loader nur im Loading-Status anzeigen */
html.quiz-loading .quiz-loader {
  display: block;
}

/* Spinner-Styles */
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid #e0e0e0;
  border-top-color: var(--mm-red);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Badge-Styles für Platin / Gold / Silber / Bronze */

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
}

/* Platin: heller, leicht bläulicher Metall-Look */
.badge--platinum {
  background: linear-gradient(135deg, #f7f7f7, #e5e4e2);
  color: #333333;
}

/* Gold */
.badge--gold {
  background: linear-gradient(135deg, #ffe680, #d4af37);
  color: #4a3b00;
}

/* Silber */
.badge--silver {
  background: linear-gradient(135deg, #f5f5f5, #c0c0c0);
  color: #333333;
}

/* Bronze */
.badge--bronze {
  background: linear-gradient(135deg, #ffe0c2, #cd7f32);
  color: #4a2b00;
}

.stats-bar {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e5e5;
  display: flex;
}

.stats-bar-correct {
  height: 100%;
  background: var(--mm-correct);
}

.stats-bar-wrong {
  height: 100%;
  background: #d0d0d0;
}

.stats-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-top: 4px;
  color: #555;
}

/* Grundlayout */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Header / Titel */

.subtitle {
  margin: 0 0 1rem;
  color: #555;
  font-size: 0.95rem;
}

/* Quiz-Card */

#quizContainer,
#resultContainer {
  background: #ffffff;
  border-radius: var(--mm-radius);
  border: 1px solid var(--mm-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding: 1rem;
}

/* Fortschritt */

#progress {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 8px;
}

/* Frage */

#questionText {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Antworten */

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.answers button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: var(--mm-radius);
  border: 1px solid var(--mm-border);
  background: #ffffff;
  color: var(--mm-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
}

.answers button:hover:not(:disabled) {
  border-color: var(--mm-red);
  background: #fff5f5;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.answers button:active:not(:disabled) {
  transform: translateY(1px);
}

.answers button:disabled {
  cursor: default;
  opacity: 0.9;
}

/* Weiter-Button */

#nextBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  background: var(--mm-red);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
  letter-spacing: 0.05em;
}

#nextBtn:hover:not(:disabled) {
  background: #c80000;
  box-shadow: 0 4px 10px rgba(223, 0, 0, 0.3);
}

#nextBtn:active:not(:disabled) {
  transform: translateY(1px);
}

#nextBtn:disabled {
  background: #cccccc;
  cursor: default;
  box-shadow: none;
}

/* Feedback-Bereich (Statistik / richtig / falsch)
   Standard jetzt neutral, nicht mehr rot.
*/

#feedback {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--mm-radius);
  background: var(--mm-grey);
  border-left: 4px solid #cccccc;
  font-size: 0.9rem;
}

#feedback p {
  margin: 4px 0;
}

/* Klassen für richtig/falsch */
#feedback.feedback-correct {
  border-left-color: var(--mm-correct);
}

#feedback.feedback-wrong {
  border-left-color: var(--mm-wrong);
}

/* Ergebnisbereich */

#resultContainer h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.3rem;
}

#scoreText p {
  margin: 4px 0 0;
}

/* Score-Kreis & Ranking */

#scoreCircleContainer {
  display: flex;
  justify-content: center;
  margin: 24px 0 16px;
}

#rankingText {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #555;
}

/* Äußerer Kreis mit Fortschrittsanzeige */
.score-circle {
  --percent: 0;
  --circle-color: #007bff; /* Fallback, wird im JS überschrieben */
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background:
    conic-gradient(
      var(--circle-color) calc(var(--percent) * 1turn),
      #e0e0e0 0
    );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  position: relative;
}

/* Kleiner weißer Rand innen, wirkt cleaner */
.score-circle::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #ffffff;
}

/* Innerer Kreis */
.score-circle-inner {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, #ffffff, #f3f3f3 40%, #e0e0e0 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8),
              inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Score-Text */
.score-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mm-dark);
}

/* Weiche Einblend-Animation */
.score-circle {
  animation: fillCircle 1s ease-out forwards, fadeInCircle 0.5s ease-out;
}

@keyframes fillCircle {
  from { --percent: 0; }
  to   { /* Zielwert kommt aus dem inline style */ }
}

@keyframes fadeInCircle {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* Aufklappbare Detailansicht */

.answer-details {
  margin-top: 20px;
}

.answer-details-summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 8px 10px;
  border-radius: var(--mm-radius);
  background: #fafafa;
  border: 1px solid var(--mm-border);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.answer-details-summary:hover {
  background: #f0f0f0;
  border-color: #cccccc;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.answer-details-summary::-webkit-details-marker {
  display: none;
}

.answer-details-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.2s ease;
}

.answer-details[open] .answer-details-summary::before {
  content: "▾ ";
}

.answer-details-content {
  margin-top: 10px;
}

/* Utility */

.hidden {
  display: none;
}

/* Mobile Optimierung */

@media (max-width: 480px) {

  #quizContainer,
  #resultContainer {
    padding: 16px 14px 18px;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* Layout: Quiz + Werbeblock nebeneinander auf Desktop */

.quiz-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.quiz-column {
  flex: 1 1 0;
}

.ad-column {
  flex: 1 1 0;
}

/* Promo-Card (komplette Box klickbar) */

.ad-card {
  display: block;
  background: #ffffff;
  border-radius: var(--mm-radius);
  border: 1px solid #e3e3e3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  color: var(--mm-text);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.08s ease;
}

.ad-card:hover {
  transform: translateY(-1px);
}

/* Bild oben */

.ad-image-wrapper {
  width: 100%;
  overflow: hidden;
}

.ad-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Textbereich unten */

.ad-txt-box {
  padding: 1.5rem 1.5rem 1.75rem;
  background: #ffffff;
}

.ad-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #000;
}

.ad-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #000;
  font-family: 'MMHeadlinePro', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ad-copy {
    margin: 0px;
    word-break: normal;
    color: rgb(0, 0, 0);
    font-size: 1rem;
    line-height: calc(1.5);
    font-family: NotoSansDisplay, NotoSansDisplay-fallback, Arial, sans-serif;
    font-weight: 400;
    letter-spacing: normal;
    white-space: normal;
    overflow: hidden;
    max-height: calc(6rem);
    -webkit-line-clamp: 4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
	margin-bottom: 1rem;
}

/* CTA-Reihe */

.ad-cta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* De’Longhi-CTA: weiße Pille mit schwarzer Outline, Pfeil links */

.ad-button {
box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
	text-align: center;
    min-height: 44px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: none;
    cursor: pointer;
    border-width: 2px;
    border-style: solid;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
    color: rgb(0, 0, 0);
    font-weight: bold;
    text-decoration: none;
    background: rgb(255, 255, 255);
    border-radius: 8px;
    border: 2px solid rgb(0, 0, 0);
    padding: 8px 16px 8px 8px;
    white-space: nowrap;
}

/* Outline-Variante wie im Beispiel */

.ad-button--outline {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.ad-button--outline .ad-button-icon svg {
  display: block;
}

.ad-button--outline .ad-button-icon path {
  fill: #000000;
}

.ad-card:hover .ad-button--outline {
  background: #f5f5f5;
}

.ad-card:active .ad-button--outline {
  transform: translateY(1px);
}

/* Desktop: 2-Spalten-Layout (50/50) */

@media (min-width: 960px) {
  .quiz-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .quiz-column,
  .ad-column {
    flex: 0 0 50%;
  }

  .ad-card {
    max-width: 80%;
  }
}

.quiz-pause-overlay {
  display: none;
  text-align: center;
  padding: 16px 12px;
  font-size: 0.95rem;
  color: #222;
  background: #ffffff;
  border-radius: var(--mm-radius);
  border: 1px solid var(--mm-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* Sichtbar, wenn JS .hidden entfernt */
.quiz-pause-overlay:not(.hidden) {
  display: block;
}

/* Optional: kleine Fade-Animation für das Ausblenden des Quiz */
.quiz-fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hidden {
  display: none !important;
}

/* Nur auf Mobile relevant – auf Desktop nicht verwenden */
@media (min-width: 769px) {
  .quiz-pause-overlay {
    display: none !important;
  }
}