/* Custom Animations and Styling */

/* Lightning background effect */
.lightning-bg {
  position: relative;
  overflow: hidden;
}

.lightning-bg::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 2px,
    rgba(57, 255, 20, 0.03) 2px,
    rgba(57, 255, 20, 0.03) 4px
  );
  animation: lightning-scan 15s linear infinite;
  pointer-events: none;
}

@keyframes lightning-scan {
  0% {
    transform: translateX(-50%) translateY(-50%);
  }
  100% {
    transform: translateX(0%) translateY(0%);
  }
}

/* Storm text effect */
.storm-text {
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 20px rgba(57, 255, 20, 0.3), 0 0 30px rgba(57, 255, 20, 0.2);
  animation: text-flicker 3s ease-in-out infinite;
}

@keyframes text-flicker {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 20px rgba(57, 255, 20, 0.3), 0 0 30px rgba(57, 255, 20, 0.2);
  }
  50% {
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.7), 0 0 30px rgba(57, 255, 20, 0.5), 0 0 45px rgba(57, 255, 20, 0.3);
  }
}

/* Pulse glow animation for CTA buttons */
.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.8);
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Prose styling for readability */
.prose {
  color: #d1d5db;
  line-height: 1.75;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose h2 {
  color: #39ff14;
  font-weight: 700;
  font-size: 1.875em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
}

.prose h3 {
  color: #39ff14;
  font-weight: 600;
  font-size: 1.5em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose strong {
  color: #fff;
  font-weight: 600;
}

.prose a {
  color: #39ff14;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #2ee010;
}

.prose code {
  color: #39ff14;
  background-color: rgba(57, 255, 20, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.prose blockquote {
  font-style: italic;
  color: #9ca3af;
  border-left: 4px solid #39ff14;
  padding-left: 1em;
  margin: 1.6em 0;
}

/* Parallax effect for sections */
@media (prefers-reduced-motion: no-preference) {
  .parallax-section {
    transform: translateZ(0);
    will-change: transform;
  }
}

/* Hover tilt effect */
.hover-tilt:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  transition: transform 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
  background: #39ff14;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2ee010;
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(57, 255, 20, 0.3);
  border-top-color: #39ff14;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Electric border effect */
.electric-border {
  border: 2px solid transparent;
  background: linear-gradient(#0a0e1a, #0a0e1a) padding-box, linear-gradient(90deg, #39ff14, #00ffff, #39ff14)
    border-box;
  animation: electric-flow 3s linear infinite;
}

@keyframes electric-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

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

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

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h2 {
    font-size: 1.5em;
  }

  .prose h3 {
    font-size: 1.25em;
  }
}
