/**
 * Modern Tech Effects - Cyber Byte Perú
 * Efectos modernos y tecnológicos para un diseño futurista
 */

/* ============================================
   VARIABLES MODERNAS
   ============================================ */

:root {
  --gradient-primary: linear-gradient(135deg, #4FACFE 0%, #00F2FE 100%);
  --gradient-secondary: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  --gradient-accent: linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
  --gradient-dark: linear-gradient(135deg, #0A0E27 0%, #1a1f3a 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  
  --shadow-glow-blue: 0 0 20px rgba(79, 172, 254, 0.3), 0 0 40px rgba(79, 172, 254, 0.2);
  --shadow-glow-purple: 0 0 20px rgba(102, 126, 234, 0.3), 0 0 40px rgba(102, 126, 234, 0.2);
  --shadow-neomorphism: 8px 8px 16px rgba(0, 0, 0, 0.3), -8px -8px 16px rgba(255, 255, 255, 0.05);
  
  --blur-glass: blur(10px);
  --blur-strong: blur(20px);
}

/* ============================================
   BACKGROUND ANIMADO - PARTÍCULAS
   ============================================ */

.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--gradient-dark);
}

.animated-background::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(79, 172, 254, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(245, 87, 108, 0.08) 0%, transparent 50%);
  animation: backgroundMove 20s ease-in-out infinite;
}

.animated-background::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(79, 172, 254, 0.03) 2px, rgba(79, 172, 254, 0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(102, 126, 234, 0.03) 2px, rgba(102, 126, 234, 0.03) 4px);
  opacity: 0.5;
  animation: gridMove 30s linear infinite;
}

@keyframes backgroundMove {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-10%, -10%) scale(1.1);
  }
  66% {
    transform: translate(10%, 10%) scale(0.9);
  }
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* ============================================
   GLASSMORPHISM - EFECTOS DE VIDRIO
   ============================================ */

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(79, 172, 254, 0.3);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(79, 172, 254, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

/* ============================================
   GRADIENTES MODERNOS
   ============================================ */

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.gradient-border {
  position: relative;
  background: var(--color-bg-dark);
  border-radius: var(--radius-xl);
  padding: 2px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  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;
}

/* ============================================
   SOMBRAS Y GLOWS MODERNOS
   ============================================ */

.shadow-glow-blue {
  box-shadow: var(--shadow-glow-blue);
}

.shadow-glow-purple {
  box-shadow: var(--shadow-glow-purple);
}

.shadow-neomorphism {
  box-shadow: var(--shadow-neomorphism);
}

/* ============================================
   ANIMACIONES AVANZADAS
   ============================================ */

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(79, 172, 254, 0.8), 0 0 60px rgba(79, 172, 254, 0.4);
  }
}

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

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

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

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

.shimmer-effect {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* ============================================
   EFECTOS DE HOVER AVANZADOS
   ============================================ */

.hover-lift {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(79, 172, 254, 0.3);
}

.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow-blue);
  transform: scale(1.05);
}

.hover-gradient {
  position: relative;
  overflow: hidden;
}

.hover-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.1;
  transition: left 0.5s ease;
  z-index: 0;
}

.hover-gradient:hover::before {
  left: 100%;
}

.hover-gradient > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   LÍNEAS Y CONEXIONES TECNOLÓGICAS
   ============================================ */

.tech-line {
  position: relative;
  overflow: hidden;
}

.tech-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  animation: lineMove 3s ease-in-out infinite;
}

@keyframes lineMove {
  0% {
    left: -100%;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* ============================================
   PARTÍCULAS FLOTANTES
   ============================================ */

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(79, 172, 254, 0.5);
  border-radius: 50%;
  animation: particleFloat 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0;
  }
}

/* ============================================
   EFECTOS DE TEXTO MODERNOS
   ============================================ */

.text-glow {
  text-shadow: 
    0 0 10px rgba(79, 172, 254, 0.5),
    0 0 20px rgba(79, 172, 254, 0.3),
    0 0 30px rgba(79, 172, 254, 0.2);
}

.text-gradient-animated {
  background: linear-gradient(
    90deg,
    #4FACFE 0%,
    #00F2FE 25%,
    #667EEA 50%,
    #764BA2 75%,
    #4FACFE 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rotate-gradient 3s linear infinite;
}

/* ============================================
   BOTONES MODERNOS
   ============================================ */

.btn-modern {
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-weight: 600;
  padding: var(--spacing-md) var(--spacing-2xl);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

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

.btn-modern:hover::before {
  width: 300px;
  height: 300px;
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

.btn-modern > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   CARDS MODERNOS
   ============================================ */

.card-modern {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card-modern:hover::before {
  transform: scaleX(1);
}

.card-modern:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(79, 172, 254, 0.3);
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(79, 172, 254, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
  .animated-background::before {
    animation-duration: 15s;
  }
  
  .glass-effect,
  .glass-card {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
}
