/* ==========================================================================
   Quiz Section — Pub Quiz Night
   Ticket-Layout mit interaktiven Antwort-Kacheln
   ========================================================================== */

/* Section Wrapper */
.pub-quiz {
  padding: 0 1rem;
  margin-top: 20px;
  margin-bottom: 1.5rem;
}

/* Ticket */
.quiz-ticket {
  display: flex;
  border: 1px solid #2e2000;
  border-radius: 10px;
  overflow: hidden;
  background: #130d00;
}

/* Stub (linker Amber-Streifen) */
.quiz-ticket__stub {
  background: #c8860a;
  width: 48px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.quiz-ticket__stub::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 5px,
    #2e2000 5px,
    #2e2000 9px
  );
}

.quiz-ticket__stub-text {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a0d00;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Body */
.quiz-ticket__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Oberer Bereich — Branding */
.quiz-ticket__top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 0.875rem;
  border-bottom: 1px dashed rgba(200, 134, 10, 0.2);
}

.quiz-ticket__qs {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 900;
  color: #c8860a;
  line-height: 1;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.quiz-ticket__qs span {
  display: inline-block;
  animation: quiz-qs-think 1.8s ease-in-out infinite;
}

.quiz-ticket__qs span:nth-child(1) { animation-delay: 0s; }
.quiz-ticket__qs span:nth-child(2) { animation-delay: 0.3s; }
.quiz-ticket__qs span:nth-child(3) { animation-delay: 0.6s; }

@keyframes quiz-qs-think {
  0%, 100% { opacity: 0.3; transform: translateY(0)    scale(1); }
  40%       { opacity: 1;   transform: translateY(-3px) scale(1.1); }
}

.quiz-ticket__branding {
  flex: 1;
  min-width: 0;
}

.quiz-ticket__title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 800;
  color: #f5e8c8;
  line-height: 1.15;
  margin-bottom: 3px;
}

.quiz-ticket__when {
  font-size: 0.5625rem;
  color: rgba(200, 160, 80, 0.6);
  letter-spacing: 0.04em;
}

/* Unterer Bereich — Frage & Antworten */
.quiz-ticket__bottom {
  padding: 0.75rem 1rem 1rem;
}

.quiz-ticket__q-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 134, 10, 0.4);
  margin-bottom: 0.375rem;
}

/* Tap-Hint mit pulsierendem Punkt */
.quiz-ticket__tap-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(200, 134, 10, 0.5);
  text-transform: uppercase;
}

.quiz-ticket__tap-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c8860a;
  flex-shrink: 0;
  animation: quiz-tap-pulse 1.4s ease-in-out infinite;
}

@keyframes quiz-tap-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.4); }
}

.quiz-ticket__question {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: #f5e8c8;
  line-height: 1.35;
  margin-bottom: 0.625rem;
}

/* Antwort-Grid */
.quiz-ticket__answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 0.75rem;
}

.quiz-ticket__answer {
  background: rgba(200, 134, 10, 0.06);
  border: 1px solid rgba(200, 134, 10, 0.18);
  border-radius: 6px;
  padding: 7px 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  transition: background var(--t-fast), border-color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.quiz-ticket__answer:hover,
.quiz-ticket__answer:active {
  background: rgba(200, 134, 10, 0.15);
  border-color: rgba(200, 134, 10, 0.45);
}

/* Entrance-Pulse via Intersection Observer */
@keyframes quiz-answer-pulse {
  0%   { transform: scale(1);    border-color: rgba(200,134,10,0.18); background: rgba(200,134,10,0.06); }
  40%  { transform: scale(1.04); border-color: rgba(200,134,10,0.6);  background: rgba(200,134,10,0.18); }
  100% { transform: scale(1);    border-color: rgba(200,134,10,0.18); background: rgba(200,134,10,0.06); }
}

.quiz-ticket__answer--pulse {
  animation: quiz-answer-pulse 0.5s ease-in-out;
}

/* Zustände nach Klick */
.quiz-ticket__answer--correct {
  background: rgba(46, 120, 30, 0.22) !important;
  border-color: rgba(80, 180, 50, 0.5) !important;
  cursor: default;
}

.quiz-ticket__answer--wrong {
  background: rgba(160, 30, 30, 0.18) !important;
  border-color: rgba(200, 60, 60, 0.38) !important;
  cursor: default;
  opacity: 0.55;
}

.quiz-ticket__answer--idle {
  cursor: default;
  opacity: 0.45;
}

.quiz-ticket__answer-letter {
  font-family: var(--font-heading);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(200, 134, 10, 0.7);
  flex-shrink: 0;
  width: 14px;
  text-align: center;
  margin-top: 1px;
}

.quiz-ticket__answer--correct .quiz-ticket__answer-letter {
  color: #6de050;
}

.quiz-ticket__answer--wrong .quiz-ticket__answer-letter {
  color: #e05050;
}

.quiz-ticket__answer-text {
  font-size: 0.625rem;
  font-weight: 600;
  color: rgba(245, 232, 200, 0.75);
  line-height: 1.3;
}

.quiz-ticket__answer--correct .quiz-ticket__answer-text {
  color: #c8f0b0;
}

/* CTA — erst nach Antwort sichtbar */
.quiz-ticket__cta {
  display: none;
  border-top: 1px dashed rgba(200, 134, 10, 0.2);
  padding-top: 0.625rem;
  margin-top: 0.25rem;
}

.quiz-ticket__cta--visible {
  display: block;
}

.quiz-ticket__cta-hint {
  font-size: 0.5625rem;
  color: rgba(200, 160, 80, 0.55);
  line-height: 1.5;
  margin-bottom: 0.625rem;
}

.quiz-ticket__cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-ticket__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #c8860a;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast);
}

.quiz-ticket__btn:hover {
  background: #b07608;
}

.quiz-ticket__btn svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.quiz-ticket__note {
  font-size: 0.5rem;
  color: rgba(200, 134, 10, 0.35);
}

/* Reset-Button */
.quiz-ticket__reset {
  display: none;
  margin-top: 0.5rem;
  width: 100%;
  background: none;
  border: 1px solid rgba(200, 134, 10, 0.3);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: rgba(200, 134, 10, 0.55);
  cursor: pointer;
  padding: 7px 16px;
  text-align: center;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.quiz-ticket__reset:hover {
  border-color: rgba(200, 134, 10, 0.6);
  color: rgba(200, 134, 10, 0.85);
}

.quiz-ticket__reset--visible {
  display: block;
}

/* ------------------------------------------------------------------
   Progress Dots
------------------------------------------------------------------ */

.quiz-ticket__progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.quiz-ticket__prog-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(200, 134, 10, 0.25);
  background: rgba(200, 134, 10, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.5625rem;
  font-weight: 800;
  color: rgba(200, 134, 10, 0.4);
  flex-shrink: 0;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.quiz-ticket__prog-dot--active {
  border-color: rgba(200, 134, 10, 0.7);
  background: rgba(200, 134, 10, 0.15);
  color: #c8860a;
}

.quiz-ticket__prog-dot--correct {
  border-color: rgba(80, 180, 50, 0.6);
  background: rgba(46, 120, 30, 0.25);
  color: #6de050;
}

.quiz-ticket__prog-dot--wrong {
  border-color: rgba(200, 60, 60, 0.5);
  background: rgba(160, 30, 30, 0.22);
  color: #e06060;
}

.quiz-ticket__prog-label {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200, 134, 10, 0.35);
  margin-left: 4px;
}

/* ------------------------------------------------------------------
   Weiter-Button
------------------------------------------------------------------ */

.quiz-ticket__next {
  margin-top: 0.625rem;
}

.quiz-ticket__next-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: rgba(200, 134, 10, 0.12);
  border: 1px solid rgba(200, 134, 10, 0.45);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c8860a;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.quiz-ticket__next-btn:hover {
  background: rgba(200, 134, 10, 0.2);
  border-color: rgba(200, 134, 10, 0.75);
}

.quiz-ticket__next-btn svg {
  width: 10px;
  height: 10px;
  stroke: #c8860a;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------
   Ergebnis-Screen
------------------------------------------------------------------ */

.quiz-ticket__results {
  padding-top: 0.25rem;
}

.quiz-ticket__score {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: #c8860a;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.quiz-ticket__score span {
  font-size: 1.25rem;
  opacity: 0.6;
}

.quiz-ticket__score-label {
  font-family: var(--font-heading);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200, 134, 10, 0.5);
  margin-bottom: 0.625rem;
}

.quiz-ticket__score-msg {
  font-size: 0.625rem;
  color: rgba(200, 160, 80, 0.6);
  line-height: 1.5;
  margin-bottom: 0.875rem;
}

/* Loading Fallback */
.quiz-ticket__loading {
  font-size: 0.625rem;
  color: rgba(200, 134, 10, 0.35);
  padding: 0.5rem 0;
  letter-spacing: 0.06em;
}
