/* eduSYMS Design System - Core Styles */

:root {
  /* GREY SCALE */
  --grey-100: #F8F8F8;
  --grey-200: #F2F2F2;
  --grey-300: #E0E0E0;
  --grey-400: #C8C8C8;
  --grey-500: #B0B0B0;
  --grey-600: #808080;
  --grey-700: #505050;
  --grey-800: #333333;
  --grey-900: #1A1A1A;

  /* WHITE & BLACK */
  --white: #ffffff;
  --black: #000000;

  /* SEMANTIC COLOR SYSTEM */
  /* Success States */
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-500: var(--accent);
  --success-600: var(--accent-6);
  --success-700: var(--accent-7);

  /* Warning States */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;

  /* Error States */
  --error-50: #fef2f2;
  --error-100: #fee2e2;
  --error-500: #ef4444;
  --error-600: #dc2626;
  --error-700: #b91c1c;

  /* Info States */
  --info-50: #eff6ff;
  --info-100: #dbeafe;
  --info-500: #3b82f6;
  --info-600: #2563eb;
  --info-700: #1d4ed8;

  /* ACCENT COLOR */
  --accent: #7cac3c;
  --accent-dark: #445b2d; /* Used for accessible text on light backgrounds, e.g., buttons or headings */
  --accent-green: #84AC40; /* consolidated \"sushi\" shade */
  --accent-rgb: 124, 172, 60;
  --accent-1: #dcebc8;
  --accent-2: #c4dea2;
  --accent-3: #add17c;
  --accent-4: #95c456;
  --accent-5: #7cac3c;
  --accent-6: #60862e;
  --accent-7: #456021;
  --accent-8: #2a3a14;
  --accent-9: #0e1407;
  /* ADVANCED GRADIENTS & EFFECTS */
  --glass-gradient: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(220, 220, 220, 0.5) 100%
  );
  --accent-gradient: linear-gradient(
    90deg,
    #7cac3c 0%,
    #a6d468 100%
  );

  /* Glass Morphism Gradients */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-backdrop: blur(20px);

  /* Mesh Gradients */
  --mesh-gradient-1: radial-gradient(at 40% 20%, hsla(228, 100%, 74%, 1) 0px, transparent 50%),
                      radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 1) 0px, transparent 50%),
                      radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 1) 0px, transparent 50%);

  --mesh-gradient-2: radial-gradient(at 0% 0%, hsla(120, 100%, 70%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 50% 0%, hsla(189, 100%, 56%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 100% 0%, hsla(355, 100%, 93%, 0.3) 0px, transparent 50%);

  /* Animated Gradients */
  --animated-gradient: linear-gradient(-45deg, #7cac3c, #a6d468, #84AC40, #60862e);
  --animated-gradient-size: 400% 400%;

  /* Backwards compatibility */
  /* Removed redundant alias --sushi-primary */
  --sushi-light: var(--accent);
  --sushi-medium: var(--accent);
  --wasabi: var(--accent);
  --fern-frond-dark: var(--accent);
  --fern-frond-darker: var(--accent);
  --fern-shadow: var(--grey-800);
  --light-gray: var(--grey-100);
  --gray: var(--grey-200);

  /* Gradient Definitions */
  /* Primary gradient: Use for prominent elements like buttons or headers */
  --gradient-primary: linear-gradient(135deg, var(--sushi-light), var(--fern-frond-dark));

  /* Dark gradient: Suitable for backgrounds or overlays */
  --gradient-dark: linear-gradient(135deg, var(--fern-frond-dark), var(--fern-frond-darker));

  /* Light gradient: Ideal for subtle backgrounds or highlights */
  --gradient-light: linear-gradient(135deg, #e0e7ff, #ffffff);

  /* Typography */
  --font-family-primary: 'Poppins', sans-serif;
  --font-primary: var(--font-family-primary);
  --font-sans: var(--font-family-primary);
  --font-weight-400: 400;
  --font-weight-500: 500;
  --font-weight-600: 600;
  --font-weight-700: 700;
  --font-weight-800: 800;
  --font-weight-900: 900;
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.125rem;  /* 18px */
  --font-size-lg: 1.25rem;   /* 20px */
  --font-size-xl: 1.5rem;    /* 24px */
  --font-size-2xl: 1.875rem; /* 30px */
  --font-size-3xl: 2.25rem;  /* 36px */
  --font-size-4xl: 3rem;     /* 48px */

  /* Spacing */
  --space-xs: 0.25rem;   /* 4px - Use for very tight spacing, e.g., small gaps between elements */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px - Use for large gaps, e.g., section spacing or prominent layout separations */
  /* Borders & Radius */
  --radius-xs: 2px;    /* Use for minimal UI elements */
  --radius-sm: 4px;    /* Use for small UI elements like buttons or input fields */
  --radius-md: 8px;    /* Use for medium-sized UI elements like cards or modals */
  --radius-lg: 12px;   /* Use for larger UI elements or containers */
  --radius-xl: 16px;   /* Use for prominent elements requiring a more rounded appearance */
  --radius-2xl: 24px;  /* Use for hero sections or major containers */
  --radius-full: 9999px; /* Use for fully rounded elements like circular buttons or avatars */

  /* Border Widths */
  --border-thin: 1px;
  --border-medium: 2px;
  --border-thick: 3px;
  /* ENHANCED SHADOWS & DEPTH */
  /* Subtle shadow for small UI elements like buttons or input fields */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  /* Use sparingly for performance-critical components */
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  /* Alternative single-layer shadow for better performance */
  --shadow-md-alt: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

  /* Colored Shadows */
  --shadow-accent: 0 10px 25px rgba(124, 172, 60, 0.15);
  --shadow-green: 0 10px 25px rgba(124, 172, 60, 0.15);
  --shadow-success: 0 10px 25px rgba(124, 172, 60, 0.2);
  --shadow-warning: 0 10px 25px rgba(245, 158, 11, 0.2);
  --shadow-error: 0 10px 25px rgba(239, 68, 68, 0.2);
  --shadow-info: 0 10px 25px rgba(59, 130, 246, 0.2);

  /* Glass Morphism Shadows */
  --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37);
  --shadow-glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  /* ADVANCED EASING & TIMING */
  --transition-fast: 150ms ease; /* Use for quick hover effects or small UI interactions */
  --transition-normal: 250ms ease; /* Use for standard animations like button presses */
  --transition-slow: 350ms ease; /* Use for more noticeable animations like dropdowns */
  --transition-very-slow: 500ms ease; /* Use for prominent animations like modal transitions */

  /* Custom Easing Functions */
  --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-swift-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-swift-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Duration Scale */
  --duration-instant: 0ms;
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
  --duration-slowest: 800ms;

  /* Micro-interaction Variables */
  --micro-duration: 200ms;
  --micro-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --micro-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --micro-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --micro-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  /* ENHANCED INTERACTIVE STATES */
  --hover-lift: -2px;
  --hover-lift-subtle: -1px;
  --hover-lift-dramatic: -4px;
  --hover-scale: 1.02;
  --hover-scale-subtle: 1.01;
  --hover-scale-dramatic: 1.05;
  --focus-ring: 0 0 0 3px rgba(124, 172, 60, 0.3);
  --focus-ring-error: 0 0 0 3px rgba(239, 68, 68, 0.3);
  --focus-ring-info: 0 0 0 3px rgba(59, 130, 246, 0.3);
  --active-scale: 0.98;
  --active-scale-subtle: 0.99;

  /* MODERN CSS VARIABLES */
  /* Environment Variables for modern devices */
  --safe-area-top: env(safe-area-inset-top, 0);
  --safe-area-right: env(safe-area-inset-right, 0);
  --safe-area-bottom: env(safe-area-inset-bottom, 0);
  --safe-area-left: env(safe-area-inset-left, 0);

  /* Scroll Variables */
  --scroll-progress: 0;
  --scroll-velocity: 0;

  /* Theme Variables */
  --theme-hue: 93; /* Green hue for accent color */
  --theme-saturation: 50%;
  --theme-lightness: 45%;

  /* Animation Performance */
  --will-change-transform: transform;
  --will-change-auto: auto;
}

/* Common Components */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Enhanced Button Component with Micro-interactions */
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: var(--white);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all var(--micro-duration) var(--micro-ease);
  will-change: var(--will-change-transform);
}

.button-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s var(--micro-ease);
}

.button-primary:hover {
  transform: translateY(var(--hover-lift)) scale(var(--hover-scale));
  box-shadow: var(--shadow-green);
  background-color: var(--accent-4);
}

.button-primary:hover::before {
  left: 100%;
}

.button-primary:focus {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-green);
}

.button-primary:active {
  transform: translateY(-1px) scale(var(--active-scale));
  transition-duration: 100ms;
}

.section-title {
  font-size: var(--font-size-3xl);
  color: var(--accent);
  position: relative;
  font-weight: var(--font-weight-700);
  line-height: 1.2;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Enhanced Card Component */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal) var(--micro-ease);
  will-change: var(--will-change-transform);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(124, 172, 60, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--micro-duration) var(--micro-ease);
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card:focus-within {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-lg);
}

/* Grid Utilities */
/* Grid container: Use for creating grid-based layouts with customizable gaps between items */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .responsive-text {
    --font-size-4xl: 2.5rem; /* Adjusted for smaller screens */
    --font-size-3xl: 2rem;
    --font-size-2xl: 1.5rem;
  }
}

/* Animation Utilities */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

@keyframes gentle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.animate-slide-in-left {
  animation: slideInLeft 0.4s var(--micro-ease-out);
}

.animate-slide-in-right {
  animation: slideInRight 0.4s var(--micro-ease-out);
}

.animate-slide-in-up {
  animation: slideInUp 0.4s var(--ease-swift-out);
}

.animate-slide-in-down {
  animation: slideInDown 0.4s var(--ease-swift-out);
}

.animate-fade-in-scale {
  animation: fadeInScale 0.3s var(--micro-ease-out);
}

.animate-bounce-in {
  animation: bounceIn 0.6s var(--ease-spring);
}

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

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-gradient {
  background: var(--animated-gradient);
  background-size: var(--animated-gradient-size);
  animation: gradientShift 4s ease infinite;
}

.animate-glow {
  animation: glowPulse 2s ease-in-out infinite;
}

.animate-levitate {
  animation: levitate 4s ease-in-out infinite;
}

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

.animate-morph {
  animation: morphingScale 6s ease-in-out infinite;
}

/* =========================================================================
   GLASS MORPHISM COMPONENTS
   ========================================================================== */

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass), var(--shadow-glass-inset);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.glass-card {
  /* Glass morphism properties */
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass), var(--shadow-glass-inset);
  position: relative;
  overflow: hidden;
  /* Card properties */
  padding: var(--space-lg);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.glass-card:hover {
  transform: translateY(var(--hover-lift-subtle)) scale(var(--hover-scale-subtle));
  background: rgba(255, 255, 255, 0.15);
}

/* =========================================================================
   ADVANCED BUTTON VARIANTS
   ========================================================================== */

.button-glass {
  /* Glass morphism properties */
  background: rgba(124, 172, 60, 0.1);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid rgba(124, 172, 60, 0.2);
  box-shadow: var(--shadow-glass), var(--shadow-glass-inset);
  position: relative;
  overflow: hidden;
  /* Button properties */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--micro-duration) var(--micro-ease);
  will-change: var(--will-change-transform);
}

.button-glass:hover {
  background: rgba(124, 172, 60, 0.2);
  transform: translateY(var(--hover-lift)) scale(var(--hover-scale));
}

.button-gradient {
  background: var(--accent-gradient);
  background-size: 200% 100%;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.button-gradient:hover {
  background-position: right center;
  transform: translateY(var(--hover-lift)) scale(var(--hover-scale));
}

.button-neuomorphic {
  background: var(--grey-100);
  color: var(--accent);
  border: none;
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.6),
    -8px -8px 16px rgba(255, 255, 255, 0.5);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.button-neuomorphic:hover {
  box-shadow:
    4px 4px 8px rgba(163, 177, 198, 0.6),
    -4px -4px 8px rgba(255, 255, 255, 0.5);
  transform: scale(var(--hover-scale-subtle));
}

.button-neuomorphic:active {
  box-shadow:
    inset 4px 4px 8px rgba(163, 177, 198, 0.6),
    inset -4px -4px 8px rgba(255, 255, 255, 0.5);
}

/* =========================================================================
   SEMANTIC COLOR UTILITIES
   ========================================================================== */

.bg-success { background-color: var(--success-500); color: var(--white); }
.bg-warning { background-color: var(--warning-500); color: var(--white); }
.bg-error { background-color: var(--error-500); color: var(--white); }
.bg-info { background-color: var(--info-500); color: var(--white); }

.text-success { color: var(--success-600); }
.text-warning { color: var(--warning-600); }
.text-error { color: var(--error-600); }
.text-info { color: var(--info-600); }

.border-success { border-color: var(--success-500); }
.border-warning { border-color: var(--warning-500); }
.border-error { border-color: var(--error-500); }
.border-info { border-color: var(--info-500); }

/* =========================================================================
   ADVANCED CARD VARIANTS
   ========================================================================== */

.card-elevated {
  /* Card base properties */
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal) var(--micro-ease);
  will-change: var(--will-change-transform);
  position: relative;
  overflow: hidden;
  /* Elevated properties */
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-elevated:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-2xl);
}

.card-gradient {
  /* Card base properties */
  background: var(--mesh-gradient-1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal) var(--micro-ease);
  will-change: var(--will-change-transform);
  position: relative;
  overflow: hidden;
  /* Gradient properties */
  color: var(--white);
}

.card-neuomorphic {
  background: var(--grey-100);
  border: none;
  box-shadow:
    12px 12px 24px rgba(163, 177, 198, 0.4),
    -12px -12px 24px rgba(255, 255, 255, 0.6);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.card-neuomorphic:hover {
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.4),
    -8px -8px 16px rgba(255, 255, 255, 0.6);
}

/* =========================================================================
   MODERN SCROLLBAR STYLING
   ========================================================================== */

/* =========================================================================
   MODERN SCROLLBAR STYLING
   ========================================================================== */

/* Webkit browsers scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--grey-200);
  border-radius: var(--radius-full);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-6);
}

/* Firefox scrollbar styling (progressive enhancement) */
@supports (scrollbar-width: thin) {
  .custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--grey-200);
  }
}

/* =========================================================================
   LOADING STATES & SKELETONS
   ========================================================================== */

.skeleton {
  background: var(--loading-shimmer);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton-text {
  height: 1em;
  margin: 0.5em 0;
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin: 0.5em 0;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton-button {
  height: 2.5rem;
  width: 120px;
  border-radius: var(--radius-full);
}

/* =========================================================================
   PROGRESS INDICATORS
   ========================================================================== */

.progress {
  width: 100%;
  height: 8px;
  background: var(--grey-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-swift-out);
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

.progress-circular {
  width: 40px;
  height: 40px;
  border: 3px solid var(--grey-200);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

/* =========================================================================
   TOOLTIP SYSTEM
   ========================================================================== */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grey-800);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-fast) var(--ease-swift-out);
  z-index: 1000;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--grey-800);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* =========================================================================
   BADGE SYSTEM
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-600);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background: var(--accent);
  color: var(--white);
}

.badge-success {
  background: var(--success-500);
  color: var(--white);
}

.badge-warning {
  background: var(--warning-500);
  color: var(--white);
}

.badge-error {
  background: var(--error-500);
  color: var(--white);
}

.badge-outline {
  background: transparent;
  border: 1px solid currentColor;
}

.badge-dot {
  position: relative;
  padding-left: 1.5rem;
}

.badge-dot::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* =========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Safe Area Utilities */
.safe-top { padding-top: var(--safe-area-top); }
.safe-right { padding-right: var(--safe-area-right); }
.safe-bottom { padding-bottom: var(--safe-area-bottom); }
.safe-left { padding-left: var(--safe-area-left); }

/* Cursor Utilities */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }

/* Select Utilities */
.select-none {
  -webkit-user-select: none;
  user-select: none;
}
.select-text {
  -webkit-user-select: text;
  user-select: text;
}
.select-all {
  -webkit-user-select: all;
  user-select: all;
}

/* Overflow Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-scroll { overflow: scroll; }
.overflow-auto { overflow: auto; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-Index Scale */
.z-0 { z-index: 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; }

/* Flexbox Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

/* Text Utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================================
   RESPONSIVE DESIGN ENHANCEMENTS
   ========================================================================== */

/* Container Queries Support */
@supports (container-type: inline-size) {
  .container-adaptive {
    container-type: inline-size;
  }

  @container (min-width: 400px) {
    .adaptive-text {
      font-size: var(--font-size-lg);
    }
  }

  @container (min-width: 600px) {
    .adaptive-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

/* =========================================================================
   DARK MODE SUPPORT
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--grey-900);
    --foreground: var(--grey-100);
    --card-background: var(--grey-800);
    --border-color: var(--grey-700);

    /* Adjust shadows for dark mode */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.3);
  }

  .card {
    background: var(--card-background);
    color: var(--foreground);
  }

  .glass {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* =========================================================================
   HIGH CONTRAST MODE SUPPORT
   ========================================================================== */

@media (prefers-contrast: high) {
  :root {
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }

  .button-primary {
    border: 2px solid currentColor;
  }

  .card {
    border: 1px solid currentColor;
  }
}

/* =========================================================================
   CREATIVE EFFECTS & EXPERIMENTAL FEATURES
   ========================================================================== */

/* Magnetic Hover Effect */
.magnetic {
  transition: transform var(--duration-normal) var(--ease-spring);
  cursor: pointer;
}

.magnetic:hover {
  transform: translate3d(var(--mouse-x, 0), var(--mouse-y, 0), 0) scale(1.05);
}

/* Tilt Effect */
.tilt {
  transform-style: preserve-3d;
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.tilt:hover {
  transform: perspective(1000px) rotateX(10deg) rotateY(10deg);
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Parallax Text */
.parallax-text {
  background: linear-gradient(45deg, var(--accent), var(--accent-4), var(--accent-2));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

/* Neon Glow Effect */
.neon-glow {
  text-shadow:
    0 0 5px var(--accent),
    0 0 10px var(--accent),
    0 0 15px var(--accent),
    0 0 20px var(--accent);
  animation: glowPulse 2s ease-in-out infinite alternate;
}

/* Holographic Effect */
.holographic {
  background: linear-gradient(
    45deg,
    #ff006e,
    #fb5607,
    #ffbe0b,
    #8338ec,
    #3a86ff
  );
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Liquid Animation */
.liquid {
  background: var(--accent);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.liquid::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, transparent 40%, var(--accent-4) 60%);
  animation: morphingScale 8s ease-in-out infinite;
}

/* Spotlight Effect */
.spotlight {
  position: relative;
  background: var(--grey-900);
  overflow: hidden;
}

.spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    transparent 100px,
    rgba(0, 0, 0, 0.8) 150px
  );
  pointer-events: none;
}

/* Crystal Effect */
.crystal {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  position: relative;
}

.crystal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

/* =========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Focus Visible Enhancement */
.focus-visible-enhanced:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(124, 172, 60, 0.2);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: 6px;
}

/* High Contrast Mode Utilities */
@media (prefers-contrast: high) {
  .high-contrast-border {
    border: 2px solid currentColor !important;
  }

  .high-contrast-bg {
    background: var(--white) !important;
    color: var(--black) !important;
  }
}

/* =========================================================================
   PRINT OPTIMIZATIONS
   ========================================================================== */

@media print {
  .print-hidden {
    display: none !important;
  }

  .print-visible {
    display: block !important;
  }

  .card,
  .button-primary,
  .glass {
    box-shadow: none !important;
    border: 1px solid var(--grey-400) !important;
  }

  .parallax-text,
  .holographic {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: var(--black) !important;
  }
}

/* =========================================================================
   PERFORMANCE UTILITIES
   ========================================================================== */

/* GPU Acceleration */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Contain Layout */
.contain-layout {
  contain: layout;
}

.contain-style {
  contain: style;
}

.contain-paint {
  contain: paint;
}

/* =========================================================================
   MODERN CSS GRID UTILITIES
   ========================================================================== */

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.grid-masonry {
  display: grid;
  grid-template-rows: masonry;
  gap: var(--space-lg);
}

/* Subgrid Support */
@supports (grid-template-rows: subgrid) {
  .subgrid {
    display: grid;
    grid-template-rows: subgrid;
  }
}

/* =========================================================================
   CUSTOM PROPERTIES ANIMATIONS
   ========================================================================== */

@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@property --scale-factor {
  syntax: '<number>';
  initial-value: 1;
  inherits: false;
}

@property --color-opacity {
  syntax: '<percentage>';
  initial-value: 100%;
  inherits: false;
}

/* Animated Custom Properties */
.animated-gradient {
  --gradient-angle: 0deg;
  background: linear-gradient(var(--gradient-angle), var(--accent), var(--accent-4));
  animation: rotateGradient 4s linear infinite;
}

@keyframes rotateGradient {
  to {
    --gradient-angle: 360deg;
  }
}

/* =========================================================================
   COMPONENT STATE SYSTEM
   ========================================================================== */

/* Loading State */
[data-state="loading"] {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

[data-state="loading"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--grey-300);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Error State */
[data-state="error"] {
  border-color: var(--error-500);
  color: var(--error-600);
}

/* Success State */
[data-state="success"] {
  border-color: var(--success-500);
  color: var(--success-600);
}

/* Disabled State */
[disabled],
[data-state="disabled"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* =========================================================================
   ENHANCED REDUCED MOTION SUPPORT
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .parallax-text,
  .holographic,
  .neon-glow,
  .liquid,
  .crystal,
  .magnetic,
  .tilt {
    animation: none !important;
    transform: none !important;
  }
}

