/* 镜像提示走马灯组件样式 */

.mirror-marquee-container {
    margin: 10px auto 8px auto; /* 减少上下间距 */
    padding: 0;
    background: linear-gradient(135deg, 
        rgba(46, 204, 113, 0.1) 0%,   /* 绿色主题 */
        rgba(39, 174, 96, 0.15) 50%,  /* 绿色主题 */
        rgba(46, 204, 113, 0.1) 100%  /* 绿色主题 */
    );
    border-radius: 6px; /* 稍微减小圆角 */
    border: 1px solid rgba(46, 204, 113, 0.4); /* 绿色边框 */
    overflow: hidden;
    position: relative;
    max-width: 800px; /* 稍微减小宽度 */
    box-shadow: 
        0 1px 6px rgba(46, 204, 113, 0.2), /* 绿色阴影 */
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mirror-marquee-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(46, 204, 113, 0.6) 50%, /* 绿色顶部线条 */
        transparent 100%);
}

.mirror-marquee-wrapper {
    display: flex;
    align-items: center;
    padding: 6px 0; /* 减少内边距 */
    height: 28px; /* 减少高度超过一半 */
    position: relative;
    overflow: hidden;
}

/* 图标 */
.mirror-marquee-icon {
    flex-shrink: 0;
    width: 16px; /* 稍微减小图标 */
    height: 16px; /* 稍微减小图标 */
    margin: 0 12px; /* 减少图标间距 */
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* 绿色图标 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(46, 204, 113, 0.4); /* 绿色阴影 */
    position: relative;
}

.mirror-marquee-icon::before {
    content: '!';
    color: white;
    font-weight: bold;
    font-size: 10px; /* 稍微减小图标文字 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mirror-marquee-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* 绿色脉冲环 */
    opacity: 0.3;
    animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* 滚动文字容器 */
.mirror-marquee-content {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    mask: linear-gradient(90deg, 
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%);
    -webkit-mask: linear-gradient(90deg, 
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%);
}

.mirror-marquee-text {
    display: inline-block;
    white-space: nowrap;
    line-height: 28px; /* 调整行高匹配新的容器高度 */
    font-size: 16px; /* 增大文字大小 */
    font-weight: 600; /* 增加文字粗细 */
    color: rgba(255, 255, 255, 0.95); /* 稍微增加对比度 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    padding-right: 100px; /* 确保文字完全滚动出去 */
    animation: marquee-scroll linear infinite; /* 立即启动动画 */
}

/* 滚动动画 - 恢复正确的走马灯逻辑 */
@keyframes marquee-scroll {
    0% {
        transform: translateX(100%); /* 从右侧外部开始（正确的走马灯效果） */
    }
    100% {
        transform: translateX(-100%); /* 滚动到左侧外部完全消失 */
    }
}

/* 动态计算滚动时间 - 进一步放慢 */
.mirror-marquee-text.slow {
    animation-duration: 40s; /* 进一步放慢到40秒 */
}

.mirror-marquee-text.medium {
    animation-duration: 35s; /* 进一步放慢到35秒 */
}

.mirror-marquee-text.fast {
    animation-duration: 25s; /* 进一步放慢到25秒 */
}

/* 暂停/恢复动画 */
.mirror-marquee-container:hover .mirror-marquee-text {
    animation-play-state: paused;
}

.mirror-marquee-container.paused .mirror-marquee-text {
    animation-play-state: paused;
}

/* 关闭按钮 */
.mirror-marquee-close {
    flex-shrink: 0;
    width: 20px; /* 稍微减小关闭按钮 */
    height: 20px; /* 稍微减小关闭按钮 */
    margin: 0 10px; /* 减少关闭按钮间距 */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.mirror-marquee-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transform: scale(1.1);
}

.mirror-marquee-close::before {
    content: '×';
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

/* 隐藏状态 */
.mirror-marquee-container.hidden {
    display: none;
}

/* 淡入/淡出动画 */
.mirror-marquee-container.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.mirror-marquee-container.fade-out {
    animation: fadeOut 0.3s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mirror-marquee-container {
        margin: 8px 10px 6px 10px; /* 减少移动端间距 */
        border-radius: 5px;
    }
    
    .mirror-marquee-wrapper {
        padding: 4px 0; /* 移动端进一步减少内边距 */
        height: 24px; /* 移动端更小的高度 */
    }
    
    .mirror-marquee-text {
        font-size: 14px; /* 移动端文字稍小但依然清晰 */
        line-height: 24px; /* 匹配容器高度 */
    }
    
    .mirror-marquee-icon {
        width: 14px; /* 移动端更小的图标 */
        height: 14px;
        margin: 0 10px;
    }
    
    .mirror-marquee-icon::before {
        font-size: 9px;
    }
    
    .mirror-marquee-close {
        width: 18px; /* 移动端更小的关闭按钮 */
        height: 18px;
        margin: 0 8px;
    }
    
    .mirror-marquee-close::before {
        font-size: 12px;
    }
}

/* 仅在镜像页面显示 */
.mirror-marquee-container.disabled {
    display: none;
}

/* 特殊主题模式（可选） */
.mirror-marquee-container.warning {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.1) 0%,
        rgba(255, 152, 0, 0.15) 50%,
        rgba(255, 193, 7, 0.1) 100%);
    border-color: rgba(255, 193, 7, 0.4);
}

.mirror-marquee-container.warning .mirror-marquee-icon {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.mirror-marquee-container.warning .mirror-marquee-icon::after {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

