:root {
    --primary-color: #4a4a4a;
    --secondary-color: #f4f4f4;
    --accent-color: #2c3e50;
    
    /* New color scheme for buttons */
    --generate-btn-color: #1a4d7c;     /* Dark Blue */
    --copy-btn-color: #6b4423;         /* Dark Brown */
    --share-btn-color: #2b5329;        /* Dark Green */
    --reset-btn-color: #8b0000;        /* Dark Red */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
    padding: 30px;
    text-align: center;
}

h1 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

#verse-input {
    font-size: 18px;  /* Increased font size for verse input */
}

#result-text {
    font-size: 16px;  
    line-height: 1.5;
    background-color: #f9f9f9;  
    border: 2px solid #e0e0e0;  
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);  
    transition: all 0.3s ease;  
    min-height: 250px;  /* Increased height to make it longer by default */
    max-height: 400px;  /* Increased max height */
    overflow-y: auto;  
}

#result-text:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.button-group button:nth-child(1) {  /* Generate Button */
    background-color: var(--generate-btn-color);
}

.button-group button:nth-child(2) {  /* Copy Button */
    background-color: var(--copy-btn-color);
}

.button-group button:nth-child(3) {  /* WhatsApp Button */
    background-color: var(--share-btn-color);
}

.button-group button:nth-child(4) {  /* Reset Button */
    background-color: var(--reset-btn-color);
}

button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;  
}

button:hover {
    background-color: var(--accent-color);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.secondary-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    opacity: 1;  /* Ensure full visibility */
    transition: opacity 0.3s ease;  /* Smooth transition */
}

.secondary-buttons.hidden {
    display: flex;  /* Keep flex display */
    opacity: 0;  /* Fully transparent when hidden */
    pointer-events: none;  /* Disable interactions */
    height: 0;  /* Collapse height */
    overflow: hidden;
}

#secondary-buttons button {
    flex: 0 1 200px; /* Adjust width as needed */
    opacity: 1;  /* Ensure full opacity */
}

#secondary-buttons button:nth-child(1) {  /* Copy Button */
    background-color: var(--copy-btn-color);
}

#secondary-buttons button:nth-child(2) {  /* WhatsApp Button */
    background-color: var(--share-btn-color);
}

.error {
    color: red;
    margin-top: 10px;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner-circle {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-indicator p {
    color: var(--accent-color);
    font-weight: bold;
}

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

@media (max-width: 480px) {
    .button-group {
        flex-direction: column;
    }
}