body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

/* New style for side-by-side fields */
.form-group.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 15px; /* Space between columns */
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Prevents padding from increasing element size */
    font-size: 1rem;
    spellcheck: true;
}

textarea {
    resize: vertical; /* Allow vertical resizing */
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #2980b9;
}

#output-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.document-preview {
    background-color: #fdfdfd;
    border: 1px solid #eee;
    padding: 25px;
    margin-top: 15px;
    min-height: 200px; /* Minimum height */
    border-radius: 4px;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
    font-family: 'Times New Roman', Times, serif; /* Classic document font */
    line-height: 1.5;
}

.document-preview p:first-child em {
    color: #888;
    font-style: italic;
}

.loading {
    text-align: center;
    margin-top: 15px;
    font-style: italic;
    color: #555;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.action-buttons button {
    flex: 1;
    max-width: 200px;
}

.generate-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.generate-buttons button {
    margin: 0;
    flex: 1;
}

#copy-btn {
    background-color: #2ecc71;
    margin: 0;
}

#share-btn {
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#share-btn img {
    width: 24px;
    height: 24px;
}

#download-btn {
    background-color: #3498db;
}

#reset-btn {
    background-color: #c0392b;
    max-width: 150px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    button {
        font-size: 1rem;
    }

    /* Stack columns on smaller screens */
    .form-group.two-cols {
        grid-template-columns: 1fr; /* Single column */
        gap: 10px; /* Adjust gap for stacked view */
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .action-buttons button {
        max-width: 100%;
    }

    input[type="text"],
    textarea {
        font-size: 16px; /* Prevents zoom on mobile */
    }

    #share-btn img {
        width: 20px;
        height: 20px;
    }
}