/* Main Stylesheet for MathStar */

/* Tailwind Base Styles */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

/* Custom CSS Variables */
:root {
  /* Primary: Playful Indigo / Blue */

  --primary-50:  #f0f2ff;
  --primary-100: #dfe3ff;
  --primary-200: #c2c8ff;
  --primary-300: #9fa8ff;
  --primary-400: #7a84ff;
  --primary-500: #5865ff;  /* Bright game blue */
  --primary-600: #4a54f0;
  --primary-700: #3c44d6;
  --primary-800: #2e35b8;
  --primary-900: #20279a;

  /* Secondary: Fun Golden Orange */

  --secondary-50:  #fff7e6;
  --secondary-100: #ffe8bf;
  --secondary-200: #ffd48a;
  --secondary-300: #ffbe52;
  --secondary-400: #ffaa1f;
  --secondary-500: #ff9800;  /* Energetic kid-friendly orange */
  --secondary-600: #f57c00;
  --secondary-700: #db6e00;
  --secondary-800: #b85a00;
  --secondary-900: #8f4500;
}

/* Base Styles */
body {
  margin: 0;
  line-height: inherit;
  font-family: 'Quicksand', sans-serif;
}

/* Font Classes */
.font-rounded {
  font-family: 'Quicksand', sans-serif;
}

.font-comic {
  font-family: 'Comic Neue', cursive;
}

/* Container */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Spacing Utilities */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.mx-4 {
  margin-left: 1rem;
  margin-right: 1rem;
}

.my-2 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.my-4 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.my-8 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-12 {
  margin-top: 3rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mr-3 {
  margin-right: 0.75rem;
}

.mr-4 {
  margin-right: 1rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

/* Padding Utilities */
.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.p-12 {
  padding: 3rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.px-10 {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.pb-2 {
  padding-bottom: 0.5rem;
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.space-x-1 > * + * {
  margin-left: 0.25rem;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.space-x-3 > * + * {
  margin-left: 0.75rem;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

.space-y-1 > * + * {
  margin-top: 0.25rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.col-span-3 {
  grid-column: span 3 / span 3;
}

/* Display Utilities */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

/* Position Utilities */
.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* Width/Height Utilities */
.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.w-10 {
  width: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.w-16 {
  width: 4rem;
}

.w-20 {
  width: 5rem;
}

.w-24 {
  width: 6rem;
}

.w-48 {
  width: 12rem;
}

.w-64 {
  width: 16rem;
}

.h-full {
  height: 100%;
}

.h-4 {
  height: 1rem;
}

.h-10 {
  height: 2.5rem;
}

.h-12 {
  height: 3rem;
}

.h-16 {
  height: 4rem;
}

.h-20 {
  height: 5rem;
}

.h-24 {
  height: 6rem;
}

.h-48 {
  height: 12rem;
}

.min-h-screen {
  min-height: 100vh;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-5xl {
  max-width: 64rem;
}

.max-w-6xl {
  max-width: 72rem;
}

.max-w-7xl {
  max-width: 80rem;
}

/* Typography Utilities */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-6xl {
  font-size: 3.75rem;
  line-height: 1;
}

.text-7xl {
  font-size: 4.5rem;
  line-height: 1;
}

.text-8xl {
  font-size: 6rem;
  line-height: 1;
}

.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-extrabold {
  font-weight: 800;
}

/* Color Utilities */
.text-white {
  color: #ffffff;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-700 {
  color: #374151;
}

.text-gray-800 {
  color: #1f2937;
}

.text-gray-900 {
  color: #111827;
}

.text-primary-500 {
  color: var(--primary-500);
}

.text-primary-600 {
  color: var(--primary-600);
}

.text-primary-700 {
  color: var(--primary-700);
}

.text-primary-800 {
  color: var(--primary-800);
}

.text-secondary-500 {
  color: var(--secondary-500);
}

.text-secondary-600 {
  color: var(--secondary-600);
}

.text-secondary-700 {
  color: var(--secondary-700);
}

.text-secondary-800 {
  color: var(--secondary-800);
}

.text-green-500 {
  color: #22c55e;
}

.text-green-600 {
  color: #16a34a;
}

.text-green-700 {
  color: #15803d;
}

.text-red-500 {
  color: #ef4444;
}

.text-red-600 {
  color: #dc2626;
}

.text-red-700 {
  color: #b91c1c;
}

.text-blue-500 {
  color: #3b82f6;
}

.text-blue-600 {
  color: #2563eb;
}

.text-blue-700 {
  color: #1d4ed8;
}

.text-purple-500 {
  color: #a855f7;
}

.text-purple-600 {
  color: #9333ea;
}

.text-purple-700 {
  color: #7e22ce;
}

.text-orange-500 {
  color: #f97316;
}

.text-orange-600 {
  color: #ea580c;
}

.text-orange-700 {
  color: #c2410c;
}

.text-yellow-500 {
  color: #eab308;
}

.text-yellow-600 {
  color: #ca8a04;
}

/* Background Utilities */
.bg-white {
  background-color: #ffffff;
}

.bg-black {
  background-color: #000000;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.bg-gray-300 {
  background-color: #d1d5db;
}

.bg-gray-400 {
  background-color: #9ca3af;
}

.bg-gray-500 {
  background-color: #6b7280;
}

.bg-gray-600 {
  background-color: #4b5563;
}

.bg-gray-700 {
  background-color: #374151;
}

.bg-gray-800 {
  background-color: #1f2937;
}

.bg-gray-900 {
  background-color: #111827;
}

.bg-primary-50 {
  background-color: var(--primary-50);
}

.bg-primary-100 {
  background-color: var(--primary-100);
}

.bg-primary-200 {
  background-color: var(--primary-200);
}

.bg-primary-300 {
  background-color: var(--primary-300);
}

.bg-primary-400 {
  background-color: var(--primary-400);
}

.bg-primary-500 {
  background-color: var(--primary-500);
}

.bg-primary-600 {
  background-color: var(--primary-600);
}

.bg-primary-700 {
  background-color: var(--primary-700);
}

.bg-primary-800 {
  background-color: var(--primary-800);
}

.bg-primary-900 {
  background-color: var(--primary-900);
}

.bg-secondary-50 {
  background-color: var(--secondary-50);
}

.bg-secondary-100 {
  background-color: var(--secondary-100);
}

.bg-secondary-200 {
  background-color: var(--secondary-200);
}

.bg-secondary-300 {
  background-color: var(--secondary-300);
}

.bg-secondary-400 {
  background-color: var(--secondary-400);
}

.bg-secondary-500 {
  background-color: var(--secondary-500);
}

.bg-secondary-600 {
  background-color: var(--secondary-600);
}

.bg-secondary-700 {
  background-color: var(--secondary-700);
}

.bg-secondary-800 {
  background-color: var(--secondary-800);
}

.bg-secondary-900 {
  background-color: var(--secondary-900);
}

.bg-green-50 {
  background-color: #f0fdf4;
}

.bg-green-100 {
  background-color: #dcfce7;
}

.bg-green-500 {
  background-color: #22c55e;
}

.bg-green-600 {
  background-color: #16a34a;
}

.bg-red-50 {
  background-color: #fef2f2;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.bg-red-500 {
  background-color: #ef4444;
}

.bg-red-600 {
  background-color: #dc2626;
}

.bg-blue-50 {
  background-color: #eff6ff;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-blue-200 {
  background-color: #bfdbfe;
}

.bg-blue-500 {
  background-color: #3b82f6;
}

.bg-yellow-50 {
  background-color: #fefce8;
}

.bg-yellow-100 {
  background-color: #fef9c3;
}

.bg-yellow-500 {
  background-color: #eab308;
}

.bg-purple-50 {
  background-color: #faf5ff;
}

.bg-purple-100 {
  background-color: #f3e8ff;
}

.bg-purple-200 {
  background-color: #e9d5ff;
}

.bg-purple-300 {
  background-color: #d8b4fe;
}

.bg-purple-500 {
  background-color: #a855f7;
}

.bg-purple-600 {
  background-color: #9333ea;
}

.bg-orange-50 {
  background-color: #fff7ed;
}

.bg-orange-100 {
  background-color: #ffedd5;
}

.bg-orange-500 {
  background-color: #f97316;
}

.bg-orange-600 {
  background-color: #ea580c;
}

/* Gradient Backgrounds */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-primary-100 {
  --tw-gradient-from: var(--primary-100);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(224 231 255 / 0));
}

.from-primary-500 {
  --tw-gradient-from: var(--primary-500);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(99 102 241 / 0));
}

.from-primary-600 {
  --tw-gradient-from: var(--primary-600);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(79 70 229 / 0));
}

.from-secondary-500 {
  --tw-gradient-from: var(--secondary-500);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(34 197 94 / 0));
}

.from-green-500 {
  --tw-gradient-from: #22c55e;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(34 197 94 / 0));
}

.from-yellow-500 {
  --tw-gradient-from: #eab308;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(234 179 8 / 0));
}

.from-red-500 {
  --tw-gradient-from: #ef4444;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(239 68 68 / 0));
}

.from-orange-500 {
  --tw-gradient-from: #f97316;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(249 115 22 / 0));
}

.to-primary-600 {
  --tw-gradient-to: var(--primary-600);
}

.to-secondary-500 {
  --tw-gradient-to: var(--secondary-500);
}

.to-secondary-600 {
  --tw-gradient-to: var(--secondary-600);
}

.to-secondary-400 {
  --tw-gradient-to: var(--secondary-400);
}

.to-green-600 {
  --tw-gradient-to: #16a34a;
}

.to-yellow-600 {
  --tw-gradient-to: #ca8a04;
}

.to-red-600 {
  --tw-gradient-to: #dc2626;
}

.to-orange-600 {
  --tw-gradient-to: #ea580c;
}

.to-purple-100 {
  --tw-gradient-to: #f3e8ff;
}

/* Border Utilities */
.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-4 {
  border-width: 4px;
}

.border-t-2 {
  border-top-width: 2px;
}

.border-t-4 {
  border-top-width: 4px;
}

.border-b-2 {
  border-bottom-width: 2px;
}

.border-b-4 {
  border-bottom-width: 4px;
}

.border-l-4 {
  border-left-width: 4px;
}

.border-r-4 {
  border-right-width: 4px;
}

.border-dashed {
  border-style: dashed;
}

.border-gray-100 {
  border-color: #f3f4f6;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.border-gray-400 {
  border-color: #9ca3af;
}

.border-primary-200 {
  border-color: var(--primary-200);
}

.border-primary-300 {
  border-color: var(--primary-300);
}

.border-primary-400 {
  border-color: var(--primary-400);
}

.border-primary-500 {
  border-color: var(--primary-500);
}

.border-primary-600 {
  border-color: var(--primary-600);
}

.border-secondary-300 {
  border-color: var(--secondary-300);
}

.border-red-200 {
  border-color: #fecaca;
}

.border-red-300 {
  border-color: #fca5a5;
}

.border-red-500 {
  border-color: #ef4444;
}

.border-green-300 {
  border-color: #86efac;
}

.border-green-500 {
  border-color: #22c55e;
}

.border-blue-200 {
  border-color: #bfdbfe;
}

.border-blue-300 {
  border-color: #93c5fd;
}

.border-blue-400 {
  border-color: #60a5fa;
}

.border-yellow-200 {
  border-color: #fef08a;
}

.border-yellow-300 {
  border-color: #fde047;
}

.border-purple-200 {
  border-color: #e9d5ff;
}

.border-purple-300 {
  border-color: #d8b4fe;
}

.border-purple-500 {
  border-color: #a855f7;
}

/* Border Radius */
.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-3xl {
  border-radius: 1.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* Shadow Utilities */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.shadow-inner {
  box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}

/* Transitions */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-200 {
  transition-duration: 200ms;
}

.duration-300 {
  transition-duration: 300ms;
}

/* Transform */
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.hover\:scale-105:hover {
  --tw-scale-x: 1.05;
  --tw-scale-y: 1.05;
}

.hover\:-translate-y-1:hover {
  --tw-translate-y: -0.25rem;
}

/* Opacity */
.opacity-50 {
  opacity: 0.5;
}

.opacity-70 {
  opacity: 0.7;
}

.opacity-90 {
  opacity: 0.9;
}

.opacity-20 {
  opacity: 0.2;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Custom Components */
.game-card {
  background: linear-gradient(145deg, #ffffff, #f9fafb);
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  border: 4px solid var(--primary-200);
}

.option-btn {
  background: linear-gradient(145deg, #ffffff, #f3f4f6);
  border-width: 3px;
  border-color: #e5e7eb;
  border-radius: 1.5rem;
  padding: 1.25rem;
  font-size: 1.75rem;
  line-height: 2rem;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.option-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-500);
}

.option-btn:active:not(:disabled) {
  transform: translateY(0);
}

.option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.option-btn.option-btn-correct {
  background: linear-gradient(145deg, #22c55e, #16a34a);
  color: white;
  border-color: #15803d;
  animation: correctPulse 0.5s ease-out;
}

.option-btn.option-btn-wrong {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  color: white;
  border-color: #b91c1c;
  animation: shake 0.5s ease-out;
}

.topic-btn {
  background: white;
  border-width: 2px;
  border-color: #e5e7eb;
  border-radius: 1rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #4b5563;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.topic-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.topic-btn.topic-btn-active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-800);
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.score-box {
  position: relative;
  overflow: hidden;
}

.score-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

.timer-box {
  position: relative;
  overflow: hidden;
}

.timer-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

.timer-box.timer-box-warning {
  background: linear-gradient(to bottom right, #fbbf24, #f59e0b) !important;
}

.timer-box.timer-box-danger {
  background: linear-gradient(to bottom right, #ef4444, #dc2626) !important;
  animation: pulse 0.5s infinite;
}

.streak-box {
  position: relative;
  overflow: hidden;
}

.streak-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

.feedback {
  min-height: 80px;
  padding: 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.feedback-success {
  animation: slideDown 0.3s ease-out;
  background: linear-gradient(145deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 2px solid #86efac;
}

.feedback-error {
  animation: slideDown 0.3s ease-out;
  background: linear-gradient(145deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 2px solid #fca5a5;
}

.feedback-timeout {
  animation: slideDown 0.3s ease-out;
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 2px solid #fcd34d;
}

.question-type {
  background-color: var(--primary-600);
  color: white;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  display: inline-block;
}

.question {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  color: var(--primary-800);
  text-align: center;
}

@media (min-width: 768px) {
  .question {
    font-size: 3.75rem;
    line-height: 1;
  }
}

.progress-bar {
  background: #f3f4f6;
  border: 2px solid #d1d5db;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-fill {
  background: linear-gradient(90deg, var(--primary-500), var(--secondary-400));
  background-size: 200% 100%;
  animation: gradientShift 2s linear infinite;
}

/* Device Management */
.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.75rem;
  border-width: 2px;
  border-color: #e5e7eb;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.device-item:hover {
  border-color: var(--primary-400);
}

.device-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary-100);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Plan Cards */
.plan-card {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.plan-card:hover {
  border-color: var(--primary-500);
  transform: scale(1.02);
}

/* Year Button Active State */
.year-btn-active {
  background: var(--primary-600) !important;
  color: white !important;
  border-color: var(--primary-800) !important;
  transform: scale(1.05);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(30deg); }
  100% { transform: translateX(100%) rotate(30deg); }
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes timerPulse {
  0% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.5); opacity: 0.3; }
  100% { transform: scale(1); opacity: 0.2; }
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.timer-pulse {
  animation: timerPulse 1s ease-in-out infinite;
}

.animate-pop-in {
  animation: popIn 0.3s ease-out;
}

/* Loading Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-600);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Form Styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-500);
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 0.75rem;
  background-color: #f9fafb;
  font-weight: 700;
}

td {
  padding: 0.75rem;
  border-bottom-width: 1px;
  border-color: #e5e7eb;
}

/* Responsive Design */
@media (max-width: 640px) {
  .question {
    font-size: 2.5rem;
  }
  
  .option-btn {
    font-size: 1.5rem;
    padding: 1rem;
  }
  
  .topic-btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .game-card {
    padding: 1rem;
  }
  
  .grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: none;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
  --tw-ring-color: var(--primary-400);
}

/* Custom Scrollbar */
.scrollbar-thin::-webkit-scrollbar {
  height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: var(--primary-300);
  border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* MathStar Specific */
.mathstar-title {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  background-image: linear-gradient(to right, var(--primary-600), var(--secondary-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 768px) {
  .mathstar-title {
    font-size: 3rem;
    line-height: 1;
  }
}

.mathstar-mascot {
  width: 6rem;
  height: 6rem;
  animation: float 3s ease-in-out infinite;
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  position: absolute;
  top: -10px;
  animation: confetti 3s ease-out forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Hover Effects */
.hover\:bg-gray-50:hover {
  background-color: #f9fafb;
}

.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}

.hover\:bg-gray-200:hover {
  background-color: #e5e7eb;
}

.hover\:bg-gray-300:hover {
  background-color: #d1d5db;
}

.hover\:bg-primary-50:hover {
  background-color: var(--primary-50);
}

.hover\:bg-primary-100:hover {
  background-color: var(--primary-100);
}

.hover\:bg-primary-600:hover {
  background-color: var(--primary-600);
}

.hover\:bg-primary-700:hover {
  background-color: var(--primary-700);
}

.hover\:bg-red-100:hover {
  background-color: #fee2e2;
}

.hover\:bg-red-600:hover {
  background-color: #dc2626;
}

.hover\:bg-red-700:hover {
  background-color: #b91c1c;
}

.hover\:bg-green-600:hover {
  background-color: #16a34a;
}

.hover\:bg-green-700:hover {
  background-color: #15803d;
}

.hover\:bg-blue-600:hover {
  background-color: #2563eb;
}

.hover\:bg-blue-700:hover {
  background-color: #1d4ed8;
}

.hover\:bg-orange-600:hover {
  background-color: #ea580c;
}

.hover\:bg-orange-700:hover {
  background-color: #c2410c;
}

.hover\:bg-purple-100:hover {
  background-color: #f3e8ff;
}

.hover\:bg-purple-200:hover {
  background-color: #e9d5ff;
}

.hover\:border-primary-400:hover {
  border-color: var(--primary-400);
}

.hover\:border-primary-500:hover {
  border-color: var(--primary-500);
}

.hover\:text-primary-600:hover {
  color: var(--primary-600);
}

.hover\:text-primary-700:hover {
  color: var(--primary-700);
}

.hover\:text-red-700:hover {
  color: #b91c1c;
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:from-primary-700:hover {
  --tw-gradient-from: var(--primary-700);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(67 56 202 / 0));
}

.hover\:to-secondary-600:hover {
  --tw-gradient-to: var(--secondary-600);
}

.hover\:from-green-600:hover {
  --tw-gradient-from: #16a34a;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(22 163 74 / 0));
}

.hover\:to-green-700:hover {
  --tw-gradient-to: #15803d;
}

.hover\:from-yellow-600:hover {
  --tw-gradient-from: #ca8a04;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(202 138 4 / 0));
}

.hover\:to-yellow-700:hover {
  --tw-gradient-to: #a16207;
}

.hover\:from-red-600:hover {
  --tw-gradient-from: #dc2626;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(220 38 38 / 0));
}

.hover\:to-red-700:hover {
  --tw-gradient-to: #b91c1c;
}

.hover\:from-gray-600:hover {
  --tw-gradient-from: #4b5563;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(75 85 99 / 0));
}

.hover\:to-gray-700:hover {
  --tw-gradient-to: #374151;
}

/* Disabled States */
.disabled\:opacity-50:disabled {
  opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}

/* Achievement Badge */
.achievement-badge {
  transition: all 0.3s;
}

.achievement-badge:hover {
  transform: scale(1.1) rotate(5deg);
}