.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    justify-content: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    line-height: 0;
    /* Remove gap below images */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.image-wrapper {
    width: 100%;
    position: relative;
}

.image-wrapper img {
    width: 100%;
    display: block;
}

.image-wrapper.overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    /* Initial split */
    overflow: hidden;
    border-right: 2px solid white;
}

.image-wrapper.overlay img {
    /* Important: preserve aspect ratio and size relative to container */
    width: 200%;
    /* If container is 50%, img needs to be 200% to match original size */
    max-width: none;
    height: 100%;
}

.label {
    position: absolute;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    line-height: 1.2;
}

#original-wrapper .label {
    right: 10px;
}

#compressed-wrapper .label {
    left: 10px;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 40px;
    margin-left: -20px;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-button {
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.actions {
    margin-top: 20px;
}