:root {
    --primary-color: #4a6ee0;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --border-color: #dee2e6;
    --hover-color: #e9ecef;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}



.smart-editor {
    max-width: 1000px;
    margin: 20px auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.editor-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.toolbar-group {
    display: flex;
    gap: 2px;
    margin-right: 10px;
    border-right: 1px solid var(--border-color);
    padding-right: 10px;
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar button {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--secondary-color);
    cursor: pointer;
    height: 34px;
    width: 34px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.toolbar button:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

.toolbar button.active {
    background-color: var(--primary-color);
    color: white;
}

.toolbar select {
    height: 34px;
    padding: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

.toolbar input[type="color"] {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

.editor-content {
    padding: 20px;
    position: relative;
}

.content-area {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    overflow-y: auto;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.content-area:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 110, 224, 0.25);
}

.content-area img {
    max-width: 100%;
    height: auto;
}

.content-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.content-area td, .content-area th {
    border: 1px solid var(--border-color);
    padding: 8px;
    position: relative;
}

.resizer {
    width: 5px;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    position: absolute;
    right: 0;
    top: 0;
    cursor: col-resize;
}

.resize-handle, .move-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.resize-handle {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}

.move-handle {
    top: 0;
    left: 0;
    cursor: move;
}

.image-wrapper {
    display: inline-block;
    position: relative;
}

.image-controls {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    display: none;
}

.image-wrapper:hover .image-controls,
.image-wrapper.active .image-controls {
    display: flex;
}

.image-controls button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--dark-color);
    margin: 2px;
}

.image-controls button:hover {
    color: var(--primary-color);
}

.beautiful-editor {
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.05);
}

.beautiful-editor .toolbar {
    background: linear-gradient(to right, #4a6ee0, #7a54ff);
    border-bottom: none;
    padding: 12px 15px;
}

.beautiful-editor .toolbar button {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 6px;
    transition: all 0.3s;
}

.beautiful-editor .toolbar button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.beautiful-editor .toolbar button.active {
    background-color: white;
    color: var(--primary-color);
}

.beautiful-editor .toolbar-group {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.beautiful-editor .content-area {
    border: none;
    padding: 25px;
    background-color: white;
    box-shadow: none;
}

.beautiful-editor .editor-header {
    background: linear-gradient(to right, #4a6ee0, #7a54ff);
    padding: 20px 25px;
    border-bottom: none;
}

.beautiful-editor .editor-title {
    color: white;
    font-weight: 500;
}

/* Status bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 8px 15px;
    background-color: var(--light-color);
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--secondary-color);
}

/* Dialogs */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.dialog {
    background-color: white;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.dialog-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-title {
    font-size: 18px;
    font-weight: 500;
}

.dialog-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--secondary-color);
}

.dialog-content {
    padding: 20px;
}

.dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.btn {
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
}