/* İstatistik kartları — alt boşluk + dans eden figürler */
.card.card--stat,
.home-card.home-card--stat {
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 0 !important;
  overflow: hidden;
  text-align: center;
}

.card--stat__head,
.home-card--stat__head {
  flex-shrink: 0;
  padding: 20px 16px 10px;
}

.card--stat .stat-ico,
.home-card--stat .stat-ico {
  margin-bottom: 10px;
}

.stat-figure {
  position: relative;
  margin-top: auto;
  width: 100%;
  line-height: 0;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.stat-figure img,
.stat-figure svg {
  display: block;
  width: 100%;
  max-height: 112px;
  margin: 0 auto;
  transform-origin: 50% 92%;
  will-change: transform;
}

/* Kullanıcı dans emojileri (siyah arka plan → şeffaf görünüm) */
.stat-dance-emoji {
  width: auto !important;
  max-width: 88%;
  max-height: 118px !important;
  height: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}

/* Dans — her kart farklı ritim (disco zıplama) */
.stat-dance-emoji {
  animation-duration: 0.75s !important;
  animation-timing-function: cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;
  animation-iteration-count: infinite !important;
}

.stat-figure--purple .stat-dance-emoji {
  animation-name: stat-disco-a !important;
}

.stat-figure--orange .stat-dance-emoji {
  animation-name: stat-disco-b !important;
  animation-delay: 0.1s;
}

.stat-figure--green .stat-dance-emoji {
  animation-name: stat-disco-c !important;
  animation-delay: 0.2s;
}

/* Kart üzerine gelince daha hızlı dans */
.card--stat:hover .stat-dance-emoji,
.home-card--stat:hover .stat-dance-emoji {
  animation-duration: 0.55s !important;
}

/* Işıltı parçacıkları */
.stat-figure::before,
.stat-figure::after {
  position: absolute;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
  animation: stat-sparkle 2.2s ease-in-out infinite;
}

.stat-figure::before {
  content: "✦";
  left: 14%;
  bottom: 38%;
}

.stat-figure::after {
  content: "★";
  right: 12%;
  bottom: 52%;
  animation-delay: 0.9s;
  font-size: 11px;
}

.stat-figure--purple::before {
  color: #7c3aed;
}

.stat-figure--purple::after {
  color: #a78bfa;
}

.stat-figure--orange::before {
  color: #ea580c;
}

.stat-figure--orange::after {
  color: #fb923c;
}

.stat-figure--green::before {
  color: #16a34a;
}

.stat-figure--green::after {
  color: #4ade80;
}

/* Arka plan nabız */
.stat-figure--purple {
  background: linear-gradient(180deg, transparent 0%, #f5f3ff 55%, #ede9fe 100%);
  animation: stat-bg-pulse 2.4s ease-in-out infinite;
}

.stat-figure--orange {
  background: linear-gradient(180deg, transparent 0%, #fff7ed 55%, #ffedd5 100%);
  animation: stat-bg-pulse 2.4s ease-in-out infinite;
  animation-delay: 0.4s;
}

.stat-figure--green {
  background: linear-gradient(180deg, transparent 0%, #f0fdf4 55%, #dcfce7 100%);
  animation: stat-bg-pulse 2.4s ease-in-out infinite;
  animation-delay: 0.8s;
}

@keyframes stat-disco-a {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  20% {
    transform: translateY(-14px) rotate(-6deg) scale(1.06);
  }
  40% {
    transform: translateY(-4px) rotate(5deg) scale(1.02);
  }
  55% {
    transform: translateY(-16px) rotate(-4deg) scale(1.08);
  }
  70% {
    transform: translateY(-6px) rotate(6deg) scale(1.03);
  }
  85% {
    transform: translateY(-12px) rotate(-3deg) scale(1.05);
  }
}

@keyframes stat-disco-b {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scaleX(1);
  }
  25% {
    transform: translateY(-12px) rotate(8deg) scaleX(1.05);
  }
  50% {
    transform: translateY(-18px) rotate(-7deg) scaleX(0.96);
  }
  75% {
    transform: translateY(-8px) rotate(5deg) scaleX(1.04);
  }
}

@keyframes stat-disco-c {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  15% {
    transform: translateY(-10px) rotate(-8deg) scale(1.05);
  }
  35% {
    transform: translateY(-17px) rotate(7deg) scale(1.08);
  }
  55% {
    transform: translateY(-6px) rotate(-5deg);
  }
  75% {
    transform: translateY(-14px) rotate(6deg) scale(1.06);
  }
}

@keyframes stat-dance-a {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  12% {
    transform: translateY(-10px) rotate(-4deg) scale(1.04);
  }
  28% {
    transform: translateY(-3px) rotate(3deg) scale(1.01);
  }
  44% {
    transform: translateY(-12px) rotate(-2deg) scale(1.05);
  }
  58% {
    transform: translateY(-5px) rotate(4deg) scale(1.02);
  }
  72% {
    transform: translateY(-9px) rotate(-3deg) scale(1.04);
  }
  86% {
    transform: translateY(-2px) rotate(2deg) scale(1.01);
  }
}

@keyframes stat-dance-b {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scaleX(1);
  }
  20% {
    transform: translateY(-8px) rotate(5deg) scaleX(1.03);
  }
  40% {
    transform: translateY(-14px) rotate(-5deg) scaleX(0.98);
  }
  55% {
    transform: translateY(-6px) rotate(3deg) scaleX(1.02);
  }
  70% {
    transform: translateY(-11px) rotate(-4deg) scaleX(1.04);
  }
  85% {
    transform: translateY(-4px) rotate(2deg) scaleX(1);
  }
}

@keyframes stat-dance-c {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  15% {
    transform: translateY(-7px) rotate(-6deg);
  }
  30% {
    transform: translateY(-13px) rotate(4deg) scale(1.06);
  }
  50% {
    transform: translateY(-5px) rotate(-3deg);
  }
  65% {
    transform: translateY(-11px) rotate(5deg) scale(1.05);
  }
  80% {
    transform: translateY(-6px) rotate(-2deg);
  }
}

@keyframes stat-sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4) translateY(0) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: scale(1.15) translateY(-14px) rotate(20deg);
  }
  65% {
    opacity: 0.6;
    transform: scale(0.9) translateY(-22px) rotate(-10deg);
  }
}

@keyframes stat-bg-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.06);
  }
}

/* Gölge zıplama */
.stat-figure img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

/* 4. kart — zebra maskot (hareketli, aktif) */
.card.card--brand-mascot,
.home-card.home-card--brand-mascot {
  display: flex !important;
  flex-direction: column;
  min-height: 248px;
  padding: 0 !important;
  overflow: hidden;
}

.card--brand-mascot.is-active,
.home-card--brand-mascot.is-active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.card-brand-mascot__wrap {
  position: relative;
  margin-top: auto;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 150px;
  overflow: hidden;
  /* Koyu/mor zemin: PNG siyah arka plan + screen ile zebra görünür (beyaz kartta kaybolmaz) */
  background: linear-gradient(180deg, #f5f3ff 0%, #a78bfa 28%, #7c3aed 55%, #5b21b6 100%);
  animation: stat-bg-pulse 2.4s ease-in-out infinite;
  animation-delay: 1.1s;
}

.card-brand-mascot__wrap::before,
.card-brand-mascot__wrap::after {
  position: absolute;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
  animation: stat-sparkle 2.2s ease-in-out infinite;
}

.card-brand-mascot__wrap::before {
  content: "✦";
  left: 14%;
  bottom: 42%;
  color: #e9d5ff;
}

.card-brand-mascot__wrap::after {
  content: "★";
  right: 12%;
  bottom: 56%;
  color: #fbbf24;
  animation-delay: 0.9s;
  font-size: 11px;
}

.brand-zebra-dance {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 92%;
  max-height: 132px;
  height: auto;
  object-fit: contain;
  transform-origin: 50% 92%;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
  animation: brand-zebra-dance 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  opacity: 1;
  visibility: visible;
  /* Siyah arka planı mor zeminde eritir; düz beyaz kartta kullanılmaz */
  mix-blend-mode: screen;
}

.card--brand-mascot:hover .brand-zebra-dance,
.home-card--brand-mascot:hover .brand-zebra-dance {
  animation-duration: 0.55s;
}

@keyframes brand-zebra-dance {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  20% {
    transform: translateY(-12px) rotate(-4deg) scale(1.04);
  }
  45% {
    transform: translateY(-18px) rotate(5deg) scale(1.07);
  }
  70% {
    transform: translateY(-8px) rotate(-3deg) scale(1.03);
  }
  85% {
    transform: translateY(-14px) rotate(4deg) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-figure--purple,
  .stat-figure--orange,
  .stat-figure--green,
  .stat-figure::before,
  .stat-figure::after {
    animation: none !important;
  }

  .brand-zebra-dance {
    animation: brand-zebra-dance 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite !important;
  }
}

@media (max-width: 640px) {
  .card.card--stat,
  .home-card.home-card--stat {
    min-height: 220px;
  }

  .stat-figure img,
  .stat-figure svg {
    max-height: 96px;
  }

  @keyframes stat-dance-a {
    0%,
    100% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-8px) rotate(-3deg);
    }
  }

  @keyframes stat-dance-b {
    0%,
    100% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-8px) rotate(3deg);
    }
  }

  @keyframes stat-dance-c {
    0%,
    100% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-8px) rotate(-3deg);
    }
  }
}
