/* ============ 在线图片调色 image-color-adjust.css ============ */

/* ---- 与图片压缩等工具对齐的上传区 ---- */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 26px 16px;
    text-align: center;
    cursor: pointer;
    background: #fafbff;
    transition: all 0.2s ease;
}

.upload-area:hover,
.upload-area.drag {
    border-color: #667eea;
    background: #eef2ff;
}

.upload-area .icon {
    font-size: 30px;
    line-height: 1.2;
}

.upload-text {
    font-size: 13px;
    color: #374151;
    margin-top: 6px;
}

.upload-text strong {
    color: #667eea;
}

.upload-tip {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ---- 已选择图片卡片 ---- */
.info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f9fafb;
}

.file-ico {
    font-size: 24px;
}

.info-card .meta {
    flex: 1;
    min-width: 0;
}

.info-card .name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-card .dims {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.btn-remove {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.btn-remove:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* ---- 滤镜预设 ---- */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.preset-chip {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 6px;
    padding: 7px 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-chip:hover {
    border-color: #667eea;
    color: #4338ca;
    background: #eef2ff;
}

.preset-chip.active {
    border-color: #667eea;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ---- 滑块参数 ---- */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-name {
    width: 46px;
    flex-shrink: 0;
    font-size: 12px;
    color: #374151;
}

.slider-row input[type="range"] {
    flex: 1;
    accent-color: #667eea;
    min-width: 0;
}

.slider-num {
    width: 58px;
    flex-shrink: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---- 按钮行 ---- */
.btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.compare-row {
    margin-top: 12px;
    align-items: center;
}

.hint-inline {
    font-size: 12px;
    color: #9ca3af;
}

/* ---- 预览区 ---- */
.preview-box {
    position: relative;
    min-height: 240px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: repeating-conic-gradient(#f1f2f4 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.preview-box canvas {
    max-width: 100%;
    height: auto;
    display: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ---- 私有缩放：小屏滑块仍可操作 ---- */
@media (max-width: 900px) {
    .preset-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .slider-name {
        width: 40px;
    }

    .slider-num {
        width: 52px;
    }
}