/* style.css – Spieler-Styles (kindgerecht, groß, kontrastreich) */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: "Segoe UI", "Verdana", Arial, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* Logo unten rechts (alle Spieler-Ansichten) */
.logo-corner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: clamp(64px, 12vw, 120px);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  z-index: 10;
}

.app {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

/* Screens */
.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Start-Screen */
.title {
  font-size: clamp(2.8rem, 9vw, 5rem);
  margin-bottom: 16px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.subtitle {
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  margin-bottom: 40px;
  opacity: 0.95;
}

.btn-start {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: bold;
  padding: 24px 48px;
  border: none;
  border-radius: 60px;
  background: #ffb400;
  color: #1e3c72;
  cursor: pointer;
  box-shadow: 0 8px 0 #cc8600, 0 10px 24px rgba(0,0,0,0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-start:hover {
  background: #ffc235;
}

.btn-start:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #cc8600, 0 6px 18px rgba(0,0,0,0.35);
}

.load-error {
  margin-top: 24px;
  background: #b71c1c;
  padding: 12px;
  border-radius: 12px;
  font-weight: bold;
}

/* Zufallsgenerator */
.randomizer-label {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  margin-bottom: 24px;
}

.randomizer-display {
  background: #ffffff;
  color: #1e3c72;
  border-radius: 24px;
  padding: 48px 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

.randomizer-icon {
  font-size: clamp(4rem, 16vw, 7rem);
  line-height: 1;
  margin-bottom: 16px;
  animation: pop 0.2s ease;
}

.randomizer-name {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: bold;
}

@keyframes pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Frage-Screen */
.category-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.category-icon {
  font-size: 2.2rem;
}

.category-name {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: bold;
  background: rgba(255,255,255,0.18);
  padding: 8px 18px;
  border-radius: 30px;
}

.timer-box {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: bold;
  margin-bottom: 24px;
}

.timer-box span {
  background: rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 1.4em;
}

.question-text {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: bold;
  margin-bottom: 32px;
  line-height: 1.3;
  white-space: pre-line;
}

.answer-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Antwort-Optionen (Mathe einfach, Bibel) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

.options-grid-text {
  grid-template-columns: 1fr;
}

.option-btn {
  font-size: clamp(1.3rem, 4.5vw, 1.8rem);
  font-weight: bold;
  padding: 18px 12px;
  border: none;
  border-radius: 18px;
  background: #ffffff;
  color: #1e3c72;
  cursor: pointer;
  box-shadow: 0 5px 0 #b9c4d8, 0 8px 16px rgba(0,0,0,0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.option-btn:hover {
  background: #eef3ff;
}

.option-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #b9c4d8, 0 4px 10px rgba(0,0,0,0.25);
}

/* Ziffernfeld (Mathe komplex) */
.keypad-display {
  width: 100%;
  max-width: 300px;
  font-size: 2.4rem;
  text-align: center;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: #ffffff;
  color: #1e3c72;
  font-weight: bold;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.keypad-key {
  font-size: 1.6rem;
  font-weight: bold;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: #ffffff;
  color: #1e3c72;
  cursor: pointer;
  box-shadow: 0 4px 0 #b9c4d8;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.keypad-key:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #b9c4d8;
}

.submit-btn {
  font-size: 1.6rem;
  font-weight: bold;
  padding: 16px 40px;
  border: none;
  border-radius: 40px;
  background: #34c759;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 5px 0 #1f8a3a;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.submit-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #1f8a3a;
}

/* Schätzfragen */
.estimation-slider {
  width: 100%;
  max-width: 560px;
  height: 42px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  outline: none;
}

.estimation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffb400;
  border: 3px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.estimation-slider::-moz-range-thumb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffb400;
  border: 3px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.estimation-value {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: bold;
}

.estimation-hint {
  opacity: 0.9;
  font-size: 1rem;
}

/* Ergebnis */
.result-message {
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 20px;
  padding: 20px 28px;
  border-radius: 24px;
  line-height: 1.15;
  text-shadow: 0 3px 8px rgba(0,0,0,0.35);
  animation: pop 0.4s ease;
}

.result-success {
  color: #ffffff;
  background: #16a34a;
  box-shadow: 0 8px 0 #0f6b31, 0 12px 28px rgba(0,0,0,0.35);
}

.result-failure {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 8px 0 #991b1b, 0 12px 28px rgba(0,0,0,0.35);
}

.result-answer {
  font-size: clamp(1.3rem, 4.5vw, 1.8rem);
  margin-bottom: 24px;
  background: rgba(255,255,255,0.16);
  padding: 16px;
  border-radius: 16px;
}

.result-countdown-text {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  opacity: 0.9;
}

/* Ergebnis-Detail (z.B. sort: Gegenüberstellung) */
.result-detail {
  margin-bottom: 20px;
}

/* Wahr/Falsch */
.truefalse-wrap {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.tf-btn {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: bold;
  padding: 24px 40px;
  border: none;
  border-radius: 24px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,0.25), 0 10px 20px rgba(0,0,0,0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tf-btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.25), 0 6px 14px rgba(0,0,0,0.3);
}

.tf-true {
  background: #34c759;
}

.tf-false {
  background: #ff3b30;
}

/* Sortieren */
.sort-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sort-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.sort-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: bold;
  padding: 16px 20px;
  border: none;
  border-radius: 16px;
  background: #ffffff;
  color: #1e3c72;
  cursor: pointer;
  box-shadow: 0 4px 0 #b9c4d8;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.sort-option:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #b9c4d8;
}

.sort-option.selected {
  background: #ffb400;
  color: #1e3c72;
}

.sort-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e3c72;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.sort-option-label {
  flex: 1;
  text-align: center;
}

/* Sortieren-Ergebnis */
.sort-result {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.sort-result-col {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  background: rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 16px;
}

.sort-result-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.sort-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.1);
}

.sort-result-row.correct {
  background: rgba(52, 199, 89, 0.35);
}

.sort-result-row.wrong {
  background: rgba(255, 59, 48, 0.35);
}

.sort-result-num {
  font-weight: bold;
  flex-shrink: 0;
}

.sort-result-mark {
  margin-left: auto;
  font-weight: bold;
}

@media (min-width: 600px) {
  .options-grid-text {
    grid-template-columns: repeat(2, 1fr);
  }
}