/* QuizMaster Custom Styles */

/* Loading animations */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Quiz card hover effects */
.quiz-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-card:hover {
  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);
}

/* Progress bars */
.progress-bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  height: 8px;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-container {
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

/* Badge styles */
.badge-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.badge-success {
  background: linear-gradient(45deg, #10b981, #059669);
}

.badge-warning {
  background: linear-gradient(45deg, #f59e0b, #d97706);
}

.badge-danger {
  background: linear-gradient(45deg, #ef4444, #dc2626);
}

/* Button animations */
.btn-animated {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-animated:hover::before {
  left: 100%;
}

/* Quiz question styles */
.question-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.question-option {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.question-option:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.question-option.selected {
  background: linear-gradient(145deg, #ddd6fe 0%, #e0e7ff 100%);
  border-color: #8b5cf6;
  color: #5b21b6;
}

.question-option.correct {
  background: linear-gradient(145deg, #d1fae5 0%, #dcfce7 100%);
  border-color: #10b981;
  color: #065f46;
}

.question-option.incorrect {
  background: linear-gradient(145deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  color: #991b1b;
}

/* Achievement badges */
.achievement-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(45deg, #f59e0b, #d97706);
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.25rem;
}

/* Leaderboard styles */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.leaderboard-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.leaderboard-rank {
  font-size: 1.25rem;
  font-weight: 700;
  color: #6b7280;
  margin-right: 1rem;
  min-width: 2rem;
}

.leaderboard-rank.first {
  color: #f59e0b;
}

.leaderboard-rank.second {
  color: #9ca3af;
}

.leaderboard-rank.third {
  color: #cd7c2f;
}

/* File upload area */
.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: #6366f1;
  background-color: #f8faff;
}

.upload-area.dragover {
  border-color: #4f46e5;
  background-color: #eef2ff;
}

/* Mind map styles */
.mind-map-node {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mind-map-node:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mind-map-connection {
  stroke: #8b5cf6;
  stroke-width: 2;
  fill: none;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .question-card {
    padding: 1rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .leaderboard-item {
    flex-direction: column;
    text-align: center;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .quiz-card {
    background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
  }
  
  .question-card {
    background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
    border-color: #374151;
  }
  
  .question-option {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }
}

/* Text utilities */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5a67d8 0%, #6b46c1 100%);
}