.flex-centered{
    display: flex;
    justify-content: center;
    align-items: center;
}

section{
    padding: 50px 20px;
}

section:nth-child(odd) {
    background: #f1f1f1;
}

section:nth-child(even) {
    background: #7d47de;
    color: white;
}

.add-section-form {
    width: 100%;
    height: 3px;
    background: #7d47de;
    position: relative;
    margin: 30px 0;
}

.add-section-form div button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: #7d47de;
    border: none;
    padding: 7px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: .3s;
}

.add-section-form div button:hover{
    background: #5c389e;
}

.add-element-toggle-btn {
    background: var(--bg-dark);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    border: none;
    padding: 7px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 5px 0 black;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.add-element-toggle-btn:hover {
    background: #4a3374;
}

.add-element-types {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 50px 20px 30px 20px;
}

.add-element-types form {
    margin: 0;
}

.add-element-types.hidden {
    display: none;
}

.element-type-btn {
    border: none;
    padding: 10px 15px;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    width: 200px;
    height: 70px;
    background: #5c389e;
    display: grid;
    align-content: space-evenly;
    justify-content: center;
    align-items: center;
    justify-items: center;
    color: #f1f1f1;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 3px 0px black;
    z-index: 3;
}

.element-type-btn:hover {
    background: #5c389e;
}

.element-type-btn i {
    font-size: 20px;
    margin-right: 5px;
    padding: 3px;
}

.element-type-btn p {
    white-space: nowrap;
}

section:nth-child(even) .add-element-types{
    background: #f1f1f1;
}

section:nth-child(odd) .add-element-types{
    background: #7d47de;
}

section:nth-child(even) .element-type-btn{
    background: #7d47de;
    color: #f1f1f1;
}

section:nth-child(odd) .element-type-btn{
    background: #ededed;
    color: black;
}

section:nth-child(even) .div-add-element-form:hover:after {
    box-shadow: 0 0 0 2px #5c389e;
}

section:nth-child(odd) .div-add-element-form:hover:after {
    box-shadow: 0 0 0 2px #f1f1f1;
}

.div-add-element-toggle-btn{
    width: 100%;
    height: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.div-add-element-form {
    position: relative;
    cursor: pointer;
    transition-timing-function: ease-in-out;
    transition-duration: .2s;
    transition-property: transform;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.div-add-element-form:after {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 0;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 0;
    box-shadow: 0 0 0 8px rgba(0, 76, 237, 0);
    transition: all .2s .05s;
    content: "";
}

.div-add-element-form:hover:after {
    position: absolute;
    top: -2px;
    left: -2px;
    z-index: 0;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    transition: all .2s 0s;
    content: "";
}

.add-element-type-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    background: black;
    padding: 5px;
    color: #fff;
    transition: .3s ease;
    transform: translateY(100%);
}

.add-element-form:hover .add-element-type-btn {
    transform: translateY(0);
}

i.bi.bi-plus-lg {
    color: white;
    margin-right: 5px;
}

section{
    position: relative;
}

.actions {
    background: #475560;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    right: 0;
}

i.bi.bi-trash {
    background-color: #e4515e !important;
}

i.bi.bi-trash:hover {
    background-color: #bb2d3b !important;
    color: #fff !important;
}

.actions i {
    margin: 0;
    padding: 0 5px;
    color: #fff !important;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    cursor: pointer;
    transition: .3s;
}

i.bi.bi-arrows-expand {
    cursor: n-resize;
}

.actions i:hover {
    background: #34424e;
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.element{
    position: relative;
    margin: 40px 0;
}

.element:hover, .element.active{
    box-shadow: 0 0 0 2px var(--bg-dark);
    border-radius: 0 2px 2px 2px;
    cursor: pointer;
}

.element.active:hover{
    cursor: default;
}

.element:hover .edit-element,
.element.active .edit-element {
    display: grid;
}

.edit-element{
    position: absolute;
    top: -2px;
    left: -35px;
    width: 35px;
    display: none;
    background-color: var(--bg-dark);
    border-radius: 5px 0 0 5px;
    overflow: hidden;
    /* padding: 5px 0 10px 0; */
}

.edit-element form{
    display: grid;
    cursor: pointer;
    width: 100%;
    height: 35px;
    align-content: center;
    justify-items: center;
    margin: 0;
}

.edit-element form button{
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
    width: 100%;
    height: 35px;
    cursor: pointer;
}

.edit-element form i{
    margin: 0;
    color: white;
    width: 100%;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.edit-element form i.bi-caret-up-fill:hover,
.edit-element form i.bi-caret-down-fill:hover {
    color: var(--primary-color);
}

.edit-element form i:hover {
    background: #353535;
}

.edit-element form i.bi-trash-fill{
    color: #dd303f;
}

.add-element-types {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.element-types-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sub-element-options {
    border-top: 1px solid #ccc;
    padding-top: 15px;
}

.form-sub-elements {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sub-element-btn {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 200px;
    position: relative;
}

.sub-element-btn:hover {
    background-color: #e6e6e6;
}

.div-add-element-form.hidden {
    display: none !important;
}

.position-relative {
    position: relative;
}

.container-content-editor textarea {
    min-width: 100%;
}

textarea {
    overflow: hidden;
    resize: none;
    line-height: 1.4;
}

.active > svg path {
    fill: #00d0fe!important;
}

.panel-edit{
    width: 100%;
    height: 50px;
    background: #404040;
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel-edit i {
    color: white;
    font-size: 20px;
}

.panel-edit-section{
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    border-radius: 5px;
    margin: 1px;
}

.panel-edit button{
    border: none;
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 40px;
    margin: 0;
    padding: 0;
    transition: .4s;
    border-radius: 5px;
}

.panel-edit button:hover{
    cursor: pointer;
    background: #7d47dea6;
}

.editor-button.active{
    background: var(--primary-color);
}

.font-family-menu, .font-size-menu, .color-select-menu{
    display: grid;
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(calc(-50% - 10px));
    background: var(--bg-dark);
    align-content: center;
    justify-items: center;
    white-space: nowrap;
    padding: 10px;
    margin: 10px;
}

.font-family-menu button, .font-size-menu button, .color-select-menu button{
    color: white;
}

.font-size-menu button {
    height: fit-content !important;
    padding: 5px !important;
}

.font-family-option, .font-size-option {
    width: 100% !important;
}

.panel-save{
    background: var(--bg-dark);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.panel-save button{
    background: var(--info-color);
    border: none;
    border-radius: 3px;
    padding: 5px;
    margin: 5px;
    color: white;
    font-size: 17px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel-save button:hover{
    background: var(--info-color-hover);
    cursor: pointer;
}

.panel-save button i{
    margin-right: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-editor{
    padding: 5px;
    min-height: fit-content;
    outline: none;
    /* background: #f1f1f1; */
}
.modal-content .text-editor{
    min-height: 50vh;
}

.container-color-select,
.container-family-select {
    width: fit-content;
}

.content-color-select {
    display: flex;
}

.carre-color-select {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: none !important;
}

.carre-color-select:hover {
    transform: scale(1.2);
    transition: all 0.2s !important;
    box-shadow: 0 0 0 1px black;
}

.carre-color-select:hover:after {
    content: attr(data-name-color);
    font-size: 12px;
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    border: 1px solid;
    white-space: nowrap;
    background: black;
    color: white;
    padding: 5px;
    z-index: 2;
}

.content-family-select {
    display: grid;
}

.content-family-select button,
.content-size-select button {
    text-align: left;
    color: black;
    background: none;
    outline: none;
    border: none;
    position: relative;
    white-space: nowrap;
    height: 25px;
    margin: 0;
}

.content-family-select button:hover,
.content-size-select button:hover,
.content-size-select button:hover {
    background: #f5f5f5;
}

.container-size-select {
    width: fit-content;
}
.content-size-select {
    display: grid;
}

.content-size-select button {
    background: none;
    outline: none;
    border: none;
    width: 100px;
    height: 25px;
    font-size: 16px;
}

.resize-handle {
    height: 8px;
    width: 100%;
    cursor: ns-resize;
    background-color: #000;
}

.modal .text-editor {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    background: #fff;
    scroll-behavior: smooth;
}

.modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

.hidden {
    display: none!important;
}

.editor-panel{
    padding-top: 30px;
}

.type-item {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    margin: 0;
    margin: 0 10px 10px 10px;
    border-radius: 8px;
    transition: background 0.3s;
    color: white;
    display: grid;
    align-content: center;
    justify-items: center;
    width: 110px;
    min-width: 110px;
    height: 80px;
}

.type-item p {
    margin: 0;
    white-space: nowrap;
}

.type-item i {
    font-size: 40px;
    display: block;
    color: white;
    margin: 0;
}

.type-item:hover {
    background: #f0f0f021;
}

.type-item.active {
    background: var(--primary-color);
}

.element-group {
    display: none;
}

.element-group.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
}

.element-buttons{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin-top: 20px;
}

.container-element-buttons{
    display: flex;
    justify-content: center;
    align-items: center;
}

.element-group {
    border-top: 1px solid #f1f1f1;
    width: 100%;
    height: auto;
}

.element-btn {
    width: 160px;
    height: 130px;
    display: grid;
    align-content: space-between;
    justify-items: center;
    padding: 0;
    border: 0;
    margin: 5px;
    border-radius: 7px;
    overflow: hidden;
}

.element-btn:hover {
    box-shadow: 0 0 0px 3px #7d47de;
    cursor: pointer;
}

.element-btn-prev{
    font-size: 6px;
    width: 140px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.element-btn-desc{
    width: 100%;
    height: 40px;
    margin: 0;
    background: var(--primary-color);
    color: #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* === MODAL STYLES === */
.modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    background-color: #1e1e1e;
    border-radius: 10px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
}

/* === ELEMENT TYPES === */
.type-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.type-item {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 90px;
}

.type-item i {
    font-size: 40px;
    color: white;
}

.type-item:hover {
    background: rgba(240, 240, 240, 0.15);
}

.type-item.active {
    background: var(--primary-color);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


<style>
.container-content-editor {
    display: grid;
    justify-items: center;
    align-content: center;
}
.full-media {
    display: block;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.edit-media-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 600px;
    margin-top: 10px;
}
.edit-media-wrapper input,
.edit-media-wrapper select {
    width: 100%;
    padding: 6px 10px;
    font-size: 1rem;
}
.resizable-media {
    position: relative;
    overflow: auto;
    border: 2px solid var(--info-color);
    min-width: 10%;
    border-radius: 10px;
    overflow: hidden;
}
.resize-button {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 23px;
    height: 20px;
    background: var(--info-color);
    cursor: ew-resize;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>