/* 电商行业投放效果对比图表样式 */
:root {
    --ec-primary: #ff6b6b;
    --ec-secondary: #6b88ff;
    --ec-tertiary: #7ed957;
    --ec-quaternary: #ffc847;
    --ec-chart-bg: linear-gradient(145deg, #ffffff, #f8f8f8);
}

/* 投放效果对比图表容器 */
.ecommerce-comparison-container {
    background: var(--ec-chart-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    margin: 20px auto;
    transition: all 0.3s ease;
    max-width: 480px;
    width: 100%;
    height: 280px;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.ecommerce-comparison-container:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.ecommerce-comparison-container h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.ecommerce-comparison-container h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--ec-primary), var(--ec-secondary));
    border-radius: 3px;
}

/* 投放效果对比列表 */
.comparison-list {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-item {
    display: flex;
    align-items: center;
    position: relative;
}

.comparison-label {
    width: 100px;
    text-align: right;
    padding-right: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
}

.comparison-track {
    flex: 1;
    height: 15px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    position: relative;
    overflow: visible;
}

.comparison-score {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    top: 50%;
    left: calc(100% - 5px);
    transform: translate(-50%, -50%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.5s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.comparison-track::after {
    content: attr(data-score);
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.comparison-progress {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

/* 投放渠道特定样式 */
.comparison-item:nth-child(1) .comparison-score {
    background: var(--ec-primary);
}

.comparison-item:nth-child(1) .comparison-progress {
    background: linear-gradient(to right, var(--ec-primary), rgba(255, 107, 107, 0.7));
}

.comparison-item:nth-child(2) .comparison-score {
    background: var(--ec-secondary);
}

.comparison-item:nth-child(2) .comparison-progress {
    background: linear-gradient(to right, var(--ec-secondary), rgba(107, 136, 255, 0.7));
}

.comparison-item:nth-child(3) .comparison-score {
    background: var(--ec-tertiary);
}

.comparison-item:nth-child(3) .comparison-progress {
    background: linear-gradient(to right, var(--ec-tertiary), rgba(126, 217, 87, 0.7));
}

.comparison-item:nth-child(4) .comparison-score {
    background: var(--ec-quaternary);
}

.comparison-item:nth-child(4) .comparison-progress {
    background: linear-gradient(to right, var(--ec-quaternary), rgba(255, 200, 71, 0.7));
}

/* 图表备注 */
.comparison-note {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    padding-top: 8px;
}

/* 动画效果 */
@keyframes scoreGrow {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.animate-score {
    animation: scoreGrow 0.6s forwards;
}

.animate-progress {
    animation: progressGrow 1s forwards;
}

@keyframes progressGrow {
    from {
        width: 0;
    }
}

/* 悬停效果 */
.comparison-item:hover .comparison-score {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.comparison-item:hover .comparison-progress {
    filter: brightness(1.1);
} 