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

@custom-variant dark (&:is(.dark *));

:root {
  --font-size: 14px;
  --background: #0f0f23;
  --foreground: #ffffff;
  --card: #1a1a2e;
  --card-foreground: #ffffff;
  --popover: #1a1a2e;
  --popover-foreground: #ffffff;
  --primary: #9747FF;
  --primary-foreground: #ffffff;
  --secondary: #00FFF2;
  --secondary-foreground: #0f0f23;
  --muted: #2a2a3e;
  --muted-foreground: #a1a1aa;
  --accent: #00FFAE;
  --accent-foreground: #0f0f23;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: rgba(255, 255, 255, 0.1);
  --input: transparent;
  --input-background: rgba(255, 255, 255, 0.05);
  --switch-background: #3f3f46;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: #9747FF;
  
  /* Dynamic Xperience Custom Colors */
  --dx-purple: #9747FF;
  --dx-cyan: #00FFF2;
  --dx-green: #00FFAE;
  
  /* Glass morphism variables */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-backdrop: blur(12px);
  
  --chart-1: #9747FF;
  --chart-2: #00FFF2;
  --chart-3: #00FFAE;
  --chart-4: #8b5cf6;
  --chart-5: #06b6d4;
  --radius: 0.75rem;
  --sidebar: #1a1a2e;
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #9747FF;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #2a2a3e;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-ring: #9747FF;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-input-background: var(--input-background);
  --color-switch-background: var(--switch-background);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    font-variation-settings: 'opsz' 32;
    margin:  auto !important;
  }

  .font-display {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-feature-settings: 'ss01', 'ss02';
  }
}

/**
 * Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
 */
@layer base {
  :where(:not(:has([class*=" text-"]), :not(:has([class^="text-"])))) {
    h1 {
      font-size: var(--text-2xl);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    h2 {
      font-size: var(--text-xl);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    h3 {
      font-size: var(--text-lg);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    h4 {
      font-size: var(--text-base);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    p {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    label {
      font-size: var(--text-base);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    button {
      font-size: var(--text-base);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    input {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }
  }
}

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
}

/* Custom utilities for Dynamic Xperience */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
}

.gradient-text {
  background: linear-gradient(135deg, var(--dx-purple), var(--dx-cyan), var(--dx-green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-bg {
  background: linear-gradient(135deg, var(--dx-purple), var(--dx-cyan), var(--dx-green));
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--dx-purple), var(--dx-cyan));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--dx-cyan), var(--dx-green));
}

/* Hide scrollbar for tabs carousel */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Animation keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(1deg); }
  50% { transform: translateY(-10px) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(151, 71, 255, 0.3),
                0 0 40px rgba(0, 255, 242, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% { 
    box-shadow: 0 0 40px rgba(151, 71, 255, 0.6),
                0 0 80px rgba(0, 255, 242, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

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

@keyframes particle-float {
  0%, 100% { 
    transform: translateY(0px) translateX(0px) rotate(0deg);
    opacity: 0.4;
  }
  25% { 
    transform: translateY(-20px) translateX(10px) rotate(90deg);
    opacity: 0.8;
  }
  50% { 
    transform: translateY(-40px) translateX(0px) rotate(180deg);
    opacity: 1;
  }
  75% { 
    transform: translateY(-20px) translateX(-10px) rotate(270deg);
    opacity: 0.8;
  }
}

@keyframes morphing-blob {
  0%, 100% { 
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(0deg);
  }
  25% { 
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(90deg);
  }
  50% { 
    border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    transform: rotate(180deg);
  }
  75% { 
    border-radius: 60% 40% 60% 30% / 70% 40% 50% 60%;
    transform: rotate(270deg);
  }
}

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

@keyframes border-spin {
  0% { 
    background-position: 0% 50%;
    transform: rotate(0deg);
  }
  100% { 
    background-position: 100% 50%;
    transform: rotate(360deg);
  }
}

@keyframes scale-in {
  0% {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0px);
    opacity: 1;
  }
}

@keyframes counter-glow {
  0%, 100% {
    text-shadow: 0 0 10px currentColor;
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
    transform: scale(1.05);
  }
}

@keyframes number-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes digit-roll {
  0% {
    transform: translateY(100%) rotateX(-90deg);
    opacity: 0;
  }
  50% {
    transform: translateY(-20%) rotateX(20deg);
    opacity: 1;
  }
  100% {
    transform: translateY(0%) rotateX(0deg);
    opacity: 1;
  }
}

@keyframes counter-bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -8px, 0) scaleY(1.1);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -4px, 0) scaleY(1.05);
  }
  90% {
    transform: translate3d(0,-1px,0) scaleY(1.02);
  }
}

/* Utility classes */
.animate-float {
  animation: float 4s ease-in-out infinite;
}

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

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

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

.animate-morphing {
  animation: morphing-blob 8s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: text-shimmer 2s ease-in-out infinite;
}

.animate-border-spin {
  background: conic-gradient(
    from 0deg,
    var(--dx-purple),
    var(--dx-cyan),
    var(--dx-green),
    var(--dx-purple)
  );
  background-size: 200% 200%;
  animation: border-spin 3s linear infinite;
}

.animate-scale-in {
  animation: scale-in 0.6s ease-out forwards;
}

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

.animate-number-pop {
  animation: number-pop 0.4s ease-out;
}

.animate-digit-roll {
  animation: digit-roll 0.6s ease-out forwards;
}

.animate-counter-bounce {
  animation: counter-bounce 1s ease-out;
}

/* Perspective utility for 3D effects */
.perspective-1000 {
  perspective: 1000px;
}

.transform-gpu {
  transform: translateZ(0);
  will-change: transform;
}

/* Enhanced glass effects */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.glass-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(151, 71, 255, 0.3);
}

/* Text selection */
::selection {
  background: var(--dx-cyan);
  color: var(--background);
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--dx-cyan);
  outline-offset: 2px;
}
