body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    text-align: center;
}

h1 {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

h1 a:hover {
    opacity: 0.8;
}

h1 a span {
    margin-right: 10px;
}

h2 {
    color: #333;
}

.description {
    margin-top: -15px;
    margin-bottom: 30px;
    color: #666;
    font-size: 14px;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.controls {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.output {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}

.required {
    color: #d9534f;
    font-size: 12px;
    font-weight: normal;
}
.optional {
    color: #5cb85c;
    font-size: 12px;
    font-weight: normal;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

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

#image-container {
    width: 100%;
    min-height: 150px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#generated-image {
    max-width: 100%;
    height: auto;
}

.error-message {
    color: #d9534f;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.current-color {
    margin-bottom: 20px;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
}
#current-color-display {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-left: 10px;
}

.placeholder-text {
    color: #cccccc;
    font-size: 14px;
}

.color-input-fields {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-fields input[type="color"] {
    width: 40px;
    padding: 0;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
}

.color-input-fields input[type="text"] {
    flex-grow: 1;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
}