@import 'tailwindcss';

@theme {
  --color-background: #ffffff;
  --color-foreground: #0f172a;
  --color-card: #ffffff;
  --color-card-foreground: #0f172a;
  --color-popover: #ffffff;
  --color-popover-foreground: #0f172a;
  --color-primary: #667eea;
  --color-primary-foreground: #f8fafc;
  --color-secondary: #f1f5f9;
  --color-secondary-foreground: #0f172a;
  --color-muted: #f1f5f9;
  --color-muted-foreground: #64748b;
  --color-accent: #f1f5f9;
  --color-accent-foreground: #0f172a;
  --color-destructive: #ef4444;
  --color-destructive-foreground: #f8fafc;
  --color-border: #e2e8f0;
  --color-input: #e2e8f0;
  --color-ring: #667eea;
  --radius: 0.75rem;

  /* === V5 VARIABLES === */
  --v5-primary: #667eea;
  --v5-primary-light: #8b9aff;
  --v5-primary-dark: #4a5fc1;
  --v5-secondary: #764ba2;
  --v5-accent: #f093fb;
  --v5-success: #84fab0;
  --v5-warning: #ffecd2;
  --v5-danger: #f5576c;
  --v5-info: #8fd3f4;

  --glass-light: rgba(255, 255, 255, 0.85);
  --glass-dark: rgba(18, 18, 18, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);

  --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  --gradient-danger: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-aurora: linear-gradient(
    45deg,
    #ff0080,
    #ff8c00,
    #ffd700,
    #00ced1,
    #8a2be2
  );
}

/* Dark mode theme variables */
.dark {
  --color-background: #0a0a0a;
  --color-foreground: #fafafa;
  --color-card: #121212;
  --color-card-foreground: #fafafa;
  --color-popover: #121212;
  --color-popover-foreground: #fafafa;
  --color-primary: #8b9aff;
  --color-primary-foreground: #0a0a0a;
  --color-secondary: #1e293b;
  --color-secondary-foreground: #fafafa;
  --color-muted: #1e293b;
  --color-muted-foreground: #94a3b8;
  --color-accent: #1e293b;
  --color-accent-foreground: #fafafa;
  --color-destructive: #dc2626;
  --color-destructive-foreground: #fafafa;
  --color-border: #334155;
  --color-input: #334155;
  --color-ring: #8b9aff;
}

@media (prefers-color-scheme: dark) {
  @theme {
    --color-background: #0a0a0a;
    --color-foreground: #fafafa;
    --color-card: #121212;
    --color-card-foreground: #fafafa;
    --color-popover: #121212;
    --color-popover-foreground: #fafafa;
    --color-primary: #8b9aff;
    --color-primary-foreground: #0a0a0a;
    --color-secondary: #1e293b;
    --color-secondary-foreground: #fafafa;
    --color-muted: #1e293b;
    --color-muted-foreground: #94a3b8;
    --color-accent: #1e293b;
    --color-accent-foreground: #fafafa;
    --color-destructive: #dc2626;
    --color-destructive-foreground: #fafafa;
    --color-border: #334155;
    --color-input: #334155;
    --color-ring: #8b9aff;
  }
}

/* === V5 ANIMATIONS === */
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* === V5 UTILITY CLASSES === */
.glass {
  background: var(--glass-light);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
}

.dark .glass {
  background: var(--glass-dark);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-strong {
  background: rgba(18, 18, 18, 0.95);
}

.gradient-brand {
  background: var(--gradient-brand);
}

.gradient-success {
  background: var(--gradient-success);
}

.gradient-danger {
  background: var(--gradient-danger);
}

.gradient-aurora {
  background: var(--gradient-aurora);
  background-size: 200% 200%;
}

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

.hover-lift {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.click-shrink:active {
  transform: scale(0.98);
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

.animate-appear {
  animation: appear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-aurora {
  background: var(--gradient-aurora);
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@layer base {
  * {
    @apply border-gray-200 dark:border-gray-700;
  }
  body {
    @apply bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  @media (prefers-color-scheme: dark) {
    body {
      @apply bg-black text-gray-100;
    }
  }
}
