/* 文件浏览器通用样式（Windows 风格） */

.file-browser-container {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  overflow: hidden;
  height: 600px;
  display: flex;
  flex-direction: column;
}

.file-browser-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* 左侧文件夹树 */
.file-browser-sidebar {
  width: 250px;
  min-width: 250px;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
}

.file-browser-sidebar .sidebar-header {
  padding: 0.75rem 1rem;
  background: var(--glass-bg-hover);
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.folder-tree {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  font-size: 0.8rem;
}

.folder-tree-node {
  position: relative;
}

.folder-tree-item {
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  transition: background 0.15s;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-tree-item:hover {
  background: var(--glass-bg-hover);
}

.folder-tree-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}

/* 展开/收起箭头 */
.folder-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  border-radius: 3px;
  transition: all 0.15s;
}

.folder-toggle:hover {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
}

.folder-toggle i {
  font-size: 0.65rem;
  transition: transform 0.15s;
}

.folder-toggle-placeholder {
  width: 16px;
  flex-shrink: 0;
}

/* 文件夹/文件内容区域 */
.folder-tree-content {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.folder-tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 子节点容器 */
.folder-tree-children {
  position: relative;
}

/* 文件项样式 */
.folder-tree-item.file-item {
  color: var(--text-secondary);
}

.folder-tree-item.file-item:hover {
  color: var(--text-primary);
}

/* 右侧主区域 */
.file-browser-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-browser-toolbar {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.file-browser-breadcrumb {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.file-browser-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--glass-bg);
}

/* 文件列表网格视图（Windows 风格） */
.file-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  padding: 1rem;
  align-content: start;
}

.file-item {
  padding: 0.75rem 0.5rem;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100px;
  background: transparent;
}

.file-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-item.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.file-item-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.file-item:hover .file-item-icon {
  transform: scale(1.1);
}

.file-item-name {
  font-size: 0.75rem;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  max-width: 100%;
  color: var(--text-primary);
  margin-top: 0.25rem;
  text-align: center;
}

.file-item.selected .file-item-name {
  color: var(--primary);
  font-weight: 500;
}

.file-item-size {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* 通用右键菜单样式 */
.context-menu {
  position: fixed;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--glass-shadow);
  padding: 0.375rem 0;
  min-width: 200px;
  z-index: 1050;
  display: none;
  font-size: 0.875rem;
}

.context-menu-item {
  padding: 0.625rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--text-primary);
  transition: all 0.2s;
  user-select: none;
}

.context-menu-item:hover {
  background: var(--glass-bg-hover);
  color: var(--primary);
}

.context-menu-item.text-danger {
  color: var(--danger);
}

.context-menu-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.context-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  margin: 0.375rem 0.5rem;
}












