body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
}

h1, h2 {
    color: #007bff;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.section {
    margin-bottom: 30px;
}

textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    resize: vertical;
    background-color: #f8f9fa;
    color: #495057;
}

pre {
    background-color: #e9ecef;
    border-left: 5px solid #007bff;
    padding: 15px;
    overflow-x: auto;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85em;
    white-space: pre-wrap; /* Ensures line breaks */
    word-wrap: break-word; /* Ensures long words break */
}

code {
    color: #d63384;
}

button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
    margin-right: 10px;
    transition: background-color 0.2s ease-in-out;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    background-color: #004085;
}

.clear-button {
    background-color: #dc3545;
}

.clear-button:hover {
    background-color: #c82333;
}

#numRecords {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    width: 80px;
    text-align: center;
    margin-left: 10px;
}

.output-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

/* Schema Builder Styles */
.schema-field {
    background-color: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.schema-field label {
    font-weight: bold;
    color: #555;
    margin-right: 5px;
}

.schema-field input[type="text"],
.schema-field input[type="number"],
.schema-field input[type="date"],
.schema-field select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
}

.schema-field .field-name {
    flex: 1 1 150px; /* Grow to take space, min width */
}

.schema-field .field-type {
    flex: 0 0 120px; /* Fixed width */
}

.schema-field .field-options {
    flex: 1 1 200px; /* Grow to take space */
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 10px;
    border-left: 1px solid #e9ecef;
}

.schema-field .field-options label {
    font-weight: normal;
}

.schema-field .remove-field-btn {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: auto; /* Push to the right */
    transition: background-color 0.2s;
}

.schema-field .remove-field-btn:hover {
    background-color: #c82333;
}

.nested-fields {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-top: 1px dashed #ced4da;
    padding-top: 15px;
}

.nested-fields .schema-field {
    background-color: #eff2f5; /* Lighter background for nested */
    border: 1px solid #d0d6db;
    margin-left: 20px;
}

/* Output Format Selection Styles */
.output-format-selection {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px; /* Spacing between radio buttons and labels */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.output-format-selection label {
    font-weight: normal;
    color: #333;
    cursor: pointer;
}

.output-format-selection input[type="radio"] {
    margin-right: 5px;
    transform: scale(1.2); /* Slightly larger radio buttons */
    cursor: pointer;
}

/* Schema JSON Controls */
.schema-json-controls {
    margin-top: 15px;
}