.python-editor-container {
    display: flex;
    height: 600px;
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-bottom: 50px;
}

.python-editor-container.python-editor-vertical-layout {
    flex-direction: column;
}

.python-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #252526;
    border-right: 1px solid #3e3e42;
    min-width: 200px;
}

.python-editor-container.python-editor-vertical-layout .python-editor-panel {
    border-right: none;
    border-bottom: 1px solid #3e3e42;
    min-height: 200px;
    min-width: auto;
}

.python-editor-resize-handle {
    background: #3e3e42;
    cursor: col-resize;
    width: 6px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.python-editor-resize-handle::before {
    content: '';
    width: 2px;
    height: 20px;
    background: #6a6a6a;
    border-radius: 1px;
    transition: all 0.2s ease;
}

.python-editor-resize-handle:hover {
    background: #6E00FF;
    width: 8px;
}

.python-editor-resize-handle:hover::before {
    background: #ffffff;
    height: 24px;
}

html.resizing {
    cursor: col-resize !important;
}

html.resizing-vertical {
    cursor: row-resize !important;
}

html.resizing .python-editor-resize-handle,
html.resizing-vertical .python-editor-resize-handle {
    background: #6E00FF !important;
    width: 8px !important;
}

html.resizing .python-editor-resize-handle::before,
html.resizing-vertical .python-editor-resize-handle::before {
    background: #ffffff !important;
    height: 24px !important;
}

html.resizing-vertical .python-editor-resize-handle {
    height: 8px !important;
}

html.resizing-vertical .python-editor-resize-handle::before {
    width: 24px !important;
    height: 2px !important;
}

html.resizing *,
html.resizing-vertical * {
    pointer-events: none !important;
}

html.resizing .python-editor-resize-handle,
html.resizing-vertical .python-editor-resize-handle {
    pointer-events: auto !important;
}

.python-editor-container.python-editor-vertical-layout .python-editor-resize-handle {
    cursor: row-resize;
    width: 100%;
    height: 6px;
}

.python-editor-container.python-editor-vertical-layout .python-editor-resize-handle::before {
    width: 20px;
    height: 2px;
}

.python-editor-container.python-editor-vertical-layout .python-editor-resize-handle:hover {
    height: 8px;
}

.python-editor-container.python-editor-vertical-layout .python-editor-resize-handle:hover::before {
    width: 24px;
    height: 2px;
}

.python-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d30;
    padding: 8px 12px;
    border-bottom: 1px solid #3e3e42;
    flex-shrink: 0;
}

.python-editor-tabs-container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    flex: 1;
    margin-right: 12px;
}

.python-editor-tab {
    display: flex;
    align-items: center;
    background: #3c3c3c;
    color: #cccccc;
    padding: 6px 12px;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.python-editor-tab:hover {
    background: #4a4a4a;
}

.python-editor-tab.python-editor-active {
    background: #1e1e1e;
    color: #ffffff;
}

.python-editor-tab-name {
    font-size: 12px;
    font-weight: 500;
}

.python-editor-tab-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.python-editor-tab-close:hover {
    background: #e74c3c;
    color: white;
}

.python-editor-add-tab-btn {
    background: #6E00FF;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.python-editor-add-tab-btn:hover {
    background: #6001da;
}

.python-editor-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.python-editor-toolbar-btn {
    background: #3c3c3c;
    border: none;
    color: #cccccc;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.python-editor-toolbar-btn:hover {
    background: #4a4a4a;
    color: #ffffff;
}

.python-editor-toolbar-btn i {
    font-size: 14px;
}

.python-editor-toolbar-run-btn {
    background: #6E00FF;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 500;
}

.python-editor-toolbar-run-btn:hover {
    background: #5a00d6;
}

.python-editor-content {
    flex: 1;
    position: relative;
    min-height: 0;
}

.python-editor-monaco-editor {
    height: 100%;
    width: 100%;
}

.python-editor-output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    min-width: 200px;
}

.python-editor-container.python-editor-vertical-layout .python-editor-output-panel {
    min-height: 200px;
    min-width: auto;
}

.python-editor-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d30;
    padding: 8px 12px;
    color: #ffffff;
    font-weight: 500;
    font-size: 12px;
    flex-shrink: 0;
    height: 62px;
}

.python-editor-output-header span {
    font-size: 16px;
    font-weight: 500;
}

.python-editor-clear-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.2s ease;
    font-size: 16px;
    height: 35px;
    width: 35px;
}

.python-editor-clear-btn:hover {
    background: #464646;
    color: #ffffff;
}

.python-editor-output-frame {
    flex: 1;
    background: #1e1e1e;
    color: #ffffff;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    padding: 0;
    overflow-y: auto;
    min-height: 0;
    white-space: pre;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
}

.python-editor-output-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
    padding: 16px;
    overflow: hidden;
}

.python-editor-output-placeholder h3 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
}

.python-editor-output-content {
    margin: 0;
    padding: 16px;
    line-height: 1.5;
}

.python-editor-output-error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin: 8px 8px;
    border-left: 4px solid #ff6b6b;
}

.python-editor-output-success {
    color: #51cf66;
    background: rgba(81, 207, 102, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    border-left: 4px solid #51cf66;
}

.python-editor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.python-editor-modal-overlay.python-editor-active {
    display: flex;
}

.python-editor-modal {
    background: #2d2d30;
    border-radius: 8px;
    width: 400px;
    color: #cccccc;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.python-editor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #3e3e42;
}

.python-editor-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
}

.python-editor-modal-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.python-editor-modal-close:hover {
    background: #e74c3c;
    color: white;
}

.python-editor-modal-body {
    padding: 20px;
}

.python-editor-form-group {
    margin-bottom: 16px;
}

.python-editor-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #ffffff;
}

.python-editor-form-group select,
.python-editor-form-group input {
    width: 100%;
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #5a5a5a;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
}

.python-editor-form-group select:focus,
.python-editor-form-group input:focus {
    outline: none;
    border-color: #6500FF;
}

#python-editor-file-type option {
    background: #252526;
    color: #cccccc;
}

.python-editor-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #3e3e42;
}

.python-editor-btn-secondary,
.python-editor-btn-primary {
    padding: 8px 16px 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.python-editor-btn-secondary {
    background: #6c6c6c;
    color: white;
}

.python-editor-btn-secondary:hover {
    background: #7a7a7a;
}

.python-editor-btn-primary {
    background: #6500FF;
    color: white;
}

.python-editor-btn-primary:hover {
    background:  #5a00d6;
}

.python-editor-btn-danger {
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    padding: 8px 16px;
}

.python-editor-btn-danger:hover {
    background: #c0392b;
}

.python-editor-loading-spinner {
    text-align: center;
    padding: 20px;
}

.python-editor-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #3e3e42;
    border-top: 4px solid #6E00FF;
    border-radius: 50%;
    animation: python-editor-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes python-editor-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.python-editor-loading-spinner p {
    margin: 0;
    color: #cccccc;
    font-size: 14px;
}

.python-editor-retry-btn {
    background: #6E00FF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.python-editor-retry-btn:hover {
    background: #5a00d6;
}

@media (max-width: 991px) {
    .python-editor-container {
        flex-direction: column;
        height: auto;
        min-height: 500px;
    }

    .python-editor-container.python-editor-vertical-layout {
        flex-direction: column;
    }

    .python-editor-panel {
        border-right: none;
        border-bottom: 1px solid #3e3e42;
        min-height: 300px;
        flex: none;
        height: 320px;
        overflow-y: auto;
    }

    .python-editor-output-panel {
        flex: 1;
        min-height: 200px;
        height: 320px;
        overflow-y: auto;
    }

    .python-editor-content {
        min-height: 0;
        height: 100%;
        overflow-y: auto;
    }

    .python-editor-monaco-editor {
        height: 100% !important;
        min-height: 200px;
        max-height: 320px;
        overflow-y: auto;
    }

    .python-editor-output-frame {
        min-height: 200px;
        max-height: 320px;
        height: 100%;
        overflow-y: auto;
    }

    .python-editor-resize-handle {
        cursor: row-resize;
        width: 100%;
        height: 4px;
    }

    .python-editor-tabs-container {
        overflow-x: auto;
        max-width: 200px;
    }

    .python-editor-toolbar-actions {
        gap: 4px;
    }

    .python-editor-toolbar-actions .python-editor-toolbar-btn {
        padding: 6px;
    }

    .python-editor-toolbar-run-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .python-editor-modal {
        width: 90%;
        max-width: 400px;
        margin: 20px;
    }

    .python-editor-toolbar-btn-layout {
        display: none;
    }

    .python-editor-resize-handle {
        display: none;
    }
}

@media (max-width: 768px) {
    .python-editor-toolbar-actions {
        flex-wrap: wrap;
    }

    .python-editor-tabs-container {
        max-width: 150px;
    }

    .python-editor-tab {
        padding: 4px 8px;
    }

    .python-editor-tab-name {
        font-size: 11px;
    }
}