.code-container {
    position: relative;
}

.code-output-toggle {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.code-output-toggle:hover {
    background-color: #e0e0e0;
}

.code-output {
    display: none;
    background-color: #f9f9f9;
    border-left: 3px solid #007bff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.code-output.visible {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.output-diagram img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.output-content {
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    tab-size: 4;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.output-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.output-content pre, .output-content code {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin: 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
