@charset "UTF-8";

/* Base Resets & Mobile Safe Area Variables */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding-top: max(0.75rem, var(--sat));
  padding-bottom: max(1rem, var(--sab));
  padding-left: max(0.75rem, var(--sal));
  padding-right: max(0.75rem, var(--sar));
}

.font-jp {
  font-family: 'Noto Sans JP', sans-serif;
}

/* Fluid, Responsive Kanji Sizing */
.quiz-kanji {
  font-size: clamp(3.2rem, 14vw, 5rem);
  line-height: 1.1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Touch-Friendly Target Enhancements */
.touch-btn {
  touch-action: manipulation;
  user-select: none;
  min-height: 46px;
}

.touch-btn:active {
  transform: scale(0.97);
}

/* Input Glow */
.input-glow:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Smooth Dynamic Animations */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Mobile-Ready Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}