body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f9;
    color: #333;
}

h1 {
    text-align: center;
    color: #444;
}

.controls {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.control-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

input[type="file"],
input[type="text"],
select,
button {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

input[type="file"] {
    border: none;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#image-preview-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

#image-preview-container p {
    width: 100%;
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
}

.image-wrapper {
    position: relative;
    /* Ensure the wrapper only takes the size of the image */
    display: inline-block;
    line-height: 0; /* Removes bottom space under the image */
}

.image-wrapper img,
.image-wrapper canvas {
    max-width: 100%;
    border-radius: 4px;
    display: block;
}

.watermark-draggable {
    position: absolute;
    width: 25%; /* Watermark is 25% of the container's width */
    height: auto;
    cursor: move;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.watermark-draggable:hover {
    opacity: 1;
}