/**
 * Next-level enhancements for Crypto Ninja Trades website
 * Ultra-modern 2025+ design with cutting-edge effects and responsiveness
 */

/* ===== ADVANCED RESPONSIVE LAYOUT ===== */
:root {
  --ninja-black: #0A0A0A;
  --ninja-dark: #1A1A1A;
  --ninja-gray: #333333;
  --ninja-light: #E0E0E0;
  --neon-green: #375F7C; /* Sophisticated blue-grey */
  --electric-blue: #567890; /* Muted steel blue-grey */
  --ninja-purple: #2F414F; /* Deep blue-grey */
  --ninja-gold: #4A6378; /* Medium blue-grey */
}

/* Liquid mesh background */
.liquid-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M50,15 L85,50 L50,85 L15,50 Z" stroke="%23444444" fill="none" stroke-width="1"/></svg>');
  background-size: 80px 80px;
  filter: blur(1px);
  animation: meshFloat 60s infinite alternate linear;
}

@keyframes meshFloat {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* Cyberpunk scan line effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 9;
  opacity: 0.08;
}

.scanlines::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(70, 70, 70, 0.05) 51%);
  background-size: 100% 4px;
  animation: scanline 6s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* 3D Card hover effects */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  perspective: 1000px;
}

.card-3d:hover {
  transform: translateZ(20px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 25px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 51, 68, 0.3);
}

.card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(0, 51, 68, 0) 30%, rgba(0, 51, 68, 0.2), rgba(0, 51, 68, 0) 70%);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}

.card-3d:hover::before {
  opacity: 1;
  animation: shine 1.5s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Particle network system */
.particles-network {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Advanced holographic text */
.holographic-text {
  background: linear-gradient(90deg, 
    rgba(55, 95, 124, 0.8),
    rgba(47, 65, 79, 0.8),
    rgba(86, 120, 144, 0.8),
    rgba(74, 99, 120, 0.8),
    rgba(55, 95, 124, 0.8)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  filter: drop-shadow(0 0 2px rgba(47, 65, 79, 0.5));
  animation: hologramShift 5s infinite linear;
}

@keyframes hologramShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.holographic-text::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(90deg, 
    rgba(55, 95, 124, 0.4),
    rgba(47, 65, 79, 0.4),
    rgba(86, 120, 144, 0.4),
    rgba(74, 99, 120, 0.4),
    rgba(55, 95, 124, 0.4)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  z-index: -1;
  filter: blur(8px);
  animation: hologramShift 5s infinite linear reverse;
}

/* Digital wave effect for section separators */
.wave-divider {
  position: relative;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
}

.wave-divider svg {
  position: absolute;
  width: 100%;
  bottom: 0;
  left: 0;
}

.wave-divider .wave1 {
  animation: waveDrift 10s linear infinite alternate;
  opacity: 0.7;
}

.wave-divider .wave2 {
  animation: waveDrift 15s linear infinite alternate-reverse;
  opacity: 0.4;
}

@keyframes waveDrift {
  0% { transform: translateX(-25%) scaleY(1); }
  100% { transform: translateX(25%) scaleY(1.1); }
}

/* Data visualization glow effect */
.data-glow {
  position: relative;
}

.data-glow::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at center, rgba(0, 51, 68, 0.4) 0%, rgba(0, 51, 68, 0) 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: -1;
  transform: scale(0.9);
}

.data-glow:hover::after {
  opacity: 1;
  transform: scale(1.1);
  animation: dataPulse 2s infinite alternate;
}

@keyframes dataPulse {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.15); }
}

/* Mobile responsiveness enhancements */
@media (max-width: 640px) {
  .hero-section {
    padding-top: 6rem;
    padding-bottom: 2rem;
  }
  
  .hero-logo {
    max-width: 160px;
    margin-bottom: 1.5rem;
  }
  
  .gradient-text.main-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .mobile-enhance {
    background: rgba(10, 10, 10, 0.7);
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1rem;
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(0, 51, 68, 0.2);
    border-bottom: 1px solid rgba(0, 51, 68, 0.2);
  }
  
  .ninja-star {
    display: none;
  }
  
  .card-3d {
    transform: none !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 51, 68, 0.2) !important;
  }
  
  .liquid-button::after {
    display: none;
  }
  
  .wave-divider {
    height: 60px;
  }
}

/* Tablet-specific optimizations */
@media (min-width: 641px) and (max-width: 1023px) {
  .hero-section {
    padding-top: 8rem;
  }
  
  .hero-logo {
    max-width: 200px;
  }
  
  .grid-cols-4-tablet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .card-3d:hover {
    transform: translateZ(10px) rotateX(3deg) rotateY(3deg);
  }
  
  .wave-divider {
    height: 80px;
  }
}

/* Large screens optimizations */
@media (min-width: 1536px) {
  .container-xl {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-logo {
    max-width: 280px;
  }
  
  .gradient-text.main-title {
    font-size: 5rem;
  }
  
  .hero-subtitle {
    font-size: 1.75rem;
  }
}

/* Advanced button effects */
.btn-cyberpunk {
  position: relative;
  background: linear-gradient(to right, var(--neon-green), var(--electric-blue));
  border: none;
  color: var(--ninja-light);
  padding: 12px 24px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  transition: all 0.3s;
  z-index: 1;
  box-shadow: 0 0 15px rgba(0, 51, 68, 0.5);
}

.btn-cyberpunk::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--electric-blue), var(--neon-green));
  z-index: -1;
  transition: opacity 0.3s;
  opacity: 0;
}

.btn-cyberpunk:hover::before {
  opacity: 1;
}

.btn-cyberpunk::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(30deg);
  transition: transform 0.3s;
  z-index: 1;
  pointer-events: none;
}

.btn-cyberpunk:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* Futuristic input fields */
.input-future {
  background: rgba(26, 26, 26, 0.7);
  border: 1px solid rgba(0, 51, 68, 0.3);
  padding: 12px 16px;
  color: var(--ninja-light);
  transition: all 0.3s;
  border-radius: 4px;
}

.input-future:focus {
  outline: none;
  border-color: var(--neon-green);
  box-shadow: 0 0 0 3px rgba(0, 51, 68, 0.2);
  background: rgba(10, 10, 10, 0.8);
}

.input-future::placeholder {
  color: rgba(224, 224, 224, 0.5);
}

.input-future + label {
  position: absolute;
  top: 0;
  left: 16px;
  font-size: 12px;
  transform: translateY(-50%);
  background: var(--ninja-dark);
  padding: 0 8px;
  color: var(--neon-green);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s;
}

.input-future:focus + label,
.input-future:not(:placeholder-shown) + label {
  opacity: 1;
}

/* Advanced Hover Group Effects */
.hover-group:hover .hover-show {
  opacity: 1;
  transform: translateY(0);
}

.hover-show {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.hover-group:hover .hover-scale {
  transform: scale(1.05);
}

.hover-scale {
  transition: transform 0.3s;
}

/* Animated background gradient */
.animated-gradient-bg {
  background: linear-gradient(-45deg, #0A0A0A, #0A121A, #001524, #001A2E);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Signature glitch effect */
.glitch-text {
  position: relative;
  color: var(--ninja-light);
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip: rect(0, 0, 0, 0);
}

.glitch-text::before {
  left: 2px;
  text-shadow: 1px 0 #004466;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -1px 0 #002844;
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip: rect(30px, 9999px, 10px, 0); }
  5% { clip: rect(80px, 9999px, 95px, 0); }
  10% { clip: rect(15px, 9999px, 25px, 0); }
  15% { clip: rect(54px, 9999px, 65px, 0); }
  20% { clip: rect(33px, 9999px, 22px, 0); }
  25% { clip: rect(10px, 9999px, 85px, 0); }
  30% { clip: rect(75px, 9999px, 58px, 0); }
  35% { clip: rect(48px, 9999px, 35px, 0); }
  40% { clip: rect(12px, 9999px, 62px, 0); }
  45% { clip: rect(37px, 9999px, 49px, 0); }
  50% { clip: rect(26px, 9999px, 78px, 0); }
  55% { clip: rect(57px, 9999px, 42px, 0); }
  60% { clip: rect(68px, 9999px, 83px, 0); }
  65% { clip: rect(23px, 9999px, 30px, 0); }
  70% { clip: rect(45px, 9999px, 16px, 0); }
  75% { clip: rect(72px, 9999px, 38px, 0); }
  80% { clip: rect(19px, 9999px, 56px, 0); }
  85% { clip: rect(39px, 9999px, 81px, 0); }
  90% { clip: rect(21px, 9999px, 65px, 0); }
  95% { clip: rect(77px, 9999px, 28px, 0); }
  100% { clip: rect(35px, 9999px, 53px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(65px, 9999px, 32px, 0); }
  5% { clip: rect(34px, 9999px, 15px, 0); }
  10% { clip: rect(43px, 9999px, 61px, 0); }
  15% { clip: rect(40px, 9999px, 73px, 0); }
  20% { clip: rect(19px, 9999px, 39px, 0); }
  25% { clip: rect(75px, 9999px, 42px, 0); }
  30% { clip: rect(22px, 9999px, 65px, 0); }
  35% { clip: rect(49px, 9999px, 31px, 0); }
  40% { clip: rect(56px, 9999px, 13px, 0); }
  45% { clip: rect(46px, 9999px, 76px, 0); }
  50% { clip: rect(21px, 9999px, 55px, 0); }
  55% { clip: rect(64px, 9999px, 37px, 0); }
  60% { clip: rect(48px, 9999px, 72px, 0); }
  65% { clip: rect(35px, 9999px, 51px, 0); }
  70% { clip: rect(17px, 9999px, 63px, 0); }
  75% { clip: rect(78px, 9999px, 27px, 0); }
  80% { clip: rect(39px, 9999px, 54px, 0); }
  85% { clip: rect(42px, 9999px, 69px, 0); }
  90% { clip: rect(29px, 9999px, 44px, 0); }
  95% { clip: rect(59px, 9999px, 22px, 0); }
  100% { clip: rect(33px, 9999px, 70px, 0); }
}

/* Reactive section highlights */
.section-highlight {
  position: relative;
  padding: 2px;
  margin: 0 -2px;
  border-radius: 6px;
  background: linear-gradient(-45deg, #375F7C, #2F414F, #567890, #4A6378);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

.section-highlight-inner {
  background: var(--ninja-black);
  border-radius: 4px;
  padding: 24px;
  height: 100%;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Smart Theme Adaptation */
@media (prefers-reduced-motion) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-color-scheme: light) {
  .adaptive-color {
    color: var(--ninja-dark);
  }
}

/* Crisp typography enhancements for readability */
.font-crisp {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Batman-style Smoke Effect */
.smoke-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.smoke {
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(30, 30, 35, 0.1);
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0;
  transform: scale(0);
  animation: smoke-float 15s ease-out infinite;
}

@keyframes smoke-float {
  0% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }
  10% {
    opacity: 0.1;
    transform: scale(0.5) translateY(0);
  }
  50% {
    opacity: 0.05;
    transform: scale(1.5) translateY(-40px);
  }
  100% {
    opacity: 0;
    transform: scale(2) translateY(-100px);
  }
}
