/**
 * 实时购买提示样式
 * 用于在购买页面显示模拟的用户购买通知
 */

/* 购买提示容器 */
.purchase-notification {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    max-width: 320px;
    min-width: 280px;
    animation: slideInRight 0.5s ease-out;
    backdrop-filter: blur(10px);
}

/* 淡出动画 */
.purchase-notification.fade-out {
    animation: fadeOutRight 0.5s ease-in forwards;
}

/* 图标样式 */
.purchase-notification .icon {
    font-size: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

/* 消息文本 */
.purchase-notification .message {
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    font-weight: 500;
}

/* 滑入动画 */
@keyframes slideInRight {
    from {
        transform: translateY(-50%) translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

/* 淡出动画 */
@keyframes fadeOutRight {
    to {
        transform: translateY(-50%) translateX(30px);
        opacity: 0;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .purchase-notification {
        right: 50%;
        top: auto;
        bottom: 80px;
        transform: translateX(50%);
        left: auto;
        max-width: calc(100% - 40px);
        min-width: auto;
        width: calc(100% - 40px);
    }

    @keyframes slideInRight {
        from {
            transform: translateX(50%) translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateX(50%) translateY(0);
            opacity: 1;
        }
    }

    @keyframes fadeOutRight {
        to {
            transform: translateX(50%) translateY(20px);
            opacity: 0;
        }
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .purchase-notification {
        padding: 12px 16px;
        font-size: 13px;
    }

    .purchase-notification .icon {
        font-size: 24px;
        width: 36px;
        height: 36px;
    }

    .purchase-notification .message {
        font-size: 13px;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .purchase-notification {
        border: 2px solid white;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .purchase-notification {
        animation: none;
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }

    .purchase-notification.fade-out {
        animation: none;
        opacity: 0;
    }
}
