.chart-param-wrapper {
    padding: 15px;
    height: 100%;
    position: relative;
}

.chart-param-scroll {
    overflow-y: auto;
    overflow-x: clip;
    max-height: 635px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.item-handle{
    display: flex;
    gap: 10px; /* 按钮之间的间距 */
}

.chart-param-scroll::-webkit-scrollbar {
    display: none;
}


.chart-action-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.chart-action-btns .ange-btn {
    width: 100%;
}

.chart-param-section {
    margin-bottom: 10px;
}

.chart-param-section .ange-form-item {
    margin-bottom: 12px;
}

.chart-param-section .ange-form-label {
    width: 60px;
    padding: 8px 0;
    text-align: left;
    font-size: 13px;
    color: #606266;
}

.chart-param-section .ange-input-block {
    margin-left: 65px;
    min-height: 36px;
}

.chart-size-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chart-size-inputs .ange-input {
    width: 80px;
    text-align: center;
}

.size-separator {
    color: #909399;
    font-size: 14px;
}

.chart-ratio-group {
    display: flex;
    gap: 8px;
}

.chart-ratio-group .ratio-btn {
    flex: 1;
    font-size: 12px;
    padding: 0 5px;
    height: 28px;
    line-height: 28px;
    background: #f5f5f5;
    border-color: #d9d9d9;
    color: #666;
}

.chart-ratio-group .ratio-btn.active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}
.chart-color-input {
    width: 60px;
    height: 32px;
    padding: 2px;
    cursor: pointer;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
}
/* 标题颜色行：颜色选择器 + 输入框 */
.title-color-block {
    display: flex;
    align-items: center;
    gap: 8px;
}
.title-color-picker {
    width: 32px;
    height: 32px;
    padding: 2px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.title-color-block .ange-input {
    flex: 1;
}
/* 标题位置行：开关 + 按钮组 */
.title-pos-block {
    display: flex;
    align-items: center;
    gap: 10px;
}
.title-pos-group {
    display: flex;
    gap: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #d9d9d9;
}
.title-pos-group .pos-btn {
    flex: 1;
    font-size: 12px;
    padding: 0 10px;
    height: 28px;
    line-height: 28px;
    background: #fff;
    border: none;
    border-right: 1px solid #d9d9d9;
    color: #666;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.title-pos-group .pos-btn:last-child {
    border-right: none;
}

.title-pos-group .pos-btn.active {
    background: var(--theme-color);
    color: #fff;
}

.title-pos-group .pos-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* 附加信息分割线 */
.extra-info-divider {
    height: 1px;
    background: #ebeef5;
    margin: 15px 0;
}

/* 预览区域 */
.preview-panel {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    height: 640px;
}

@media screen and (max-width: 1047px) {
    .preview-panel {
        height: 500px;
    }
}

@media screen and (max-width: 430px) {
    .preview-panel {
        height: 330px;
    }
}

.preview-scroll-container {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(rgba(0, 0, 0, .18) 8%, #f0f2f5 8%) center / 16px 16px repeat;
    position: relative;
}

.preview-chart-wrapper {
    display: inline-block;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 10px;
    margin: 10px;
    transform-origin: center center;
    transition: none;
    overflow: hidden;
    max-width: calc(100% - 20px);
    box-sizing: border-box;
}

#chartContainer {
    max-width: 100%;
    overflow: hidden;
}

/* 缩放控件 */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    z-index: 10;
    font-size: 14px;
    color: white;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: auto;
}

.zoom-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.zoom-btn:hover {
    background: rgba(255,255,255,0.4);
}

.zoom-percent {
    min-width: 42px;
    text-align: center;
    font-family: monospace;
    font-size: 12px;
}

.zoom-fit-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    margin-left: 4px;
}

.zoom-fit-btn:hover {
    background: rgba(255,255,255,0.4);
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .chart-size-inputs .ange-input {
        width: 60px;
    }

    .chart-ratio-group .ratio-btn {
        font-size: 11px;
        padding: 0 3px;
    }
}
