/**
 * 🌸 Xundu 统一通知系统 - Tailwind 风格
 * 萌神出品，全站通用
 */

/* 通知容器 - 固定在右上角 */
#notification-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* 通知卡片基础样式 */
.notification {
    min-width: 320px;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* 顶部渐变条 */
.notification-bar {
    height: 3px;
    width: 100%;
}

.notification-bar.success {
    background: linear-gradient(90deg, #22c55e, #10b981);
}

.notification-bar.error {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.notification-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.notification-bar.info {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* 通知内容区 */
.notification-content {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* 图标容器 */
.notification-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon.success {
    background: #ecfdf5;
    color: #22c55e;
}

.notification-icon.error {
    background: #fef2f2;
    color: #ef4444;
}

.notification-icon.warning {
    background: #fffbeb;
    color: #f59e0b;
}

.notification-icon.info {
    background: #eff6ff;
    color: #3b82f6;
}

.notification-icon svg {
    width: 24px;
    height: 24px;
}

/* 文本区域 */
.notification-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    word-wrap: break-word;
}

/* 关闭按钮 */
.notification-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
    padding: 0;
}

.notification-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.notification-close svg {
    width: 18px;
    height: 18px;
}

/* 进度条 */
.notification-progress {
    height: 2px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.notification-progress-bar {
    height: 100%;
    background: currentColor;
    transition: width linear;
}

.notification-progress-bar.success {
    color: #22c55e;
}

.notification-progress-bar.error {
    color: #ef4444;
}

.notification-progress-bar.warning {
    color: #f59e0b;
}

.notification-progress-bar.info {
    color: #3b82f6;
}

/* 响应式 */
@media (max-width: 640px) {
    #notification-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    .notification {
        min-width: auto;
        max-width: none;
    }
}
