/* =========================================================
   ANIMATIONS — Анимации появления, переходы, прелоадер
   ========================================================= */

/* ----- СКРОЛЛ-АНИМАЦИИ ----- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 {
  transition-delay: 0.1s;
}
.animate-on-scroll.delay-2 {
  transition-delay: 0.2s;
}
.animate-on-scroll.delay-3 {
  transition-delay: 0.3s;
}
.animate-on-scroll.delay-4 {
  transition-delay: 0.4s;
}
.animate-on-scroll.delay-5 {
  transition-delay: 0.5s;
}

/* ----- СТРАНИЧНЫЙ ПЕРЕХОД (затемнение) ----- */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

.page-content {
  opacity: 0;
  animation: fadeInContent 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.page-content.delay {
  animation-delay: 0.3s;
}

.header.page-content {
  animation: none;
  opacity: 1;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ----- ПРЕЛОАДЕР (скелетон) ----- */
.skeleton-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--green-900);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  transition: opacity 0.4s ease;
}

.skeleton-preloader.active {
  display: flex;
}

.skeleton-preloader.hide {
  opacity: 0;
  pointer-events: none;
}

.skeleton-content {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  flex-shrink: 0;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.w70 {
  width: 70%;
}
.skeleton-line.w50 {
  width: 50%;
}
.skeleton-line.w90 {
  width: 90%;
}
.skeleton-line.w60 {
  width: 60%;
}
.skeleton-line.w40 {
  width: 40%;
}
.skeleton-line.w30 {
  width: 30%;
}
.skeleton-line.h12 {
  height: 12px;
}
.skeleton-line.h10 {
  height: 10px;
}
.skeleton-line.h32 {
  height: 32px;
  border-radius: 8px;
}

.skeleton-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 20px 24px;
}

.skeleton-block .row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.skeleton-block .line-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-buttons {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

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

/* ----- ДЕКОРАТИВНЫЕ АНИМАЦИИ ----- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
