
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

@layer base {
  :root {
    --background: 0 0% 98%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 210 100% 50%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --radius: 0.8rem;

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  body {
    @apply bg-background text-foreground font-normal overflow-x-hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

@layer components {
  .card-hover {
    @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
  }
  
  .button-primary {
    @apply bg-quiz-light-blue text-white font-medium px-6 py-3 rounded-lg shadow-sm 
    transition-all duration-300 hover:shadow-md hover:bg-opacity-90 active:bg-opacity-100
    active:scale-[0.98] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50;
  }
  
  .button-secondary {
    @apply bg-secondary text-primary font-medium px-6 py-3 rounded-lg shadow-sm 
    transition-all duration-300 hover:shadow-md hover:bg-opacity-90 active:bg-opacity-100
    active:scale-[0.98] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50;
  }
  
  .category-chip {
    @apply inline-block text-xs font-medium py-1 px-3 rounded-full bg-secondary text-primary 
    shadow-sm transition-all duration-300;
  }
  
  .option-button {
    @apply bg-white border border-border rounded-lg px-6 py-4 text-left w-full flex items-center
    transition-all duration-300 hover:bg-secondary hover:border-primary/30 shadow-sm
    focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-30;
  }
  
  .option-button.selected {
    @apply bg-primary/10 border-primary/50;
  }
  
  .option-button.correct {
    @apply bg-quiz-green/10 border-quiz-green text-quiz-green;
  }
  
  .option-button.incorrect {
    @apply bg-quiz-coral/10 border-quiz-coral text-quiz-coral;
  }
}

/* Smooth page transitions */
.page-transition-enter {
  opacity: 0;
  transform: translateY(10px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0px);
  transition: opacity 400ms, transform 400ms;
}

.page-transition-exit {
  opacity: 1;
  transform: translateY(0px);
}

.page-transition-exit-active {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms, transform 400ms;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}
