/* ============================================
   VISUAL EFFECTS
   Vibe Working & AI Workforce
   Glass Morphism, Glows, Shadows, Gradients
   ============================================ */

/* ===== GLASS MORPHISM ===== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.glass-card:hover {
  background: var(--glass-bg-strong);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

/* ===== GRADIENT BACKGROUNDS ===== */

.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-accent {
  background: var(--gradient-accent);
}

.bg-gradient-hero {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.bg-gradient-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-glow);
  animation: gradient-shift 10s ease infinite;
  opacity: 0.5;
}

.bg-gradient-animated {
  background: linear-gradient(
    -45deg,
    var(--color-primary-light),
    var(--color-secondary),
    var(--color-accent),
    var(--color-primary)
  );
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* ===== GLOW EFFECTS ===== */

.glow {
  box-shadow: var(--shadow-glow);
}

.glow-accent {
  box-shadow: var(--shadow-glow-accent);
}

.glow-success {
  box-shadow: var(--shadow-glow-success);
}

.glow-strong {
  box-shadow:
    var(--shadow-glow),
    0 0 60px rgba(59, 130, 246, 0.3);
}

/* Agent-specific glows */
.glow-agent-research {
  box-shadow: var(--shadow-agent-research);
}

.glow-agent-content {
  box-shadow: var(--shadow-agent-content);
}

.glow-agent-design {
  box-shadow: var(--shadow-agent-design);
}

.glow-agent-code {
  box-shadow: var(--shadow-agent-code);
}

.glow-agent-analysis {
  box-shadow: var(--shadow-agent-analysis);
}

.glow-agent-automation {
  box-shadow: var(--shadow-agent-automation);
}

/* ===== GRADIENT BORDERS ===== */

.gradient-border {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.gradient-border-animated {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.gradient-border-animated::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    60deg,
    var(--color-primary),
    var(--color-secondary),
    var(--color-accent),
    var(--color-primary)
  );
  background-size: 300% 300%;
  animation: gradient-shift 3s linear infinite;
  z-index: -1;
}

.gradient-border-animated::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-surface);
  z-index: -1;
}

/* ===== SPOTLIGHT EFFECT ===== */

.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.1) 0%,
    transparent 40%
  );
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

/* ===== MESH GRADIENT BACKGROUNDS ===== */

.mesh-gradient {
  position: relative;
  overflow: hidden;
}

.mesh-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, var(--color-primary-ultra-light) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--color-secondary-ultra-light) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, var(--color-accent-ultra-light) 0%, transparent 50%);
  animation: morph 20s ease-in-out infinite;
  opacity: 0.3;
}

/* ===== SHADOW VARIATIONS ===== */

.shadow-xs {
  box-shadow: var(--shadow-xs);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

.shadow-inner {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-none {
  box-shadow: none !important;
}

/* ===== FROSTED GLASS EFFECT ===== */

.frosted {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== NEUMORPHISM (Soft Shadow Effect) ===== */

.neumorphic {
  background: var(--color-surface);
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.1),
    -8px -8px 16px rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
}

.neumorphic-inset {
  background: var(--color-surface);
  box-shadow:
    inset 4px 4px 8px rgba(0, 0, 0, 0.1),
    inset -4px -4px 8px rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
}

/* ===== GRADIENT TEXT ===== */

.text-gradient-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-animated {
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-secondary),
    var(--color-accent),
    var(--color-primary)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s linear infinite;
}

/* ===== SHIMMER EFFECT ===== */

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* ===== BORDER GLOW ===== */

.border-glow {
  position: relative;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
}

.border-glow::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--gradient-primary);
  opacity: 0;
  filter: blur(10px);
  transition: opacity var(--transition-base);
  z-index: -1;
}

.border-glow:hover::before {
  opacity: 0.6;
}

/* ===== INTERACTIVE TILT (3D) ===== */

.tilt-card {
  transform-style: preserve-3d;
  transition: transform var(--transition-base);
}

.tilt-card:hover {
  transform:
    perspective(1000px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    scale(1.02);
}

.tilt-card-inner {
  transform: translateZ(20px);
}

/* ===== MAGNETIC EFFECT ===== */

.magnetic {
  transition: transform var(--transition-spring);
}

.magnetic:hover {
  transform:
    translate(var(--magnetic-x, 0px), var(--magnetic-y, 0px))
    scale(1.05);
}

/* ===== FLOATING EFFECT ===== */

.floating {
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

/* ===== PARTICLE CONTAINER ===== */

.particle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--z-particles);
}

/* ===== BLOB SHAPES ===== */

.blob {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morph 8s ease-in-out infinite;
}

.blob-sm {
  width: 200px;
  height: 200px;
}

.blob-md {
  width: 400px;
  height: 400px;
}

.blob-lg {
  width: 600px;
  height: 600px;
}

/* ===== GRADIENT MESH DECORATIONS ===== */

.gradient-mesh-1 {
  background: radial-gradient(
    ellipse at top left,
    var(--color-primary-ultra-light) 0%,
    transparent 50%
  );
}

.gradient-mesh-2 {
  background: radial-gradient(
    ellipse at bottom right,
    var(--color-secondary-ultra-light) 0%,
    transparent 50%
  );
}

.gradient-mesh-3 {
  background: radial-gradient(
    ellipse at center,
    var(--color-accent-ultra-light) 0%,
    transparent 60%
  );
}

/* ===== DECORATIVE ELEMENTS ===== */

.decoration-circle {
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.1;
  filter: blur(40px);
}

.decoration-square {
  background: var(--gradient-accent);
  opacity: 0.08;
  filter: blur(30px);
  transform: rotate(45deg);
}

/* ===== HOVER EFFECTS ===== */

.hover-gradient-shift {
  position: relative;
  background: var(--color-surface);
  transition: background var(--transition-base);
}

.hover-gradient-shift::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-base);
  border-radius: inherit;
}

.hover-gradient-shift:hover::before {
  opacity: 1;
}

.hover-gradient-shift > * {
  position: relative;
  z-index: 1;
}

/* ===== FOCUS EFFECTS ===== */

.focus-glow:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--color-bg),
    0 0 0 5px var(--color-primary),
    var(--shadow-glow);
}

/* ===== AGENT AVATAR EFFECTS ===== */

.agent-avatar {
  position: relative;
  border-radius: var(--radius-agent);
  background: var(--color-surface);
  transition: all var(--transition-base);
}

.agent-avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient-primary);
  opacity: 0;
  filter: blur(8px);
  transition: opacity var(--transition-base);
  z-index: -1;
}

.agent-avatar:hover::before,
.agent-avatar.active::before {
  opacity: 0.6;
}

.agent-avatar.working {
  animation: glow-pulse 2s infinite;
}

/* ===== PROGRESS INDICATORS ===== */

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.6s ease-out;
}

/* ===== TOOLTIP EFFECTS ===== */

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--space-2) var(--space-3);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-tooltip);
}

.tooltip:hover::after {
  opacity: 1;
}

/* ===== BADGE EFFECTS ===== */

.badge-glow {
  position: relative;
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-glow);
}

.badge-glow::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: inherit;
  filter: blur(12px);
  opacity: 0.4;
  z-index: -1;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.hardware-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform;
}
