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

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

h1, h2 {
    text-align: center;
    color: #555;
}

h2 {
    margin-top: 20px;
}

.section {
    margin-top: 20px;
}

.input-section, .output-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

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

input[type="text"], textarea, input[type="number"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input[type="number"] {
     width: 80px;
     display: inline-block;
     margin-right: 15px;
}

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

button:hover {
    background-color: #4cae4c;
}

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

.view-toggle {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.view-toggle button {
    flex-grow: 1;
    background-color: #eee;
    color: #333;
    border: none;
    border-radius: 0;
    padding: 10px 0;
    font-size: 1rem;
    margin: 0;
    border-bottom: 2px solid transparent;
}

.view-toggle button.active {
    background-color: #fff;
    color: #5cb85c;
    font-weight: bold;
    border-bottom-color: #5cb85c;
}

.view-toggle button:hover:not(.active) {
    background-color: #e0e0e0;
}

.output-box {
    background-color: #e9e9e9;
    padding: 15px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 100px;
    margin-top: 15px;
    overflow-x: auto;
}

.output-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-box.map-data {
    margin-top: 20px;
}

.map-entity-item {
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px dashed #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-entity-item:last-child {
    border-bottom: none;
}

.map-entity-item strong {
    flex-shrink: 0;
}

.map-entity-item code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #555;
    flex-shrink: 0;
}

.share-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.share-section input[type="text"] {
    width: calc(100% - 22px);
    display: inline-block;
    vertical-align: top;
    margin-right: 10px;
    margin-bottom: 0;
}

.share-section button {
    width: auto;
    display: inline-block;
    vertical-align: top;
    padding: 10px 20px;
    margin-bottom: 0;
}

.scenario-item {
    border-bottom: 1px solid #ccc;
    padding: 15px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.scenario-item:last-child {
    border-bottom: none;
}

.scenario-item:hover {
    background-color: #e0e0e0;
}

.scenario-item h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.scenario-item p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #555;
}

.scenario-item .author {
    font-style: italic;
    font-size: 0.8em;
    color: #777;
}

.scenario-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #bbb;
    font-size: 0.9em;
    color: #444;
}

.scenario-details pre {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 5px;
}

.scenario-details .map-data-preview .map-entity-item {
    border-bottom: 1px dotted #ccc;
    padding: 5px 0;
    margin-bottom: 5px;
}

.scenario-details .map-data-preview .map-entity-item:last-child {
     border-bottom: none;
}

.option-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.option-group input[type="checkbox"] {
    margin-right: 10px;
    margin-bottom: 0; 
    width: auto; 
    vertical-align: middle;
}

.option-group .inline-label {
    display: inline-block; 
    margin-bottom: 0; 
    font-weight: normal; 
    vertical-align: middle;
}