.flow {
  position: relative;
  width: 420px;
  height: 460px;
  /* tilt за курсором: --rx/--ry пишет useTilt */
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.card {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  border-radius: 20px;
  z-index: 2;
}

.cardRub {
  width: 100px;
  height: 100px;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.15);
  animation: float 6s ease-in-out infinite;
}

.cardEksa {
  width: 120px;
  height: 120px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* непрозрачная подложка, чтобы траектория не просвечивала под логотипом */
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%),
    var(--bg-mid);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: glowPulse 4s ease-in-out infinite;
}

.cardUsdt {
  width: 100px;
  height: 100px;
  bottom: 0;
  right: 0;
  background: rgba(38, 161, 123, 0.12);
  border: 1px solid rgba(38, 161, 123, 0.3);
  box-shadow: 0 0 24px rgba(38, 161, 123, 0.25);
  animation: float 6s ease-in-out 1.8s infinite;
}

.eksaLogo {
  opacity: 0.9;
  height: 100px;
  width: 80px;
  object-fit: contain;
}

.ghost {
  position: absolute;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.2;
  z-index: 1;
  backdrop-filter: blur(8px);
}

.ghostBtc {
  top: 10px;
  right: 40px;
  animation: drift 9s ease-in-out infinite;
}

.ghostEth {
  bottom: 30px;
  left: 10px;
  animation: drift 11s ease-in-out 2s infinite reverse;
}

.logoCircle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.logoRub {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.logoUsdt {
  background: rgba(38, 161, 123, 0.25);
  color: var(--success);
}

/* Настоящий логотип монеты — круглый и цветной, подложка не нужна. */
.logoHasImg {
  background: none;
}

.logoImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Декоративные «призрачные» монеты фона. */
.ghostImg {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
}

.badge {
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: var(--bg-mid);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  white-space: nowrap;
  min-width: 24px;
  min-height: 22px;
  display: flex;
  align-items: center;
}

.caret {
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 2px;
  background: currentColor;
  animation: blink 0.9s step-end infinite;
}

.badgeRub {
  color: var(--text-secondary);
}

.badgeUsdt {
  color: var(--success);
}

.status {
  position: absolute;
  bottom: -30px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--success);
  transition: color 0.3s ease;
}

.statusPending {
  color: var(--text-secondary);
}

.statusPending .statusDot {
  background: var(--text-secondary);
  animation-duration: 0.8s;
}

.statusDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: dotPulse 1.6s ease-in-out infinite;
  transition: background 0.3s ease;
}

.path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.dashLine {
  animation: dashFlow 1.2s linear infinite;
}

.spark {
  animation: dotPulse 3s ease-in-out infinite;
}

.spark:nth-of-type(odd) {
  animation-delay: 1.5s;
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 6px -10px;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.22);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -14;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow {
    transform: none;
    transition: none;
  }

  .cardRub,
  .cardUsdt,
  .cardEksa,
  .ghostBtc,
  .ghostEth,
  .dashLine,
  .statusDot,
  .spark,
  .caret {
    animation: none;
  }

  .traveler {
    display: none;
  }
}
