/* =====================================================================
 *  Quiz — modulspezifische Styles (auf shared/style.css)
 *  CI: Life Radio Clean Light. Gelb sparsam, schwarzer Text auf Gelb.
 * ===================================================================== */

/* Host-Screen darf breiter werden — projizierbar. */
.lr-app--wide { max-width: 1200px; }

/* ===================================================================
   Lobby (Host)
   =================================================================== */
.host-lobby { text-align: center; }

.host-code-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lr-text-soft);
  margin-top: 14px;
}
.host-code {
  font-size: clamp(3rem, 12vw, 6.5rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  margin: 4px 0 18px;
  font-family: ui-monospace, "Menlo", "Consolas", monospace;
  color: var(--lr-text);
  background: var(--lr-yellow);
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--lr-radius);
}

.host-players-counter {
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--lr-text-soft);
}
.host-players-counter span { color: var(--lr-text); font-size: 1.1em; }

.host-players {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 auto 20px;
  max-width: 700px;
}
.host-player {
  background: var(--lr-bg-alt);
  padding: 12px 16px;
  border-radius: var(--lr-radius-sm);
  border: 1.5px solid var(--lr-line);
  font-weight: 600;
  text-align: center;
}
.host-player--off {
  opacity: 0.4;
  text-decoration: line-through;
}

/* ===================================================================
   Starting Countdown
   =================================================================== */
.host-starting { text-align: center; padding: 64px 16px; }
.host-countdown {
  font-size: clamp(6rem, 22vw, 14rem);
  font-weight: 800;
  color: var(--lr-text);
  line-height: 1;
  animation: lr-countdown-pulse 1s var(--lr-ease) infinite;
}
@keyframes lr-countdown-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.94); opacity: 0.8; }
}

/* ===================================================================
   Question (Host)
   =================================================================== */
.host-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}
.host-q-index {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lr-text-soft);
  font-weight: 600;
}
.host-q-timer {
  position: relative;
  flex: 1;
  max-width: 400px;
  height: 36px;
  background: var(--lr-bg-alt);
  border-radius: 999px;
  overflow: hidden;
  border: 1.5px solid var(--lr-line);
}
.host-q-timer-bar {
  position: absolute; inset: 0;
  background: var(--lr-yellow);
  width: 100%;
  transition: width 200ms linear;
  transform-origin: left;
}
.host-q-timer-text {
  position: relative;
  text-align: center;
  line-height: 36px;
  font-weight: 700;
  color: var(--lr-text);
}

.host-q-text {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  margin: 8px 0 18px;
  line-height: 1.25;
}

.host-q-image {
  display: block;
  max-width: min(340px, 60%);
  margin: 0 auto 20px;
  border-radius: var(--lr-radius);
  box-shadow: var(--lr-shadow);
}

.host-q-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}
@media (max-width: 640px) {
  .host-q-options { grid-template-columns: 1fr; }
}
.host-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--lr-bg-alt);
  border: 2px solid var(--lr-line);
  border-radius: var(--lr-radius);
  transition: all 200ms var(--lr-ease);
  min-width: 0;             /* sonst sprengen lange Titel das Grid */
}
.host-option-letter {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lr-text);
  color: var(--lr-yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}
.host-option-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--lr-text);
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.host-option--correct {
  background: var(--lr-yellow);
  border-color: var(--lr-text);
  transform: scale(1.02);
}
.host-option--correct .host-option-letter {
  background: var(--lr-text);
  color: var(--lr-yellow);
}
.host-option--wrong {
  opacity: 0.35;
}

.host-q-answered {
  text-align: center;
  color: var(--lr-text-soft);
  font-weight: 600;
}
.host-q-answered span { color: var(--lr-text); }

/* ===================================================================
   Reveal & Leaderboard
   =================================================================== */
.host-reveal-correct {
  background: var(--lr-yellow);
  color: var(--lr-text);
  padding: 12px 20px;
  border-radius: var(--lr-radius);
  font-weight: 700;
  margin: 0 0 18px;
  display: inline-block;
}

.host-leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.host-leaderboard li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--lr-bg-alt);
  border-radius: var(--lr-radius-sm);
}
.host-leaderboard li > span:first-child {
  font-weight: 700;
  color: var(--lr-text-soft);
}
.host-leaderboard li strong { font-weight: 700; }
.host-leaderboard li em {
  font-style: normal;
  font-weight: 700;
  color: var(--lr-text);
}
.host-leaderboard li:first-child {
  background: var(--lr-yellow);
}

/* ===================================================================
   Podium (Finished)
   =================================================================== */
.host-finished { text-align: center; }
.host-podium {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.host-podium-place {
  background: var(--lr-bg-alt);
  border-radius: var(--lr-radius);
  padding: 20px 12px;
  text-align: center;
  border: 2px solid var(--lr-line);
}
.host-podium-place--1 {
  background: var(--lr-yellow);
  border-color: var(--lr-text);
  order: 2;
  padding-top: 32px;
  padding-bottom: 32px;
}
.host-podium-place--2 { order: 1; }
.host-podium-place--3 { order: 3; }
.host-podium-medal { font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.host-podium-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.host-podium-pts { color: var(--lr-text-soft); font-size: 0.9rem; }

/* ===================================================================
   Play-Screen (Spieler-Handy)
   =================================================================== */
.play-app { max-width: 480px; }

.play-login form { display: grid; gap: 14px; }
.play-login input.lr-input { font-size: 1.1rem; padding: 16px; text-align: center; }
.play-login input#play-code {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: ui-monospace, monospace;
  font-weight: 700;
}

.play-waiting { text-align: center; }
.play-waiting__name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 16px 0 4px;
}
.play-waiting__hint { color: var(--lr-text-soft); }

.play-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--lr-text-soft);
}
.play-q-timer {
  position: relative;
  height: 8px;
  background: var(--lr-bg-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.play-q-timer-bar {
  position: absolute; inset: 0;
  background: var(--lr-yellow);
  transition: width 200ms linear;
}

.play-q-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 18px;
  line-height: 1.35;
  text-align: center;
}

.play-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
@media (max-width: 360px) {
  .play-options { grid-template-columns: 1fr; }
}
.play-option {
  min-height: 96px;
  padding: 14px;
  border: 2px solid var(--lr-line);
  border-radius: var(--lr-radius);
  background: var(--lr-bg);
  color: var(--lr-text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 150ms var(--lr-ease);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  width: 100%;
}
.play-option:active:not(:disabled) {
  transform: scale(0.97);
  background: var(--lr-yellow);
  border-color: var(--lr-text);
}
.play-option:disabled { opacity: 0.5; cursor: not-allowed; }
.play-option[data-picked="true"] {
  background: var(--lr-text);
  color: var(--lr-yellow);
  border-color: var(--lr-text);
}
.play-option-letter {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--lr-text);
  color: var(--lr-yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.play-option[data-picked="true"] .play-option-letter {
  background: var(--lr-yellow);
  color: var(--lr-text);
}
.play-option-text {
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.play-feedback { text-align: center; padding: 28px 8px; }
.play-feedback__title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.play-feedback__title--correct { color: var(--lr-success); }
.play-feedback__title--wrong   { color: var(--lr-error); }
.play-feedback__points {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 4px 0 4px;
}
.play-feedback__total { color: var(--lr-text-soft); font-size: 0.95rem; }

.play-final { text-align: center; }
.play-final__rank {
  font-size: 4rem;
  font-weight: 800;
  margin: 12px 0 4px;
  color: var(--lr-text);
}
.play-final__rank::before { content: "#"; }
.play-final__points {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--lr-text);
  margin: 0 0 4px;
}
.play-final__lbl { color: var(--lr-text-soft); font-size: 0.9rem; }
