/* Custom CSS variables matching the original theme */
:root {
  --radius: 0.625rem;
  --background: #0a0a0f;
  --foreground: #f8fafc;
  --card: #12121a;
  --card-foreground: #f8fafc;
  --popover: #12121a;
  --popover-foreground: #f8fafc;
  --primary: #6366f1;
  --primary-foreground: #ffffff;
  --secondary: #1e1e2a;
  --secondary-foreground: #f8fafc;
  --muted: #1e1e2a;
  --muted-foreground: #94a3b8;
  --accent: #6366f1;
  --accent-foreground: #ffffff;
  --accent-hover: #818cf8;
  --destructive: #ef4444;
  --border: rgba(99, 102, 241, 0.2);
  --input: rgba(99, 102, 241, 0.15);
  --ring: #6366f1;
  --bg-elevated: #12121a;
}

/* Custom Cursor Styles */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid #6366f1;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.custom-cursor.hover {
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
}

.custom-cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #6366f1;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .custom-cursor,
  .custom-cursor-dot {
    display: none !important;
  }
}

/* Hide default cursor on desktop when hover is supported */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none !important;
  }
  a, button, input, select, textarea, .cursor-pointer, [onclick] {
    cursor: none !important;
  }
}

/* Hero Animation Styles */
.hero-gradient-bg {
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
              radial-gradient(ellipse at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
}

/* Particle Animation */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #6366f1;
  border-radius: 50%;
  opacity: 0.6;
  animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translate(20px, -30px) scale(1.2);
    opacity: 0.8;
  }
  50% {
    transform: translate(-10px, -60px) scale(0.8);
    opacity: 0.4;
  }
  75% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.7;
  }
}

/* Glowing text effect */
.glow-text {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.5),
               0 0 40px rgba(99, 102, 241, 0.3),
               0 0 60px rgba(99, 102, 241, 0.2);
}

/* Metallic Orbs Animation */
.metallic-orb {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.metallic-orb::before {
  content: '';
  position: absolute;
  top: 5%;
  left: 20%;
  width: 30%;
  height: 15%;
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, transparent 100%);
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.metallic-orb:hover {
  filter: brightness(1.1);
}

/* Orb glow effect */
.orb-glow {
  pointer-events: none;
  transition: all 0.3s ease;
}

/* Workflow Animation */
.workflow-node {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.workflow-node:hover {
  transform: translateY(-4px) scale(1.05);
}

.workflow-node:active {
  transform: scale(0.98);
}

/* Workflow connection pulse */
@keyframes workflow-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

.workflow-connection-active {
  animation: workflow-pulse 1.5s ease-in-out infinite;
}

/* Node status indicator */
@keyframes node-processing {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
  }
}

.node-processing {
  animation: node-processing 2s ease-in-out infinite;
}

/* 3D Card Tilt */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-3d:hover {
  box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.25),
              0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Holographic shimmer effect */
.holographic-shimmer {
  position: relative;
  overflow: hidden;
}

.holographic-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.15),
    rgba(99, 102, 241, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.holographic-shimmer:hover::before {
  left: 100%;
}

/* Marquee Animation */
.marquee {
  animation: marquee 30s linear infinite;
  will-change: transform;
  display: flex;
  flex-shrink: 0;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-container {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Pulse animation for nodes */
.pulse-node {
  animation: pulse 2s ease-in-out infinite;
}

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

/* Line drawing animation */
.line-draw {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 2s ease forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Counter number animation */
.counter-number {
  font-variant-numeric: tabular-nums;
}

/* Gradient border animation */
.gradient-border {
  position: relative;
  background: #12121a;
  border-radius: 12px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #6366f1);
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

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

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Badge glow effect */
.badge-glow {
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4),
                0 0 40px rgba(99, 102, 241, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6),
                0 0 60px rgba(99, 102, 241, 0.3);
  }
}

/* Step progress animation */
.step-line {
  position: relative;
  overflow: hidden;
}

.step-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transform: translateX(-100%);
  animation: step-progress 2s ease forwards;
}

@keyframes step-progress {
  to {
    transform: translateX(0);
  }
}

/* Blob animation for hero */
.blob {
  border-radius: 50%;
  filter: blur(60px);
  animation: blob-float 8s ease-in-out infinite;
}

@keyframes blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

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

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #818cf8;
}

/* Button hover effects */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-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.5s ease;
}

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

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

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

/* Custom fade animations for texts */
@keyframes customFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: customFadeIn 0.8s ease forwards;
}

/* Apply border box fixes */
* {
  border-color: rgba(99, 102, 241, 0.2);
}
