/* ==========================================================================
   DEXTER GLOBAL NOTIFICATIONS
   Social notifications for wagers, challenges, battles, etc.
   ========================================================================== */

/* Container - fixed in top-right corner */
.dexter-notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

/* Individual notification */
.dexter-notification {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.98), rgba(20, 20, 30, 0.98));
  border: 1px solid var(--notification-color, #6366F1);
  border-radius: 12px;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
  
  /* Animation setup */
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visible state */
.dexter-notification.dn-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Dismissing state */
.dexter-notification.dn-dismissing {
  opacity: 0;
  transform: translateX(100%);
}

/* Glow effect on left border */
.dexter-notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--notification-color, #6366F1);
  border-radius: 12px 0 0 12px;
  box-shadow: 0 0 20px var(--notification-color, #6366F1);
}

/* Icon */
.dexter-notification .dn-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Content area */
.dexter-notification .dn-content {
  flex: 1;
  min-width: 0;
}

/* Header row */
.dexter-notification .dn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

/* Title */
.dexter-notification .dn-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Username badge */
.dexter-notification .dn-username {
  font-size: 11px;
  font-weight: 500;
  color: var(--notification-color, #6366F1);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Message */
.dexter-notification .dn-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.dexter-notification .dn-message strong {
  color: #fff;
  font-weight: 600;
}

/* Amount badge */
.dexter-notification .dn-amount {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--notification-color, #6366F1);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Close button */
.dexter-notification .dn-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0;
}

.dexter-notification:hover .dn-close {
  opacity: 1;
}

.dexter-notification .dn-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ==========================================================================
   TYPE-SPECIFIC STYLES
   ========================================================================== */

/* Win notification - celebratory */
.dexter-notification-win {
  animation: dn-win-pulse 0.6s ease-out;
}

.dexter-notification-win::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #10B981, #34D399, #10B981);
  border-radius: 14px;
  z-index: -1;
  opacity: 0.3;
  animation: dn-glow 2s ease-in-out infinite;
}

@keyframes dn-win-pulse {
  0% { transform: translateX(0) scale(1); }
  50% { transform: translateX(0) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes dn-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

/* Challenge notification - attention-grabbing */
.dexter-notification-challenge {
  animation: dn-shake 0.5s ease-out;
}

@keyframes dn-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Payout notification - money effect */
.dexter-notification-payout .dn-amount {
  animation: dn-bounce 0.6s ease-out;
}

@keyframes dn-bounce {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Announcement - prominent */
.dexter-notification-announcement {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(139, 92, 246, 0.15));
  border-color: #EC4899;
}

/* Burn notification - fire effect 🔥 */
.dexter-notification-burn {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.15));
  border-color: #F97316;
  animation: dn-burn-pulse 0.8s ease-out;
}

.dexter-notification-burn::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #F97316, #EA580C, #F97316);
  border-radius: 14px;
  z-index: -1;
  opacity: 0.4;
  animation: dn-fire-glow 1.5s ease-in-out infinite;
}

@keyframes dn-burn-pulse {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(0) scale(1.03); }
  50% { transform: translateX(0) scale(0.98); }
  75% { transform: translateX(0) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes dn-fire-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.6; }
}

/* Link styling */
.dexter-notification .dn-link {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--notification-color, #6366F1);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--notification-color, #6366F1);
  text-decoration: none;
  transition: all 0.15s;
}

.dexter-notification .dn-link:hover {
  background: var(--notification-color, #6366F1);
  color: #fff;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .dexter-notification-container {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .dexter-notification {
    padding: 12px 16px;
  }

  .dexter-notification .dn-icon {
    font-size: 24px;
  }

  .dexter-notification .dn-title {
    font-size: 13px;
  }

  .dexter-notification .dn-message {
    font-size: 12px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .dexter-notification,
  .dexter-notification-win,
  .dexter-notification-challenge,
  .dexter-notification-payout .dn-amount {
    animation: none !important;
  }

  .dexter-notification {
    transition: opacity 0.2s ease !important;
    transform: none !important;
  }

  .dexter-notification.dn-visible {
    transform: none !important;
  }

  .dexter-notification.dn-dismissing {
    transform: none !important;
  }
}
