/* Automatoon referral-stat cards redesign */
.automatoon-stats-grid {
  gap: 18px;
}

.automatoon-stat-card {
  --automatoon-stat-accent: #f59e0b;
  --automatoon-stat-bright: #fcd34d;
  --automatoon-stat-deep: #f97316;
  position: relative;
  isolation: isolate;
  min-height: 184px;
  overflow: hidden;
  padding: 1.45rem 1rem;
  align-content: center;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% -24%, rgba(245, 158, 11, 0.17), transparent 44%),
    linear-gradient(145deg, #0d0a06 0%, #050505 58%, #020202 100%) !important;
  color: #f8fafc;
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(245, 158, 11, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.automatoon-stat-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--automatoon-stat-accent) 22%,
    var(--automatoon-stat-bright) 52%,
    var(--automatoon-stat-deep) 80%,
    transparent
  );
  box-shadow: 0 0 18px color-mix(in srgb, var(--automatoon-stat-accent) 44%, transparent);
}

.automatoon-stat-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 126px;
  height: 126px;
  right: -68px;
  bottom: -78px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--automatoon-stat-deep) 11%, transparent);
  filter: blur(6px);
}

.automatoon-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(252, 211, 77, 0.58);
  box-shadow:
    0 27px 54px rgba(0, 0, 0, 0.46),
    0 0 26px rgba(245, 158, 11, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.automatoon-stat-card-blue {
  --automatoon-stat-accent: #eab308;
  --automatoon-stat-bright: #fde047;
  --automatoon-stat-deep: #f59e0b;
}

.automatoon-stat-card-green {
  --automatoon-stat-accent: #f59e0b;
  --automatoon-stat-bright: #fcd34d;
  --automatoon-stat-deep: #f97316;
}

.automatoon-stat-card-orange {
  --automatoon-stat-accent: #fb923c;
  --automatoon-stat-bright: #fdba74;
  --automatoon-stat-deep: #ea580c;
}

.automatoon-stat-card-purple {
  --automatoon-stat-accent: #f97316;
  --automatoon-stat-bright: #fbbf24;
  --automatoon-stat-deep: #dc570d;
}

.automatoon-stat-card .automatoon-stat-icon {
  position: relative;
  z-index: 1;
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  margin-bottom: 0.42rem;
  padding: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--automatoon-stat-bright) 36%, transparent);
  border-radius: 15px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--automatoon-stat-accent) 17%, transparent),
      color-mix(in srgb, var(--automatoon-stat-deep) 6%, transparent)
    );
  color: var(--automatoon-stat-bright);
  box-shadow:
    0 11px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.automatoon-stat-card .automatoon-stat-icon svg {
  width: 23px;
  height: 23px;
  filter: drop-shadow(0 3px 8px rgba(245, 158, 11, 0.22));
}

.automatoon-stat-card small {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 2.15em;
  align-items: center;
  justify-content: center;
  color: var(--automatoon-stat-bright);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.automatoon-stat-card h5 {
  position: relative;
  z-index: 1;
  margin-top: 0.08rem;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 3px 14px rgba(0, 0, 0, 0.5),
    0 0 16px color-mix(in srgb, var(--automatoon-stat-accent) 11%, transparent);
}

@media (max-width: 991px) {
  .automatoon-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  .automatoon-stat-card {
    min-height: 162px;
    padding: 1.08rem 0.55rem;
    border-radius: 18px;
  }

  .automatoon-stat-card .automatoon-stat-icon {
    width: 21px;
    height: 21px;
    margin-bottom: 0.32rem;
    padding: 0.58rem;
    border-radius: 13px;
  }

  .automatoon-stat-card .automatoon-stat-icon svg {
    width: 20px;
    height: 20px;
  }

  .automatoon-stat-card small {
    min-height: 2.4em;
    font-size: 0.63rem;
    letter-spacing: 0.045em;
  }

  .automatoon-stat-card h5 {
    font-size: 1.42rem;
  }
}

@media (max-width: 359px) {
  .automatoon-stats-grid {
    grid-template-columns: 1fr;
  }
}

