/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #4b5563;
  border-radius: 20px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #6b7280;
}

/* Typing specifics */
.word {
  display: flex;
  margin-right: 0.2em;
  border-bottom: 2px solid transparent;
  transition: border-bottom-color 0.2s;
}

/* Error indicator on the word level */
.word.error {
  border-bottom-color: #ca4754;
}

/* Letter states */
.letter {
  transition: color 0.1s;
}

.letter.correct {
  color: #d1d0c5;
}

.letter.incorrect {
  color: #ca4754;
}

.letter.extra {
  color: #ca4754;
  opacity: 0.7;
}

/* Caret blinking */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.caret-blink {
  animation: blink 1s step-end infinite;
}

/* Fade in utility */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Progress bar inside leaderboard */
.mini-progress-bg {
  background: rgba(255,255,255,0.05);
  height: 6px;
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.mini-progress-fill {
  background: #e2b714;
  height: 100%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(226,183,20,0.5);
}

/* Toast animation */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast-enter {
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
