/* Kelvirox — nx-animations.css */

/* ---- FADE IN ---- */
.nx-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.nx-fade-in.nx-visible {
  opacity: 1;
  transform: translateY(0);
}

.nx-fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.nx-fade-in-left.nx-visible {
  opacity: 1;
  transform: translateX(0);
}

.nx-fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.nx-fade-in-right.nx-visible {
  opacity: 1;
  transform: translateX(0);
}

.nx-fade-in-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.nx-fade-in-scale.nx-visible {
  opacity: 1;
  transform: scale(1);
}

/* ---- STAGGER DELAYS ---- */
.nx-delay-1 { transition-delay: 0.1s; }
.nx-delay-2 { transition-delay: 0.2s; }
.nx-delay-3 { transition-delay: 0.3s; }
.nx-delay-4 { transition-delay: 0.4s; }
.nx-delay-5 { transition-delay: 0.5s; }
.nx-delay-6 { transition-delay: 0.6s; }
.nx-delay-7 { transition-delay: 0.7s; }
.nx-delay-8 { transition-delay: 0.8s; }

/* ---- SVG ANIMATED SEPARATOR ---- */
.nx-animated-sep-svg {
  display: block;
  width: 100%;
  overflow: hidden;
}

.nx-sep-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: nx-draw-line 1.8s ease forwards;
}

@keyframes nx-draw-line {
  to { stroke-dashoffset: 0; }
}

.nx-sep-wave path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: nx-draw-wave 2.5s ease forwards 0.3s;
}

@keyframes nx-draw-wave {
  to { stroke-dashoffset: 0; }
}

/* ---- GRADIENT BACKGROUND ANIMATION ---- */
.nx-animated-bg {
  background-size: 300% 300%;
  animation: nx-grad-move 12s ease infinite;
}

@keyframes nx-grad-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- ROTATING RING ---- */
.nx-rotating-ring {
  animation: nx-rotate 20s linear infinite;
}

@keyframes nx-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nx-rotating-ring-reverse {
  animation: nx-rotate-rev 15s linear infinite;
}

@keyframes nx-rotate-rev {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* ---- PULSING DOT ---- */
.nx-pulse-dot {
  position: relative;
}

.nx-pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.3);
  animation: nx-pulse-ring 2s ease-out infinite;
}

@keyframes nx-pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* ---- SHIMMER EFFECT ---- */
.nx-shimmer {
  position: relative;
  overflow: hidden;
}

.nx-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: nx-shimmer-slide 3s ease infinite;
}

@keyframes nx-shimmer-slide {
  0% { left: -60%; }
  100% { left: 160%; }
}

/* ---- HOVER LIFT ---- */
.nx-hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nx-hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

/* ---- CARD FLIP ---- */
.nx-flip-card {
  perspective: 1000px;
  height: 280px;
}

.nx-flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.nx-flip-card:hover .nx-flip-card-inner {
  transform: rotateY(180deg);
}

.nx-flip-front, .nx-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px;
  text-align: center;
}

.nx-flip-front {
  background: rgba(12, 20, 40, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.nx-flip-back {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.4);
  transform: rotateY(180deg);
}

.nx-flip-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.nx-flip-title {
  font-family: var(--nx-font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.nx-flip-text {
  font-size: 0.88rem;
  color: var(--nx-text-secondary);
  line-height: 1.7;
}

/* ---- TYPEWRITER ---- */
.nx-typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid var(--nx-cyan);
  white-space: nowrap;
  animation: nx-type-cursor 0.8s step-end infinite;
}

@keyframes nx-type-cursor {
  50% { border-color: transparent; }
}

/* ---- SCAN LINE OVERLAY ---- */
.nx-scan-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0),
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* ---- PROGRESS RING ANIMATION ---- */
.nx-ring-animated {
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- COUNTER ANIMATION ---- */
@keyframes nx-count-up {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- HERO PARTICLE FLOAT ---- */
.nx-hero-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: nx-particle-drift 8s ease-in-out infinite;
}

@keyframes nx-particle-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.1); }
  66% { transform: translate(-15px, 15px) scale(0.9); }
}

/* ---- SCORE GAUGE FILL ---- */
.nx-gauge-fill {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-gauge-fill.nx-filled {
  clip-path: inset(0 0% 0 0);
}

/* ---- SLIDE IN VARIATIONS ---- */
.nx-slide-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.nx-slide-up.nx-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- TAG BADGE ANIMATION ---- */
.nx-badge-pulse {
  animation: nx-badge-glow 2s ease-in-out infinite;
}

@keyframes nx-badge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
}

/* ---- LOADING DOT ---- */
.nx-loading-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nx-violet);
  margin: 0 3px;
  animation: nx-dot-bounce 1.2s ease infinite;
}

.nx-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.nx-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes nx-dot-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* ---- GRID LINES ANIMATION ---- */
.nx-grid-animated {
  background-image: 
    linear-gradient(rgba(124, 58, 237, 0) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: nx-grid-fade 4s ease-in-out infinite;
}

@keyframes nx-grid-fade {
  0%, 100% {
    background-image: 
      linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
  }
  50% {
    background-image: 
      linear-gradient(rgba(124, 58, 237, 0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(124, 58, 237, 0.12) 1px, transparent 1px);
  }
}
