/* 🚀 Enhanced Tech Creativity & Animation Styles */

/* === Code Rain Effect === */
.code-rain-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
}

#code-rain-canvas {
  width: 100%;
  height: 100%;
}

/* === Circuit Animation === */
.circuit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.4;
  z-index: 1;
}

.circuit-svg {
  width: 100%;
  height: 100%;
}

.circuit-line {
  fill: none;
  stroke: var(--primary-accent);
  stroke-width: 2;
  stroke-dasharray: 10, 5;
  animation: circuit-flow 3s linear infinite;
  filter: url(#glow);
}

.circuit-node {
  fill: var(--secondary-accent);
  animation: node-pulse 2s ease-in-out infinite;
  filter: url(#glow);
}

@keyframes circuit-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -100; }
}

@keyframes node-pulse {
  0%, 100% { r: 8; opacity: 1; }
  50% { r: 12; opacity: 0.7; }
}

/* === Holographic Effects === */
.hologram-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(138, 79, 255, 0.1) 25%,
    transparent 50%,
    rgba(232, 64, 106, 0.1) 75%,
    transparent 100%
  );
  animation: hologram-scan 3s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes hologram-scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* === Network Activity Indicator === */
.network-activity {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 999;
}

.activity-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.activity-dot.upload.active {
  background: var(--primary-accent);
  box-shadow: 0 0 10px var(--glow-color-primary);
  animation: upload-pulse 0.5s ease;
}

.activity-dot.download.active {
  background: var(--secondary-accent);
  box-shadow: 0 0 10px var(--glow-color-secondary);
  animation: download-pulse 0.5s ease;
}

@keyframes upload-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes download-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.activity-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.7rem;
  color: var(--text-color-muted);
  margin-top: 0.5rem;
}

/* === Enhanced Glow Effects === */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 5px var(--primary-accent);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-accent), 0 0 30px var(--primary-accent);
  }
}

@keyframes float-animation {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes slide-in {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === Matrix Code Animation === */
.matrix-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(ellipse at center, rgba(13, 13, 13, 0.9) 0%, rgba(0, 0, 0, 1) 100%);
}

/* === Particle System === */
.particle-system {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary-accent);
  border-radius: 50%;
  opacity: 0.7;
  animation: particle-float 6s linear infinite;
}

@keyframes particle-float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-10vh) translateX(100px);
    opacity: 0;
  }
}

/* === Enhanced Hover Effects === */
.enhanced-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.enhanced-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.enhanced-hover:hover::before {
  left: 100%;
}

/* === Tech UI Elements === */
.tech-border {
  position: relative;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(138, 79, 255, 0.1), rgba(232, 64, 106, 0.1));
  background-clip: padding-box;
}

.tech-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

/* === Data Stream Animation === */
.data-stream {
  position: relative;
  overflow: hidden;
}

.data-stream::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
  animation: data-flow 2s linear infinite;
}

@keyframes data-flow {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* === Cyber Grid === */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -3;
  background-image: 
    linear-gradient(rgba(138, 79, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 79, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* === Glitch Effect === */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.glitch-effect {
  animation: glitch 0.3s ease-in-out infinite;
}

/* === Energy Orbs === */
.energy-orb {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-accent), transparent);
  animation: orb-float 4s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes orb-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

/* === Terminal Window Effect === */
.terminal-window {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-accent);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.terminal-header {
  background: rgba(138, 79, 255, 0.2);
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28ca42; }

.terminal-content {
  padding: 12px;
  font-family: 'Courier New', monospace;
  color: var(--primary-accent);
  line-height: 1.4;
}

/* === Scanning Lines === */
.scan-lines {
  position: relative;
  overflow: hidden;
}

.scan-lines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(138, 79, 255, 0.03) 2px,
    rgba(138, 79, 255, 0.03) 4px
  );
  pointer-events: none;
  animation: scan-move 2s linear infinite;
}

@keyframes scan-move {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .network-activity {
    display: none;
  }
  
  .code-rain-container {
    opacity: 0.08;
  }
  
  .particle-system {
    display: none;
  }
  
  .cyber-grid {
    background-size: 30px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-rain-container,
  .particle-system,
  .cyber-grid {
    display: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
