#gpt-letter-gen {
    background-color: #a00000;
    display: flex;
    justify-content: center;
    width: 100% !important;
    color: white;
    font-weight: bold;
    flex-direction: column;
    margin: 0 auto;
}

#gpt-letter-gen #generator {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

#gpt-letter-gen #custom-input {
    display: inline-block;
    margin: 1rem auto;
}

#gpt-letter-gen #prompt-form {
    padding: 1rem;
}

#gpt-letter-gen #sample-output {
    display: inline-block;
    margin: 1rem auto;
}

#gpt-letter-gen #response-container {
    padding: 1rem;
    padding-bottom: 0;
}

#gpt-letter-gen #response {
    width: 100%;
    height: 350px;
    padding: 1rem;
    margin-top: 1rem;
    resize: vertical;
}

#gpt-letter-gen #count {
    display: inline-block;
    font-size: 12px;
    margin-bottom: 0.5rem;
}

#gpt-letter-gen #address {
    padding: 1rem;
    margin-left: 2rem;
    margin-right: 2rem;
}

#gpt-letter-gen #address-form {
    margin-top: 2rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

#gpt-letter-gen #address-name, #address-street {
    width: 100%;
}

#gpt-letter-gen #address-inner {
    columns: 3;
}

#gpt-letter-gen .header {
    padding: 1rem;
    font-size: 24px;
}

#gpt-letter-gen .prompt {
    width: 100%;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 20px;
}

#gpt-letter-gen .input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-size: 16px;
}

#gpt-letter-gen .select {
    -webkit-appearance: none;
}

#gpt-letter-gen .error-label {
    color: lightgray;
    font-weight: normal;
    font-size: 12px;
}

#gpt-letter-gen .button-container {
    --loader-radius: 12px;
    display: flex;
    align-items: center;
    width: 100%;
}

#gpt-letter-gen .button {
    position: relative;
    height: 40px;
    width: 150px;
    margin: 0;
    margin-left: auto;
    left: var(--loader-radius);
    background-color: white;
    color: #b4000c;
    font-weight: bold;
}

#gpt-letter-gen .loader {
    position: relative;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: calc(2 * var(--loader-radius));
    height: calc(2 * var(--loader-radius));
    animation: spin 2s linear infinite;
    left: 24px;
    margin-right: auto;
}

@media (max-width: 780px) {
    #gpt-letter-gen {
        width: 500px;
    }

    #gpt-letter-gen #generator, #address {
        flex-direction: column;
        margin: 0px auto !important;
    }

    #gpt-letter-gen #address-inner {
        columns: 1 !important;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}