/* General styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
}

h1, h2 {
    text-align: center;
    color: #2c3e50;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Controls styling */
.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

textarea#image-prompt {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    resize: vertical;
    min-height: 60px;
}

/* Suggestions styling */
.suggestions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.suggestions h3 {
    margin-bottom: 8px;
    font-size: 0.95em;
    color: #666;
    text-align: left;
}

#suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-btn {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.suggestion-btn:hover {
    background-color: #d0d0d0;
    color: #000;
}

/* Button styling */
button, .btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin: 5px 0;
    transition: background-color 0.3s ease, transform 0.1s ease;
    font-size: 1.05em;
    font-weight: 500;
    display: inline-block;
    text-align: center;
}

button:hover, .btn:hover {
    background-color: #2980b9;
}

button:active, .btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #e67e22;
    width: 100%;
}
.btn-primary:hover {
    background-color: #d35400;
}

.btn-success {
    background-color: #2ecc71;
}
.btn-success:hover {
    background-color: #27ae60;
}

button:disabled, .btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Image display styling */
#image-display-container {
    width: 100%;
    max-width: 512px;
    min-height: 300px;
    background-color: #ecf0f1;
    border: 1px dashed #bdc3c7;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    margin-top: 10px;
}

#generated-image {
    max-width: 100%;
    max-height: 500px;
    display: block;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
#generated-image.loaded {
    opacity: 1;
}

#placeholder-info {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
}

/* Status message */
.status {
    font-size: 0.9em;
    color: #e74c3c;
    margin-top: 5px;
    min-height: 1.2em;
    text-align: center;
}
.status.success {
    color: #27ae60;
}

/* Loading Indicator */
#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: #3498db;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}