.python-editor-container {
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.python-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #282a36;
    border-bottom: 1px solid #44475a;
}

.python-editor-title {
    font-weight: 600;
    color: #4EC9B0;
    font-size: 0.875rem;
}

.python-editor-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.python-loading {
    color: #f8f8f2;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #44475a;
    border-top-color: #4EC9B0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.python-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.python-btn-primary {
    background: #4CAF50;
    color: white;
}

.python-btn-primary:hover {
    background: #45a049;
}

.python-btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
}

.python-editor-wrapper {
    position: relative;
}

.python-editor-wrapper .CodeMirror {
    height: auto;
    min-height: 150px;
    max-height: 500px;
    font-size: 14px;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    overflow-y: hidden;
}

.python-editor-wrapper .CodeMirror-scroll {
    overflow-y: hidden;
    min-height: 150px;
}

.python-editor-wrapper .CodeMirror-gutters {
    background: #282a36 !important;
}

.python-output-container {
    border-top: 1px solid var(--border);
    position: relative;
}

.python-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.python-output {
    margin: 0;
    padding: 1rem;
    background: #1e1e1e;
    color: #a2d9b1;
    font-size: 14px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.python-error {
    margin: 0;
    padding: 1rem;
    background: #ffebee;
    color: #c53030;
    font-size: 14px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    border-left: 4px solid #c53030;
}