/* Custom styles for typing test */

/* Character highlighting */
.char {
  transition: all 0.1s ease;
}

.char.correct {
  color: #10b981;
  background-color: #d1fae5;
}

.char.incorrect {
  color: #ef4444;
  background-color: #fee2e2;
}

.char.current {
  background-color: #dbeafe;
  border-bottom: 2px solid #3b82f6;
}

/* Smooth animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Card hover effects */
.lesson-card {
  transition: all 0.3s ease;
}

.lesson-card:hover:not(.opacity-60) {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Input focus styling */
input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Pulse animation for timer */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive typography */
@media (max-width: 768px) {
  .char {
    font-size: 0.9rem;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Button ripple effect */
button {
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::after {
  width: 300px;
  height: 300px;
}
