body {
    font-family: Arial, sans-serif;
}

/* Preview Container */
#imagePreview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Image Container */
.image-container {
    position: relative;
    display: inline-block;
    margin: 5px;
    text-align: center;
    max-width: 200px;
    /* Constrain container width */
    max-height: 200px;
    /* Constrain container height */
    overflow: hidden;
    /* Hide overflow */

    cursor: grab;
}

.image-container img {
    transition: transform 0.3s ease-in-out;
    /* Only animate on rotation */
}

.image-container.moving img {
    transition: none;
    /* Disable transition while moving */
}

.image-container.dragging {
    opacity: 0.5;
}


/* Image Styling */
#imagePreview img {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid #ddd;
    padding: 5px;
    transition: transform 0.3s ease;
    /* Smooth rotation */
}

/* Remove Button */
.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rotate Button */
.rotate-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Arrow Buttons */
.arrow-buttons {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.arrow-buttons button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-buttons button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.drop-zone.dragover {
    border-color: #000;
    background-color: #f9f9f9;
}