body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

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

h1 {
    color: #0056b3;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.input-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

#promptInput {
    flex-grow: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    max-width: 600px;
}

#promptInput:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#generateButton {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#generateButton:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#generateButton:active {
    transform: translateY(0);
}

.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

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

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
}

.image-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card img {
    max-width: 100%;
    height: 250px; /* Fixed height for gallery consistency */
    object-fit: cover; /* Cover the area, crop if necessary */
    display: block;
    border-bottom: 1px solid #eee;
}

.download-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    margin: 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: #218838;
}

