/* ============================================
   EFFECTS STYLES - ZERO DEFENCE PRO
   Animations, Glitch, Ripple, Particles, Scroll Effects
   Version: 2.0.0 | Complete Effects Library
   ============================================ */

/* --------------------------------------------
   CSS VARIABLES (Effects Specific)
   -------------------------------------------- */
:root {
  --effect-duration-fast: 0.2s;
  --effect-duration-normal: 0.3s;
  --effect-duration-slow: 0.5s;
  --effect-duration-slower: 0.8s;
  --effect-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --effect-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --effect-ease-smooth: cubic-bezier(0.2, 0.9, 0.4, 1.1);
  --glitch-cyan: rgba(0, 255, 255, 0.6);
  --glitch-magenta: rgba(255, 0, 255, 0.4);
  --glitch-red: rgba(255, 0, 100, 0.5);
  --glitch-green: rgba(0, 255, 200, 0.5);
}

/* --------------------------------------------
   RIPPLE EFFECT
   -------------------------------------------- */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.5) 0%, rgba(0, 255, 255, 0.2) 40%, rgba(0, 255, 255, 0) 70%);
  transform: scale(0);
  pointer-events: none;
  animation: rippleAnim 0.6s var(--effect-ease) forwards;
  z-index: 10;
}

@keyframes rippleAnim {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: scale(6);
    opacity: 0;
  }
}

/* Ripple Variants */
.ripple-primary {
  background: radial-gradient(circle, rgba(0, 255, 255, 0.6) 0%, rgba(0, 255, 255, 0.2) 40%, rgba(0, 255, 255, 0) 70%);
}

.ripple-danger {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, rgba(239, 68, 68, 0.2) 40%, rgba(239, 68, 68, 0) 70%);
}

.ripple-success {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.6) 0%, rgba(16, 185, 129, 0.2) 40%, rgba(16, 185, 129, 0) 70%);
}

/* --------------------------------------------
   CLICK EFFECT
   -------------------------------------------- */
.click-effect {
  animation: clickPop 0.15s var(--effect-ease);
}

@keyframes clickPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}

/* Click Pulse Effect */
.click-pulse {
  animation: clickPulse 0.3s var(--effect-ease);
}

@keyframes clickPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
  }
}

/* --------------------------------------------
   GLITCH EFFECT - Professional Version
   -------------------------------------------- */
.glitch-pro {
  position: relative;
  display: inline-block;
  transition: all var(--effect-duration-normal) var(--effect-ease);
}

.glitch-pro::before,
.glitch-pro::after {
  content: attr(data-glitch-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--effect-duration-normal) var(--effect-ease);
}

.glitch-pro:hover {
  text-shadow: 2px 0 var(--glitch-cyan), -2px 0 var(--glitch-cyan);
}

.glitch-pro:hover::before {
  opacity: 0.6;
  animation: glitchShift 0.25s infinite alternate;
  text-shadow: 3px 0 var(--glitch-red);
  z-index: -1;
}

.glitch-pro:hover::after {
  opacity: 0.6;
  animation: glitchShiftReverse 0.25s infinite alternate;
  text-shadow: -3px 0 var(--glitch-green);
  z-index: -1;
}

@keyframes glitchShift {
  0% {
    transform: translate(0, 0);
    clip-path: inset(0% 0% 0% 0%);
  }
  20% {
    transform: translate(2px, -1px);
    clip-path: inset(10% 0% 15% 0%);
  }
  40% {
    transform: translate(-1px, 2px);
    clip-path: inset(30% 0% 5% 0%);
  }
  60% {
    transform: translate(3px, 1px);
    clip-path: inset(60% 0% 20% 0%);
  }
  80% {
    transform: translate(-2px, -1px);
    clip-path: inset(80% 0% 40% 0%);
  }
  100% {
    transform: translate(0, 0);
    clip-path: inset(0% 0% 0% 0%);
  }
}

@keyframes glitchShiftReverse {
  0% {
    transform: translate(0, 0);
    clip-path: inset(0% 0% 0% 0%);
  }
  20% {
    transform: translate(-2px, 1px);
    clip-path: inset(15% 0% 10% 0%);
  }
  40% {
    transform: translate(1px, -2px);
    clip-path: inset(5% 0% 30% 0%);
  }
  60% {
    transform: translate(-3px, -1px);
    clip-path: inset(20% 0% 60% 0%);
  }
  80% {
    transform: translate(2px, 1px);
    clip-path: inset(40% 0% 80% 0%);
  }
  100% {
    transform: translate(0, 0);
    clip-path: inset(0% 0% 0% 0%);
  }
}

/* Glitch Image Effect */
.glitch-image {
  position: relative;
  overflow: hidden;
}

.glitch-image img {
  transition: transform var(--effect-duration-normal) var(--effect-ease);
}

.glitch-image:hover img {
  transform: scale(1.05);
}

.glitch-image::before,
.glitch-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--effect-duration-normal);
}

.glitch-image:hover::before {
  opacity: 0.3;
  animation: imageGlitch 0.2s infinite alternate;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
}

@keyframes imageGlitch {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(3px, -2px);
  }
}

/* --------------------------------------------
   NOTIFICATION TOAST
   -------------------------------------------- */
.notification-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.98), rgba(0, 40, 60, 0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid #00ffff;
  padding: 14px 20px;
  border-radius: 12px;
  color: #00ffff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 255, 0.1);
  z-index: 10000;
  cursor: pointer;
  animation: slideInRight 0.3s var(--effect-ease-smooth);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
}

.notification-toast i {
  font-size: 18px;
}

.notification-toast .toast-content {
  flex: 1;
}

.notification-toast .toast-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.notification-toast .toast-message {
  font-size: 12px;
  opacity: 0.8;
}

.notification-toast .toast-close {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--effect-duration-fast);
}

.notification-toast .toast-close:hover {
  opacity: 1;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Notification Types */
.notification-toast.success {
  border-left-color: #10b981;
  color: #10b981;
}

.notification-toast.error {
  border-left-color: #ef4444;
  color: #ef4444;
}

.notification-toast.warning {
  border-left-color: #f59e0b;
  color: #f59e0b;
}

/* --------------------------------------------
   BACK TO TOP BUTTON
   -------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 44px;
  height: 44px;
  background: rgba(0, 30, 50, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 50%;
  color: #00ffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--effect-duration-normal) var(--effect-ease);
  font-size: 20px;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  background: rgba(0, 255, 255, 0.15);
}

.back-to-top:active {
  transform: translateY(0);
}

/* --------------------------------------------
   SCROLL ANIMATIONS (AOS Style)
   -------------------------------------------- */
[data-animate],
.fade-up,
.fade-down,
.fade-left,
.fade-right,
.zoom-in,
.zoom-out,
.slide-up,
.slide-down {
  opacity: 0;
  transition: opacity var(--effect-duration-slow) var(--effect-ease-smooth),
              transform var(--effect-duration-slow) var(--effect-ease-smooth);
  will-change: opacity, transform;
}

/* Fade Directions */
[data-animate="fade-up"],
.fade-up {
  transform: translateY(40px);
}

[data-animate="fade-down"],
.fade-down {
  transform: translateY(-40px);
}

[data-animate="fade-left"],
.fade-left {
  transform: translateX(-40px);
}

[data-animate="fade-right"],
.fade-right {
  transform: translateX(40px);
}

/* Zoom Effects */
[data-animate="zoom-in"],
.zoom-in {
  transform: scale(0.9);
}

[data-animate="zoom-out"],
.zoom-out {
  transform: scale(1.1);
}

/* Slide Effects */
[data-animate="slide-up"],
.slide-up {
  transform: translateY(60px);
}

[data-animate="slide-down"],
.slide-down {
  transform: translateY(-60px);
}

/* Animate In Class */
.animate-in {
  opacity: 1 !important;
  transform: translate(0) scale(1) !important;
}

/* Stagger Children Animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerFadeIn 0.5s var(--effect-ease-smooth) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------
   TERMINAL STYLES
   -------------------------------------------- */
.terminal-container {
  font-family: 'Courier New', 'Fira Code', 'JetBrains Mono', monospace;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.terminal-header {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: #00ffff;
  font-size: 12px;
  opacity: 0.7;
}

.terminal-body {
  font-size: 14px;
  line-height: 1.6;
}

.terminal-line {
  color: #00ffff;
  font-size: 14px;
  line-height: 1.6;
  margin: 5px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-prompt {
  color: #00ff00;
  font-weight: bold;
}

.terminal-prompt::before {
  content: '$ ';
}

.terminal-command {
  color: #ffff00;
}

.terminal-output {
  color: #aaaaaa;
  margin-left: 20px;
}

.terminal-error {
  color: #ff4444;
}

.terminal-success {
  color: #44ff44;
}

.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: #00ffff;
  vertical-align: middle;
  animation: terminalBlink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes terminalBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-input-line {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.terminal-input-prompt {
  color: #00ff00;
  font-weight: bold;
}

.terminal-input {
  background: transparent;
  border: none;
  color: #00ffff;
  outline: none;
  flex: 1;
  margin-left: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.terminal-input:focus {
  outline: none;
}

/* --------------------------------------------
   PARTICLE CANVAS
   -------------------------------------------- */
#particle-canvas,
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------
   HOVER GLOW EFFECTS
   -------------------------------------------- */
.hover-glow {
  transition: all var(--effect-duration-normal) var(--effect-ease);
}

.hover-glow:hover {
  filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.6));
}

.hover-glow-cyan:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  border-color: rgba(0, 255, 255, 0.6);
}

/* Pulse Animation */
.pulse {
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(25deg);
  animation: shimmerAnim 3s infinite;
}

@keyframes shimmerAnim {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  100% {
    transform: translateX(100%) rotate(25deg);
  }
}

/* --------------------------------------------
   TYPING ANIMATION
   -------------------------------------------- */
.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #00ffff;
  animation: typingAnim 3.5s steps(40, end), blinkCaret 0.75s step-end infinite;
}

@keyframes typingAnim {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCaret {
  from, to { border-color: transparent; }
  50% { border-color: #00ffff; }
}

/* Multi-line typing */
.typing-multi {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid #00ffff;
  animation: blinkCaret 0.75s step-end infinite;
}

/* --------------------------------------------
   LOADING SPINNERS
   -------------------------------------------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 255, 255, 0.2);
  border-top-color: #00ffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pulse Spinner */
.spinner-pulse {
  width: 40px;
  height: 40px;
  background: rgba(0, 255, 255, 0.2);
  border-radius: 50%;
  animation: pulseScale 1.2s ease-in-out infinite;
}

@keyframes pulseScale {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* --------------------------------------------
   GLASS MORPHISM EFFECTS
   -------------------------------------------- */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.glass-card {
  background: rgba(15, 25, 35, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 24px;
  transition: all var(--effect-duration-normal) var(--effect-ease);
}

.glass-card:hover {
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------
   REDUCED MOTION SUPPORT
   -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .glitch-pro:hover::before,
  .glitch-pro:hover::after {
    animation: none;
    opacity: 0.3;
  }
  
  [data-animate],
  .fade-up,
  .fade-down,
  .fade-left,
  .fade-right,
  .zoom-in,
  .zoom-out,
  .slide-up,
  .slide-down {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .stagger-children > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .typing {
    white-space: normal;
    border-right: none;
    animation: none;
  }
  
  .shimmer::after {
    animation: none;
  }
  
  .pulse {
    animation: none;
  }
}

/* --------------------------------------------
   PERFORMANCE OPTIMIZATIONS
   -------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .smooth-scroll {
    scroll-behavior: smooth;
  }
}

/* Hardware acceleration for animations */
.animate-hardware {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}