/* Advanced Electric Border Effect - Animated Card Style with Lightning */
.electric-border-advanced {
  position: relative;
  display: inline-block;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(45deg, #7df9ff, #00bfff, #7df9ff, #00bfff, #7df9ff);
  background-size: 300% 300%;
  animation: electricFlow 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(125, 249, 255, 0.4));
  overflow: visible;
}

.electric-border-advanced::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #7df9ff, #00bfff, #7df9ff, #00bfff, #7df9ff);
  background-size: 300% 300%;
  border-radius: 18px;
  z-index: -1;
  filter: blur(6px);
  opacity: 0.8;
  animation: electricFlow 4s ease-in-out infinite;
}

.electric-border-advanced::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(45deg, #7df9ff, #00bfff, #7df9ff, #00bfff, #7df9ff);
  background-size: 300% 300%;
  border-radius: 20px;
  z-index: -2;
  filter: blur(12px);
  opacity: 0.6;
  animation: electricFlow 4s ease-in-out infinite;
}

@keyframes electricFlow {
  0% {
    background-position: 0% 50%;
    transform: scale(1);
  }
  25% {
    background-position: 100% 50%;
    transform: scale(1.02);
  }
  50% {
    background-position: 100% 100%;
    transform: scale(1);
  }
  75% {
    background-position: 0% 100%;
    transform: scale(1.02);
  }
  100% {
    background-position: 0% 50%;
    transform: scale(1);
  }
}

/* Pulsing glow effect */
@keyframes electricPulse {
  0%, 100% {
    box-shadow: 
      0 0 20px rgba(125, 249, 255, 0.5),
      0 0 40px rgba(125, 249, 255, 0.3),
      0 0 60px rgba(125, 249, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 0 30px rgba(125, 249, 255, 0.8),
      0 0 60px rgba(125, 249, 255, 0.5),
      0 0 90px rgba(125, 249, 255, 0.2);
  }
}

.electric-border-advanced {
  animation: electricFlow 4s ease-in-out infinite, electricPulse 2s ease-in-out infinite;
}

/* Ensure the card inside has proper styling */
.electric-border-advanced .pricing-card {
  border-radius: 13px;
  background: var(--card-background, #ffffff);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Add some electric distortion effect */
.electric-border-advanced {
  filter: drop-shadow(0 0 20px rgba(125, 249, 255, 0.4));
}

/* Hover effect for extra interactivity */
.electric-border-advanced:hover {
  animation-duration: 2s, 1s;
  filter: drop-shadow(0 0 30px rgba(125, 249, 255, 0.6));
}

/* Lightning Effect */
.lightning-bolt {
  position: absolute;
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, #ffffff, #7df9ff, #00bfff);
  border-radius: 1px;
  opacity: 0;
  animation: lightningStrike 0.1s ease-out;
  z-index: 10;
}

.lightning-bolt::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #ffffff, #7df9ff, #00bfff);
  border-radius: 2px;
  filter: blur(1px);
  opacity: 0.7;
}

.lightning-bolt::after {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, #ffffff, #7df9ff, #00bfff);
  border-radius: 3px;
  filter: blur(2px);
  opacity: 0.4;
}

@keyframes lightningStrike {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  10% {
    opacity: 1;
    transform: scaleY(1);
  }
  90% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
  }
}

/* Lightning positions around the border */
.lightning-1 {
  top: 10%;
  left: 0;
  animation-delay: 0s;
}

.lightning-2 {
  top: 30%;
  right: 0;
  animation-delay: 0.5s;
}

.lightning-3 {
  top: 60%;
  left: 0;
  animation-delay: 1s;
}

.lightning-4 {
  top: 80%;
  right: 0;
  animation-delay: 1.5s;
}

.lightning-5 {
  top: 0;
  left: 20%;
  animation-delay: 2s;
}

.lightning-6 {
  top: 0;
  right: 20%;
  animation-delay: 2.5s;
}

.lightning-7 {
  bottom: 0;
  left: 40%;
  animation-delay: 3s;
}

.lightning-8 {
  bottom: 0;
  right: 40%;
  animation-delay: 3.5s;
}

/* Random lightning strikes */
@keyframes randomLightning {
  0%, 90%, 100% {
    opacity: 0;
  }
  5%, 15% {
    opacity: 1;
  }
}

.lightning-random {
  animation: randomLightning 4s infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .electric-border-advanced {
    padding: 2px;
  }
  
  .electric-border-advanced::before {
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
  }
  
  .electric-border-advanced::after {
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
  }
  
  .lightning-bolt {
    height: 15px;
  }
}
