.warningBar {
  background-color: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 16px;
  color: #d48806;
  font-size: 14px;
}

.dictionaryCard {
  height: 100%;
  
  :global {
    .ant-card-body {
      padding: 12px;
      height: calc(100% - 57px);
      overflow-y: auto;
    }
  }
}

.detailCard {
  height: 100%;
  margin-left: 16px;
  
  :global {
    .ant-card-body {
      padding: 16px;
      height: calc(100% - 57px);
      overflow-y: auto;
    }
  }
}

.dictionaryItem {
  cursor: pointer;
  padding: 12px 8px !important;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: #f5f5f5;
  transition: all 0.3s;
  
  &:hover {
    background-color: #e6f7ff;
  }
  
  &.selected {
    background-color: #1890ff;
    color: #fff;
    
    .itemType {
      background-color: rgba(255, 255, 255, 0.2);
      border-color: rgba(255, 255, 255, 0.3);
      color: #fff;
    }
    
    .exportIcon,
    .editIcon,
    .deleteIcon {
      color: #fff !important;
    }
  }
  
  &.childItem {
    margin-left: 16px;
    border-left: 2px solid #91d5ff;
  }
}

.itemContent {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.childPrefix {
  color: #999;
  margin-right: 4px;
  font-size: 12px;
}

.itemName {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.itemType {
  flex-shrink: 0;
}

.exportIcon {
  color: #52c41a !important;
  cursor: pointer;
  
  &:hover {
    opacity: 0.8;
  }
}

.editIcon {
  color: #1890ff !important;
  cursor: pointer;
  
  &:hover {
    opacity: 0.8;
  }
}

.deleteIcon {
  color: #ff4d4f !important;
  cursor: pointer;
  
  &:hover {
    opacity: 0.8;
  }
}

.emptyTip {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #999;
  font-size: 14px;
}

// 暗色模式适配
:global(.ant-layout-content[data-theme='dark']) {
  .warningBar {
    background-color: #2b2111;
    border-color: #594214;
    color: #d89614;
  }
  
  .dictionaryItem {
    background-color: #1f1f1f;
    
    &:hover {
      background-color: #111d2c;
    }
    
    &.selected {
      background-color: #177ddc;
    }
  }
}

// 拖拽上传区域
.dragUploadArea {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
  
  &:hover {
    border-color: #1890ff;
    background-color: #e6f7ff;
  }
  
  &.isDragging {
    border-color: #1890ff;
    background-color: #e6f7ff;
    transform: scale(1.02);
  }
}
