.achv-popup-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9500;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
}

.achv-popup {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(10, 14, 23, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--achv-accent, #3b82f6);
  box-shadow:
    0 0 24px var(--achv-glow, rgba(59,130,246,0.15)),
    0 0 60px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  transform: translateX(-120%);
  opacity: 0;
  animation: achvSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  cursor: pointer;
  min-width: 260px;
  max-width: 360px;
  overflow: hidden;
}

.achv-popup::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--achv-accent) 0%, var(--achv-accent) 100%);
  border-radius: 3px 0 0 3px;
  box-shadow: 0 0 12px var(--achv-glow);
}

.achv-popup::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: achvSweep 1.8s ease-in-out 0.5s;
  pointer-events: none;
}

.achv-popup.achv-popup-out {
  animation: achvSlideOut 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.achv-popup-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--achv-glow));
  animation: achvIconPop 0.4s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.achv-popup-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.achv-popup-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--achv-accent, #60a5fa);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-10px);
  opacity: 0;
  animation: achvTextIn 0.35s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.achv-popup-name {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #f0f4f8;
  letter-spacing: 0.3px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-10px);
  opacity: 0;
  animation: achvTextIn 0.35s 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.achv-popup-xp {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--achv-accent) 0%, #f0f4f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.2px;
  line-height: 1.3;
  white-space: nowrap;
  filter: drop-shadow(0 0 6px var(--achv-glow));
  transform: translateX(-10px);
  opacity: 0;
  animation: achvTextIn 0.35s 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.achv-popup-legendary .achv-popup-icon {
  animation: achvIconPop 0.4s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             achvIconGlow 2s 0.8s ease-in-out infinite;
}

@keyframes achvSlideIn {
  0% { transform: translateX(-120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes achvSlideOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-120%); opacity: 0; }
}

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

@keyframes achvTextIn {
  0% { transform: translateX(-10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

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

@keyframes achvIconGlow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--achv-glow)); }
  50% { filter: drop-shadow(0 0 16px var(--achv-glow)) brightness(1.2); }
}

@media (max-width: 600px) {
  .achv-popup-container {
    left: 10px;
    bottom: 16px;
  }
  .achv-popup {
    min-width: 0;
    max-width: 240px;
    padding: 10px 14px 10px 12px;
    gap: 10px;
    border-radius: 10px;
  }
  .achv-popup-icon {
    width: 28px;
    height: 28px;
  }
  .achv-popup-name {
    font-size: 0.82rem;
  }
  .achv-popup-label {
    font-size: 0.52rem;
  }
  .achv-popup-xp {
    font-size: 0.72rem;
  }
}
