@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

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

.container {
    background-color: #222;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(200, 162, 255, 0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.header-content {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    /* The BunnyRemixSymbol.jpg image is used as the background for the header */
    background-image: url('/BunnyRemixSymbol.jpg');
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    padding: 150px 20px 80px 20px; 
    border-radius: 8px;
    overflow: hidden;
}

.header-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    z-index: 1;
    pointer-events: none;
}

h1 {
    color: #C8A2FF;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
}

.subtitle {
    color: #C8A2FF;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
}

.input-group {
    text-align: left;
    margin-bottom: 5px;
    width: 100%;
    position: relative;
    z-index: 2;
}

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

textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background-color: #333;
    color: #C8A2FF;
}

select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

textarea {
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

button#generate-btn {
    background-color: #000000;
    color: #C8A2FF;
    padding: 12px 25px;
    border: 1px solid #C8A2FF;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, color 0.3s ease, border-color 0.3s ease;
    width: auto;
    align-self: center;
    margin-top: 15px;
}

button#generate-btn:hover {
    background-color: #1a1a1a;
    border-color: #ffffff;
}

button#generate-btn:disabled {
    background-color: #222;
    color: #777;
    border-color: #555;
    cursor: not-allowed;
}

button#generate-btn:active {
    transform: scale(0.98);
    background-color: #333;
}

.loading {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #C8A2FF;
    gap: 10px;
}

.spinner {
    border: 4px solid rgba(200, 162, 255, 0.2);
    border-left-color: #C8A2FF;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

#image-result-container {
    margin-top: 25px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #444;
    color: #C8A2FF;
}

#result-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.credit {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #C8A2FF;
}

.credit a {
    color: #C8A2FF;
    text-decoration: underline;
    font-weight: bold;
}

.credit a:hover {
    text-decoration: none;
    opacity: 0.8;
}