/* 消息提示框组件样式 */

.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    font-family: 'Quicksand', sans-serif;
}

.message-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.message-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

/* 消息类型样式 */
.message-box.success {
    border-left: 4px solid #28a745;
    color: #155724;
    background-color: #d4edda;
}

.message-box.error {
    border-left: 4px solid #dc3545;
    color: #721c24;
    background-color: #f8d7da;
}

.message-box.warning {
    border-left: 4px solid #ffc107;
    color: #856404;
    background-color: #fff3cd;
}

.message-box.info {
    border-left: 4px solid #17a2b8;
    color: #0c5460;
    background-color: #d1ecf1;
}

/* 图标样式 */
.message-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.message-box.success .message-icon {
    color: #28a745;
}

.message-box.error .message-icon {
    color: #dc3545;
}

.message-box.warning .message-icon {
    color: #ffc107;
}

.message-box.info .message-icon {
    color: #17a2b8;
}

/* 消息内容 */
.message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.message-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

/* 关闭按钮 */
.message-close {
    margin-left: 12px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.message-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

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

.message-box.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .message-box {
        min-width: auto;
        width: 100%;
    }
}

