.prompt-generator {
    background-color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    box-sizing: border-box;
}

.prompt-generator * {
    box-sizing: border-box;
}

.prompt-generator form {
    margin-bottom: 2rem;
}

.prompt-generator textarea {
    flex: 1;
    height: 50px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #b0b0b0;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
    margin-bottom: 0;
    font-family: 'Open Sans', sans-serif;
}

.controls-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.generate-button {
    background-color: #7E22CE;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 200px; /* Fixed width instead of min-width */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center text */
}

.generate-button:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
    width: 200px; /* Match the enabled state width */
}

.results-container {
    margin-top: 2rem;
}

.result-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.result-content {
    color: #2d3748;
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    margin-right: 40px; /* Add margin for copy button */
}

.input-container {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.prompt-generator textarea {
    flex: 1;
    margin-bottom: 0;
}

.generate-button {
    min-width: 120px;
}

.result-card {
    position: relative;
    padding: 16px;
}

.icon-copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    transition: background-color 0.2s;
}

.icon-copy-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #2d3748;
}

.icon-copy-button.copied {
    color: #ffffff;
}

.error-message {
    background-color: #fed7d7;
    border-left: 4px solid #f56565;
    color: #c53030;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.subscription-form {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
    .input-container {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .prompt-generator {
        padding: 1rem;
    }

    .prompt-generator textarea {
        width: 100%;
        min-height: 100px; /* Bigger touch target on mobile */
    }

    .generate-button {
        width: 100%; /* Full width button on mobile */
        margin-top: 0.5rem;
    }

    .generate-button:disabled {
        width: 100%; /* Full width button on mobile */
        margin-top: 0.5rem;
    }

    .result-card {
        padding: 1rem;
    }

    /* Subscription form adjustments for mobile */
    .subscription-form {
        padding: 1rem;
        margin: 1rem 0;
    }

    .subscription-form input {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .form-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-buttons button {
        width: 100%;
    }
}
