/* Robuuste, extreem duidelijke en intuïtieve styling voor PeriodiekeQuiz */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700;800&display=swap');

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  color: #0f172a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* Witte centrale kaart */
.quiz-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 28px;
  padding: 28px 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2);
  margin: 0 auto;
  position: relative;
  text-align: center;
}

/* Bovenbalk: Ronde en Score */
.meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #f1f5f9;
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.score-badge {
  background: #059669;
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* De Vraag */
.question-prompt {
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* Doel-element: Grote, kristalheldere badge */
.question-target-badge {
  display: inline-block;
  font-size: 34px;
  font-weight: 900;
  color: #0284c7;
  background: #e0f2fe;
  padding: 8px 24px;
  border-radius: 18px;
  border: 2px solid #bae6fd;
  margin: 6px 0 14px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

/* Instructie hint */
.input-hint-text {
  font-size: 13px;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* De container waarin de vakjes en de input leven */
.letter-stage {
  position: relative;
  width: 100%;
  min-height: 68px;
  margin: 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Letters container: ALTIJD op 1 enkele lijn */
#letterContainer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap !important;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 2px;
}

.letter-box {
  border-radius: 12px;
  background: #f8fafc;
  border: 2.5px solid #cbd5e1;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  user-select: none;
  flex-shrink: 0;
}

/* Actief vakje */
.letter-box.active-cursor {
  border-color: #0284c7 !important;
  background: #f0f9ff !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3) !important;
  transform: translateY(-2px);
}

.letter-box.active-cursor::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 50%;
  height: 3px;
  background-color: #0284c7;
  border-radius: 2px;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.letter-box.correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #047857 !important;
}

.letter-box.wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

/* Feedback banner */
.feedback-banner {
  font-size: 15px;
  font-weight: 800;
  min-height: 28px;
  margin: 6px 0 14px;
}

/* Hulpknoppen mobiel */
.mobile-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.action-chip {
  background: #f1f5f9;
  color: #1e293b;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  user-select: none;
}

.action-chip:hover {
  background: #e2e8f0;
}

.action-chip:active {
  background: #cbd5e1;
  transform: scale(0.96);
}

/* Knoppen algemeen */
.game-btn {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  pointer-events: auto !important;
}

.game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.game-btn:active {
  transform: scale(0.98);
}

.game-btn.secondary {
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
  border: 1px solid #e2e8f0;
}

.game-btn.secondary:hover {
  background: #e2e8f0;
}

/* Verborgen input: ALLEEN boven de letterboxen, nooit over de knoppen */
.hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 16px;
}

@media screen and (max-width: 480px) {
  .quiz-card {
    padding: 20px 14px;
    border-radius: 20px;
  }
  .question-target-badge {
    font-size: 28px;
    padding: 6px 18px;
  }
  .action-chip {
    padding: 10px 16px;
    font-size: 13px;
  }
}
