/* Layout principal del editor */
.editor-container {
    display: none;
    height: 100vh;
    width: 100%;
}

.editor-container.visible {
    display: block;
}

.editor-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Panel lateral */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.user-info {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 25px;
}

.user-info #userName {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.components-list {
    list-style: none;
    margin-bottom: 20px;
}

.component-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: move;
    transition: all 0.3s;
    border: 2px dashed transparent;
}

.component-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
    transform: translateX(5px);
}

/* Nuevos estilos para el sistema de columnas */
.layout-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.layout-option {
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
}

.layout-option:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.2);
}

.layout-preview {
    display: flex;
    height: 30px;
    margin-bottom: 8px;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.layout-column {
    background: var(--primary);
    height: 20px;
    border-radius: 2px;
}

/* Área principal de contenido */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f8f9fa;
}

/* Barra superior */
.topbar {
    background: white;
    padding: 0 25px;
    height: var(--topbar-height);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-info {
    flex: 1;
}

.project-info input {
    border: none;
    font-size: 18px;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
    background: #f8f9fa;
    transition: all 0.3s;
}

.project-info input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px var(--primary);
}

.device-buttons {
    display: flex;
    gap: 8px;
    margin: 0 20px;
}

.device-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.device-btn:hover {
    background: #e9ecef;
}

.device-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

/* Área del editor */
.editor-area {
    flex: 1;
    padding: 25px;
    overflow: auto;
    background: #f8f9fa;
}

.editor-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    height: 100%;
    position: relative;
    overflow: auto;
    padding: 20px;
}

.editor {
    min-height: 100%;
    position: relative;
}

/* Sistema de columnas */
.column-system {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    min-height: 200px;
}

.column {
    flex: 1;
    min-height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
    transition: all 0.3s;
    position: relative;
}

.column:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.column-placeholder {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 14px;
}

/* Nuevos estilos para las mejoras */
.context-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 10px 0;
    min-width: 150px;
    display: none;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #f0f4ff;
}

.column-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    z-index: 10;
}

.column-resize-handle-left {
    left: -4px;
}

.column-resize-handle-right {
    right: -4px;
}

.column-size-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    z-index: 5;
}