body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for scroll */
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    text-align: center;
}

h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 25px;
}

.upload-area-wrapper {
    margin-bottom: 20px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    background-color: #fafafa;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.upload-area-wrapper.dragover {
    background-color: #e0e0e0;
    border-color: #aaa;
}

.upload-area {
    cursor: pointer;
    color: #666;
}

.upload-icon svg {
    fill: #aaa;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 5px 0;
    font-size: 14px;
}

.upload-hint {
    font-size: 12px !important;
    color: #888;
}

.instructions {
    text-align: left;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}

.instructions ol {
    padding-left: 20px;
    margin-top: 0;
    margin-bottom: 10px;
}

.instructions li {
    margin-bottom: 5px;
}

.hint {
    color: red;
    font-size: 13px;
    margin-top: 10px;
}

.size-selection {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 15px; /* row-gap column-gap */
}

.size-selection label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.size-selection input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
}


#generateBtn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#generateBtn:hover {
    background-color: #218838;
}

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

.error-msg {
    color: red;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px; /* Prevent layout shift */
}

#imagePreview {
    display: block; /* Initially none, will be block when image is loaded */
    margin: 15px auto 0; /* Center if it has width */
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    object-fit: contain;
}