body {
    overflow-x: hidden !important;
}

#container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    width: 90vw;
    max-width: calc(100vw - 20px);
    margin: 10px auto;
    gap: 20px;
}

button {
    font: inherit;
}

#controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 30%;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

#preview {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 70%;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

#thumbnails {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.thumbnail.selected {
    border: 5px solid #007bff;
}

#upload {
    margin-bottom: 20px;
}

canvas {
    border: 1px solid black;
    width: 100%;
    max-width: 100%;
    height: auto;
    display: none;
}

#generate-thumbnails-btn,
#generate-thumbnail-btn,
#download-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font: inherit;
}

#generate-thumbnails-btn:hover,
#generate-thumbnail-btn:hover,
#download-btn:hover {
    background-color: #0056b3;
}

input[type="number"] {
    margin-top: 10px;
    padding: 5px;
    width: 150px;
    max-width: calc(100% - 20px);
    font: inherit;
}

.instructions {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 768px) {
    #container {
        flex-direction: column;
        align-items: center;
    }

    #controls {
        width: 95%;
        max-width: 100%;
    }

    #preview {
        width: 95%;
        max-width: 100%;
    }
}

body.dark-mode #controls,
body.dark-mode #preview {
    background-color: #333;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
