/* --- 1. 上传框样式 (高度 250px) --- */
.upload-box {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    height: 250px; /* 保持你要的高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

/* 鼠标悬停 或 拖拽进入时的样式 */
.upload-box:hover, .upload-box.drag-over {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: #00d2ff;
    transform: scale(1.01); 
}

/* 修复图片不显示的问题：关键修改！ */
.image-preview {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain; 
    display: none; /* 默认隐藏，上传后 JS 会改成 block */
    z-index: 10;   /* 确保在最上层 */
    background-color: #000;
}

.upload-content {
    z-index: 5;
    text-align: center;
    width: 100%;
    pointer-events: none; /* 让点击穿透，统一由父容器处理 */
}

/* 让 Browse 文字恢复点击 */
.upload-content span {
    pointer-events: auto;
}

/* --- 2. 结果对比展示区 --- */
.comparison-slider-wrapper {
    width: 100%;
    max-width: 600px;
    height: 250px; 
    position: relative;
    border: 4px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto; 
}
.comparison-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    text-align: left !important;
}
.img-comp {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
    user-select: none;
    position: absolute; 
    top: 0; left: 0;
}
.img-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 2px solid #fff;
    z-index: 10;
    background-color: #000;
    text-align: left !important; 
}
.img-overlay img {
    max-width: none; 
    height: 100%; 
    position: absolute; 
    top: 0; left: 0;
}
.slider-handle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 30px; height: 30px;
    background: #fff;
    border-radius: 50%;
    z-index: 20;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    color: #333;
}