/* 加载动画样式 - 现代化设计 */
.chart-container {
    position: relative; /* 确保容器是相对定位的 */
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chart-loading.active {
    opacity: 1;
    pointer-events: none;
}

.chart-loading .loading-text {
    color: #333;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 500;
}

/* 股票数据加载动画 */
.chart-loading .loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.chart-loading .dot {
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite ease-in-out;
}

.chart-loading .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chart-loading .dot:nth-child(3) {
    animation-delay: 0.4s;
}

.chart-loading .dot:nth-child(4) {
    animation-delay: 0.6s;
}

.chart-loading .dot:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.6);
        opacity: 0.6;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 图表加载中的半透明遮罩 */
.chart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chart-overlay.active {
    opacity: 1;
    pointer-events: all;
}