/* Retro-Futuristic Enhancement Styles */

/* Advanced Glow Effects */
.glow-element {
  box-shadow: 
    0 0 5px rgba(0, 212, 255, 0.5),
    0 0 10px rgba(0, 212, 255, 0.3),
    0 0 15px rgba(0, 212, 255, 0.2);
}

.glow-text-enhanced {
  text-shadow: 
    0 0 5px rgba(0, 212, 255, 0.8),
    0 0 10px rgba(0, 212, 255, 0.6),
    0 0 15px rgba(0, 212, 255, 0.4),
    0 0 20px rgba(0, 212, 255, 0.2);
}

/* Geometric Background Patterns */
.geometric-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, transparent 40%, rgba(0, 212, 255, 0.02) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(0, 255, 136, 0.02) 50%, transparent 60%);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Scan Lines Effect */
.scanlines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 212, 255, 0.03) 2px,
    rgba(0, 212, 255, 0.03) 4px
  );
  pointer-events: none;
  animation: scanline-move 10s linear infinite;
}

@keyframes scanline-move {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Neon Border Animation */
.neon-border {
  position: relative;
  border: 1px solid var(--color-border);
}

.neon-border::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(
    45deg,
    var(--color-accent),
    var(--color-accent-secondary),
    var(--color-accent)
  );
  background-size: 200% 200%;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-normal);
  animation: neon-glow 3s ease-in-out infinite alternate;
  z-index: -1;
}

.neon-border:hover::before {
  opacity: 1;
}

@keyframes neon-glow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Holographic Effect */
.holographic {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1) 0%,
    rgba(0, 255, 136, 0.1) 25%,
    rgba(251, 191, 36, 0.1) 50%,
    rgba(0, 255, 136, 0.1) 75%,
    rgba(0, 212, 255, 0.1) 100%
  );
  background-size: 200% 200%;
  animation: holographic-shift 4s ease-in-out infinite;
}

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

/* Circuit Board Pattern */
.circuit-pattern {
  position: relative;
}

.circuit-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(0, 255, 136, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%),
    linear-gradient(0deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%);
  background-size: 50px 50px, 50px 50px, 50px 50px, 50px 50px;
  pointer-events: none;
}

/* Data Stream Animation */
.data-stream {
  position: relative;
  overflow: hidden;
}

.data-stream::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 212, 255, 0.1) 25%,
    rgba(0, 255, 136, 0.2) 50%,
    rgba(0, 212, 255, 0.1) 75%,
    transparent 100%
  );
  animation: data-flow 3s ease-in-out infinite;
}

@keyframes data-flow {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Matrix Rain Effect */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.02;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0px,
    rgba(0, 255, 136, 0.8) 1px,
    transparent 2px
  );
  background-size: 1px 20px;
  animation: matrix-fall 20s linear infinite;
}

@keyframes matrix-fall {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Glitch Effect */
.glitch {
  position: relative;
  animation: glitch-main 2s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: var(--color-accent);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: var(--color-accent-secondary);
  z-index: -2;
}

@keyframes glitch-main {
  0%, 99% { transform: translate(0); }
  1% { transform: translate(2px, -1px); }
  2% { transform: translate(-1px, 2px); }
  3% { transform: translate(1px, 1px); }
}

@keyframes glitch-1 {
  0%, 99% { transform: translate(0); }
  1% { transform: translate(-2px, 1px); }
  2% { transform: translate(2px, -1px); }
  3% { transform: translate(-1px, -1px); }
}

@keyframes glitch-2 {
  0%, 99% { transform: translate(0); }
  1% { transform: translate(1px, -2px); }
  2% { transform: translate(-2px, 1px); }
  3% { transform: translate(1px, 2px); }
}

/* Pulse Animation */
.pulse-glow {
  animation: pulse-effect 2s ease-in-out infinite alternate;
}

@keyframes pulse-effect {
  0% {
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
  }
  100% {
    box-shadow: 
      0 0 5px rgba(0, 212, 255, 0.8),
      0 0 10px rgba(0, 212, 255, 0.6),
      0 0 15px rgba(0, 212, 255, 0.4);
  }
}

/* Hexagon Pattern */
.hex-pattern {
  position: relative;
}

.hex-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='none' stroke='%2300d4ff' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

/* Loading Animation */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Retro Effects */
@media (max-width: 768px) {
  .matrix-rain,
  .circuit-pattern::before,
  .hex-pattern::before {
    display: none;
  }
  
  .glitch {
    animation: none;
  }
  
  .glitch::before,
  .glitch::after {
    display: none;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .scanlines::after,
  .matrix-rain,
  .glitch,
  .pulse-glow,
  .loading-dots span {
    animation: none;
  }
  
  .holographic {
    background: rgba(0, 212, 255, 0.1);
  }
  
  .data-stream::after {
    display: none;
  }
}