/* ============================================
   NICHIFY PRO - ANIMATIONS CSS
   Canlı, Dinamik, Modern Animasyonlar
   ============================================ */

/* ============================================
   1. AURORA BACKGROUND (Arka plan ışıltısı)
   ============================================ */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-bg::before,
.aurora-bg::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: aurora-float 20s ease-in-out infinite;
}

.aurora-bg::before {
  background: var(--accent-blue);
  top: -200px;
  left: -200px;
}

.aurora-bg::after {
  background: var(--accent-purple);
  bottom: -200px;
  right: -200px;
  animation-delay: -10s;
}

.aurora-bg .aurora-3 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: var(--accent-pink);
  filter: blur(120px);
  opacity: 0.1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: aurora-pulse 15s ease-in-out infinite;
}

@keyframes aurora-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(100px, -100px) scale(1.1);
  }
  66% {
    transform: translate(-100px, 100px) scale(0.9);
  }
}

@keyframes aurora-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.2;
  }
}

/* ============================================
   2. FADE IN ANIMATIONS
   ============================================ */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-down {
  animation: fadeInDown 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Sıralı gecikmeler (kartlar için) */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* ============================================
   3. SCALE ANIMATIONS
   ============================================ */
.scale-in {
  animation: scaleIn 0.5s var(--transition-bounce) forwards;
  opacity: 0;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pop-in {
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   4. PULSE / GLOW EFFECTS
   ============================================ */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(77, 163, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(77, 163, 255, 0.8), 0 0 60px rgba(167, 139, 250, 0.4);
  }
}

.pulse-dot {
  position: relative;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  transform: translate(-50%, -50%);
  animation: pulseDot 1.5s ease-out infinite;
}

@keyframes pulseDot {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3);
  }
}

/* Live indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(69, 224, 138, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(69, 224, 138, 0);
  }
}

/* ============================================
   5. FLOATING ANIMATIONS
   ============================================ */
.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-slow {
  animation: float 6s ease-in-out infinite;
}

.float-fast {
  animation: float 2s ease-in-out infinite;
}

/* ============================================
   6. SHIMMER (Skeleton Loading)
   ============================================ */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-elevated) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  animation: shimmer-sweep 1.5s linear infinite;
}

@keyframes shimmer-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================
   7. SPINNER / LOADING
   ============================================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Dual ring spinner */
.spinner-dual {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
}

.spinner-dual::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid transparent;
  border-color: var(--accent-blue) transparent var(--accent-purple) transparent;
  animation: spinDual 1.2s linear infinite;
}

@keyframes spinDual {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

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

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

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

/* ============================================
   8. SLIDE ANIMATIONS
   ============================================ */
.slide-in-bottom {
  animation: slideInBottom 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes slideInBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   9. SHAKE / WIGGLE
   ============================================ */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.wiggle {
  animation: wiggle 0.6s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* ============================================
   10. HOVER EFFECTS
   ============================================ */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-grow {
  transition: transform var(--transition-base);
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: var(--glow-blue);
}

.hover-rotate {
  transition: transform var(--transition-base);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Tilt 3D effect */
.tilt-3d {
  transition: transform var(--transition-base);
  transform-style: preserve-3d;
}

.tilt-3d:hover {
  transform: perspective(1000px) rotateY(5deg) rotateX(-5deg);
}

/* ============================================
   11. GRADIENT BORDER (Animasyonlu kenarlık)
   ============================================ */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-aurora);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradient-shift 4s ease infinite;
  pointer-events: none;
}

.gradient-border-content {
  background: var(--bg-card);
  border-radius: inherit;
  padding: var(--space-lg);
  position: relative;
}

/* ============================================
   12. NUMBER COUNTER GLOW
   ============================================ */
.counter-glow {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  display: inline-block;
  position: relative;
}

.counter-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  filter: blur(20px);
  opacity: 0.3;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* ============================================
   13. RIPPLE EFFECT (Tıklama dalgası)
   ============================================ */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   14. TYPING ANIMATION (Yazılıyor efekti)
   ============================================ */
.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-blue);
  animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-blue); }
}

/* ============================================
   15. BOUNCE
   ============================================ */
.bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-15px);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* ============================================
   16. GLITCH EFFECT
   ============================================ */
.glitch {
  position: relative;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

/* ============================================
   17. PROGRESS BAR ANIMATION
   ============================================ */
.progress-bar {
  height: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: inherit;
  position: relative;
  animation: progressFill 1.5s ease-out forwards;
  transform-origin: left;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: progressShine 2s linear infinite;
}

@keyframes progressFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================
   18. CARD HOVER MAGIC
   ============================================ */
.card-magic {
  position: relative;
  transition: all var(--transition-base);
  overflow: hidden;
}

.card-magic::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(77, 163, 255, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.card-magic:hover::before {
  left: 100%;
}

.card-magic:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-lg), var(--glow-blue);
}

/* ============================================
   19. BADGE ANIMATIONS
   ============================================ */
.badge-new {
  position: relative;
  display: inline-block;
}

.badge-new::after {
  content: 'YENİ';
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gradient-warm);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  animation: badgePop 0.5s var(--transition-bounce);
}

@keyframes badgePop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   20. SMOOTH ENTER FOR PAGE LOAD
   ============================================ */
.page-enter {
  animation: pageEnter 0.6s ease-out;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   21. NEON GLOW TEXT
   ============================================ */
.neon-text {
  color: var(--text-primary);
  text-shadow: 
    0 0 5px rgba(77, 163, 255, 0.8),
    0 0 10px rgba(77, 163, 255, 0.5),
    0 0 20px rgba(77, 163, 255, 0.3),
    0 0 40px rgba(77, 163, 255, 0.2);
  animation: neonFlicker 3s infinite alternate;
}

@keyframes neonFlicker {
  0%, 100% {
    text-shadow: 
      0 0 5px rgba(77, 163, 255, 0.8),
      0 0 10px rgba(77, 163, 255, 0.5),
      0 0 20px rgba(77, 163, 255, 0.3);
  }
  50% {
    text-shadow: 
      0 0 10px rgba(77, 163, 255, 1),
      0 0 20px rgba(77, 163, 255, 0.8),
      0 0 40px rgba(77, 163, 255, 0.5);
  }
}

/* ============================================
   22. SCROLL REVEAL (JS ile tetiklenecek)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   23. ACCESSIBILITY - Reduce motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .aurora-bg,
  .aurora-bg::before,
  .aurora-bg::after {
    animation: none;
  }
}
