@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --color-primary: #EF4444;
  --color-secondary: #3B82F6;
  --color-tertiary: #FACC15;
  --surface-base: #FFFFFF;
  --surface-highlight: #FEF3C7;
  --color-success: #22C55E;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #F8FAFC;
  color: #1E293B;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Baloo 2', 'Nunito', cursive, sans-serif;
}

/* Playful KidLearn 3D button effect */
.btn-chunky {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.16);
  user-select: none;
}

.btn-chunky:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 rgba(0, 0, 0, 0.16);
}

.btn-chunky:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2);
}

/* Card interactive bounce & chunky shadow */
.card-chunky {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 5px 0 0 #E2E8F0;
  user-select: none;
}

.card-chunky:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 0 #CBD5E1;
}

.card-chunky:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 0 #CBD5E1;
}

/* Dictionary card pulse when playing */
@keyframes pulseRing {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.15);
  }
  100% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
}

.playing-pulse {
  animation: pulseRing 1.1s infinite ease-in-out;
  border-color: #3B82F6 !important;
  background-color: #EFF6FF !important;
}

/* Custom Audio Slider */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3B82F6;
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Hide scrollbar for clean tab lists */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Modal animation */
@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.animate-scale-up {
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Mobile, iPad & iOS Touch Optimizations */
button, select, [role="button"], .dict-card, .track-card, .btn-chunky {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#lesson-tabs {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

#lesson-tabs > button {
  scroll-snap-align: start;
}


