body {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    max-width: 200px;
}

.result {
    gap: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#canvas {
    max-width: 500px;
    width: 100%;
    height: auto;
    border: 1px solid #444;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.image-grid img:hover {
    border-color: #007bff;
}