/* Custom Styles for "تحدي المعرفة" Arabic Quiz Game */

@layer utilities {
  .bg-size-200 {
    background-size: 200% 200%;
  }
  .bg-pos-100 {
    background-position: 100% 100%;
  }
  .active\:scale-98:active {
    transform: scale(0.98);
  }
}

/* Base resets & touch friendly defaults */
* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* Mascot subtle gentle bounce */
@keyframes mascotBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.mascot-bounce {
  animation: mascotBounce 3s ease-in-out infinite;
}

/* Subject cards hover/active treatment */
.subject-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-card:active {
  transform: scale(0.96);
}

/* Option Buttons styling */
.option-btn {
  transition: all 0.18s ease-out;
  min-height: 52px;
}

.option-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* Correct and Incorrect animation classes */
@keyframes pulseCorrect {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes shakeIncorrect {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.anim-correct {
  animation: pulseCorrect 0.3s ease-in-out;
}

.anim-wrong {
  animation: shakeIncorrect 0.4s ease-in-out;
}

/* Points highlight glow */
@keyframes glowFeedback {
  0% { transform: scale(0.97); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

#feedbackBanner:not(.hidden) {
  animation: glowFeedback 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Smooth modal transitions */
#reviewModal:not(.hidden) {
  display: flex !important;
  animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Custom scrollbar for review modal */
#reviewListContainer::-webkit-scrollbar {
  width: 6px;
}

#reviewListContainer::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 999px;
}

#reviewListContainer::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}