/* Custom styles for the educational website */

/* Bengali font support */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Noto Sans Bengali", sans-serif;
}

/* Custom gradient classes */
.purple-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blue-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.green-gradient {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.orange-gradient {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.indigo-gradient {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Animation classes */
.animate-bounce-slow {
  animation: bounce 2s infinite;
}

.animate-pulse-slow {
  animation: pulse 3s infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Loading spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Button hover effects */
.btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card hover effects */
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive text */
@media (max-width: 640px) {
  .text-responsive {
    font-size: 0.875rem;
  }
}

/* Custom focus styles */
.focus-ring:focus {
  outline: none;
  ring: 2px;
  ring-color: #3b82f6;
  ring-offset: 2px;
}

/* Smooth transitions */
.transition-all {
  transition: all 0.3s ease;
}

/* Custom shadows */
.shadow-custom {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.shadow-custom-lg {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Quiz specific styles */
.question-card {
  border-left: 4px solid #3b82f6;
}

.answer-option:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.answer-option.selected {
  background-color: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

/* Timer styles */
.timer-warning {
  color: #f59e0b;
}

.timer-danger {
  color: #ef4444;
  animation: pulse 1s infinite;
}

/* Progress bar animation */
.progress-bar {
  transition: width 0.5s ease-in-out;
}

/* Modal styles */
.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* Leaderboard styles */
.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
}

.rank-2 {
  background: linear-gradient(135deg, #c0c0c0, #e5e7eb);
}

.rank-3 {
  background: linear-gradient(135deg, #cd7f32, #f59e0b);
}

/* Navigation styles */
.nav-item.active {
  color: #3b82f6;
  background-color: #dbeafe;
}

/* Form styles */
.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Error and success messages */
.alert-error {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.alert-success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    background-color: #1f2937;
    color: #f9fafb;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .high-contrast {
    border: 2px solid;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
