/* Custom Base & Game Styles */
html, body {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Category Card Styling */
.category-card {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.category-card:hover {
  transform: translateY(-3px);
}
.category-card:active {
  transform: scale(0.96);
}

/* Ambient glow subtle pulsing */
@keyframes ambientFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.08);
  }
}

.ambient-glow {
  animation: ambientFloat 14s ease-in-out infinite alternate;
}

/* Micro-animations */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-pop-in {
  animation: popIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes bounceShort {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-bounce-short {
  animation: bounceShort 1.5s ease-in-out infinite;
}

/* Shaking animation on wrong answer */
@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.animate-shake {
  animation: shakeAnim 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Green pulse on correct answer */
@keyframes correctGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.animate-correct {
  animation: correctGlow 0.8s ease-out;
  border-color: #10b981 !important;
}

/* Pulse on Timer critical */
.timer-critical {
  animation: pulseCrit 0.5s infinite alternate;
  color: #ef4444 !important;
}

@keyframes pulseCrit {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

/* Focus and input styling */
input::placeholder {
  color: #64748b;
  font-weight: 500;
}