/* Modern Popup Notification System */
.popup-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 350px;
    max-width: 450px;
    z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.popup-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.popup-notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Success Notification */
.popup-notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.popup-notification.success .popup-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Error Notification */
.popup-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.popup-notification.error .popup-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Warning Notification */
.popup-notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.popup-notification.warning .popup-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Info Notification */
.popup-notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.popup-notification.info .popup-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Notification Content */
.popup-notification-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
}

.popup-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.popup-message {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-close {
    background: none;
    border: none;
    color: currentColor;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 4px;
    margin-left: 8px;
    flex-shrink: 0;
}

.popup-close:hover {
    opacity: 1;
}

/* Progress Bar */
.popup-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: width linear;
}

.popup-notification.success .popup-progress {
    background: rgba(255, 255, 255, 0.4);
}

.popup-notification.error .popup-progress {
    background: rgba(255, 255, 255, 0.4);
}

.popup-notification.warning .popup-progress {
    background: rgba(255, 255, 255, 0.4);
}

.popup-notification.info .popup-progress {
    background: rgba(255, 255, 255, 0.4);
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.popup-notification .popup-icon {
    animation: pulse 0.6s ease-in-out;
}

/* Multiple notifications stacking */
.popup-notification:nth-child(2) {
    top: 100px;
}

.popup-notification:nth-child(3) {
    top: 180px;
}

.popup-notification:nth-child(4) {
    top: 260px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .popup-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .popup-notification.show {
        transform: translateY(0);
    }
    
    .popup-notification.hide {
        transform: translateY(-100%);
    }
    
    .popup-notification-content {
        padding: 16px;
        gap: 12px;
    }
    
    .popup-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .popup-message {
        font-size: 14px;
    }
    
    .popup-title {
        font-size: 15px;
    }
    
    .popup-notification:nth-child(2) {
        top: 80px;
    }
    
    .popup-notification:nth-child(3) {
        top: 150px;
    }
    
    .popup-notification:nth-child(4) {
        top: 220px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .popup-notification {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}
