.html-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;
}

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

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

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

.html-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.html-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;
}

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

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

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

.html-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;
}

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

.html-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;
}

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

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

.html-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;
}

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

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

.html-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;
}

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

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

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

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

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

.html-editor-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-weight: 500;
    font-size: 12px;
    flex-shrink: 0;
    height: 62px;
}

.html-editor-preview-header span {
    font-size: 16px;
    font-weight: 500;
}

.html-editor-refresh-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.html-editor-refresh-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.html-editor-preview-frame {
    flex: 1;
    border: none;
    background: white;
    min-height: 0;
}

.html-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;
}

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

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

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

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

.html-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;
}

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

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

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

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

.html-editor-form-group select,
.html-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

