/* 通知组件样式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #e0e0e0;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

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

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

/* 通知类型样式 */
.notification.success {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.notification.error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #fff8f8 0%, #ffffff 100%);
}

.notification.warning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #fffaf8 0%, #ffffff 100%);
}

.notification.info {
    border-left-color: #2196f3;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

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

.notification-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification.success .notification-icon::before {
    content: '✅';
}

.notification.error .notification-icon::before {
    content: '❌';
}

.notification.warning .notification-icon::before {
    content: '⚠️';
}

.notification.info .notification-icon::before {
    content: 'ℹ️';
}

.notification-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

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

.notification-message {
    color: #666;
}

/* 关闭按钮 */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* 进度条 */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

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

.notification.success .notification-progress-bar {
    background: #4caf50;
}

.notification.error .notification-progress-bar {
    background: #f44336;
}

.notification.warning .notification-progress-bar {
    background: #ff9800;
}

.notification.info .notification-progress-bar {
    background: #2196f3;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        margin-bottom: 8px;
        padding: 12px 16px;
    }
    
    .notification-text {
        font-size: 13px;
    }
}

/* 动画效果 */
@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;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #2a2a2a;
        color: #e0e0e0;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .notification.success {
        background: linear-gradient(135deg, #1a2e1a 0%, #2a2a2a 100%);
    }
    
    .notification.error {
        background: linear-gradient(135deg, #2e1a1a 0%, #2a2a2a 100%);
    }
    
    .notification.warning {
        background: linear-gradient(135deg, #2e251a 0%, #2a2a2a 100%);
    }
    
    .notification.info {
        background: linear-gradient(135deg, #1a232e 0%, #2a2a2a 100%);
    }
    
    .notification-title {
        color: #f0f0f0;
    }
    
    .notification-message {
        color: #b0b0b0;
    }
    
    .notification-close {
        color: #888;
    }
    
    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }
}